X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/f68cc067b5b7fb74421d309f051099e8afc2f41f..db23b2361f86b618d00e10d97b6166646012ef7b:/mock/tools/level-converter.cc diff --git a/mock/tools/level-converter.cc b/mock/tools/level-converter.cc index 04651af..54be8f7 100644 --- a/mock/tools/level-converter.cc +++ b/mock/tools/level-converter.cc @@ -18,7 +18,7 @@ extern "C" { #include enum { - LEVEL_LINE_COUNT = 13 + LEVEL_LINE_COUNT = 14 }; #define PATH_PREFIX "../badge/jumpnrun/" @@ -33,23 +33,32 @@ namespace jnrcpp { ("tube_right" , JUMPNRUN_TILE_TYPE_TUBE_RIGHT ) ("brick" , JUMPNRUN_TILE_TYPE_BRICK ) ("square" , JUMPNRUN_TILE_TYPE_SQUARE ) + ("spike_up" , JUMPNRUN_TILE_TYPE_SPIKE_UP ) + ("spike_right" , JUMPNRUN_TILE_TYPE_SPIKE_RIGHT ) + ("spike_down" , JUMPNRUN_TILE_TYPE_SPIKE_DOWN ) + ("spike_left" , JUMPNRUN_TILE_TYPE_SPIKE_LEFT ) ; items.add - ("doc", JUMPNRUN_ITEM_TYPE_DOCUMENT) + ("doc" , JUMPNRUN_ITEM_TYPE_DOCUMENT ) + ("checkpoint" , JUMPNRUN_ITEM_TYPE_CHECKPOINT ) + ("key" , JUMPNRUN_ITEM_TYPE_KEY ) + ("doc_encrypted", JUMPNRUN_ITEM_TYPE_ENCRYPTED_DOCUMENT) ; enemies.add - ("cat" , JUMPNRUN_ENEMY_TYPE_CAT ) - ("mushroom" , JUMPNRUN_ENEMY_TYPE_MUSHROOM ) - ("bunny" , JUMPNRUN_ENEMY_TYPE_BUNNY ) - ("kaninchen", JUMPNRUN_ENEMY_TYPE_BUNNY ) // legacy - ("snake" , JUMPNRUN_ENEMY_TYPE_SNAKE ) - ("spiral" , JUMPNRUN_ENEMY_TYPE_SPIRAL ) - ("rotor" , JUMPNRUN_ENEMY_TYPE_ROTOR ) - ("dog" , JUMPNRUN_ENEMY_TYPE_DOG ) - ("giraffe" , JUMPNRUN_ENEMY_TYPE_GIRAFFE ) - ("bird" , JUMPNRUN_ENEMY_TYPE_BIRD ) + ("cat" , JUMPNRUN_ENEMY_TYPE_CAT ) + ("mushroom" , JUMPNRUN_ENEMY_TYPE_MUSHROOM ) + ("bunny" , JUMPNRUN_ENEMY_TYPE_BUNNY ) + ("kaninchen" , JUMPNRUN_ENEMY_TYPE_BUNNY ) // legacy + ("snake" , JUMPNRUN_ENEMY_TYPE_SNAKE ) + ("spiral" , JUMPNRUN_ENEMY_TYPE_SPIRAL ) + ("rotor" , JUMPNRUN_ENEMY_TYPE_ROTOR ) + ("dog" , JUMPNRUN_ENEMY_TYPE_DOG ) + ("giraffe" , JUMPNRUN_ENEMY_TYPE_GIRAFFE ) + ("bird" , JUMPNRUN_ENEMY_TYPE_BIRD ) + ("bird_straight", JUMPNRUN_ENEMY_TYPE_BIRD_STRAIGHT) + ("bird_dip" , JUMPNRUN_ENEMY_TYPE_BIRD_DIP ) ; } @@ -174,7 +183,7 @@ namespace jnrcpp { if(iter != objmap.end()) { unsigned char buf[3]; - buf[0] = static_cast(y + 1) << 4 | static_cast(x >> 8); + buf[0] = static_cast(y) << 4 | static_cast(x >> 8); buf[1] = static_cast(x); buf[2] = static_cast(find_type(types, iter->second, error));