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 02:45:17 2019 +0000
Revision:
26:abbc19edc5c1
Child:
27:a1b41626f57c
RoomEngine done, no test yet, Room h partial done;

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 26:abbc19edc5c1 9 class GameEngine
el17sm 26:abbc19edc5c1 10 {
el17sm 26:abbc19edc5c1 11 public:
el17sm 26:abbc19edc5c1 12 void init();
el17sm 26:abbc19edc5c1 13 void read_input(Gamepad &gamepad);
el17sm 26:abbc19edc5c1 14 void update(N5110 &lcd);
el17sm 26:abbc19edc5c1 15 void draw(N5110 &lcd);
el17sm 26:abbc19edc5c1 16
el17sm 26:abbc19edc5c1 17 private:
el17sm 26:abbc19edc5c1 18 bool _L;
el17sm 26:abbc19edc5c1 19 bool _R;
el17sm 26:abbc19edc5c1 20 bool _START;
el17sm 26:abbc19edc5c1 21 bool _BACK;
el17sm 26:abbc19edc5c1 22 bool _A;
el17sm 26:abbc19edc5c1 23 bool _B;
el17sm 26:abbc19edc5c1 24 bool _X;
el17sm 26:abbc19edc5c1 25 bool _Y;
el17sm 26:abbc19edc5c1 26 Vector2D mapped_coord;
el17sm 26:abbc19edc5c1 27
el17sm 26:abbc19edc5c1 28 Player player;
el17sm 26:abbc19edc5c1 29 Room room;
el17sm 26:abbc19edc5c1 30
el17sm 26:abbc19edc5c1 31
el17sm 26:abbc19edc5c1 32 // Functions
el17sm 26:abbc19edc5c1 33 void check_damage();
el17sm 26:abbc19edc5c1 34 void check_damage_player();
el17sm 26:abbc19edc5c1 35 void check_damage_enemies();
el17sm 26:abbc19edc5c1 36 void check_death();
el17sm 26:abbc19edc5c1 37 void move();
el17sm 26:abbc19edc5c1 38 void move_player();
el17sm 26:abbc19edc5c1 39 void move_enemies();
el17sm 26:abbc19edc5c1 40 void move_bullets();
el17sm 26:abbc19edc5c1 41 void minimap_detection(N5110 &lcd);
el17sm 26:abbc19edc5c1 42 void pause_detection(N5110 &lcd);
el17sm 26:abbc19edc5c1 43
el17sm 26:abbc19edc5c1 44 void draw_player(N5110 &lcd);
el17sm 26:abbc19edc5c1 45 void draw_enemies(N5110 &lcd);
el17sm 26:abbc19edc5c1 46 void draw_bullets(N5110 &lcd);
el17sm 26:abbc19edc5c1 47 void draw_health(N5110 &lcd);
el17sm 26:abbc19edc5c1 48
el17sm 26:abbc19edc5c1 49 bool entity_collision(Entity &a, Entity &b);
el17sm 26:abbc19edc5c1 50 float entity_move_check_x(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]);
el17sm 26:abbc19edc5c1 51 float entity_move_check_y(Entity *a, Entity *array[], int no_of_enemies, int current_entity, bool valid_enemies[]);
el17sm 26:abbc19edc5c1 52 };
el17sm 26:abbc19edc5c1 53 #endif