A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.
Dependencies: mbed MotionSensor
Diff: RoomEngine/RoomEngine.h
- Revision:
- 29:6b8411bb040a
- Parent:
- 28:98848e6a77a2
- Child:
- 30:ec915d24d3e9
diff -r 98848e6a77a2 -r 6b8411bb040a RoomEngine/RoomEngine.h --- a/RoomEngine/RoomEngine.h Thu May 02 21:30:49 2019 +0000 +++ b/RoomEngine/RoomEngine.h Sat May 04 15:39:20 2019 +0000 @@ -1,28 +1,35 @@ #ifndef ROOMENGINE_H #define ROOMENGINE_H #include "N5110.h" +#include "Gamepad.h" + #include "Player.h" -#include "Bullets.h" +#include "Health.h" #include "Room.h" -#include "Gamepad.h" + #include "sprites.h" -#include "Health.h" + class RoomEngine { public: RoomEngine(); ~RoomEngine(); - void init(Player ¤t_player, Room ¤t_room); - void save_room(Room ¤t_room); + void load(Player ¤t_player, Room *current_room); void entrance_scene(N5110 &lcd, Gamepad &gamepad); void exit_scene(N5110 &lcd, Gamepad &gamepad); + void update_current_room(); + void read_input(Gamepad &gamepad); void update(); void render(N5110 &lcd, Gamepad &gamepad); bool check_player_death(); int check_player_room_position(); + // Accessor + int get_room_x(); + int get_room_y(); + private: bool _L; bool _R; @@ -32,6 +39,9 @@ bool _Y; Vector2D mapped_coord; + int _room_x; + int _room_y; + Room *room; Player *player;