Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes to level, can jump above level now

  • Loading branch information...
commit 6332f1cd42e5ede5e50b1bc541551b56d9a61dec 1 parent 7952b14
@kvakvs authored
View
BIN  bin/HGESKEL.exe
Binary file not shown
View
12 bin/level_01.txt
@@ -1,11 +1,11 @@
-# ##################### #####################
-# # #
-# $ A A $$A A A ! #
-# ################ $ ####### ############# ##########
-# $ # ############ #### ### #
+# ######## ##################### #####################
+# $ $ # # #
+###^^###^^## ##### # $ A A $$A A A ! #
+#!# ## # # ^^ ############## $ ####### ############# ##########
+### $ ####^^ # ## ############ #### ### #
# @ ##^^#### A ## $ # #### #
# #A $ ##^######## ### ########### #### # #
-# ###^^#### $ A $ $ A $ # ### $ ### $ A #
+# ######### $ A $ $ A $ # ### $ ### $ A #
#############^###^^###################^^^^^^^^^^^##########^^^^^^^######################^^^^^^^^##############################
* * *
View
4 src/world.h
@@ -150,6 +150,8 @@ class World
if( x > m_camera_pos.x + SCREEN_WIDTH ) return WORLD_CELL_WALL1;
// always not solid below the world
if( y >= m_world_height * CELL_BOX_SIZE ) return WORLD_CELL_EMPTY;
+ // always not solid above the world
+ if( y < 0 ) return WORLD_CELL_EMPTY;
return At( (uint32_t)(y / CELL_BOX_SIZE), (uint32_t)(x / CELL_BOX_SIZE) );
}
@@ -163,6 +165,8 @@ class World
if( x > m_camera_pos.x + SCREEN_WIDTH ) return true;
// always not solid below the world
if( y >= m_world_height * CELL_BOX_SIZE ) return false;
+ // always not solid above the world
+ if( y < 0 ) return false;
return IsSolid(
At( (uint32_t)(y / CELL_BOX_SIZE), (uint32_t)(x / CELL_BOX_SIZE) )
Please sign in to comment.
Something went wrong with that request. Please try again.