cleanup
This commit is contained in:
parent
584fc662c1
commit
a43354f7af
6 changed files with 10 additions and 31 deletions
|
@ -44,9 +44,3 @@ Procedure DrawRunningGame()
|
||||||
|
|
||||||
DrawHUD()
|
DrawHUD()
|
||||||
EndProcedure
|
EndProcedure
|
||||||
; IDE Options = PureBasic 4.51 (Linux - x64)
|
|
||||||
; CursorPosition = 44
|
|
||||||
; Folding = -
|
|
||||||
; EnableXP
|
|
||||||
; EnableCompileCount = 0
|
|
||||||
; EnableBuildCount = 0
|
|
|
@ -53,6 +53,7 @@ Procedure HandleEventRunningGame()
|
||||||
|
|
||||||
; Player movement
|
; Player movement
|
||||||
If KeyboardReleased(#PB_Key_Left) And Player\X > 0
|
If KeyboardReleased(#PB_Key_Left) And Player\X > 0
|
||||||
|
Player\Direction = #PLAYER_DIR_LEFT
|
||||||
If TileIsType(#TILESET_TYPE_FLOOR, Player\X-1, Player\Y) Or TileIsType(#TILESET_TYPE_GRASS, Player\X-1, Player\Y)
|
If TileIsType(#TILESET_TYPE_FLOOR, Player\X-1, Player\Y) Or TileIsType(#TILESET_TYPE_GRASS, Player\X-1, Player\Y)
|
||||||
Player\X-1
|
Player\X-1
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -64,6 +65,7 @@ Procedure HandleEventRunningGame()
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If KeyboardReleased(#PB_Key_Right) And Player\X < #MAP_WIDTH-1
|
If KeyboardReleased(#PB_Key_Right) And Player\X < #MAP_WIDTH-1
|
||||||
|
Player\Direction = #PLAYER_DIR_RIGHT
|
||||||
If TileIsType(#TILESET_TYPE_FLOOR, Player\X+1, Player\Y) Or TileIsType(#TILESET_TYPE_GRASS, Player\X+1, Player\Y)
|
If TileIsType(#TILESET_TYPE_FLOOR, Player\X+1, Player\Y) Or TileIsType(#TILESET_TYPE_GRASS, Player\X+1, Player\Y)
|
||||||
Player\X+1
|
Player\X+1
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -75,6 +77,7 @@ Procedure HandleEventRunningGame()
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If KeyboardReleased(#PB_Key_Up) And Player\Y > 0
|
If KeyboardReleased(#PB_Key_Up) And Player\Y > 0
|
||||||
|
Player\Direction = #PLAYER_DIR_UP
|
||||||
If TileIsType(#TILESET_TYPE_FLOOR, Player\X, Player\Y-1) Or TileIsType(#TILESET_TYPE_GRASS, Player\X, Player\Y-1)
|
If TileIsType(#TILESET_TYPE_FLOOR, Player\X, Player\Y-1) Or TileIsType(#TILESET_TYPE_GRASS, Player\X, Player\Y-1)
|
||||||
Player\Y-1
|
Player\Y-1
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -86,6 +89,7 @@ Procedure HandleEventRunningGame()
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If KeyboardReleased(#PB_Key_Down) And Player\Y < #MAP_HEIGHT-1
|
If KeyboardReleased(#PB_Key_Down) And Player\Y < #MAP_HEIGHT-1
|
||||||
|
Player\Direction = #PLAYER_DIR_DOWN
|
||||||
If TileIsType(#TILESET_TYPE_FLOOR, Player\X, Player\Y+1) Or TileIsType(#TILESET_TYPE_GRASS, Player\X, Player\Y+1)
|
If TileIsType(#TILESET_TYPE_FLOOR, Player\X, Player\Y+1) Or TileIsType(#TILESET_TYPE_GRASS, Player\X, Player\Y+1)
|
||||||
Player\Y+1
|
Player\Y+1
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -96,10 +100,3 @@ Procedure HandleEventRunningGame()
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
EndProcedure
|
EndProcedure
|
||||||
; IDE Options = PureBasic 4.51 (Linux - x64)
|
|
||||||
; CursorPosition = 98
|
|
||||||
; FirstLine = 52
|
|
||||||
; Folding = -
|
|
||||||
; EnableXP
|
|
||||||
; EnableCompileCount = 0
|
|
||||||
; EnableBuildCount = 0
|
|
File diff suppressed because one or more lines are too long
|
@ -63,9 +63,3 @@ LoadSound(2, #DATA_PATH + "sound/title_song.wav")
|
||||||
; Map
|
; Map
|
||||||
Global Dim TileMap.Tile(#MAP_WIDTH, #MAP_HEIGHT)
|
Global Dim TileMap.Tile(#MAP_WIDTH, #MAP_HEIGHT)
|
||||||
Global Dim ShadowMap.Shadow(#MAP_WIDTH, #MAP_HEIGHT)
|
Global Dim ShadowMap.Shadow(#MAP_WIDTH, #MAP_HEIGHT)
|
||||||
; IDE Options = PureBasic 4.51 (Linux - x64)
|
|
||||||
; CursorPosition = 47
|
|
||||||
; FirstLine = 11
|
|
||||||
; EnableXP
|
|
||||||
; EnableCompileCount = 0
|
|
||||||
; EnableBuildCount = 0
|
|
||||||
|
|
|
@ -139,9 +139,3 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
End
|
End
|
||||||
; IDE Options = PureBasic 4.51 (Linux - x64)
|
|
||||||
; CursorPosition = 102
|
|
||||||
; FirstLine = 72
|
|
||||||
; EnableXP
|
|
||||||
; EnableCompileCount = 0
|
|
||||||
; EnableBuildCount = 0
|
|
||||||
|
|
Loading…
Reference in a new issue