This commit is contained in:
Ruben Müller 2011-08-21 18:19:11 +02:00
parent 584fc662c1
commit a43354f7af
6 changed files with 10 additions and 31 deletions

View file

@ -43,10 +43,4 @@ Procedure DrawRunningGame()
DrawPlayer() DrawPlayer()
DrawHUD() DrawHUD()
EndProcedure EndProcedure
; IDE Options = PureBasic 4.51 (Linux - x64)
; CursorPosition = 44
; Folding = -
; EnableXP
; EnableCompileCount = 0
; EnableBuildCount = 0

View file

@ -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
@ -95,11 +99,4 @@ Procedure HandleEventRunningGame()
Cam\Y + 1 Cam\Y + 1
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

View file

@ -62,10 +62,4 @@ 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

View file

@ -138,10 +138,4 @@ If OpenWindow(0, 0, 0, Screen\Width, Screen\Height, title, #PB_Window_ScreenCent
Until CurrentState = "QUIT" Until CurrentState = "QUIT"
EndIf EndIf
End End
; IDE Options = PureBasic 4.51 (Linux - x64)
; CursorPosition = 102
; FirstLine = 72
; EnableXP
; EnableCompileCount = 0
; EnableBuildCount = 0

View file

@ -62,4 +62,4 @@ Structure Camera
Width.i Width.i
Height.i Height.i
Padding.i Padding.i
EndStructure EndStructure