![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.
Dependencies: mbed MotionSensor
Diff: RoomEngine/Room/Room.h
- Revision:
- 46:f09711580d4a
- Parent:
- 45:8725b4171646
- Child:
- 47:6e31b195ce3c
--- a/RoomEngine/Room/Room.h Wed May 08 12:40:52 2019 +0000 +++ b/RoomEngine/Room/Room.h Wed May 08 20:47:52 2019 +0000 @@ -21,7 +21,7 @@ int _room_type; int _enemy_coord[MAX_ENEMIES][2]; // _enemy_coord[EnemyID][x/y] char _wall_stat[2][4]; // _wall_coord[WallID][x/y/width/height] - bool _before_boss_room; + int _before_boss_room; short int _spawn_point_counter; short int _spawn_point_coord; @@ -45,12 +45,15 @@ ~Room(); // Mutators - void set_boss_doorway(bool before_boss_room); + void set_doorway(int index, bool doorway_value); + void set_boss_doorway(int before_boss_room); // Accessors char * get_current_map_2d(); bool * get_doorways(); + bool get_doorway(int index); char get_room_type(); + int get_boss_doorway(); // Functions void load(); @@ -225,24 +228,25 @@ const short int n_spawn_points[3] = {1547, 502, 972}; // [room_type] -const char boss_doorway[2][12][14] = { // [Level/Overlay][Size_Y][Size_X] +const char boss_doorway_n[2][12][14] = { // [Level/Overlay][Size_Y][Size_X] { - {2,1,2,2,2,1,1,1,1,2,2,2,1,2}, - {1,2,2,1,1,0,0,0,0,1,1,2,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,2,1,0,0,0,0,0,0,0,0,1,2,1}, - {1,1,1,0,0,0,0,0,0,0,0,1,1,1}, + {1,0,1,1,0,0,0,0,0,0,1,1,0,1}, + {1,1,0,0,0,1,1,1,1,0,0,0,1,1}, + {1,0,0,1,1,0,0,0,0,1,1,0,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,0,1,0,0,0,0,0,0,0,0,1,0,1}, + {1,1,1,0,0,0,0,0,0,0,0,1,1,1} }, { + {0,0,1,1,2,2,2,2,2,2,1,1,0,0}, {0,0,2,2,2,1,1,1,1,2,2,2,0,0}, - {0,0,2,1,1,0,0,0,0,1,1,2,0,0}, + {0,0,0,1,1,0,0,0,0,1,1,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, @@ -251,11 +255,64 @@ {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - {0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }; +const char boss_doorway_e[19][5] = { + {1,1,1,1,1}, + {1,1,1,1,1}, + {1,2,2,2,2}, + {1,2,2,2,2}, + {1,2,2,2,2}, + {1,2,2,2,2}, + {1,1,1,1,1}, + {1,2,2,2,2}, + {1,2,2,2,2}, + {1,1,1,1,1}, + {1,2,2,2,2}, + {1,1,1,1,1}, + {1,2,1,2,2}, + {1,2,1,2,2}, + {1,2,1,2,2}, + {1,2,1,2,2}, + {1,2,1,2,2}, + {1,2,1,2,2}, + {1,1,1,2,2} +}; + +const char boss_doorway_s[7][14] = { + {0,0,0,0,1,1,1,1,1,1,0,0,0,0}, + {0,0,1,1,1,2,2,2,2,1,1,1,0,0}, + {1,1,2,2,1,2,2,2,2,1,2,2,1,1}, + {1,2,2,2,1,2,2,2,2,1,2,2,2,1}, + {1,2,2,2,1,2,2,2,2,1,2,2,2,1}, + {1,2,2,2,1,2,2,2,2,1,2,2,2,1}, + {1,2,2,2,1,2,2,2,2,1,2,2,2,1} +}; + +const char boss_doorway_w[19][5] = { + {1,1,1,1,1}, + {1,1,1,1,1}, + {2,2,2,2,1}, + {2,2,2,2,1}, + {2,2,2,2,1}, + {2,2,2,2,1}, + {1,1,1,1,1}, + {2,2,2,2,1}, + {2,2,2,2,1}, + {1,1,1,1,1}, + {2,2,2,2,1}, + {1,1,1,1,1}, + {2,2,1,2,1}, + {2,2,1,2,1}, + {2,2,1,2,1}, + {2,2,1,2,1}, + {2,2,1,2,1}, + {2,2,1,2,1}, + {2,2,1,1,1} +}; + const char wall_x[2][11][3] = { // [E/W][Size_Y][Size_X] { // E {1,2,2},