From 70d783cc5e2466b2cc589669e420657eab5948f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Mu=CC=88ller?= Date: Sat, 20 Aug 2011 19:42:09 +0200 Subject: [PATCH 1/2] sprites are workin!! --- data/gfx/tileset01.bmp | Bin 49180 -> 49208 bytes data/gfx/tileset01.jpg | Bin 36078 -> 0 bytes data/gfx/tileset01.png | Bin 3959 -> 0 bytes escape.pbp | 24 +++++++++++---------- spritetest.pbp | 20 ++++++++++++++++++ src/Draw.pbi | 46 ++++++++++++++++++++++------------------- src/Functions.pbi | 2 +- src/Globals.pbi | 9 +++----- src/Main.pb | 4 ++-- 9 files changed, 64 insertions(+), 41 deletions(-) delete mode 100644 data/gfx/tileset01.jpg delete mode 100644 data/gfx/tileset01.png create mode 100644 spritetest.pbp diff --git a/data/gfx/tileset01.bmp b/data/gfx/tileset01.bmp index 9ce510b8ee0a4fa24722cc402ff5b3335785f609..0ee909e12f3a977968f1c65eded4036194b1dbaf 100644 GIT binary patch delta 72 zcmbQ!z`Ub@+0@C`;s65}m;p%*AZ~zSMg|EWi-CdZ00V;%Hw1$P7#KDhW-?9;kk~wn Hv1uOwklzbk delta 44 scmdndz&xjcS<=Z@<^Tg2NC8P6AZ`FcMh1zEj-`wf6L>anV{F<70M7afEdT%j diff --git a/data/gfx/tileset01.jpg b/data/gfx/tileset01.jpg deleted file mode 100644 index 595773ce1abfac9bb72545e9c50bd104aacbca59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36078 zcmeG^2Ut_f(wjo>RY8;xswlmKNJo$=MGKKpAr$-plsXXM!vI8}#tgwRD1!kSG^8;DFa$Vwvry)ISQ)|@X%v8k zPsjxvhWC9S+4~3pefhzs3yBdy#sx+*I1F|)gNbtswlX%u`4NZ|I)VY_ref*pfQ7q z@&JWJVbEB#h?uCj2u9ihCMsaCT8d^OF4G7~__(F!qRN~07P)Hcs03Y(u&`t;yXPjR zn-Sdp>?4tFrJ8$Uxt{yx5R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+ + - + + + + + @@ -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) From b09169256b6b7aa905ed44612d8e950d227c94e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Mu=CC=88ller?= Date: Sat, 20 Aug 2011 19:44:21 +0200 Subject: [PATCH 2/2] key fix --- src/Events.pbi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Events.pbi b/src/Events.pbi index 6027240..83fe572 100644 --- a/src/Events.pbi +++ b/src/Events.pbi @@ -41,7 +41,7 @@ Procedure HandleEventMenu() EndProcedure Procedure HandleEventRunningGame() - If KeyboardReleased(#PB_Key_F10) + If KeyboardReleased(#PB_Key_Q) CurrentState = "MAIN_MENU" *ActiveMenu.GameMenu = Menus(CurrentState) EndIf