From 30a48990e2954d7919acc79d0f22ddc4f13f409a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruben=20Mu=CC=88ller?= Date: Sat, 20 Aug 2011 17:40:18 +0200 Subject: [PATCH] stuff --- data/gfx/flyer.bmp | Bin 0 -> 15510 bytes data/gfx/tilemap01.bmp | Bin 49208 -> 0 bytes data/gfx/tileset01.bmp | Bin 0 -> 32824 bytes data/gfx/{tilemap01.psd => tileset01.psd} | Bin src/Functions.pbi | 2 +- src/Globals.pbi | 12 +++++++++++- src/Main.pb | 10 +++++++--- 7 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 data/gfx/flyer.bmp delete mode 100644 data/gfx/tilemap01.bmp create mode 100644 data/gfx/tileset01.bmp rename data/gfx/{tilemap01.psd => tileset01.psd} (100%) diff --git a/data/gfx/flyer.bmp b/data/gfx/flyer.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7afc360a5f6f5d388f6d38183db354cd1b2b166c GIT binary patch literal 15510 zcmeI2F>Vzx5J1fZs5t^BKq*q8v~-jdIYJJQ15l(!93cmwr2GfqNGyH`y=XGl{_kBj zh_U`!qgi`q{ATQRq`d#|<+}CuZt34H&!^?NTAo+!&C<7aySzWW=IM&+ia-%40!5$* z6oHpa;HtNq-foADk@SCmMUL}hZ&|RcWhPGh%DkXwFV=;jS&+3|B;IsP@(68+ld z|H*_bz}z$-?B28)xu(Z{BpxX#GtrOdHRMPC)Y2GP6cyXKL+ zUG3`R2&oe+u$FA4>-EJXV+EObqX?JKR1xQ*;q)Mz$l1u$ba>&a!`fCAVm`&hG%R}` zk&BR`R1vf93h~zgeav-gI=t}QJu0M_m_R0bACcdXsAm+^iN7Y)178y+Aft~XpD`L# z#IxTSQcN-encim$*%{v-*yC7x^0z~4_pN>IzeV`<>&>@KG-Lb3z{tJNkYbV%$n>#V z$XD#ipzUyCp!c^1y+<-8+C;;>_t*+?w8g|UEJKF;a^{nFXO_P~Jd4wVljM7A%g?9E zlaaj$Yz_PVmiheg+@s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F zleMez^ZMJYJ^H81;UbLb>29-y?+6>)$)T{Zo782MZzo2A>7QrqsQ>K+|Cc-%P0f1b^=K^op%zy8?&i&g0Oa9ylI8l3B&XD;1&AL{a0^cw=&TmRSxThF*DHvY$c zy|)B3{qxLb?bmwFtl|F|34w5I;C-!Jc`*m?bj!ss{MM#I0| z@b%aKb^hc2x6wb^PWHavL)DLk-vOQ0!|U(=sPnS_f1l1lrhkyy?l;!lPCwTBmVRx} kf4=J5b4-HUX8&&*=b344_J3(V9r$6ZzwQ36Uw@MP1 #True FirstElement(*ActiveMenu\Entries()); ForEach *ActiveMenu\Entries() If *ActiveMenu\Entries()\Selected = #True Break EndIf Next EndIf EndProcedure ; ***************************************************************************** \ No newline at end of file +; This file holds all the functions If it gets too big, ; we can split it in categories ; ***************************************************************************** ; * Tileset Procedure InitTileset() CatchSprite(#Tile01, ?Gfx_Tileset) ;ClipSprite(0, 0, 0, 16, 16) ; test the sprite ;DisplaySprite(0, 20, 20) EndProcedure ; ***************************************************************************** ; ***************************************************************************** ; * Menu Procedure Menu_GotoCurrent() If *ActiveMenu\Entries()\Selected <> #True FirstElement(*ActiveMenu\Entries()); ForEach *ActiveMenu\Entries() If *ActiveMenu\Entries()\Selected = #True Break EndIf Next EndIf EndProcedure ; ***************************************************************************** \ No newline at end of file diff --git a/src/Globals.pbi b/src/Globals.pbi index 3392bfe..247bda4 100644 --- a/src/Globals.pbi +++ b/src/Globals.pbi @@ -12,4 +12,14 @@ Global *ActiveMenu.GameMenu ; Fonts Global Font_H1 = LoadFont(1, "Courier", 40, #PB_Font_Bold) -Global Font_H2 = LoadFont(2, "Verdana", 18) \ No newline at end of file +Global Font_H2 = LoadFont(2, "Verdana", 18) + +; Graphics +Enumeration 500 + #Tile01 + #Tile02 + #Tile03 + #Tile04 + #Tile05 + #Tile06 +EndEnumeration \ No newline at end of file diff --git a/src/Main.pb b/src/Main.pb index f1fed6a..875f1bc 100644 --- a/src/Main.pb +++ b/src/Main.pb @@ -47,8 +47,6 @@ If ReadFile(0, "../data/menu.data") CloseFile(0) EndIf -InitTileset() - Menus("MAIN_MENU")\Title = "ESCape" Define Item.GameMenuItem @@ -73,6 +71,8 @@ If InitSprite() = 0 Or InitKeyboard() = 0 End EndIf +InitTileset() + ; Start the main loop which will create the window, wait for events and draw things ; on the screen. To escape from this loop, press ESC or close the window. If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCentered) @@ -112,4 +112,8 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent Until KeyboardPushed(#PB_Key_Escape) EndIf -End \ No newline at end of file +End + +DataSection + Gfx_Tileset: + IncludeBinary "../data/gfx/tileset01.bmp" \ No newline at end of file