A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.
Dependencies: mbed MotionSensor
Diff: sprites.h
- Revision:
- 30:ec915d24d3e9
- Parent:
- 27:a1b41626f57c
- Child:
- 33:4f3948dcd2f7
--- a/sprites.h Sat May 04 15:39:20 2019 +0000 +++ b/sprites.h Sun May 05 18:04:43 2019 +0000 @@ -3,7 +3,132 @@ const int screen_width = 84; const int screen_height = 48; -const int pause_sprite[9][45] ={ +const int star_sprite[4][11][5] = { // star_sprite[frame][Size_Y][Size_X] + { + {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,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,1,0,0}, + {0,0,1,0,0}, + {0,1,1,1,0}, + {0,0,1,0,0}, + {0,0,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,1,0,0}, + {0,0,1,0,0}, + {0,1,1,1,0}, + {1,1,1,1,1}, + {0,1,1,1,0}, + {0,0,1,0,0}, + {0,0,1,0,0}, + {0,0,0,0,0}, + {0,0,0,0,0} + }, + { + {0,0,1,0,0}, + {0,0,1,0,0}, + {0,0,1,0,0}, + {0,1,1,1,0}, + {0,1,1,1,0}, + {1,1,1,1,1}, + {0,1,1,1,0}, + {0,1,1,1,0}, + {0,0,1,0,0}, + {0,0,1,0,0}, + {0,0,1,0,0} + } +}; + +const int title_options_sprite[4][9][32] = { + { + {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,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0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,0,0,0,1,1,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,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,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 int arrow_right_sprite[3][2] = { + {1,0}, + {1,1}, + {1,0} +}; +const int arrow_left_sprite[3][2] = { + {0,1}, + {1,1}, + {0,1} +}; + +const int button_A_sprite[8][8] = { + {0,0,1,1,1,1,0,0}, + {0,1,1,1,1,1,1,0}, + {1,1,1,0,0,1,1,1}, + {1,1,0,1,1,0,1,1}, + {1,1,0,0,0,0,1,1}, + {1,1,0,1,1,0,1,1}, + {0,1,1,1,1,1,1,0}, + {0,0,1,1,1,1,0,0} +}; + + +const int pause_sprite[9][45] = { {0,1,1,1,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,1,0,0,0,0,}, {1,1,1,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,1,1,1,0,0,0,}, {0,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,}, @@ -15,6 +140,44 @@ {0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,0,1,0,0,1,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,}, }; +const int title_name_0[15][44] = { + {0,1,1,1,1,1,1,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}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