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

Dependencies:   mbed MotionSensor

Revision:
7:4aaa37a711a1
Parent:
6:104c2506237e
Child:
10:1a3499f6b583
--- a/main.cpp	Tue Apr 16 12:30:33 2019 +0000
+++ b/main.cpp	Sat Apr 20 22:17:24 2019 +0000
@@ -8,24 +8,51 @@
 Date: 11/04/2019
 */
 
-#include "main.h"
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include "math.h"
+#include "sprites.h"
+#include "Entity.h"
+#include "Player.h"
+
+N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
+Gamepad gamepad;
+
+int counter = 0;
 
 int main()
 {
     lcd.init();
     lcd.setContrast(0.45);
     gamepad.init();
+    Player player(39, 27);
 
     while(1){
+        // Player Movement
+        // Enemy Movement
         
-        move_player();
+        // MiniMap Generation
+        // MiniMap Screen Detection
+        
+        // Pause Detection
+        
+        // screen update
+        
+        Vector2D mapped_coord = gamepad.get_mapped_coord();
+        player.move(mapped_coord.x, mapped_coord.y);
         
         lcd.clear();
-        lcd.drawSprite(0,0,48,84,(int *)level_map[1]);
-        lcd.drawSpriteTransparent(player_pos[0],player_pos[1]-7,12,6,(int *)player[face][(int)(moving*(counter/5)%4)]);
+        lcd.drawSprite(0,0,screen_height,screen_width,(int *)level_map[1]);
+        lcd.drawSpriteTransparent(player.get_pos_x()-player.get_offset_x(),
+                                  player.get_pos_y()-player.get_offset_y(),
+                                  player.get_sprite_height(),
+                                  player.get_sprite_width(),
+                                  (int *)sprite_player[player.get_face()][(int)(player.get_moving()*(counter/5)%4)]);
         lcd.refresh();
         wait_ms(1000/20);
         counter++;
         
     }
-}
\ No newline at end of file
+    
+}