diff --git a/data/gfx/tileset01.bmp b/data/gfx/tileset01.bmp
index 9ce510b..0ee909e 100644
Binary files a/data/gfx/tileset01.bmp and b/data/gfx/tileset01.bmp differ
diff --git a/data/gfx/tileset01.jpg b/data/gfx/tileset01.jpg
deleted file mode 100644
index 595773c..0000000
Binary files a/data/gfx/tileset01.jpg and /dev/null differ
diff --git a/data/gfx/tileset01.png b/data/gfx/tileset01.png
deleted file mode 100644
index 277c924..0000000
Binary files a/data/gfx/tileset01.png and /dev/null differ
diff --git a/escape.pbp b/escape.pbp
index 05a6110..6adccfc 100644
--- a/escape.pbp
+++ b/escape.pbp
@@ -10,28 +10,28 @@
-
-
-
-
-
+
-
+
-
-
+
+
-
+
+
+
+
+
@@ -42,8 +42,10 @@
+
-
+
+
diff --git a/spritetest.pbp b/spritetest.pbp
new file mode 100644
index 0000000..46f2a13
--- /dev/null
+++ b/spritetest.pbp
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
diff --git a/src/Draw.pbi b/src/Draw.pbi
index 33ba040..eb9fd8b 100644
--- a/src/Draw.pbi
+++ b/src/Draw.pbi
@@ -7,31 +7,35 @@
; the dispatcher. The events are controlled by the
; HandleEventMenu() function.
Procedure DrawMenu()
- Define Black = RGB(0, 0, 0)
- Define White = RGB(255, 255, 255)
- Define ActiveMenuItemColor = RGB(255, 0, 0)
-
- DrawingFont(Font_H1)
- DrawText(50, 50, *ActiveMenu\Title, white, black)
-
- Define Offset = 0
- Define FontColor = White
- ForEach *ActiveMenu\Entries()
- If *ActiveMenu\Entries()\Selected
- FontColor = ActiveMenuItemColor
- Else
- FontColor = White
- EndIf
+ StartDrawing(ScreenOutput())
+ Define Black = RGB(0, 0, 0)
+ Define White = RGB(255, 255, 255)
+ Define ActiveMenuItemColor = RGB(255, 0, 0)
- DrawingFont(Font_H2)
- DrawText(50, 300+(Offset*30), *ActiveMenu\Entries()\Label, FontColor, Black)
- Offset = Offset+1
- Next
+ DrawingFont(Font_H1)
+ DrawText(50, 50, *ActiveMenu\Title, white, black)
+
+ Define Offset = 0
+ Define FontColor = White
+ ForEach *ActiveMenu\Entries()
+ If *ActiveMenu\Entries()\Selected
+ FontColor = ActiveMenuItemColor
+ Else
+ FontColor = White
+ EndIf
+
+ DrawingFont(Font_H2)
+ DrawText(50, 300+(Offset*30), *ActiveMenu\Entries()\Label, FontColor, Black)
+ Offset = Offset+1
+ Next
+ StopDrawing()
EndProcedure
Procedure DrawRunningGame()
- ;Box(0, 0, 200, 200, RGB(0, 255, 0))
+ StartDrawing(ScreenOutput())
+ Box(0, 0, 200, 200, RGB(0, 255, 0))
+ StopDrawing()
- DrawImage(ImageID(#Tile01), 20, 20)
+ DisplaySprite(Tile01, 20, 20)
EndProcedure
diff --git a/src/Functions.pbi b/src/Functions.pbi
index 2f2e9d3..b6e0f6f 100644
--- a/src/Functions.pbi
+++ b/src/Functions.pbi
@@ -4,7 +4,7 @@
; *****************************************************************************
; * Tileset
Procedure InitTileset()
-
+ Tile01 = LoadSprite(#PB_Any, "../data/gfx/tileset01.bmp")
;ClipSprite(#Tile01, 0, 0, 16, 16)
EndProcedure
diff --git a/src/Globals.pbi b/src/Globals.pbi
index fd6e8bd..fe8404f 100644
--- a/src/Globals.pbi
+++ b/src/Globals.pbi
@@ -17,6 +17,8 @@ Global Font_H1 = LoadFont(1, "Courier", 40, #PB_Font_Bold)
Global Font_H2 = LoadFont(2, "Verdana", 18)
; Graphics
+Global Tile01.i
+
Enumeration 500
#Tile01
#Tile02
@@ -28,9 +30,4 @@ EndEnumeration
; Sounds
LoadSound(0, #DATA_PATH + "sound/menu_change.wav")
-LoadSound(1, #DATA_PATH + "sound/menu_select.wav")
-
-: Images
-UseJPEGImageDecoder()
-Debug LoadImage(#Tile01, #DATA_PATH+"gfx/tileset01.jp")
-
+LoadSound(1, #DATA_PATH + "sound/menu_select.wav")
\ No newline at end of file
diff --git a/src/Main.pb b/src/Main.pb
index 7d192a7..2bfa365 100644
--- a/src/Main.pb
+++ b/src/Main.pb
@@ -103,9 +103,9 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent
; Draw the stuff on the screen
FlipBuffers()
ClearScreen(RGB(0, 0, 0))
- If StartDrawing(ScreenOutput()) And CurrentState <> "QUIT"
+
+ If CurrentState <> "QUIT"
GameStates(CurrentState)\DrawFun()
- StopDrawing()
EndIf
Delay(1)