A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.

Dependencies:   mbed MotionSensor

Committer:
el17sm
Date:
Mon Apr 29 10:39:09 2019 +0000
Revision:
27:a1b41626f57c
Parent:
26:abbc19edc5c1
Child:
28:98848e6a77a2
Functional Room; Great Success;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17sm 26:abbc19edc5c1 1 #ifndef ROOMENGINE_H
el17sm 26:abbc19edc5c1 2 #define ROOMENGINE_H
el17sm 26:abbc19edc5c1 3 #include "Player.h"
el17sm 26:abbc19edc5c1 4 #include "Bullets.h"
el17sm 26:abbc19edc5c1 5 #include "Room.h"
el17sm 26:abbc19edc5c1 6 #include "Gamepad.h"
el17sm 26:abbc19edc5c1 7 #include "sprites.h"
el17sm 26:abbc19edc5c1 8
el17sm 27:a1b41626f57c 9 class RoomEngine
el17sm 26:abbc19edc5c1 10 {
el17sm 26:abbc19edc5c1 11 public:
el17sm 27:a1b41626f57c 12 RoomEngine();
el17sm 27:a1b41626f57c 13 ~RoomEngine();
el17sm 27:a1b41626f57c 14 void load_room(Room &current_room);
el17sm 26:abbc19edc5c1 15 void read_input(Gamepad &gamepad);
el17sm 27:a1b41626f57c 16 void update();
el17sm 27:a1b41626f57c 17 void render(N5110 &lcd, Gamepad &gamepad);
el17sm 27:a1b41626f57c 18 bool check_player_death();
el17sm 26:abbc19edc5c1 19
el17sm 26:abbc19edc5c1 20 private:
el17sm 26:abbc19edc5c1 21 bool _L;
el17sm 26:abbc19edc5c1 22 bool _R;
el17sm 26:abbc19edc5c1 23 bool _START;
el17sm 26:abbc19edc5c1 24 bool _BACK;
el17sm 26:abbc19edc5c1 25 bool _A;
el17sm 26:abbc19edc5c1 26 bool _B;
el17sm 26:abbc19edc5c1 27 bool _X;
el17sm 26:abbc19edc5c1 28 bool _Y;
el17sm 26:abbc19edc5c1 29 Vector2D mapped_coord;
el17sm 26:abbc19edc5c1 30
el17sm 27:a1b41626f57c 31 Room *room;
el17sm 27:a1b41626f57c 32 Player *player;
el17sm 26:abbc19edc5c1 33
el17sm 26:abbc19edc5c1 34 // Functions
el17sm 26:abbc19edc5c1 35 void check_damage();
el17sm 26:abbc19edc5c1 36 void check_damage_player();
el17sm 26:abbc19edc5c1 37 void check_damage_enemies();
el17sm 27:a1b41626f57c 38 void check_enemies_death();
el17sm 26:abbc19edc5c1 39 void move();
el17sm 26:abbc19edc5c1 40 void move_player();
el17sm 26:abbc19edc5c1 41 void move_enemies();
el17sm 26:abbc19edc5c1 42 void move_bullets();
el17sm 27:a1b41626f57c 43 void minimap_detection(N5110 &lcd, Gamepad &gamepad);
el17sm 27:a1b41626f57c 44 void pause_detection(N5110 &lcd, Gamepad &gamepad);
el17sm 26:abbc19edc5c1 45
el17sm 27:a1b41626f57c 46 void draw(N5110 &lcd);
el17sm 26:abbc19edc5c1 47 void draw_player(N5110 &lcd);
el17sm 26:abbc19edc5c1 48 void draw_enemies(N5110 &lcd);
el17sm 26:abbc19edc5c1 49 void draw_bullets(N5110 &lcd);
el17sm 26:abbc19edc5c1 50 void draw_health(N5110 &lcd);
el17sm 26:abbc19edc5c1 51
el17sm 26:abbc19edc5c1 52 bool entity_collision(Entity &a, Entity &b);
el17sm 26:abbc19edc5c1 53 float entity_move_check_x(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]);
el17sm 26:abbc19edc5c1 54 float entity_move_check_y(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]);
el17sm 26:abbc19edc5c1 55 };
el17sm 26:abbc19edc5c1 56 #endif