From 65f9982ba6992e62960d20bb690cf29ef60e835c Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Wed, 8 Mar 2023 15:37:25 +0100 Subject: spelling correction --- src/stm32/TODO/hh_entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/stm32/TODO/hh_entity.h b/src/stm32/TODO/hh_entity.h index 82d75c5..768b2e6 100644 --- a/src/stm32/TODO/hh_entity.h +++ b/src/stm32/TODO/hh_entity.h @@ -7,10 +7,10 @@ typedef struct hh_entity //armor/block? }; -/// @brief detect for collision enity and eviroment +/// @brief detect for collision entity and environment /// @param environment position of tile to be checked /// @param entity position entity -/// @return true if collision between enity and environment +/// @return true if collision between entity and environment bool hh_collision(const vec2& environment, const vec2& entity); /// @brief solve collisions -- cgit v1.2.3 From 0ce1adac6d80bf69e3a03891879d9445698300bc Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 11:55:46 +0100 Subject: nope --- src/stm32/TODO/hh_entity.c | 6 ++++++ src/stm32/TODO/maths.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/stm32/TODO/hh_entity.c create mode 100644 src/stm32/TODO/maths.c (limited to 'src') diff --git a/src/stm32/TODO/hh_entity.c b/src/stm32/TODO/hh_entity.c new file mode 100644 index 0000000..492ca67 --- /dev/null +++ b/src/stm32/TODO/hh_entity.c @@ -0,0 +1,6 @@ +#include "maths.h" +#include "hh_entity.h" + +bool hh_collision(const vec2& environment, const vec2& entity){ + +} \ No newline at end of file diff --git a/src/stm32/TODO/maths.c b/src/stm32/TODO/maths.c new file mode 100644 index 0000000..ef3698b --- /dev/null +++ b/src/stm32/TODO/maths.c @@ -0,0 +1,12 @@ +#include "maths.h" + +#include + +float clamp( float x, float min, float max ){ + if (x > max) + return max; + else if (x < min) + return min; + else + return x; +} -- cgit v1.2.3 From e3e0feb56340a72545b6fd38f22e134cf2e3509a Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 14:23:05 +0100 Subject: fixed code styles --- .editorconfig | 4 ++-- src/engine/TODO/combat.h | 9 +++++++++ src/engine/TODO/draw_screen.h | 1 + src/engine/TODO/entity.c | 41 ++++++++++++++++++++++++++++++++++++++++ src/engine/TODO/entity.h | 24 +++++++++++++++++++++++ src/engine/TODO/hh_combat.h | 9 --------- src/engine/TODO/hh_draw_screen.h | 1 - src/engine/TODO/hh_entity.c | 41 ---------------------------------------- src/engine/TODO/hh_entity.h | 24 ----------------------- src/engine/TODO/hh_level.h | 1 - src/engine/TODO/hh_rand.h | 1 - src/engine/TODO/level.h | 4 ++++ src/engine/TODO/maths.c | 1 - src/engine/TODO/maths.h | 3 ++- src/entity.h | 1 - src/input.h | 1 - src/ppu/ppu.h | 3 --- src/ppusim/sim.c | 5 +++++ src/ppusim/sim.h | 3 +++ src/stm32/main.c | 3 +++ 20 files changed, 94 insertions(+), 86 deletions(-) create mode 100644 src/engine/TODO/combat.h create mode 100644 src/engine/TODO/draw_screen.h create mode 100644 src/engine/TODO/entity.c create mode 100644 src/engine/TODO/entity.h delete mode 100644 src/engine/TODO/hh_combat.h delete mode 100644 src/engine/TODO/hh_draw_screen.h delete mode 100644 src/engine/TODO/hh_entity.c delete mode 100644 src/engine/TODO/hh_entity.h delete mode 100644 src/engine/TODO/hh_level.h delete mode 100644 src/engine/TODO/hh_rand.h create mode 100644 src/engine/TODO/level.h delete mode 100644 src/engine/TODO/maths.c (limited to 'src') diff --git a/.editorconfig b/.editorconfig index fece754..1f4a360 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,10 +2,10 @@ root = true [*] indent_style = tab -indent_size = 2 +indent_size = 3 end_of_line = lf insert_final_newline = true [*.md] indent_style = space -indent_size = 2 +indent_size = 3 diff --git a/src/engine/TODO/combat.h b/src/engine/TODO/combat.h new file mode 100644 index 0000000..16c41f5 --- /dev/null +++ b/src/engine/TODO/combat.h @@ -0,0 +1,9 @@ +#include "hh_entity.h" + + +// attacktypes: + +/// @brief basic attack +/// @param dmg damage number +/// @param target entity under attack (damage changes this hp value) +void hh_attack_basic( int8_t dmg, hh_entity* target ); diff --git a/src/engine/TODO/draw_screen.h b/src/engine/TODO/draw_screen.h new file mode 100644 index 0000000..f5d7507 --- /dev/null +++ b/src/engine/TODO/draw_screen.h @@ -0,0 +1 @@ +// every function call for drawing the screen goes here. diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c new file mode 100644 index 0000000..fa550d5 --- /dev/null +++ b/src/engine/TODO/entity.c @@ -0,0 +1,41 @@ +#include + +#include "hh_entity.h" +#include "maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec2* pos1, vec2* pos2){ + if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x + return true; + } + + if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ + if (entity->vec.x > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.x < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } +} + diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h new file mode 100644 index 0000000..fdbeb8a --- /dev/null +++ b/src/engine/TODO/entity.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "maths.h" + +typedef struct { + vec2 pos, vec; + bool is_grounded; + int8_t hp; + //armor/block? +}hh_entity; + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2* pos1, vec2* pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/hh_combat.h b/src/engine/TODO/hh_combat.h deleted file mode 100644 index 16c41f5..0000000 --- a/src/engine/TODO/hh_combat.h +++ /dev/null @@ -1,9 +0,0 @@ -#include "hh_entity.h" - - -// attacktypes: - -/// @brief basic attack -/// @param dmg damage number -/// @param target entity under attack (damage changes this hp value) -void hh_attack_basic( int8_t dmg, hh_entity* target ); diff --git a/src/engine/TODO/hh_draw_screen.h b/src/engine/TODO/hh_draw_screen.h deleted file mode 100644 index f5d7507..0000000 --- a/src/engine/TODO/hh_draw_screen.h +++ /dev/null @@ -1 +0,0 @@ -// every function call for drawing the screen goes here. diff --git a/src/engine/TODO/hh_entity.c b/src/engine/TODO/hh_entity.c deleted file mode 100644 index fa550d5..0000000 --- a/src/engine/TODO/hh_entity.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include "hh_entity.h" -#include "maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x - return true; - } - - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } -} - diff --git a/src/engine/TODO/hh_entity.h b/src/engine/TODO/hh_entity.h deleted file mode 100644 index fdbeb8a..0000000 --- a/src/engine/TODO/hh_entity.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -#include "maths.h" - -typedef struct { - vec2 pos, vec; - bool is_grounded; - int8_t hp; - //armor/block? -}hh_entity; - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/hh_level.h b/src/engine/TODO/hh_level.h deleted file mode 100644 index 43b19a3..0000000 --- a/src/engine/TODO/hh_level.h +++ /dev/null @@ -1 +0,0 @@ -//deal with loading/saving the correct level diff --git a/src/engine/TODO/hh_rand.h b/src/engine/TODO/hh_rand.h deleted file mode 100644 index ea7c1d4..0000000 --- a/src/engine/TODO/hh_rand.h +++ /dev/null @@ -1 +0,0 @@ -// deal with Pseudo random number generation here. diff --git a/src/engine/TODO/level.h b/src/engine/TODO/level.h new file mode 100644 index 0000000..09f77e7 --- /dev/null +++ b/src/engine/TODO/level.h @@ -0,0 +1,4 @@ +//deal with loading/saving the correct level + +/** @brief */ +void hh_map_load(); diff --git a/src/engine/TODO/maths.c b/src/engine/TODO/maths.c deleted file mode 100644 index d1bb089..0000000 --- a/src/engine/TODO/maths.c +++ /dev/null @@ -1 +0,0 @@ -#include "maths.h" diff --git a/src/engine/TODO/maths.h b/src/engine/TODO/maths.h index 032e56d..c7f1b44 100644 --- a/src/engine/TODO/maths.h +++ b/src/engine/TODO/maths.h @@ -9,7 +9,8 @@ typedef struct { typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner -#define HH_MATH_FIXED_POINT 7 //fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) +//fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) +#define HH_MATH_FIXED_POINT 7 #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) diff --git a/src/entity.h b/src/entity.h index 20cbf42..181182b 100644 --- a/src/entity.h +++ b/src/entity.h @@ -12,4 +12,3 @@ typedef struct { int8_t speed; //10 default L/R MODifier bool in_air; } hh_s_entity_player; - diff --git a/src/input.h b/src/input.h index adacba2..90f0c61 100644 --- a/src/input.h +++ b/src/input.h @@ -19,4 +19,3 @@ extern hh_s_gamepad g_hh_controller_p2; /** @brief update g_hh_controller_p1 and 2 by reading buttons */ void hh_input_read(); - diff --git a/src/ppu/ppu.h b/src/ppu/ppu.h index 18b58a2..75d97c1 100644 --- a/src/ppu/ppu.h +++ b/src/ppu/ppu.h @@ -9,9 +9,6 @@ void hh_ppu_init(); /** @brief deinitialize ppu interface */ void hh_ppu_deinit(); -/** @brief */ -void hh_ppu_load_tilemap(); - /** @brief update single foreground sprite */ void hh_ppu_update_foreground(unsigned index, hh_s_ppu_loc_fam_entry e); /** @brief update single background sprite */ diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 449b78d..7d56d2d 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -22,6 +22,11 @@ void hh_ppu_init() { g_hh_ppusim_vram = malloc(sizeof(hh_ppu_data_t) * 0xffff); memset(g_hh_ppusim_vram, 0x0000, 0xffff); + hh_ppu_load_tilemap(); +} + +void hh_ppu_load_tilemap() { + } void hh_ppu_deinit() { diff --git a/src/ppusim/sim.h b/src/ppusim/sim.h index 73f4b23..4d1d718 100644 --- a/src/ppusim/sim.h +++ b/src/ppusim/sim.h @@ -4,3 +4,6 @@ #define HH_PPUSIM_UPSCALE_FACTOR 3 /** @brief max framerate for PPUSIM */ #define HH_PPUSIM_FRAMERATE 60 + +/** @brief pump tilemap from rom to ppu ram */ +void hh_ppu_load_tilemap(); //ppu sim? diff --git a/src/stm32/main.c b/src/stm32/main.c index 735b378..d381d35 100644 --- a/src/stm32/main.c +++ b/src/stm32/main.c @@ -1,4 +1,7 @@ #include "main.h" +#include "ppu/ppu.h" + +void hh_ppu_load_tilemap() {} void hh_loop() { while(g_hh_run); -- cgit v1.2.3 From 8670e4bb2bdaf46399830d9c4d413705ae01dc40 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Fri, 10 Mar 2023 16:32:50 +0100 Subject: ppusim read sprites from file and put into vram --- src/ppusim/sim.c | 25 +++++++++++++++++++++++- test/bin/test_file_read.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 test/bin/test_file_read.c (limited to 'src') diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 7d56d2d..1fceb82 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -1,9 +1,12 @@ #include #include #include +#include #include "main.h" #include "ppu/ppu.h" +#include "ppu/consts.h" +#include "ppu/internals.h" #include "ppusim/mem.h" #include "ppusim/sim.h" #include "ppusim/work.h" @@ -26,7 +29,27 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - + char* filename = "tiles.bin"; + FILE* fp = fopen(filename,"rb"); + if (!fp){ + return;//error + } + + fseek(fp, 0, SEEK_END);//goto EOF + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0);//goto start of file + + for (int i = 0; i < _size; i++) { + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + + hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data); + sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE; + hh_ppu_vram_write(sprite); + free(sprite.data); + } + fclose(fp); } void hh_ppu_deinit() { diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c new file mode 100644 index 0000000..6357feb --- /dev/null +++ b/test/bin/test_file_read.c @@ -0,0 +1,48 @@ + +#include +#include +#include + + +#define HH_PPU_VRAM_TMM_SPRITE_SIZE 52 + + +void printData(uint8_t* in) { + for (int i = 0; i < HH_PPU_VRAM_TMM_SPRITE_SIZE; i++) + { + printf("%02x ",in[i]); + } + printf("\n"); +} + +void hh_ppu_load_tilemap() { + + //TODO: lees bestand in mem + char* filename = "tiles.bin"; + FILE* fp = fopen(filename,"rb"); + if (!fp){ + return;//error + } + + fseek(fp, 0, SEEK_END); + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0); + // printf("%i",_size); + for (int i = 0; i < _size; i++) { + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + // for (int i = 0; i < 255; i++) { + // buffer[i] = 0; //TODO: vullen + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + // } + + printData(data); + } + fclose(fp); + +} + + +int main(){ +hh_ppu_load_tilemap(); + return 0; +} -- cgit v1.2.3 From 148db0e330e158381bf2b5b39e139d75c55088b2 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:36:21 +0100 Subject: Delete c_cpp_properties.json --- src/.vscode/c_cpp_properties.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/.vscode/c_cpp_properties.json (limited to 'src') diff --git a/src/.vscode/c_cpp_properties.json b/src/.vscode/c_cpp_properties.json deleted file mode 100644 index 359928d..0000000 --- a/src/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "compilerPath": "/usr/bin/gcc", - "cStandard": "c17", - "cppStandard": "c++14", - "intelliSenseMode": "linux-gcc-x64" - } - ], - "version": 4 -} \ No newline at end of file -- cgit v1.2.3 From 233b2e7a0743935db145f921dd49756248aaee58 Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:36:38 +0100 Subject: Delete settings.json --- src/.vscode/settings.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/.vscode/settings.json (limited to 'src') diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json deleted file mode 100644 index d485e2c..0000000 --- a/src/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "files.associations": { - "hh_entity.h": "c", - "maths.h": "c" - } -} \ No newline at end of file -- cgit v1.2.3 From c9ef075fbbb57f9968fbce39b12fbd82a89e7ef6 Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Sat, 11 Mar 2023 09:32:11 +0100 Subject: moved files --- src/engine/TODO/draw_screen.h | 1 - src/engine/TODO/level.h | 4 ---- src/engine/TODO/maths.h | 17 ----------------- src/engine/draw_screen.h | 1 + src/engine/level.h | 4 ++++ src/engine/maths.h | 17 +++++++++++++++++ 6 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 src/engine/TODO/draw_screen.h delete mode 100644 src/engine/TODO/level.h delete mode 100644 src/engine/TODO/maths.h create mode 100644 src/engine/draw_screen.h create mode 100644 src/engine/level.h create mode 100644 src/engine/maths.h (limited to 'src') diff --git a/src/engine/TODO/draw_screen.h b/src/engine/TODO/draw_screen.h deleted file mode 100644 index f5d7507..0000000 --- a/src/engine/TODO/draw_screen.h +++ /dev/null @@ -1 +0,0 @@ -// every function call for drawing the screen goes here. diff --git a/src/engine/TODO/level.h b/src/engine/TODO/level.h deleted file mode 100644 index 09f77e7..0000000 --- a/src/engine/TODO/level.h +++ /dev/null @@ -1,4 +0,0 @@ -//deal with loading/saving the correct level - -/** @brief */ -void hh_map_load(); diff --git a/src/engine/TODO/maths.h b/src/engine/TODO/maths.h deleted file mode 100644 index c7f1b44..0000000 --- a/src/engine/TODO/maths.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -#include -// #include - -typedef struct { - uint32_t x,y; -} vec2; - -typedef vec2 vec_cen;//centered -typedef vec2 vec_cor;//left upper corner - -//fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) -#define HH_MATH_FIXED_POINT 7 - -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define CLAMP(N,LOWER,UPPER) (MIN(MAX(LOWER, N), UPPER)) diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h new file mode 100644 index 0000000..f5d7507 --- /dev/null +++ b/src/engine/draw_screen.h @@ -0,0 +1 @@ +// every function call for drawing the screen goes here. diff --git a/src/engine/level.h b/src/engine/level.h new file mode 100644 index 0000000..09f77e7 --- /dev/null +++ b/src/engine/level.h @@ -0,0 +1,4 @@ +//deal with loading/saving the correct level + +/** @brief */ +void hh_map_load(); diff --git a/src/engine/maths.h b/src/engine/maths.h new file mode 100644 index 0000000..c7f1b44 --- /dev/null +++ b/src/engine/maths.h @@ -0,0 +1,17 @@ +#pragma once +#include +// #include + +typedef struct { + uint32_t x,y; +} vec2; + +typedef vec2 vec_cen;//centered +typedef vec2 vec_cor;//left upper corner + +//fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) +#define HH_MATH_FIXED_POINT 7 + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) +#define CLAMP(N,LOWER,UPPER) (MIN(MAX(LOWER, N), UPPER)) -- cgit v1.2.3 From f4e4b53fe3ef96a7bd2d4052c5a181f05945a0aa Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Sat, 11 Mar 2023 11:16:50 +0100 Subject: makefile engine --- src/engine/draw_screen.h | 8 ++++++++ src/engine/engine.c | 3 +++ src/engine/level.h | 1 + src/makefile | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/engine/engine.c (limited to 'src') diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index f5d7507..4af5865 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -1 +1,9 @@ +#pragma once + + // every function call for drawing the screen goes here. +#include "engine/maths.h" + +#include +uint16_t hh_world_to_tile(vec2 pos); +void hh_draw_screen(vec2 viewport); \ No newline at end of file diff --git a/src/engine/engine.c b/src/engine/engine.c new file mode 100644 index 0000000..f3410a4 --- /dev/null +++ b/src/engine/engine.c @@ -0,0 +1,3 @@ +#include "engine/draw_screen.h" +#include "engine/level.h" +#include "engine/maths.h" diff --git a/src/engine/level.h b/src/engine/level.h index 09f77e7..8d610dd 100644 --- a/src/engine/level.h +++ b/src/engine/level.h @@ -1,3 +1,4 @@ +#pragma once //deal with loading/saving the correct level /** @brief */ diff --git a/src/makefile b/src/makefile index c69bfb5..96751fb 100644 --- a/src/makefile +++ b/src/makefile @@ -30,7 +30,8 @@ CFLAGS += $(if $(DESKTOP), -DHH_TARGET_DESKTOP, ) LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ - demo.c + demo.c \ + engine/engine.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From 311850396060dbd2b6d716d69bd98af44ee69164 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sat, 11 Mar 2023 12:08:52 +0100 Subject: C: --- src/engine/TODO/sprite_controller.h | 6 ------ src/engine/sprite_controller.c | 0 src/engine/sprite_controller.h | 8 ++++++++ 3 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 src/engine/TODO/sprite_controller.h create mode 100644 src/engine/sprite_controller.c create mode 100644 src/engine/sprite_controller.h (limited to 'src') diff --git a/src/engine/TODO/sprite_controller.h b/src/engine/TODO/sprite_controller.h deleted file mode 100644 index c1fadff..0000000 --- a/src/engine/TODO/sprite_controller.h +++ /dev/null @@ -1,6 +0,0 @@ -// handles sprites - -// Bg sprites - - -// Fg or entity sprites diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c new file mode 100644 index 0000000..e69de29 diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h new file mode 100644 index 0000000..a433bd6 --- /dev/null +++ b/src/engine/sprite_controller.h @@ -0,0 +1,8 @@ +#pragma once +// handles sprites + +// Bg sprites + +// Fg or entity sprites + + -- cgit v1.2.3 From 557cbed3ab2dea1dafd61ccdc3521aeed9b63a43 Mon Sep 17 00:00:00 2001 From: NielsCoding <101340368+NielsCoding@users.noreply.github.com> Date: Sat, 11 Mar 2023 19:46:57 +0100 Subject: drawing map en read from binary complete. shift to background. --- src/engine/draw_screen.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ src/engine/draw_screen.h | 18 +++++++++++--- src/makefile | 3 ++- 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 src/engine/draw_screen.c (limited to 'src') diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c new file mode 100644 index 0000000..3e4d8c4 --- /dev/null +++ b/src/engine/draw_screen.c @@ -0,0 +1,61 @@ +#include "draw_screen.h" + +uint8_t hh_world_to_tile(vec2 pos){ + + FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + if (!level) { /* check if file opened successfully */ + fprintf(stderr, "Error: Failed to open file.\n"); + return 0; + } + int index = (pos.y + pos.x); + fseek(level, (index * sizeof(int)) + sizeof(int), SEEK_SET); + int* tile = (int*)malloc(sizeof(int)); + fread(tile, sizeof(int), 1, level); // read 1 tile from binary + + fclose(level); + int val = *tile; + free(tile); + return val; +} + + +// remeber old value to know which part to update. +vec2 previousViewport = { .x = 0, .y = 0 }; +void hh_draw_screen(vec2 viewport){ + if (viewport.x == previousViewport.x && viewport.y == previousViewport.y) return; + + hh_ppu_update_aux((hh_s_ppu_loc_aux){ + .bg_shift_x = viewport.x*HH_PPU_SPRITE_WIDTH, + .bg_shift_y = viewport.y*HH_PPU_SPRITE_HEIGHT, + .fg_fetch = 0, + .sysreset = 0, + }); + + // update previous viewport values + previousViewport = viewport; +} + +void hh_setup_screen(){ + //(HH_map_size_X*HH_map_size_Y) + int size = 3200; // max X = 40 en max Y = 80 + FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + if (!level) { /* check if file opened successfully */ + fprintf(stderr, "Error: Failed to open file.\n"); + return; + } + fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); + int* tile = (int*)malloc(size*sizeof(int)); + fread(tile, sizeof(int), size, level); // read 1 tile from binary + + fclose(level); + + for(int BAM_index = 0; BAM_index < size; BAM_index++){ + hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = tile[BAM_index]+1, + .tilemap_index = tile[BAM_index], + }); + } + free(tile); +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index 4af5865..8d7df47 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -2,8 +2,20 @@ // every function call for drawing the screen goes here. -#include "engine/maths.h" +#include "../engine/maths.h" +#include "ppu/ppu.h" +#include #include -uint16_t hh_world_to_tile(vec2 pos); -void hh_draw_screen(vec2 viewport); \ No newline at end of file +#include + + +#define HH_map_size_X 80 +#define HH_map_size_Y 60 + +/** @brief return a single tile from world binary */ +uint8_t hh_world_to_tile(vec2 pos); +/** @brief shift to level if viewport changed position */ +void hh_draw_screen(vec2 viewport); +/** @brief send data to BAM memory from binary level */ +void hh_setup_screen(); diff --git a/src/makefile b/src/makefile index 96751fb..96f3108 100644 --- a/src/makefile +++ b/src/makefile @@ -31,7 +31,8 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c + engine/engine.c \ + engine/draw_screen.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From c12ff10740927c6040c83b3399ad35e94117131c Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Sat, 11 Mar 2023 20:56:26 +0100 Subject: Fixed movement Adjusted movement speed otherwise wouldnt show any movement. Also changed input testing lines so it does work --- src/demo.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/demo.c b/src/demo.c index b9bba17..baaf73d 100644 --- a/src/demo.c +++ b/src/demo.c @@ -12,7 +12,7 @@ hh_s_entity_player g_hh_player_1 = { .pos_x = 31000, // 0b0000 0001 0011 0110 .pos_y = 21000, .radius = 8, - .speed = 1, + .speed = 100, .direction_x = 1, .rotation = 8, .in_air = false, @@ -66,14 +66,17 @@ void hh_demo_setup() { void hh_demo_loop(unsigned long frame) { hh_player_movement(); + // input testing (no hitbox stuff) + // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R + // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U + // adjust map size g_hh_pos_x = g_hh_player_1.pos_x / 100; g_hh_pos_y = g_hh_player_1.pos_y / 100; - // input testing (no hitbox stuff) - // pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - // pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + + // update player sprite on ppu g_hh_demo_balls[0].position_x = g_hh_pos_x; @@ -102,7 +105,7 @@ void hh_demo_loop(unsigned long frame) { void hh_player_movement() { int8_t directionX = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - int8_t directionY = (-1 * g_hh_controller_p1.dpad_down) + (1 * g_hh_controller_p1.dpad_up); // -1 = D || 1 == U + int8_t directionY = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U uint8_t i, j; uint8_t rotation = 0; // 0-7 @@ -140,11 +143,11 @@ void hh_player_movement() { if (g_hh_player_1.in_air == false && directionX != 0) { if (directionX == 1) { - tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 20; - modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 2000; + tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 16; + modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 1600; } else if (directionX == -1) { - tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 20; - modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 2000; + tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 16; + modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 1600; } if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] != 1) { @@ -163,6 +166,11 @@ void hh_player_movement() { { } + + if(directionY != 0) + { + // g_hh_player_1.pos_y = g_hh_player_1.pos_y + (directionY * g_hh_player_1.speed * 2); // NEW x set + } // collision map floor (y-axis) (falling) // if falling no jump press (implement) /* -- cgit v1.2.3 From a386709d12167ab8f85336a1764040c3f573e9eb Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 12 Mar 2023 11:37:58 +0100 Subject: integrated palettes and fixed reading tiles --- src/engine/engine.c | 1 + src/engine/sprite_controller.c | 10 + src/engine/sprite_controller.h | 96 ++++++++ src/makefile | 3 +- src/ppusim/sim.c | 12 +- test/bin/exportingPalettes.md | 4 + test/bin/test_file_read.c | 11 +- test/bin/tilemap.pip | 512 +++++++++++++++++++++++++++++++++++++++++ 8 files changed, 637 insertions(+), 12 deletions(-) create mode 100644 test/bin/exportingPalettes.md create mode 100644 test/bin/tilemap.pip (limited to 'src') diff --git a/src/engine/engine.c b/src/engine/engine.c index f3410a4..799ee7c 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,3 +1,4 @@ #include "engine/draw_screen.h" #include "engine/level.h" #include "engine/maths.h" +#include "engine/sprite_controller.h" diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c index e69de29..c224ff7 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -0,0 +1,10 @@ +#include + +#include "engine/sprite_controller.h" +// #include "engine/maths.h" +#include "ppu/types.h" +#include "ppu/consts.h" + +uint8_t hh_get_palette(uint16_t tile_idx) { + return hh_g_sprite_palette[tile_idx]; +} diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index a433bd6..47ab0af 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -1,8 +1,104 @@ #pragma once +#include + +#include "ppu/types.h" + // handles sprites // Bg sprites // Fg or entity sprites +//TODO: pack data inside of sprite_palette LUT +//HH_PPU_PALETTE_COUNT +#define HH_SPRITE_COUNT 32 +#define HH_PAL_IDX_SKY 0 +#define HH_PAL_IDX_BRICK 1 +uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { + 0,1,1,1,1,1,1,1,1,1, //1+9 + 1,1,1,1,1,1,1,1,1,1, //6+4 + 1,1,1,1,1,1,1,1,1, //9 + 7,7,7,2,7,7,1,2,7 + //other palettes here: +}; + + +hh_ppu_loc_palette_table_t hh_g_palette = { + {//palette info here + {0x1,0x2,0x3}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + {//Bricks + {0x1,0x2,0x3},//01 + {0xd,0x8,0xa},//24 + {0x0,0x0,0x1},//25 + {0x1,0x1,0x1},//26 + {0x1,0x1,0x2},//27 + {0x2,0x2,0x3},//28 + {0x3,0x4,0x5},//29 + {0x5,0x1,0x7}}, + {//slime + {0x1,0x2,0x3}, + {0x1,0x3,0x2}, + {0x4,0x8,0x3}, + {0x7,0xa,0x4}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}} +}; + +/** @brief return palette index that belongs to tilemap index */ +uint8_t hh_get_palette(uint16_t tile_idx); +bool hh_colidable(uint16_t tile_idx); diff --git a/src/makefile b/src/makefile index 96751fb..02fcb12 100644 --- a/src/makefile +++ b/src/makefile @@ -31,7 +31,8 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c + engine/engine.c \ + engine/sprite_controller.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index a759039..1e7e609 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,21 +29,21 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + char* filename = "../test/bin/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ - printf("File error!"); + fprintf(stderr,"File error!"); return;//error } - + int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT); fseek(fp, 0, SEEK_END);//goto EOF - int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + int _size = ftell(fp)/sprite_size; fseek(fp, 0, 0);//goto start of file for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + uint8_t data[sprite_size]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + fread(data,sizeof(uint8_t),sprite_size,fp); hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data); sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE; diff --git a/test/bin/exportingPalettes.md b/test/bin/exportingPalettes.md new file mode 100644 index 0000000..be4a354 --- /dev/null +++ b/test/bin/exportingPalettes.md @@ -0,0 +1,4 @@ +```sh +cat test.src|head -n 46 | awk '{printf "%02x: {0x%x,0x%x,0x%x}\n",NR,$1/2,$2/2,$3/2 }' > hex_palettes +``` + diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index 391e2c6..df93395 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -18,19 +18,20 @@ void printData(uint8_t* in) { void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + char* filename = "slime.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ return;//error } + int sprite_size = (16 * 16); fseek(fp, 0, SEEK_END); - int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; - fseek(fp, 0, 0); + int _size = ftell(fp)/sprite_size; + rewind(fp); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + uint8_t data[sprite_size]; + fread(data,1,sprite_size,fp); printData(data); } diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip new file mode 100644 index 0000000..c0c646e --- /dev/null +++ b/test/bin/tilemap.pip @@ -0,0 +1,512 @@ +0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 +0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 +0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 +03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 +04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 +0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 +06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 +0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 +0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 +0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 +0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 +0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 +0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 +0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 +0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 +0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 +0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 +0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 +0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 +0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 +0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 +0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 +0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 +0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 +0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 +0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 +1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 +10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 +10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 +10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 +11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 +11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 +11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 +1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 +1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 +1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 +1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 +1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 +1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 +1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 +1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 +15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 +15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 +15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 +15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 +15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 +16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 +1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 +1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 +1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 +1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 +17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 +17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 +17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 +17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 +17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 +1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 +1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 +1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 +1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 +18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 +18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 +18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 +18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 +1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 +1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 +1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 +1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 +19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 +19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 +19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 +19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 +19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 +1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 +1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 +1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 +1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 +1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 +1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 +1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 +1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 +1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 +1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 +1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 +1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 +1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 +1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 +1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 +1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 +1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00 +1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00 +1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00 +1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 +1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 +1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 +1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 +1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- cgit v1.2.3 From c74b9b2ff60db2ddc7fe50686b6b654ceea3896e Mon Sep 17 00:00:00 2001 From: UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> Date: Sun, 12 Mar 2023 11:38:48 +0100 Subject: syntax update --- src/engine/draw_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 3e4d8c4..acf5b41 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -21,7 +21,7 @@ uint8_t hh_world_to_tile(vec2 pos){ // remeber old value to know which part to update. vec2 previousViewport = { .x = 0, .y = 0 }; -void hh_draw_screen(vec2 viewport){ +void hh_draw_screen(vec_cor viewport){ if (viewport.x == previousViewport.x && viewport.y == previousViewport.y) return; hh_ppu_update_aux((hh_s_ppu_loc_aux){ -- cgit v1.2.3 From 43951373604173c70bb2423dd56988b60a6704db Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 12 Mar 2023 12:58:51 +0100 Subject: camera movement --- src/engine/camera.c | 16 ++++++++++++++++ src/engine/camera.h | 6 ++++++ src/engine/draw_screen.c | 9 +++++---- src/engine/draw_screen.h | 2 +- src/engine/maths.c | 15 +++++++++++++++ src/engine/maths.h | 3 +++ src/engine/sprite_controller.c | 11 ++++++++++- src/engine/sprite_controller.h | 24 +++++++++++++----------- 8 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 src/engine/camera.c create mode 100644 src/engine/camera.h create mode 100644 src/engine/maths.c (limited to 'src') diff --git a/src/engine/camera.c b/src/engine/camera.c new file mode 100644 index 0000000..46c2d93 --- /dev/null +++ b/src/engine/camera.c @@ -0,0 +1,16 @@ +#include "engine/camera.h" + +#include "ppu/consts.h" + + +vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ + + new = vec_cen2cor(new,(vec2){.x=20,.y=30}); + static vec_cor old; + + old.x = CLAMP(new.x,min.x,max.x); + old.y = CLAMP(new.y,min.y,max.y); + + return old; +} + diff --git a/src/engine/camera.h b/src/engine/camera.h new file mode 100644 index 0000000..b3ffb52 --- /dev/null +++ b/src/engine/camera.h @@ -0,0 +1,6 @@ +#pragma once + +#include "engine/maths.h" + +vec_cor hh_update_camera(vec_cor new, vec2 min, vec2 max); + diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index acf5b41..0295241 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -1,4 +1,5 @@ -#include "draw_screen.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" uint8_t hh_world_to_tile(vec2 pos){ @@ -37,8 +38,8 @@ void hh_draw_screen(vec_cor viewport){ void hh_setup_screen(){ //(HH_map_size_X*HH_map_size_Y) - int size = 3200; // max X = 40 en max Y = 80 - FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + int size = 2400; // max X = 40 en max Y = 80 + FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ fprintf(stderr, "Error: Failed to open file.\n"); return; @@ -53,7 +54,7 @@ void hh_setup_screen(){ hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){ .horizontal_flip = false, .vertical_flip = false, - .palette_index = tile[BAM_index]+1, + .palette_index = hh_get_palette(tile[BAM_index]), .tilemap_index = tile[BAM_index], }); } diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index 8d7df47..b181108 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -2,7 +2,7 @@ // every function call for drawing the screen goes here. -#include "../engine/maths.h" +#include "engine/maths.h" #include "ppu/ppu.h" #include diff --git a/src/engine/maths.c b/src/engine/maths.c new file mode 100644 index 0000000..ebd699c --- /dev/null +++ b/src/engine/maths.c @@ -0,0 +1,15 @@ +#include "engine/maths.h" + +vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){ + return (vec_cor){ + .x = in.x - halfDistance.x, + .y = in.y - halfDistance.y, + }; +} + +vec_cen vec_cor2cen(vec_cor in, vec2 halfDistance){ + return (vec_cen){ + .x = in.x + halfDistance.x, + .y = in.y + halfDistance.y, + }; +} diff --git a/src/engine/maths.h b/src/engine/maths.h index c7f1b44..bd20202 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -9,6 +9,9 @@ typedef struct { typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner +vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance); +vec_cor vec_cor2cen(vec_cen in, vec2 halfDistance); + //fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) #define HH_MATH_FIXED_POINT 7 diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c index c224ff7..d4c44ab 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -4,7 +4,16 @@ // #include "engine/maths.h" #include "ppu/types.h" #include "ppu/consts.h" +#include "ppu/ppu.h" -uint8_t hh_get_palette(uint16_t tile_idx) { +uint8_t hh_get_palette(uint8_t tile_idx) { return hh_g_sprite_palette[tile_idx]; } + +void hh_setup_palettes(){ + for (int idx = 0; idx < HH_PPU_PALETTE_COUNT; idx++) { + for (int col = 0; col < HH_PPU_PALETTE_COLOR_COUNT; col++) { + hh_ppu_update_color(idx,col,hh_g_palette[idx][col]); + } + } +} diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index 47ab0af..001a459 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -11,10 +11,10 @@ //TODO: pack data inside of sprite_palette LUT //HH_PPU_PALETTE_COUNT -#define HH_SPRITE_COUNT 32 +#define HH_SPRITE_COUNT 40 #define HH_PAL_IDX_SKY 0 #define HH_PAL_IDX_BRICK 1 -uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { +const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { 0,1,1,1,1,1,1,1,1,1, //1+9 1,1,1,1,1,1,1,1,1,1, //6+4 1,1,1,1,1,1,1,1,1, //9 @@ -23,7 +23,7 @@ uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { }; -hh_ppu_loc_palette_table_t hh_g_palette = { +const static hh_ppu_loc_palette_table_t hh_g_palette = { {//palette info here {0x1,0x2,0x3}, {0x0,0x0,0x0}, @@ -88,17 +88,19 @@ hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}}, { + {0x0,0xf,0xf}, {0xf,0xf,0xf}, - {0xf,0xf,0xf}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, + {0xf,0x0,0xf}, + {0xf,0xf,0x0}, + {0xf,0x0,0x0}, + {0x0,0xf,0x0}, + {0x0,0x0,0xf}, {0x0,0x0,0x0}} }; +void hh_setup_palettes(); + /** @brief return palette index that belongs to tilemap index */ -uint8_t hh_get_palette(uint16_t tile_idx); +uint8_t hh_get_palette(uint8_t tile_idx); -bool hh_colidable(uint16_t tile_idx); +bool hh_colidable(uint8_t tile_idx); -- cgit v1.2.3 From bb2839a81d64e8644c57d83806ae41cc4cfad9dd Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 12 Mar 2023 13:00:45 +0100 Subject: makefile update --- src/engine/TODO/entity.c | 41 ----------------------------------------- src/engine/TODO/entity.h | 24 ------------------------ src/engine/entity.c | 41 +++++++++++++++++++++++++++++++++++++++++ src/engine/entity.h | 24 ++++++++++++++++++++++++ src/makefile | 7 +++++-- 5 files changed, 70 insertions(+), 67 deletions(-) delete mode 100644 src/engine/TODO/entity.c delete mode 100644 src/engine/TODO/entity.h create mode 100644 src/engine/entity.c create mode 100644 src/engine/entity.h (limited to 'src') diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c deleted file mode 100644 index fa550d5..0000000 --- a/src/engine/TODO/entity.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include "hh_entity.h" -#include "maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x - return true; - } - - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } -} - diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h deleted file mode 100644 index fdbeb8a..0000000 --- a/src/engine/TODO/entity.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -#include "maths.h" - -typedef struct { - vec2 pos, vec; - bool is_grounded; - int8_t hp; - //armor/block? -}hh_entity; - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/entity.c b/src/engine/entity.c new file mode 100644 index 0000000..1dc1df8 --- /dev/null +++ b/src/engine/entity.c @@ -0,0 +1,41 @@ +#include + +#include "engine/hh_entity.h" +#include "engine/maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec2* pos1, vec2* pos2){ + if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x + return true; + } + + if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ + if (entity->vec.x > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.x < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } +} + diff --git a/src/engine/entity.h b/src/engine/entity.h new file mode 100644 index 0000000..b2a0c49 --- /dev/null +++ b/src/engine/entity.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "engine/maths.h" + +typedef struct { + vec2 pos, vec; + bool is_grounded; + int8_t hp; + //armor/block? +}hh_entity; + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2* pos1, vec2* pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/makefile b/src/makefile index 10baa14..142d918 100644 --- a/src/makefile +++ b/src/makefile @@ -32,8 +32,11 @@ LOCAL_SRCS += main.c \ ppu/ppu.c \ demo.c \ engine/engine.c \ - engine/sprite_controller.c \ - engine/draw_screen.c + engine/sprite_controller.c \ + engine/draw_screen.c \ + engine/camera.c \ + engine/maths.c \ + engine/entity.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) -- cgit v1.2.3 From 5c4bf7d451135cd3af3e51976251f01cbb6e6573 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 13 Mar 2023 09:57:34 +0100 Subject: camera, movement, collisions --- src/engine/TODO/player_controller.h | 4 ---- src/engine/camera.c | 20 +++++++++++++++++- src/engine/draw_screen.c | 18 ++++++++-------- src/engine/entity.c | 41 +++++++++++++++++++++---------------- src/engine/entity.h | 6 ++++-- src/engine/maths.c | 4 ++++ src/engine/maths.h | 4 +++- src/engine/player_controller.c | 1 + src/engine/player_controller.h | 7 +++++++ src/engine/sprite_controller.c | 5 ++++- src/makefile | 1 + src/ppusim/input.c | 1 + src/ppusim/sim.c | 2 +- 13 files changed, 77 insertions(+), 37 deletions(-) delete mode 100644 src/engine/TODO/player_controller.h create mode 100644 src/engine/player_controller.c create mode 100644 src/engine/player_controller.h (limited to 'src') diff --git a/src/engine/TODO/player_controller.h b/src/engine/TODO/player_controller.h deleted file mode 100644 index 1e9b86c..0000000 --- a/src/engine/TODO/player_controller.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "maths.h" -#include "hh_entity.h" - -// inputs diff --git a/src/engine/camera.c b/src/engine/camera.c index 46c2d93..e756bd4 100644 --- a/src/engine/camera.c +++ b/src/engine/camera.c @@ -5,8 +5,26 @@ vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ - new = vec_cen2cor(new,(vec2){.x=20,.y=30}); + //TODO: change floating point math to fix point math + //TODO: fix buggy y-axis ?? + + // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2}); + new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH/2),.y=(new.y+(HH_PPU_SPRITE_HEIGHT/2))*2},(vec2){.x=max.x/2,.y=max.y/2}); + // new.x = new.x << HH_MATH_FIXED_POINT; + // new.y = new.y << HH_MATH_FIXED_POINT; static vec_cor old; + // old.x = old.x << HH_MATH_FIXED_POINT; + // old.y = old.y << HH_MATH_FIXED_POINT; + + // int16_t some = 0; + // some = some <<= HH_MATH_FIXED_POINT-1; + + new.x = (int)((float)new.x*0.1f + (float)old.x*0.9f); + new.y = (int)((float)new.y*0.1f + (float)old.y*0.9f); + + // old.x = old.x >> HH_MATH_FIXED_POINT; + // old.y = old.y >> HH_MATH_FIXED_POINT; + old.x = CLAMP(new.x,min.x,max.x); old.y = CLAMP(new.y,min.y,max.y); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 0295241..c4f3389 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -3,20 +3,20 @@ uint8_t hh_world_to_tile(vec2 pos){ - FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ fprintf(stderr, "Error: Failed to open file.\n"); return 0; } - int index = (pos.y + pos.x); + int index = ((pos.y/16)*40 + pos.x/16);//TODO: remove magic number(s) fseek(level, (index * sizeof(int)) + sizeof(int), SEEK_SET); - int* tile = (int*)malloc(sizeof(int)); - fread(tile, sizeof(int), 1, level); // read 1 tile from binary + int tile;// = (int*)malloc(sizeof(int)); + fread(&tile, sizeof(int), 1, level); // read 1 tile from binary fclose(level); - int val = *tile; - free(tile); - return val; + // int val = tile; + // free(tile); + return tile; } @@ -26,8 +26,8 @@ void hh_draw_screen(vec_cor viewport){ if (viewport.x == previousViewport.x && viewport.y == previousViewport.y) return; hh_ppu_update_aux((hh_s_ppu_loc_aux){ - .bg_shift_x = viewport.x*HH_PPU_SPRITE_WIDTH, - .bg_shift_y = viewport.y*HH_PPU_SPRITE_HEIGHT, + .bg_shift_x = viewport.x, + .bg_shift_y = viewport.y, .fg_fetch = 0, .sysreset = 0, }); diff --git a/src/engine/entity.c b/src/engine/entity.c index 1dc1df8..152cf1d 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -1,6 +1,6 @@ #include -#include "engine/hh_entity.h" +#include "engine/entity.h" #include "engine/maths.h" /* @@ -12,30 +12,35 @@ */ -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x +bool hh_collision(vec_cor pos1, vec2 pos2){ + if (pos2.x == CLAMP(pos2.x, pos1.x, pos1.x+16)){// hit x return true; } - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + if (pos2.y == CLAMP(pos2.y, pos1.y, pos1.y+16)){// hit y return true; } return false; } -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } +void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ + if (!hh_collision(pos_environment,entity->pos)) + return; + + printf("BONK!/n"); + // if (entity->vec.y > 0){ + // entity->pos.y = MAX(entity->pos.y,pos_environment.y); + // entity->vec.y = 0; + // } else { + // entity->pos.y = MIN(entity->pos.y,pos_environment.y); + // entity->vec.y = 0; + // } + // if (entity->vec.x <= 0){ + // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16); + // entity->vec.x = 0; + // } else { + // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16); + // entity->vec.x = 0; + // } } diff --git a/src/engine/entity.h b/src/engine/entity.h index b2a0c49..dee4aed 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include "engine/maths.h" @@ -8,6 +9,7 @@ typedef struct { vec2 pos, vec; bool is_grounded; int8_t hp; + int8_t speed; //armor/block? }hh_entity; @@ -15,10 +17,10 @@ typedef struct { /// @param pos1 position of environment tile to be checked /// @param pos2 position entity /// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); +bool hh_collision(vec2 pos1, vec2 pos2); /// @brief solve collisions /// @param environment position /// @param entity position /// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); +void hh_solve_collision(vec2 pos_environment, hh_entity* entity); diff --git a/src/engine/maths.c b/src/engine/maths.c index ebd699c..475bba2 100644 --- a/src/engine/maths.c +++ b/src/engine/maths.c @@ -1,5 +1,9 @@ #include "engine/maths.h" +vec2 vec_add(vec2 a, vec2 b){ + return (vec2){a.x + b.x, a.y + b.y}; +} + vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){ return (vec_cor){ .x = in.x - halfDistance.x, diff --git a/src/engine/maths.h b/src/engine/maths.h index bd20202..bef287e 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -3,12 +3,14 @@ // #include typedef struct { - uint32_t x,y; + int32_t x,y; } vec2; typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner +vec2 vec_add(vec2 a, vec2 b); + vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance); vec_cor vec_cor2cen(vec_cen in, vec2 halfDistance); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c new file mode 100644 index 0000000..27e522e --- /dev/null +++ b/src/engine/player_controller.c @@ -0,0 +1 @@ +#include "engine/player_controller.h" diff --git a/src/engine/player_controller.h b/src/engine/player_controller.h new file mode 100644 index 0000000..400c18e --- /dev/null +++ b/src/engine/player_controller.h @@ -0,0 +1,7 @@ +#pragma once + +#include "engine/maths.h" +#include "engine/entity.h" +// inputs + +void hh_player_actions(); diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c index d4c44ab..5d93cf8 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -1,7 +1,6 @@ #include #include "engine/sprite_controller.h" -// #include "engine/maths.h" #include "ppu/types.h" #include "ppu/consts.h" #include "ppu/ppu.h" @@ -17,3 +16,7 @@ void hh_setup_palettes(){ } } } + +bool hh_colidable(uint8_t tile_idx){ + return (hh_get_palette(tile_idx) != 0); +} diff --git a/src/makefile b/src/makefile index 142d918..d7d9087 100644 --- a/src/makefile +++ b/src/makefile @@ -33,6 +33,7 @@ LOCAL_SRCS += main.c \ demo.c \ engine/engine.c \ engine/sprite_controller.c \ + engine/player_controller.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 08bc382..5323fb1 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,4 +12,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; + g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE]; } diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 1e7e609..a5fec45 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -32,7 +32,7 @@ void hh_ppu_load_tilemap() { char* filename = "../test/bin/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ - fprintf(stderr,"File error!"); + fprintf(stderr,"Error: Failed to load tiles."); return;//error } int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT); -- cgit v1.2.3 From 506b1d11e6006e44de5b888eb342eb9dbed58d2c Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 13 Mar 2023 10:04:37 +0100 Subject: demo.c --- src/demo.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 184 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/demo.c b/src/demo.c index b9bba17..58cb461 100644 --- a/src/demo.c +++ b/src/demo.c @@ -1,10 +1,17 @@ #include #include "demo.h" -#include "entity.h" #include "input.h" +#include "entity.h" #include "ppu/ppu.h" +#include "engine/maths.h" +#include "engine/camera.h" +#include "engine/entity.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" + + #define HH_DEMO_BALL_COUNT 1 hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; @@ -32,10 +39,19 @@ uint8_t g_hh_data_send[3]; int g_hh_tile_x; int g_hh_tile_y; +typedef struct { + vec2 pos; + uint8_t idx; +}hh_s_tiles; + + +hh_entity hh_g_player, hh_g_player_new; void hh_demo_setup() { +#if 0 // load sprites - hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); - hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); + // hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); + // hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); + hh_ppu_update_sprite(1, HH_SQUARE); // background pattern hh_ppu_update_color(0, 1, (hh_ppu_rgb_color_t){0x4, 0x4, 0x4}); @@ -49,44 +65,189 @@ void hh_demo_setup() { } // cool colors - hh_ppu_update_color(1, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0xf}); - hh_ppu_update_color(2, 1, (hh_ppu_rgb_color_t){0xf, 0xf, 0xf}); - hh_ppu_update_color(3, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0x0}); - hh_ppu_update_color(4, 1, (hh_ppu_rgb_color_t){0x0, 0xf, 0xf}); - hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t){0x0, 0x0, 0xf}); + // hh_ppu_update_color(1, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0xf}); + // hh_ppu_update_color(2, 1, (hh_ppu_rgb_color_t){0xf, 0xf, 0xf}); + // hh_ppu_update_color(3, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0x0}); + // hh_ppu_update_color(4, 1, (hh_ppu_rgb_color_t){0x0, 0xf, 0xf}); + // hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t){0x0, 0x0, 0xf}); + + for (int i = 0; i < 8; i++) + { + hh_ppu_update_color(1,i,HH_SLIME[i]); + } + // balls +#else + hh_g_player = (hh_entity){ + .pos = {32,32}, + .vec = {0,0}, + .hp = 1, + .speed = 1, + .is_grounded = false + }; + for (unsigned i = 0; i < HH_DEMO_BALL_COUNT; i++) { g_hh_demo_balls[i].horizontal_flip = false; g_hh_demo_balls[i].vertical_flip = false; - g_hh_demo_balls[i].palette_index = i + 1; - g_hh_demo_balls[i].tilemap_index = 0; + g_hh_demo_balls[i].palette_index = 7; + g_hh_demo_balls[i].tilemap_index = 20; } + hh_setup_palettes(); + hh_setup_screen(); +#endif } void hh_demo_loop(unsigned long frame) { - hh_player_movement(); + // hh_player_movement(); // adjust map size - g_hh_pos_x = g_hh_player_1.pos_x / 100; - g_hh_pos_y = g_hh_player_1.pos_y / 100; + // g_hh_pos_x = g_hh_player_1.pos_x / 100; + // g_hh_pos_y = g_hh_player_1.pos_y / 100; // input testing (no hitbox stuff) - // pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - // pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + // g_hh_pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R + // g_hh_pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + + + + hh_g_player.vec = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), + .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; + // const int8_t maa = 3; + // const int8_t mbb = -3; + // if (g_hh_controller_p1.dpad_up) + + // if (g_hh_controller_p1.dpad_down) + + // if (g_hh_controller_p1.dpad_left) { + // hh_g_player.vec.x += mbb; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + // if (g_hh_controller_p1.dpad_right) { + // hh_g_player.vec.x += maa; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + if (g_hh_controller_p1.button_primary /*&& hh_g_player.is_grounded*/) //JUMP + hh_g_player.vec.y += -6; + // // if (g_hh_controller_p1.button_secondary) + + + hh_g_player.vec.y += 1; //gravity + + + //END OF VECTOR CHANGES + // hh_g_player.vec.y = CLAMP(hh_g_player.vec.y,-32,32); + // hh_g_player.vec.x = CLAMP(hh_g_player.vec.x,-32,32); + + hh_g_player_new.pos = (vec2){ + .x = hh_g_player.pos.x + hh_g_player.vec.x, + .y = hh_g_player.pos.y + hh_g_player.vec.y, + }; + + + + // const uint8_t empty = 0; + // hh_s_tiles tiles[9]; + // const vec2 tile_offset[9] = { + // (vec2){-16,-16},(vec2){0,-16},(vec2){+16,-16}, + // (vec2){-16,0}, (vec2){0,0}, (vec2){+16,0}, + // (vec2){-16,+16},(vec2){0,+16},(vec2){+16,+16}, + // }; + + // for (int i = 0; i < 9; i++) { + // vec2 temp_pos = vec_add(hh_g_player.pos, tile_offset[i]); + // temp_pos =(vec2){ + // .x = temp_pos.x, + // .y = temp_pos.y, + // }; + // hh_s_tiles tile = { + // .pos = temp_pos, + // .idx = hh_world_to_tile(temp_pos) + // }; + + // if(hh_colidable(tile.idx)) { + // tiles[i]=tile; + // // printf(" collidable near!"); + // } else { + // tiles[i].idx = 0; + // } + // } + /* + 012 + 345 + 678 + */ + + // for (int i = 0; i < 9; i++) + // { + // if (tiles[i].idx != 0){ + // hh_solve_collision(tiles[i].pos, &hh_g_player); + // } + // } + + hh_g_player_new.is_grounded = false; + + // solves x collision + if (hh_g_player.vec.x <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 15}))) { + hh_g_player_new.pos.x = (hh_g_player_new.pos.x & ~15) + 16, + hh_g_player_new.vec.x = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 15}))) { + hh_g_player_new.pos.x = hh_g_player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY + hh_g_player_new.vec.x = 0; + } + } + + //solves y collision + if (hh_g_player.vec.y <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 15}))) { + hh_g_player_new.pos.y = (hh_g_player_new.pos.y & ~15) + 16, + hh_g_player_new.vec.y = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 16})) || + hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player_new.pos.y + 15}))) { + hh_g_player_new.pos.y = hh_g_player_new.pos.y & ~15, + hh_g_player_new.vec.y = 0; + hh_g_player_new.is_grounded = true; + } + } + + hh_g_player = hh_g_player_new; + + + + vec_cor cam_pos;//value in tiles + // cam_pos = (vec2){0,0}; + cam_pos = hh_update_camera(hh_g_player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) + printf("%i, %i:%i, %i\n",hh_g_player.pos.x,hh_g_player.pos.y,cam_pos.x,cam_pos.y); + hh_draw_screen(cam_pos); // update player sprite on ppu - g_hh_demo_balls[0].position_x = g_hh_pos_x; - g_hh_demo_balls[0].position_y = g_hh_pos_y; + g_hh_demo_balls[0].position_x = (hh_g_player.pos.x-cam_pos.x); + g_hh_demo_balls[0].position_y = hh_g_player.pos.y-cam_pos.y; hh_ppu_update_foreground(0, g_hh_demo_balls[0]); + // for (int i = 0; i < HH_DEMO_BALL_COUNT; i++){ + // g_hh_demo_balls[i].position_x = hh_g_player.pos.x +16*i; + // g_hh_demo_balls[i].position_y = hh_g_player.pos.y; + // hh_ppu_update_foreground(i, g_hh_demo_balls[i]); + + // } + + // set background pattern position - hh_ppu_update_aux((hh_s_ppu_loc_aux){ - .bg_shift_x = (frame / 2) % HH_PPU_SPRITE_WIDTH, - .bg_shift_y = (frame / 8) % HH_PPU_SPRITE_HEIGHT, - .fg_fetch = 0, - .sysreset = 0, - }); + // hh_ppu_update_aux((hh_s_ppu_loc_aux){ + // .bg_shift_x = (frame / 2) % HH_PPU_SPRITE_WIDTH, + // .bg_shift_y = (frame / 8) % HH_PPU_SPRITE_HEIGHT, + // .fg_fetch = 0, + // .sysreset = 0, + // }); } // void sendData(uint8_t address, uint16_t data) { -- cgit v1.2.3 From e47f7fa198229b8598b8ab03ef8b2483f7c685bc Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 13:24:44 +0100 Subject: Background collision Added background collision for player and other entities. Added gravity and jump functionailty --- .vscode/c_cpp_properties.json | 3 +- .vscode/launch.json | 2 +- .vscode/tasks.json | 69 +++++++++++--- src/demo.c | 208 +++++++++++++++++++++++++++++++++--------- src/entity.h | 17 +++- src/ppusim/input.c | 1 + 6 files changed, 241 insertions(+), 59 deletions(-) (limited to 'src') diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 51f5ad0..3a0c430 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -2,7 +2,8 @@ "configurations": [ { "name": "src", - "compileCommands": "${workspaceFolder}/src/compile_commands.json" + "compileCommands": "${workspaceFolder}/src/compile_commands.json", + "configurationProvider": "ms-vscode.makefile-tools" } ], "version": 4 diff --git a/.vscode/launch.json b/.vscode/launch.json index 2f7561c..4ff91bb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "environment": [], "externalConsole": false, "MIMode": "gdb", - "preLaunchTask": "client/build", + "preLaunchTask": "build", "setupCommands": [ { "description": "Enable pretty-printing for gdb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 53a235e..a670b0f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,13 +16,19 @@ "isDefault": false, "kind": "build" }, - "options": { "cwd": "${workspaceFolder}/src" }, + "options": { + "cwd": "${workspaceFolder}/src" + }, "windows": { "command": "make -j", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "-j" ], + "args": [ + "-j" + ], "type": "shell" }, { @@ -32,13 +38,20 @@ "isDefault": false, "kind": "test" }, - "options": { "cwd": "${workspaceFolder}/src" }, + "options": { + "cwd": "${workspaceFolder}/src" + }, "windows": { "command": "make -j flash", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "-j", "flash" ], + "args": [ + "-j", + "flash" + ], "type": "shell" }, { @@ -48,13 +61,19 @@ "isDefault": false, "kind": "test" }, - "options": { "cwd": "${workspaceFolder}/src" }, + "options": { + "cwd": "${workspaceFolder}/src" + }, "windows": { "command": "make compile_commands.json", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "compile_commands" ], + "args": [ + "compile_commands" + ], "type": "shell" }, { @@ -64,14 +83,40 @@ "isDefault": false, "kind": "test" }, - "options": { "cwd": "${workspaceFolder}" }, + "options": { + "cwd": "${workspaceFolder}" + }, "windows": { "command": "make clean", - "args": [ "" ], + "args": [ + "" + ] }, "command": "make", - "args": [ "clean" ], + "args": [ + "clean" + ], "type": "shell" + }, + { + "type": "cppbuild", + "label": "C/C++: gcc.exe build active file", + "command": "C:\\msys64\\mingw64\\bin\\gcc.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}\\${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "C:\\msys64\\mingw64\\bin" + }, + "problemMatcher": [ + "$gcc" + ], + "group": "build", + "detail": "compiler: C:\\msys64\\mingw64\\bin\\gcc.exe" } ] } diff --git a/src/demo.c b/src/demo.c index baaf73d..f5d2e71 100644 --- a/src/demo.c +++ b/src/demo.c @@ -5,21 +5,36 @@ #include "input.h" #include "ppu/ppu.h" -#define HH_DEMO_BALL_COUNT 1 +#define HH_DEMO_BALL_COUNT 2 hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; hh_s_entity_player g_hh_player_1 = { - .pos_x = 31000, // 0b0000 0001 0011 0110 - .pos_y = 21000, - .radius = 8, + .pos_x = 11000, + .pos_y = 5000, + .radius = 4, .speed = 100, + .air_speed = 80, .direction_x = 1, + .accelY = 0, .rotation = 8, .in_air = false, }; +hh_s_entity_enemy g_hh_enemy_1 = { + .pos_x = 16000, + .pos_y = 20000, + .radius = 4, + .speed = 100, + .direction_x = 1, + .accelY = 0, + .in_air = false, +}; + void hh_player_movement(); +int hh_background_collision_x(hh_s_entity_player tempEntity); +hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity); + uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110 uint16_t g_hh_pos_y; uint8_t g_hh_left = 0; @@ -68,7 +83,7 @@ void hh_demo_loop(unsigned long frame) { hh_player_movement(); // input testing (no hitbox stuff) // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R - // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U + g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U // adjust map size @@ -76,12 +91,14 @@ void hh_demo_loop(unsigned long frame) { g_hh_pos_y = g_hh_player_1.pos_y / 100; - - // update player sprite on ppu g_hh_demo_balls[0].position_x = g_hh_pos_x; g_hh_demo_balls[0].position_y = g_hh_pos_y; + + g_hh_demo_balls[1].position_x = 220; + g_hh_demo_balls[1].position_y = 220; hh_ppu_update_foreground(0, g_hh_demo_balls[0]); + hh_ppu_update_foreground(1, g_hh_demo_balls[1]); // set background pattern position hh_ppu_update_aux((hh_s_ppu_loc_aux){ @@ -107,6 +124,12 @@ void hh_player_movement() { int8_t directionX = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R int8_t directionY = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U + if(g_hh_controller_p1.button_primary == 1 && g_hh_player_1.accelY == 0 && g_hh_player_1.in_air == false) + { + g_hh_player_1.accelY = 25; + } + + uint8_t i, j; uint8_t rotation = 0; // 0-7 @@ -124,63 +147,162 @@ void hh_player_movement() { rotation++; } } - // direction calc - if (directionX != 0) // update direction if player is not idle + // X-axis calc + if (directionX != 0) // update direction and position if player is not idle { g_hh_player_1.direction_x = directionX; + g_hh_player_1.pos_x = hh_background_collision_x(g_hh_player_1); } - // collision map x-axis + + g_hh_player_1 = hh_background_collision_y_player(g_hh_player_1); + +} + + +int hh_background_collision_x(hh_s_entity_player tempEntity){ // tile calc including radius and direction for background coliision uint16_t tileColX; - uint16_t tileColY = (g_hh_player_1.pos_y / 100) / 16; + uint16_t tileColY = (tempEntity.pos_y / 100) / 8; ; // remaining space between grid and exact uint8_t modTileX; - uint8_t modTileY; - - if (g_hh_player_1.in_air == false && directionX != 0) { - if (directionX == 1) { - tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 16; - modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 1600; - } else if (directionX == -1) { - tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 16; - modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 1600; - } - if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] != 1) { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set - } - else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] == 1) { + + if (tempEntity.direction_x == 1) { + tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; + modTileX = 800 -((tempEntity.pos_x + (100 * tempEntity.radius)) % 800); + } else if (tempEntity.direction_x == -1) { + tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius )/ 8; + modTileX = (tempEntity.pos_x - (100 * tempEntity.radius)) % 800; + } + + tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box + + if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { + tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //bottom of player box + if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { + if(tempEntity.in_air== true){ + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // 80% of max speed if in air + } else { + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // 80% of max speed if in air + } + } else { + if(tempEntity.in_air == true){ + if (modTileX < tempEntity.air_speed) { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + } else { + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // + } + } else { + if (modTileX < g_hh_player_1.speed) { + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + } else { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // + } + } + } + } else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] == 1) { + if(tempEntity.in_air == true){ + if (modTileX < tempEntity.air_speed) { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + } else { + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // + } + } else { if (modTileX < g_hh_player_1.speed) { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * modTileX); // NEW x set + tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set } else { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set + tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // } } - - } else // if in air different all borders have to be checked - { } + + return tempEntity.pos_x; + +} + +hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity){ + + uint16_t tileColX; + uint16_t tileColY; + + + // remaining space between grid and exact + uint8_t modTileY; - if(directionY != 0) + if(g_hh_controller_p1.button_primary == 1 && tempEntity.accelY == 0 && tempEntity.in_air == false) { - // g_hh_player_1.pos_y = g_hh_player_1.pos_y + (directionY * g_hh_player_1.speed * 2); // NEW x set +// tempEntity.accelY = 25; } - // collision map floor (y-axis) (falling) - // if falling no jump press (implement) - /* - tileColY = (( g_hh_player_1.pos_y / 100) + g_hh_player_1.radius) / 16; //bottom of player box - modTileY = 1; - if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) //rework after jumping - { - g_hh_player_1.pos_y = g_hh_player_1.pos_y + 5 ;// NEW y set //makew var gravity - //playerStat = falling; //for later use of graphics/sound + + tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box + tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; //right of player + modTileY = ((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //bottom of box + + //rework arfter jumping + if(tempEntity.accelY <= 0){ //falling + if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) {//check bottom right first + tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; + if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) { + tempEntity.in_air = true; + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + if (tempEntity.accelY > -35){ + tempEntity.accelY--; + } + } + else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + } + tempEntity.in_air = false; + tempEntity.accelY = 0; + } + } + else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + } + tempEntity.in_air = false; + tempEntity.accelY = 0; + } } - */ - // else if(HH_DEMO_HITBOX_TILEMAP[]) + else{ //jumping + tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //top of player box + modTileY = 800 -((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //top of box + if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) {//check bottom right first + tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; + if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set + tempEntity.in_air = true; + tempEntity.accelY--; + } else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ; + } + tempEntity.accelY = 0; + } + } + else { + if(modTileY < tempEntity.accelY * -8) { + tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set //makew var gravity + } else { + tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set //makew var gravity + } + tempEntity.accelY = 0; + } + + } + + return tempEntity; } diff --git a/src/entity.h b/src/entity.h index 181182b..3684252 100644 --- a/src/entity.h +++ b/src/entity.h @@ -8,7 +8,20 @@ typedef struct { uint16_t pos_y; uint8_t radius; uint8_t rotation; //45 degrees steps 0 == right 2 == down 4 == left 6 == up - uint8_t direction_x; //direction where its looking at in case no input; - int8_t speed; //10 default L/R MODifier + int8_t direction_x; //direction where its looking at in case no input; + int8_t accelY; + int16_t speed; // default L/R MODifier + int16_t air_speed; // air L/R MODifier bool in_air; } hh_s_entity_player; + +typedef struct { + uint16_t pos_x; + uint16_t pos_y; + uint8_t radius; + uint8_t direction_x; //direction where its walking towards; + int8_t accelY; + int16_t speed; // default L/R MODifier + int16_t air_speed; + bool in_air; +} hh_s_entity_enemy; diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 08bc382..4491a63 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,4 +12,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; + g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_K]; } -- cgit v1.2.3 From 30eca8d3bd03c1efe52f2432c4b6b0c842fffa2d Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 13 Mar 2023 17:10:11 +0100 Subject: demo.c clean up --- src/demo.c | 197 +---------------------------------------- src/engine/entity.c | 12 +-- src/engine/entity.h | 33 ++++++- src/engine/player_controller.c | 166 ++++++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+), 201 deletions(-) (limited to 'src') diff --git a/src/demo.c b/src/demo.c index 58cb461..bb0aecf 100644 --- a/src/demo.c +++ b/src/demo.c @@ -9,11 +9,10 @@ #include "engine/camera.h" #include "engine/entity.h" #include "engine/draw_screen.h" +#include "engine/player_controller.h" #include "engine/sprite_controller.h" -#define HH_DEMO_BALL_COUNT 1 -hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; hh_s_entity_player g_hh_player_1 = { .pos_x = 31000, // 0b0000 0001 0011 0110 @@ -47,207 +46,17 @@ typedef struct { hh_entity hh_g_player, hh_g_player_new; void hh_demo_setup() { -#if 0 - // load sprites - // hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); - // hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); - hh_ppu_update_sprite(1, HH_SQUARE); - // background pattern - hh_ppu_update_color(0, 1, (hh_ppu_rgb_color_t){0x4, 0x4, 0x4}); - for (unsigned i = 0; i < HH_PPU_BG_CANVAS_TILES_H * HH_PPU_BG_CANVAS_TILES_V; i++) { - hh_ppu_update_background(i, (hh_s_ppu_loc_bam_entry){ - .horizontal_flip = false, - .vertical_flip = false, - .palette_index = 0, - .tilemap_index = 1, - }); - } - - // cool colors - // hh_ppu_update_color(1, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0xf}); - // hh_ppu_update_color(2, 1, (hh_ppu_rgb_color_t){0xf, 0xf, 0xf}); - // hh_ppu_update_color(3, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0x0}); - // hh_ppu_update_color(4, 1, (hh_ppu_rgb_color_t){0x0, 0xf, 0xf}); - // hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t){0x0, 0x0, 0xf}); - - for (int i = 0; i < 8; i++) - { - hh_ppu_update_color(1,i,HH_SLIME[i]); - } - - - // balls -#else - hh_g_player = (hh_entity){ - .pos = {32,32}, - .vec = {0,0}, - .hp = 1, - .speed = 1, - .is_grounded = false - }; - - for (unsigned i = 0; i < HH_DEMO_BALL_COUNT; i++) { - g_hh_demo_balls[i].horizontal_flip = false; - g_hh_demo_balls[i].vertical_flip = false; - g_hh_demo_balls[i].palette_index = 7; - g_hh_demo_balls[i].tilemap_index = 20; - } hh_setup_palettes(); hh_setup_screen(); -#endif + } void hh_demo_loop(unsigned long frame) { // hh_player_movement(); - // adjust map size - // g_hh_pos_x = g_hh_player_1.pos_x / 100; - // g_hh_pos_y = g_hh_player_1.pos_y / 100; - - // input testing (no hitbox stuff) - // g_hh_pos_x += (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - // g_hh_pos_y += (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U - - - - hh_g_player.vec = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), - .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; - // const int8_t maa = 3; - // const int8_t mbb = -3; - // if (g_hh_controller_p1.dpad_up) - - // if (g_hh_controller_p1.dpad_down) - - // if (g_hh_controller_p1.dpad_left) { - // hh_g_player.vec.x += mbb; - // // g_hh_demo_balls[0].horizontal_flip = true; - // } - // if (g_hh_controller_p1.dpad_right) { - // hh_g_player.vec.x += maa; - // // g_hh_demo_balls[0].horizontal_flip = true; - // } - if (g_hh_controller_p1.button_primary /*&& hh_g_player.is_grounded*/) //JUMP - hh_g_player.vec.y += -6; - // // if (g_hh_controller_p1.button_secondary) - - - hh_g_player.vec.y += 1; //gravity - - - //END OF VECTOR CHANGES - // hh_g_player.vec.y = CLAMP(hh_g_player.vec.y,-32,32); - // hh_g_player.vec.x = CLAMP(hh_g_player.vec.x,-32,32); - - hh_g_player_new.pos = (vec2){ - .x = hh_g_player.pos.x + hh_g_player.vec.x, - .y = hh_g_player.pos.y + hh_g_player.vec.y, - }; - - - - - // const uint8_t empty = 0; - // hh_s_tiles tiles[9]; - // const vec2 tile_offset[9] = { - // (vec2){-16,-16},(vec2){0,-16},(vec2){+16,-16}, - // (vec2){-16,0}, (vec2){0,0}, (vec2){+16,0}, - // (vec2){-16,+16},(vec2){0,+16},(vec2){+16,+16}, - // }; - - // for (int i = 0; i < 9; i++) { - // vec2 temp_pos = vec_add(hh_g_player.pos, tile_offset[i]); - // temp_pos =(vec2){ - // .x = temp_pos.x, - // .y = temp_pos.y, - // }; - // hh_s_tiles tile = { - // .pos = temp_pos, - // .idx = hh_world_to_tile(temp_pos) - // }; - - // if(hh_colidable(tile.idx)) { - // tiles[i]=tile; - // // printf(" collidable near!"); - // } else { - // tiles[i].idx = 0; - // } - // } - /* - 012 - 345 - 678 - */ - - // for (int i = 0; i < 9; i++) - // { - // if (tiles[i].idx != 0){ - // hh_solve_collision(tiles[i].pos, &hh_g_player); - // } - // } - - hh_g_player_new.is_grounded = false; - - // solves x collision - if (hh_g_player.vec.x <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player.pos.y + 15}))) { - hh_g_player_new.pos.x = (hh_g_player_new.pos.x & ~15) + 16, - hh_g_player_new.vec.x = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player.pos.y + 15}))) { - hh_g_player_new.pos.x = hh_g_player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY - hh_g_player_new.vec.x = 0; - } - } - - //solves y collision - if (hh_g_player.vec.y <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 15}))) { - hh_g_player_new.pos.y = (hh_g_player_new.pos.y & ~15) + 16, - hh_g_player_new.vec.y = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 0, .y=hh_g_player_new.pos.y + 16})) || - hh_colidable(hh_world_to_tile((vec2){.x=hh_g_player_new.pos.x + 16, .y=hh_g_player_new.pos.y + 15}))) { - hh_g_player_new.pos.y = hh_g_player_new.pos.y & ~15, - hh_g_player_new.vec.y = 0; - hh_g_player_new.is_grounded = true; - } - } - - hh_g_player = hh_g_player_new; - - - - vec_cor cam_pos;//value in tiles - // cam_pos = (vec2){0,0}; - cam_pos = hh_update_camera(hh_g_player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) - printf("%i, %i:%i, %i\n",hh_g_player.pos.x,hh_g_player.pos.y,cam_pos.x,cam_pos.y); - hh_draw_screen(cam_pos); - // update player sprite on ppu - g_hh_demo_balls[0].position_x = (hh_g_player.pos.x-cam_pos.x); - g_hh_demo_balls[0].position_y = hh_g_player.pos.y-cam_pos.y; - hh_ppu_update_foreground(0, g_hh_demo_balls[0]); - - // for (int i = 0; i < HH_DEMO_BALL_COUNT; i++){ - // g_hh_demo_balls[i].position_x = hh_g_player.pos.x +16*i; - // g_hh_demo_balls[i].position_y = hh_g_player.pos.y; - // hh_ppu_update_foreground(i, g_hh_demo_balls[i]); - - // } - + hh_player_actions(); - // set background pattern position - // hh_ppu_update_aux((hh_s_ppu_loc_aux){ - // .bg_shift_x = (frame / 2) % HH_PPU_SPRITE_WIDTH, - // .bg_shift_y = (frame / 8) % HH_PPU_SPRITE_HEIGHT, - // .fg_fetch = 0, - // .sysreset = 0, - // }); } // void sendData(uint8_t address, uint16_t data) { diff --git a/src/engine/entity.c b/src/engine/entity.c index 152cf1d..153e7e1 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -28,19 +28,19 @@ void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ return; printf("BONK!/n"); - // if (entity->vec.y > 0){ + // if (entity->vel.y > 0){ // entity->pos.y = MAX(entity->pos.y,pos_environment.y); - // entity->vec.y = 0; + // entity->vel.y = 0; // } else { // entity->pos.y = MIN(entity->pos.y,pos_environment.y); - // entity->vec.y = 0; + // entity->vel.y = 0; // } - // if (entity->vec.x <= 0){ + // if (entity->vel.x <= 0){ // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16); - // entity->vec.x = 0; + // entity->vel.x = 0; // } else { // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16); - // entity->vec.x = 0; + // entity->vel.x = 0; // } } diff --git a/src/engine/entity.h b/src/engine/entity.h index dee4aed..f45dae2 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -3,16 +3,47 @@ #include #include +#include "ppu/types.h" + #include "engine/maths.h" +typedef uint8_t hh_idx_t; + +typedef enum { + fire, ice, poison +}hh_e_damage_t; + +typedef struct { + hh_s_ppu_loc_fam_entry fam; //screen + hh_idx_t frame0; + hh_idx_t palette; + +}hh_s_rendering; + +typedef struct { + int8_t hp; + int8_t dmg; + hh_e_damage_t dmg_type; + int8_t speed_x, speed_y; + +} hh_s_atributes; + + typedef struct { - vec2 pos, vec; + vec2 pos, vel, vec; bool is_grounded; int8_t hp; int8_t speed; + hh_s_rendering render; //armor/block? }hh_entity; +typedef struct { + hh_entity p; + hh_s_atributes atr; +}hh_s_player; + + /// @brief detect for collision enity and eviroment /// @param pos1 position of environment tile to be checked /// @param pos2 position entity diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 27e522e..6735620 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -1 +1,167 @@ +#include "ppu/types.h" +#include "engine/camera.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" #include "engine/player_controller.h" + +#include "demo.h" +#include + +#include "input.h" + +void hh_player_actions() { + static hh_entity player={ + .hp = 4, + .speed = 6, + .is_grounded = false, + .pos = (vec2){32,32}, + .vel = (vec2){0,0}, + .vec = (vec2){0,0}, + .render = { + .frame0 = 20, + .palette = 7, + .fam = (hh_s_ppu_loc_fam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 2, + } + } + }, player_new = {0}; + + // hh_input_read(); + player.vel = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), + .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; + // const int8_t maa = 3; + // const int8_t mbb = -3; + // if (g_hh_controller_p1.dpad_up) + // + // if (g_hh_controller_p1.dpad_down) + // + // if (g_hh_controller_p1.dpad_left) { + // player.vel.x += mbb; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + // if (g_hh_controller_p1.dpad_right) { + // player.vel.x += maa; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + // if (g_hh_controller_p1.button_primary /*&& player.is_grounded*/) //JUMP + // player.vel.y += -6; + // // // if (g_hh_controller_p1.button_secondary) + + // player.render.fam.palette_index = 7; + // player.render.fam.tilemap_index = 7; + + // printf("%x ",player.render.fam.palette_index); + + // player.vel.y += 1; //gravity + + + //END OF VECTOR CHANGES + // player.vel.y = CLAMP(player.vel.y,-32,32); + // player.vel.x = CLAMP(player.vel.x,-32,32); + + player_new.pos = (vec2){ + .x = player.pos.x + player.vel.x, + .y = player.pos.y + player.vel.y, + }; + + + + // const uint8_t empty = 0; + // hh_s_tiles tiles[9]; + // const vec2 tile_offset[9] = { + // (vec2){-16,-16},(vec2){0,-16},(vec2){+16,-16}, + // (vec2){-16,0}, (vec2){0,0}, (vec2){+16,0}, + // (vec2){-16,+16},(vec2){0,+16},(vec2){+16,+16}, + // }; + // for (int i = 0; i < 9; i++) { + // vec2 temp_pos = vec_add(player.pos, tile_offset[i]); + // temp_pos =(vec2){ + // .x = temp_pos.x, + // .y = temp_pos.y, + // }; + // hh_s_tiles tile = { + // .pos = temp_pos, + // .idx = hh_world_to_tile(temp_pos) + // }; + // if(hh_colidable(tile.idx)) { + // tiles[i]=tile; + // // printf(" collidable near!"); + // } else { + // tiles[i].idx = 0; + // } + // } + /* + 012 + 345 + 678 + */ + // for (int i = 0; i < 9; i++) + // { + // if (tiles[i].idx != 0){ + // hh_solve_collision(tiles[i].pos, &player); + // } + // } + + player_new.is_grounded = false; + + // solves x collision + if (player.vel.x <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 15}))) { + player_new.pos.x = (player_new.pos.x & ~15) + 16, + player_new.vel.x = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 15}))) { + player_new.pos.x = player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY + player_new.vel.x = 0; + } + } + + //solves y collision + if (player.vel.y <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 15}))) { + player_new.pos.y = (player_new.pos.y & ~15) + 16, + player_new.vel.y = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 16})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player_new.pos.y + 15}))) { + player_new.pos.y = player_new.pos.y & ~15, + player_new.vel.y = 0; + player_new.is_grounded = true; + } + } + + player = player_new; + + vec_cor cam_pos;//value in tiles + // cam_pos = (vec2){0,0}; + cam_pos = hh_update_camera(player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) + // printf("%i, %i:%i, %i\n",player.pos.x,player.pos.y,cam_pos.x,cam_pos.y); + hh_draw_screen(cam_pos); + // update player sprite on ppu + player.render.fam.position_x = (player.pos.x-cam_pos.x); + player.render.fam.position_y = (player.pos.y-cam_pos.y); + + + player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant + player.render.fam.palette_index = 7; + hh_ppu_update_foreground(0, player.render.fam); + + + hh_s_ppu_loc_fam_entry sprite = { + .position_x = 16, + .position_y = 16, + .palette_index = 7, + .tilemap_index = 2, + }; + hh_ppu_update_foreground(1, sprite); + +} + -- cgit v1.2.3 From a9ad8e0a8ac5346108f1e2c1a0bf9360fadc20da Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 18:02:59 +0100 Subject: Revert "Merge branch 'dev' of https://github.com/Flenk008/avans-arcade into dev" This reverts commit 4f489426e05fb3b296998b17859d8702cc4f37e1, reversing changes made to e47f7fa198229b8598b8ab03ef8b2483f7c685bc. --- features.md | 72 ----- src/.gitignore | 1 - src/engine/TODO/entity.c | 41 +++ src/engine/TODO/entity.h | 24 ++ src/engine/TODO/player_controller.h | 4 + src/engine/TODO/sprite_controller.h | 6 + src/engine/camera.c | 34 --- src/engine/camera.h | 6 - src/engine/draw_screen.c | 62 ----- src/engine/draw_screen.h | 16 +- src/engine/engine.c | 1 - src/engine/entity.c | 46 ---- src/engine/entity.h | 57 ---- src/engine/maths.c | 19 -- src/engine/maths.h | 7 +- src/engine/player_controller.c | 167 ------------ src/engine/player_controller.h | 7 - src/engine/sprite_controller.c | 22 -- src/engine/sprite_controller.h | 106 -------- src/makefile | 8 +- src/ppusim/sim.c | 11 +- test/bin/exportingPalettes.md | 4 - test/bin/test_file_read.c | 13 +- test/bin/tilemap.pip | 512 ------------------------------------ 24 files changed, 89 insertions(+), 1157 deletions(-) delete mode 100644 features.md create mode 100644 src/engine/TODO/entity.c create mode 100644 src/engine/TODO/entity.h create mode 100644 src/engine/TODO/player_controller.h create mode 100644 src/engine/TODO/sprite_controller.h delete mode 100644 src/engine/camera.c delete mode 100644 src/engine/camera.h delete mode 100644 src/engine/draw_screen.c delete mode 100644 src/engine/entity.c delete mode 100644 src/engine/entity.h delete mode 100644 src/engine/maths.c delete mode 100644 src/engine/player_controller.c delete mode 100644 src/engine/player_controller.h delete mode 100644 src/engine/sprite_controller.c delete mode 100644 src/engine/sprite_controller.h delete mode 100644 test/bin/exportingPalettes.md delete mode 100644 test/bin/tilemap.pip (limited to 'src') diff --git a/features.md b/features.md deleted file mode 100644 index d044232..0000000 --- a/features.md +++ /dev/null @@ -1,72 +0,0 @@ -Af/Cancelled/Implement in sprint 3 -Done -## Checkpoint room (shop) -| feature | status | -|-|-| -|Upgrade abilities|Implement in sprint 3| -|Interaction with shopkeeper|Implement in sprint 3| - -## Upgrades abilities -| feature | status | -|-|-| -|HP boost|Implement in sprint 3| -|Jump boost|Implement in sprint 3| -|Speed boost|Implement in sprint 3| -|Regular dash|Implement in sprint 3| -|Super punch|Implement in sprint 3| -|Smoke bomb|Implement in sprint 3| - -## Levels -| feature | status | -|-|-| -|Breakable blocks|Implement in sprint 3| -|Hidden secrets|Implement in sprint 3| -|Boss fights|Implement in sprint 3| -|Enemies|Implement in sprint 3| -|audio|Implement in sprint 3| - -## player (Gozer) -| feature | status | -|-|-| -|Move X-as|Done| -|Jump|Done| -|Special ability|Implement in sprint 3| -|Health|Implement in sprint 3| -|Currency/Scoreboard|Implement in sprint 3| - -## Enemy (Menneke) -| feature | status | -|-|-| -|Move X-as|Implement in sprint 3| -|Jump|Implement in sprint 3| -|Hunt player|Implement in sprint 3| -|Health (1 HP)|Implement in sprint 3| -|Currency/Scoreboard|Implement in sprint 3| - -## Enemy (Ventje) -| feature | status | -|-|-| -|Move X-as|Implement in sprint 3| -|Jump|Implement in sprint 3| -|Hunt player|Implement in sprint 3| -|Health (2 HP) |Implement in sprint 3| -|Splitting upon defeat|Implement in sprint 3| -|Currency/Scoreboard|Implement in sprint 3| - -## Enemy (Terror uil) -| feature | status | -|-|-| -|Movement|Implement in sprint 3| -|Hunt player|Implement in sprint 3| -|Health (1 HP) |Implement in sprint 3| -|Splitting upon defeat|Implement in sprint 3| -|Currency/Scoreboard|Implement in sprint 3| - -## Could have additions if time is enough -| feature | status | -|-|-| -|Multiplayer|Implement in sprint 3| -|Shared HP|Implement in sprint 3| -|Special ability|Implement in sprint 3| -|Health|Implement in sprint 3| -|Currency/Scoreboard|Implement in sprint 3| diff --git a/src/.gitignore b/src/.gitignore index 504b995..d8325cf 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -4,4 +4,3 @@ main.bin main main.exe static/ -*.bin diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c new file mode 100644 index 0000000..fa550d5 --- /dev/null +++ b/src/engine/TODO/entity.c @@ -0,0 +1,41 @@ +#include + +#include "hh_entity.h" +#include "maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec2* pos1, vec2* pos2){ + if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x + return true; + } + + if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ + if (entity->vec.x > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.x < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y > 0.0f){ + entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); + entity->vec.x = 0.0f; + } else if (entity->vec.y < 0.0f){ + entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); + entity->vec.x = 0.0f; + } +} + diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h new file mode 100644 index 0000000..fdbeb8a --- /dev/null +++ b/src/engine/TODO/entity.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "maths.h" + +typedef struct { + vec2 pos, vec; + bool is_grounded; + int8_t hp; + //armor/block? +}hh_entity; + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2* pos1, vec2* pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/player_controller.h b/src/engine/TODO/player_controller.h new file mode 100644 index 0000000..1e9b86c --- /dev/null +++ b/src/engine/TODO/player_controller.h @@ -0,0 +1,4 @@ +#include "maths.h" +#include "hh_entity.h" + +// inputs diff --git a/src/engine/TODO/sprite_controller.h b/src/engine/TODO/sprite_controller.h new file mode 100644 index 0000000..c1fadff --- /dev/null +++ b/src/engine/TODO/sprite_controller.h @@ -0,0 +1,6 @@ +// handles sprites + +// Bg sprites + + +// Fg or entity sprites diff --git a/src/engine/camera.c b/src/engine/camera.c deleted file mode 100644 index e756bd4..0000000 --- a/src/engine/camera.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "engine/camera.h" - -#include "ppu/consts.h" - - -vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ - - //TODO: change floating point math to fix point math - //TODO: fix buggy y-axis ?? - - // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2}); - new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH/2),.y=(new.y+(HH_PPU_SPRITE_HEIGHT/2))*2},(vec2){.x=max.x/2,.y=max.y/2}); - // new.x = new.x << HH_MATH_FIXED_POINT; - // new.y = new.y << HH_MATH_FIXED_POINT; - static vec_cor old; - // old.x = old.x << HH_MATH_FIXED_POINT; - // old.y = old.y << HH_MATH_FIXED_POINT; - - // int16_t some = 0; - // some = some <<= HH_MATH_FIXED_POINT-1; - - new.x = (int)((float)new.x*0.1f + (float)old.x*0.9f); - new.y = (int)((float)new.y*0.1f + (float)old.y*0.9f); - - // old.x = old.x >> HH_MATH_FIXED_POINT; - // old.y = old.y >> HH_MATH_FIXED_POINT; - - - old.x = CLAMP(new.x,min.x,max.x); - old.y = CLAMP(new.y,min.y,max.y); - - return old; -} - diff --git a/src/engine/camera.h b/src/engine/camera.h deleted file mode 100644 index b3ffb52..0000000 --- a/src/engine/camera.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include "engine/maths.h" - -vec_cor hh_update_camera(vec_cor new, vec2 min, vec2 max); - diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c deleted file mode 100644 index c4f3389..0000000 --- a/src/engine/draw_screen.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "engine/draw_screen.h" -#include "engine/sprite_controller.h" - -uint8_t hh_world_to_tile(vec2 pos){ - - FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ - if (!level) { /* check if file opened successfully */ - fprintf(stderr, "Error: Failed to open file.\n"); - return 0; - } - int index = ((pos.y/16)*40 + pos.x/16);//TODO: remove magic number(s) - fseek(level, (index * sizeof(int)) + sizeof(int), SEEK_SET); - int tile;// = (int*)malloc(sizeof(int)); - fread(&tile, sizeof(int), 1, level); // read 1 tile from binary - - fclose(level); - // int val = tile; - // free(tile); - return tile; -} - - -// remeber old value to know which part to update. -vec2 previousViewport = { .x = 0, .y = 0 }; -void hh_draw_screen(vec_cor viewport){ - if (viewport.x == previousViewport.x && viewport.y == previousViewport.y) return; - - hh_ppu_update_aux((hh_s_ppu_loc_aux){ - .bg_shift_x = viewport.x, - .bg_shift_y = viewport.y, - .fg_fetch = 0, - .sysreset = 0, - }); - - // update previous viewport values - previousViewport = viewport; -} - -void hh_setup_screen(){ - //(HH_map_size_X*HH_map_size_Y) - int size = 2400; // max X = 40 en max Y = 80 - FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ - if (!level) { /* check if file opened successfully */ - fprintf(stderr, "Error: Failed to open file.\n"); - return; - } - fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); - int* tile = (int*)malloc(size*sizeof(int)); - fread(tile, sizeof(int), size, level); // read 1 tile from binary - - fclose(level); - - for(int BAM_index = 0; BAM_index < size; BAM_index++){ - hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){ - .horizontal_flip = false, - .vertical_flip = false, - .palette_index = hh_get_palette(tile[BAM_index]), - .tilemap_index = tile[BAM_index], - }); - } - free(tile); -} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index b181108..4af5865 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -3,19 +3,7 @@ // every function call for drawing the screen goes here. #include "engine/maths.h" -#include "ppu/ppu.h" -#include #include -#include - - -#define HH_map_size_X 80 -#define HH_map_size_Y 60 - -/** @brief return a single tile from world binary */ -uint8_t hh_world_to_tile(vec2 pos); -/** @brief shift to level if viewport changed position */ -void hh_draw_screen(vec2 viewport); -/** @brief send data to BAM memory from binary level */ -void hh_setup_screen(); +uint16_t hh_world_to_tile(vec2 pos); +void hh_draw_screen(vec2 viewport); \ No newline at end of file diff --git a/src/engine/engine.c b/src/engine/engine.c index 799ee7c..f3410a4 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,4 +1,3 @@ #include "engine/draw_screen.h" #include "engine/level.h" #include "engine/maths.h" -#include "engine/sprite_controller.h" diff --git a/src/engine/entity.c b/src/engine/entity.c deleted file mode 100644 index 153e7e1..0000000 --- a/src/engine/entity.c +++ /dev/null @@ -1,46 +0,0 @@ -#include - -#include "engine/entity.h" -#include "engine/maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec_cor pos1, vec2 pos2){ - if (pos2.x == CLAMP(pos2.x, pos1.x, pos1.x+16)){// hit x - return true; - } - - if (pos2.y == CLAMP(pos2.y, pos1.y, pos1.y+16)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ - if (!hh_collision(pos_environment,entity->pos)) - return; - - printf("BONK!/n"); - // if (entity->vel.y > 0){ - // entity->pos.y = MAX(entity->pos.y,pos_environment.y); - // entity->vel.y = 0; - // } else { - // entity->pos.y = MIN(entity->pos.y,pos_environment.y); - // entity->vel.y = 0; - // } - // if (entity->vel.x <= 0){ - // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16); - // entity->vel.x = 0; - // } else { - // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16); - // entity->vel.x = 0; - // } -} - diff --git a/src/engine/entity.h b/src/engine/entity.h deleted file mode 100644 index f45dae2..0000000 --- a/src/engine/entity.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include -#include - -#include "ppu/types.h" - -#include "engine/maths.h" - -typedef uint8_t hh_idx_t; - -typedef enum { - fire, ice, poison -}hh_e_damage_t; - -typedef struct { - hh_s_ppu_loc_fam_entry fam; //screen - hh_idx_t frame0; - hh_idx_t palette; - -}hh_s_rendering; - -typedef struct { - int8_t hp; - int8_t dmg; - hh_e_damage_t dmg_type; - int8_t speed_x, speed_y; - -} hh_s_atributes; - - -typedef struct { - vec2 pos, vel, vec; - bool is_grounded; - int8_t hp; - int8_t speed; - hh_s_rendering render; - //armor/block? -}hh_entity; - -typedef struct { - hh_entity p; - hh_s_atributes atr; -}hh_s_player; - - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2 pos1, vec2 pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2 pos_environment, hh_entity* entity); diff --git a/src/engine/maths.c b/src/engine/maths.c deleted file mode 100644 index 475bba2..0000000 --- a/src/engine/maths.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "engine/maths.h" - -vec2 vec_add(vec2 a, vec2 b){ - return (vec2){a.x + b.x, a.y + b.y}; -} - -vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){ - return (vec_cor){ - .x = in.x - halfDistance.x, - .y = in.y - halfDistance.y, - }; -} - -vec_cen vec_cor2cen(vec_cor in, vec2 halfDistance){ - return (vec_cen){ - .x = in.x + halfDistance.x, - .y = in.y + halfDistance.y, - }; -} diff --git a/src/engine/maths.h b/src/engine/maths.h index bef287e..c7f1b44 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -3,17 +3,12 @@ // #include typedef struct { - int32_t x,y; + uint32_t x,y; } vec2; typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner -vec2 vec_add(vec2 a, vec2 b); - -vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance); -vec_cor vec_cor2cen(vec_cen in, vec2 halfDistance); - //fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) #define HH_MATH_FIXED_POINT 7 diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c deleted file mode 100644 index 6735620..0000000 --- a/src/engine/player_controller.c +++ /dev/null @@ -1,167 +0,0 @@ -#include "ppu/types.h" -#include "engine/camera.h" -#include "engine/draw_screen.h" -#include "engine/sprite_controller.h" -#include "engine/player_controller.h" - -#include "demo.h" -#include - -#include "input.h" - -void hh_player_actions() { - static hh_entity player={ - .hp = 4, - .speed = 6, - .is_grounded = false, - .pos = (vec2){32,32}, - .vel = (vec2){0,0}, - .vec = (vec2){0,0}, - .render = { - .frame0 = 20, - .palette = 7, - .fam = (hh_s_ppu_loc_fam_entry){ - .horizontal_flip = false, - .vertical_flip = false, - .palette_index = 7, - .tilemap_index = 2, - } - } - }, player_new = {0}; - - // hh_input_read(); - player.vel = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), - .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; - // const int8_t maa = 3; - // const int8_t mbb = -3; - // if (g_hh_controller_p1.dpad_up) - // - // if (g_hh_controller_p1.dpad_down) - // - // if (g_hh_controller_p1.dpad_left) { - // player.vel.x += mbb; - // // g_hh_demo_balls[0].horizontal_flip = true; - // } - // if (g_hh_controller_p1.dpad_right) { - // player.vel.x += maa; - // // g_hh_demo_balls[0].horizontal_flip = true; - // } - // if (g_hh_controller_p1.button_primary /*&& player.is_grounded*/) //JUMP - // player.vel.y += -6; - // // // if (g_hh_controller_p1.button_secondary) - - // player.render.fam.palette_index = 7; - // player.render.fam.tilemap_index = 7; - - // printf("%x ",player.render.fam.palette_index); - - // player.vel.y += 1; //gravity - - - //END OF VECTOR CHANGES - // player.vel.y = CLAMP(player.vel.y,-32,32); - // player.vel.x = CLAMP(player.vel.x,-32,32); - - player_new.pos = (vec2){ - .x = player.pos.x + player.vel.x, - .y = player.pos.y + player.vel.y, - }; - - - - // const uint8_t empty = 0; - // hh_s_tiles tiles[9]; - // const vec2 tile_offset[9] = { - // (vec2){-16,-16},(vec2){0,-16},(vec2){+16,-16}, - // (vec2){-16,0}, (vec2){0,0}, (vec2){+16,0}, - // (vec2){-16,+16},(vec2){0,+16},(vec2){+16,+16}, - // }; - // for (int i = 0; i < 9; i++) { - // vec2 temp_pos = vec_add(player.pos, tile_offset[i]); - // temp_pos =(vec2){ - // .x = temp_pos.x, - // .y = temp_pos.y, - // }; - // hh_s_tiles tile = { - // .pos = temp_pos, - // .idx = hh_world_to_tile(temp_pos) - // }; - // if(hh_colidable(tile.idx)) { - // tiles[i]=tile; - // // printf(" collidable near!"); - // } else { - // tiles[i].idx = 0; - // } - // } - /* - 012 - 345 - 678 - */ - // for (int i = 0; i < 9; i++) - // { - // if (tiles[i].idx != 0){ - // hh_solve_collision(tiles[i].pos, &player); - // } - // } - - player_new.is_grounded = false; - - // solves x collision - if (player.vel.x <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 15}))) { - player_new.pos.x = (player_new.pos.x & ~15) + 16, - player_new.vel.x = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 15}))) { - player_new.pos.x = player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY - player_new.vel.x = 0; - } - } - - //solves y collision - if (player.vel.y <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 15}))) { - player_new.pos.y = (player_new.pos.y & ~15) + 16, - player_new.vel.y = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 16})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player_new.pos.y + 15}))) { - player_new.pos.y = player_new.pos.y & ~15, - player_new.vel.y = 0; - player_new.is_grounded = true; - } - } - - player = player_new; - - vec_cor cam_pos;//value in tiles - // cam_pos = (vec2){0,0}; - cam_pos = hh_update_camera(player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) - // printf("%i, %i:%i, %i\n",player.pos.x,player.pos.y,cam_pos.x,cam_pos.y); - hh_draw_screen(cam_pos); - // update player sprite on ppu - player.render.fam.position_x = (player.pos.x-cam_pos.x); - player.render.fam.position_y = (player.pos.y-cam_pos.y); - - - player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant - player.render.fam.palette_index = 7; - hh_ppu_update_foreground(0, player.render.fam); - - - hh_s_ppu_loc_fam_entry sprite = { - .position_x = 16, - .position_y = 16, - .palette_index = 7, - .tilemap_index = 2, - }; - hh_ppu_update_foreground(1, sprite); - -} - diff --git a/src/engine/player_controller.h b/src/engine/player_controller.h deleted file mode 100644 index 400c18e..0000000 --- a/src/engine/player_controller.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "engine/maths.h" -#include "engine/entity.h" -// inputs - -void hh_player_actions(); diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c deleted file mode 100644 index 5d93cf8..0000000 --- a/src/engine/sprite_controller.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -#include "engine/sprite_controller.h" -#include "ppu/types.h" -#include "ppu/consts.h" -#include "ppu/ppu.h" - -uint8_t hh_get_palette(uint8_t tile_idx) { - return hh_g_sprite_palette[tile_idx]; -} - -void hh_setup_palettes(){ - for (int idx = 0; idx < HH_PPU_PALETTE_COUNT; idx++) { - for (int col = 0; col < HH_PPU_PALETTE_COLOR_COUNT; col++) { - hh_ppu_update_color(idx,col,hh_g_palette[idx][col]); - } - } -} - -bool hh_colidable(uint8_t tile_idx){ - return (hh_get_palette(tile_idx) != 0); -} diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h deleted file mode 100644 index 001a459..0000000 --- a/src/engine/sprite_controller.h +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once -#include - -#include "ppu/types.h" - -// handles sprites - -// Bg sprites - -// Fg or entity sprites - -//TODO: pack data inside of sprite_palette LUT -//HH_PPU_PALETTE_COUNT -#define HH_SPRITE_COUNT 40 -#define HH_PAL_IDX_SKY 0 -#define HH_PAL_IDX_BRICK 1 -const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { - 0,1,1,1,1,1,1,1,1,1, //1+9 - 1,1,1,1,1,1,1,1,1,1, //6+4 - 1,1,1,1,1,1,1,1,1, //9 - 7,7,7,2,7,7,1,2,7 - //other palettes here: -}; - - -const static hh_ppu_loc_palette_table_t hh_g_palette = { - {//palette info here - {0x1,0x2,0x3}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - {//Bricks - {0x1,0x2,0x3},//01 - {0xd,0x8,0xa},//24 - {0x0,0x0,0x1},//25 - {0x1,0x1,0x1},//26 - {0x1,0x1,0x2},//27 - {0x2,0x2,0x3},//28 - {0x3,0x4,0x5},//29 - {0x5,0x1,0x7}}, - {//slime - {0x1,0x2,0x3}, - {0x1,0x3,0x2}, - {0x4,0x8,0x3}, - {0x7,0xa,0x4}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - { - {0x0,0xf,0xf}, - {0xf,0xf,0xf}, - {0xf,0x0,0xf}, - {0xf,0xf,0x0}, - {0xf,0x0,0x0}, - {0x0,0xf,0x0}, - {0x0,0x0,0xf}, - {0x0,0x0,0x0}} -}; - -void hh_setup_palettes(); - -/** @brief return palette index that belongs to tilemap index */ -uint8_t hh_get_palette(uint8_t tile_idx); - -bool hh_colidable(uint8_t tile_idx); diff --git a/src/makefile b/src/makefile index d7d9087..96751fb 100644 --- a/src/makefile +++ b/src/makefile @@ -31,13 +31,7 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c \ - engine/sprite_controller.c \ - engine/player_controller.c \ - engine/draw_screen.c \ - engine/camera.c \ - engine/maths.c \ - engine/entity.c + engine/engine.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index a5fec45..1fceb82 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,21 +29,20 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "../test/bin/tiles.bin"; + char* filename = "tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ - fprintf(stderr,"Error: Failed to load tiles."); return;//error } - int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT); + fseek(fp, 0, SEEK_END);//goto EOF - int _size = ftell(fp)/sprite_size; + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; fseek(fp, 0, 0);//goto start of file for (int i = 0; i < _size; i++) { - uint8_t data[sprite_size]; + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - fread(data,sizeof(uint8_t),sprite_size,fp); + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data); sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE; diff --git a/test/bin/exportingPalettes.md b/test/bin/exportingPalettes.md deleted file mode 100644 index be4a354..0000000 --- a/test/bin/exportingPalettes.md +++ /dev/null @@ -1,4 +0,0 @@ -```sh -cat test.src|head -n 46 | awk '{printf "%02x: {0x%x,0x%x,0x%x}\n",NR,$1/2,$2/2,$3/2 }' > hex_palettes -``` - diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index df93395..b3357ce 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -16,22 +16,19 @@ void printData(uint8_t* in) { } void hh_ppu_load_tilemap() { - - - char* filename = "slime.bin"; + char* filename = "tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ return;//error } - int sprite_size = (16 * 16); fseek(fp, 0, SEEK_END); - int _size = ftell(fp)/sprite_size; - rewind(fp); + int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + fseek(fp, 0, 0); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[sprite_size]; - fread(data,1,sprite_size,fp); + uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); printData(data); } diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip deleted file mode 100644 index c0c646e..0000000 --- a/test/bin/tilemap.pip +++ /dev/null @@ -1,512 +0,0 @@ -0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 -0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 -0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 -0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 -0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 -0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 -0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 -0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 -01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 -01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 -01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 -0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 -0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 -0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 -0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 -0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 -0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 -0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 -03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 -03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 -03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 -03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 -0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 -0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 -0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 -0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 -0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 -04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 -04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 -04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 -0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 -0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 -0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 -0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 -06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 -06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 -06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 -06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 -0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 -0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 -0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 -0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 -0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 -07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 -07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 -07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 -0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 -08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 -08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 -08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 -0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 -0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 -0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 -0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 -09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 -09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 -09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 -09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 -0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 -0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 -0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 -0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 -0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 -0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 -0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 -0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 -0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 -0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 -0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 -0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 -0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 -0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 -0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 -0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 -0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 -0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 -0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 -0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 -0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 -0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 -0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 -0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 -0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 -0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 -0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 -0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 -0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 -0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 -0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 -0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 -0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 -0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 -0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 -0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 -0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 -0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 -0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 -0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 -0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 -0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 -0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 -0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 -0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 -0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 -0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 -0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 -0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 -0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 -0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 -0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 -0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 -0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 -0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 -0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 -0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 -0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 -0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 -0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 -0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 -0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 -0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 -1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 -10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 -10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 -10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 -11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 -11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 -11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 -1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 -1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 -1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 -1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 -1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 -1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 -1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 -1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 -1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 -15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 -15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 -15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 -15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 -15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 -1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 -1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 -1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 -1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 -16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 -16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 -1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 -1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 -1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 -1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 -1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 -1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 -17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 -17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 -17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 -17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 -17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 -1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 -1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 -1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 -1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 -1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 -1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 -1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 -18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 -18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 -18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 -18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 -18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 -1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 -1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 -1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 -1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 -1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 -1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 -1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 -1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 -19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 -19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 -19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 -19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 -19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 -1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 -1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 -1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 -1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 -1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 -1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 -1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 -1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 -1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 -1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 -1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 -1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 -1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 -1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 -1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 -1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 -1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 -1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 -1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 -1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 -1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 -1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 -1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 -1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 -1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 -1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00 -1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00 -1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 -1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 -1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00 -1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 -1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 -1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 -1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 -1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 -1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 -1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 -1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 -1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- cgit v1.2.3 From 91c9d1c9fc13cf163c6262437de16c992dadaa5b Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 18:03:21 +0100 Subject: Revert "Background collision" This reverts commit e47f7fa198229b8598b8ab03ef8b2483f7c685bc. --- .vscode/c_cpp_properties.json | 3 +- .vscode/launch.json | 2 +- .vscode/tasks.json | 69 +++----------- src/demo.c | 208 +++++++++--------------------------------- src/entity.h | 17 +--- src/ppusim/input.c | 1 - 6 files changed, 59 insertions(+), 241 deletions(-) (limited to 'src') diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 3a0c430..51f5ad0 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -2,8 +2,7 @@ "configurations": [ { "name": "src", - "compileCommands": "${workspaceFolder}/src/compile_commands.json", - "configurationProvider": "ms-vscode.makefile-tools" + "compileCommands": "${workspaceFolder}/src/compile_commands.json" } ], "version": 4 diff --git a/.vscode/launch.json b/.vscode/launch.json index 4ff91bb..2f7561c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "environment": [], "externalConsole": false, "MIMode": "gdb", - "preLaunchTask": "build", + "preLaunchTask": "client/build", "setupCommands": [ { "description": "Enable pretty-printing for gdb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a670b0f..53a235e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,19 +16,13 @@ "isDefault": false, "kind": "build" }, - "options": { - "cwd": "${workspaceFolder}/src" - }, + "options": { "cwd": "${workspaceFolder}/src" }, "windows": { "command": "make -j", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "-j" - ], + "args": [ "-j" ], "type": "shell" }, { @@ -38,20 +32,13 @@ "isDefault": false, "kind": "test" }, - "options": { - "cwd": "${workspaceFolder}/src" - }, + "options": { "cwd": "${workspaceFolder}/src" }, "windows": { "command": "make -j flash", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "-j", - "flash" - ], + "args": [ "-j", "flash" ], "type": "shell" }, { @@ -61,19 +48,13 @@ "isDefault": false, "kind": "test" }, - "options": { - "cwd": "${workspaceFolder}/src" - }, + "options": { "cwd": "${workspaceFolder}/src" }, "windows": { "command": "make compile_commands.json", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "compile_commands" - ], + "args": [ "compile_commands" ], "type": "shell" }, { @@ -83,40 +64,14 @@ "isDefault": false, "kind": "test" }, - "options": { - "cwd": "${workspaceFolder}" - }, + "options": { "cwd": "${workspaceFolder}" }, "windows": { "command": "make clean", - "args": [ - "" - ] + "args": [ "" ], }, "command": "make", - "args": [ - "clean" - ], + "args": [ "clean" ], "type": "shell" - }, - { - "type": "cppbuild", - "label": "C/C++: gcc.exe build active file", - "command": "C:\\msys64\\mingw64\\bin\\gcc.exe", - "args": [ - "-fdiagnostics-color=always", - "-g", - "${file}", - "-o", - "${fileDirname}\\${fileBasenameNoExtension}.exe" - ], - "options": { - "cwd": "C:\\msys64\\mingw64\\bin" - }, - "problemMatcher": [ - "$gcc" - ], - "group": "build", - "detail": "compiler: C:\\msys64\\mingw64\\bin\\gcc.exe" } ] } diff --git a/src/demo.c b/src/demo.c index f5d2e71..baaf73d 100644 --- a/src/demo.c +++ b/src/demo.c @@ -5,36 +5,21 @@ #include "input.h" #include "ppu/ppu.h" -#define HH_DEMO_BALL_COUNT 2 +#define HH_DEMO_BALL_COUNT 1 hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; hh_s_entity_player g_hh_player_1 = { - .pos_x = 11000, - .pos_y = 5000, - .radius = 4, + .pos_x = 31000, // 0b0000 0001 0011 0110 + .pos_y = 21000, + .radius = 8, .speed = 100, - .air_speed = 80, .direction_x = 1, - .accelY = 0, .rotation = 8, .in_air = false, }; -hh_s_entity_enemy g_hh_enemy_1 = { - .pos_x = 16000, - .pos_y = 20000, - .radius = 4, - .speed = 100, - .direction_x = 1, - .accelY = 0, - .in_air = false, -}; - void hh_player_movement(); -int hh_background_collision_x(hh_s_entity_player tempEntity); -hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity); - uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110 uint16_t g_hh_pos_y; uint8_t g_hh_left = 0; @@ -83,7 +68,7 @@ void hh_demo_loop(unsigned long frame) { hh_player_movement(); // input testing (no hitbox stuff) // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R - g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U + // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U // adjust map size @@ -91,14 +76,12 @@ void hh_demo_loop(unsigned long frame) { g_hh_pos_y = g_hh_player_1.pos_y / 100; + + // update player sprite on ppu g_hh_demo_balls[0].position_x = g_hh_pos_x; g_hh_demo_balls[0].position_y = g_hh_pos_y; - - g_hh_demo_balls[1].position_x = 220; - g_hh_demo_balls[1].position_y = 220; hh_ppu_update_foreground(0, g_hh_demo_balls[0]); - hh_ppu_update_foreground(1, g_hh_demo_balls[1]); // set background pattern position hh_ppu_update_aux((hh_s_ppu_loc_aux){ @@ -124,12 +107,6 @@ void hh_player_movement() { int8_t directionX = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R int8_t directionY = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U - if(g_hh_controller_p1.button_primary == 1 && g_hh_player_1.accelY == 0 && g_hh_player_1.in_air == false) - { - g_hh_player_1.accelY = 25; - } - - uint8_t i, j; uint8_t rotation = 0; // 0-7 @@ -147,162 +124,63 @@ void hh_player_movement() { rotation++; } } - // X-axis calc - if (directionX != 0) // update direction and position if player is not idle + // direction calc + if (directionX != 0) // update direction if player is not idle { g_hh_player_1.direction_x = directionX; - g_hh_player_1.pos_x = hh_background_collision_x(g_hh_player_1); } + // collision map x-axis - - g_hh_player_1 = hh_background_collision_y_player(g_hh_player_1); - -} - - -int hh_background_collision_x(hh_s_entity_player tempEntity){ // tile calc including radius and direction for background coliision uint16_t tileColX; - uint16_t tileColY = (tempEntity.pos_y / 100) / 8; + uint16_t tileColY = (g_hh_player_1.pos_y / 100) / 16; ; // remaining space between grid and exact uint8_t modTileX; + uint8_t modTileY; + + if (g_hh_player_1.in_air == false && directionX != 0) { + if (directionX == 1) { + tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 16; + modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 1600; + } else if (directionX == -1) { + tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 16; + modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 1600; + } - - - if (tempEntity.direction_x == 1) { - tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; - modTileX = 800 -((tempEntity.pos_x + (100 * tempEntity.radius)) % 800); - } else if (tempEntity.direction_x == -1) { - tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius )/ 8; - modTileX = (tempEntity.pos_x - (100 * tempEntity.radius)) % 800; - } - - tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box - - if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { - tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //bottom of player box - if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] != 1) { - if(tempEntity.in_air== true){ - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // 80% of max speed if in air - } else { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // 80% of max speed if in air - } - } else { - if(tempEntity.in_air == true){ - if (modTileX < tempEntity.air_speed) { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set - } else { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // - } - } else { - if (modTileX < g_hh_player_1.speed) { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set - } else { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // - } - } + if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] != 1) { + g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set } - } else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + tempEntity.direction_x] == 1) { - if(tempEntity.in_air == true){ - if (modTileX < tempEntity.air_speed) { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set - } else { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * tempEntity.air_speed); // - } - } else { + + else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] == 1) { if (modTileX < g_hh_player_1.speed) { - tempEntity.pos_x = tempEntity.pos_x + (tempEntity.direction_x * modTileX); // NEW x set + g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * modTileX); // NEW x set } else { - tempEntity.pos_x= tempEntity.pos_x + (tempEntity.direction_x * tempEntity.speed); // + g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set } } - } - - - return tempEntity.pos_x; - -} - -hh_s_entity_player hh_background_collision_y_player(hh_s_entity_player tempEntity){ - - uint16_t tileColX; - uint16_t tileColY; - - - // remaining space between grid and exact - uint8_t modTileY; - if(g_hh_controller_p1.button_primary == 1 && tempEntity.accelY == 0 && tempEntity.in_air == false) + } else // if in air different all borders have to be checked { -// tempEntity.accelY = 25; } - - tileColY = (( tempEntity.pos_y / 100) + tempEntity.radius) / 8; //bottom of player box - tileColX = ((tempEntity.pos_x / 100) + tempEntity.radius) / 8; //right of player - modTileY = ((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //bottom of box - //rework arfter jumping - if(tempEntity.accelY <= 0){ //falling - if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) {//check bottom right first - tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; - if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) { - tempEntity.in_air = true; - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - if (tempEntity.accelY > -35){ - tempEntity.accelY--; - } - } - else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - } - tempEntity.in_air = false; - tempEntity.accelY = 0; - } - } - else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y + (modTileY) ;// NEW y set - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - } - tempEntity.in_air = false; - tempEntity.accelY = 0; - } + + if(directionY != 0) + { + // g_hh_player_1.pos_y = g_hh_player_1.pos_y + (directionY * g_hh_player_1.speed * 2); // NEW x set } - else{ //jumping - tileColY = (( tempEntity.pos_y / 100) - tempEntity.radius) / 8; //top of player box - modTileY = 800 -((tempEntity.pos_y + (100 * tempEntity.radius)) % 800); //top of box - if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) {//check bottom right first - tileColX = ((tempEntity.pos_x / 100) - tempEntity.radius) / 8; - if(HH_DEMO_HITBOX_TILEMAP[tileColY-1][tileColX] != 1) { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set - tempEntity.in_air = true; - tempEntity.accelY--; - } else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ; - } - tempEntity.accelY = 0; - } - } - else { - if(modTileY < tempEntity.accelY * -8) { - tempEntity.pos_y = tempEntity.pos_y - (modTileY) ;// NEW y set //makew var gravity - } else { - tempEntity.pos_y = tempEntity.pos_y - (tempEntity.accelY * 8) ;// NEW y set //makew var gravity - } - tempEntity.accelY = 0; - } - + // collision map floor (y-axis) (falling) + // if falling no jump press (implement) + /* + tileColY = (( g_hh_player_1.pos_y / 100) + g_hh_player_1.radius) / 16; //bottom of player box + modTileY = 1; + if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) //rework after jumping + { + g_hh_player_1.pos_y = g_hh_player_1.pos_y + 5 ;// NEW y set //makew var gravity + //playerStat = falling; //for later use of graphics/sound } - - return tempEntity; + */ + // else if(HH_DEMO_HITBOX_TILEMAP[]) } diff --git a/src/entity.h b/src/entity.h index 3684252..181182b 100644 --- a/src/entity.h +++ b/src/entity.h @@ -8,20 +8,7 @@ typedef struct { uint16_t pos_y; uint8_t radius; uint8_t rotation; //45 degrees steps 0 == right 2 == down 4 == left 6 == up - int8_t direction_x; //direction where its looking at in case no input; - int8_t accelY; - int16_t speed; // default L/R MODifier - int16_t air_speed; // air L/R MODifier + uint8_t direction_x; //direction where its looking at in case no input; + int8_t speed; //10 default L/R MODifier bool in_air; } hh_s_entity_player; - -typedef struct { - uint16_t pos_x; - uint16_t pos_y; - uint8_t radius; - uint8_t direction_x; //direction where its walking towards; - int8_t accelY; - int16_t speed; // default L/R MODifier - int16_t air_speed; - bool in_air; -} hh_s_entity_enemy; diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 4491a63..08bc382 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,5 +12,4 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; - g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_K]; } -- cgit v1.2.3 From 47c76e5eabd2b7aa4eb0de7ca34b4ef9ac78f395 Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Mon, 13 Mar 2023 18:04:59 +0100 Subject: Revert "Revert "Merge branch 'dev' of https://github.com/Flenk008/avans-arcade into dev"" This reverts commit a9ad8e0a8ac5346108f1e2c1a0bf9360fadc20da. --- features.md | 72 +++++ src/.gitignore | 1 + src/engine/TODO/entity.c | 41 --- src/engine/TODO/entity.h | 24 -- src/engine/TODO/player_controller.h | 4 - src/engine/TODO/sprite_controller.h | 6 - src/engine/camera.c | 34 +++ src/engine/camera.h | 6 + src/engine/draw_screen.c | 62 +++++ src/engine/draw_screen.h | 16 +- src/engine/engine.c | 1 + src/engine/entity.c | 46 ++++ src/engine/entity.h | 57 ++++ src/engine/maths.c | 19 ++ src/engine/maths.h | 7 +- src/engine/player_controller.c | 167 ++++++++++++ src/engine/player_controller.h | 7 + src/engine/sprite_controller.c | 22 ++ src/engine/sprite_controller.h | 106 ++++++++ src/makefile | 8 +- src/ppusim/sim.c | 11 +- test/bin/exportingPalettes.md | 4 + test/bin/test_file_read.c | 13 +- test/bin/tilemap.pip | 512 ++++++++++++++++++++++++++++++++++++ 24 files changed, 1157 insertions(+), 89 deletions(-) create mode 100644 features.md delete mode 100644 src/engine/TODO/entity.c delete mode 100644 src/engine/TODO/entity.h delete mode 100644 src/engine/TODO/player_controller.h delete mode 100644 src/engine/TODO/sprite_controller.h create mode 100644 src/engine/camera.c create mode 100644 src/engine/camera.h create mode 100644 src/engine/draw_screen.c create mode 100644 src/engine/entity.c create mode 100644 src/engine/entity.h create mode 100644 src/engine/maths.c create mode 100644 src/engine/player_controller.c create mode 100644 src/engine/player_controller.h create mode 100644 src/engine/sprite_controller.c create mode 100644 src/engine/sprite_controller.h create mode 100644 test/bin/exportingPalettes.md create mode 100644 test/bin/tilemap.pip (limited to 'src') diff --git a/features.md b/features.md new file mode 100644 index 0000000..d044232 --- /dev/null +++ b/features.md @@ -0,0 +1,72 @@ +Af/Cancelled/Implement in sprint 3 +Done +## Checkpoint room (shop) +| feature | status | +|-|-| +|Upgrade abilities|Implement in sprint 3| +|Interaction with shopkeeper|Implement in sprint 3| + +## Upgrades abilities +| feature | status | +|-|-| +|HP boost|Implement in sprint 3| +|Jump boost|Implement in sprint 3| +|Speed boost|Implement in sprint 3| +|Regular dash|Implement in sprint 3| +|Super punch|Implement in sprint 3| +|Smoke bomb|Implement in sprint 3| + +## Levels +| feature | status | +|-|-| +|Breakable blocks|Implement in sprint 3| +|Hidden secrets|Implement in sprint 3| +|Boss fights|Implement in sprint 3| +|Enemies|Implement in sprint 3| +|audio|Implement in sprint 3| + +## player (Gozer) +| feature | status | +|-|-| +|Move X-as|Done| +|Jump|Done| +|Special ability|Implement in sprint 3| +|Health|Implement in sprint 3| +|Currency/Scoreboard|Implement in sprint 3| + +## Enemy (Menneke) +| feature | status | +|-|-| +|Move X-as|Implement in sprint 3| +|Jump|Implement in sprint 3| +|Hunt player|Implement in sprint 3| +|Health (1 HP)|Implement in sprint 3| +|Currency/Scoreboard|Implement in sprint 3| + +## Enemy (Ventje) +| feature | status | +|-|-| +|Move X-as|Implement in sprint 3| +|Jump|Implement in sprint 3| +|Hunt player|Implement in sprint 3| +|Health (2 HP) |Implement in sprint 3| +|Splitting upon defeat|Implement in sprint 3| +|Currency/Scoreboard|Implement in sprint 3| + +## Enemy (Terror uil) +| feature | status | +|-|-| +|Movement|Implement in sprint 3| +|Hunt player|Implement in sprint 3| +|Health (1 HP) |Implement in sprint 3| +|Splitting upon defeat|Implement in sprint 3| +|Currency/Scoreboard|Implement in sprint 3| + +## Could have additions if time is enough +| feature | status | +|-|-| +|Multiplayer|Implement in sprint 3| +|Shared HP|Implement in sprint 3| +|Special ability|Implement in sprint 3| +|Health|Implement in sprint 3| +|Currency/Scoreboard|Implement in sprint 3| diff --git a/src/.gitignore b/src/.gitignore index d8325cf..504b995 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -4,3 +4,4 @@ main.bin main main.exe static/ +*.bin diff --git a/src/engine/TODO/entity.c b/src/engine/TODO/entity.c deleted file mode 100644 index fa550d5..0000000 --- a/src/engine/TODO/entity.c +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include "hh_entity.h" -#include "maths.h" - -/* - PLAYER: (pos on X) - ,___, - | | - | X | - |___| - -*/ - -bool hh_collision(vec2* pos1, vec2* pos2){ - if (pos2->x == CLAMP(pos2->x,pos1->x,pos1->x+1.0f)){// hit x - return true; - } - - if (pos2->y == CLAMP(pos2->y,pos1->y,pos1->y+0.99f)){// hit y - return true; - } - return false; -} - -void hh_solve_collision(vec2* pos_environment, hh_entity* entity){ - if (entity->vec.x > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.x < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y > 0.0f){ - entity->pos.x = MIN(entity->pos.x,pos_environment->x-1.0f); - entity->vec.x = 0.0f; - } else if (entity->vec.y < 0.0f){ - entity->pos.x = MAX(entity->pos.x,pos_environment->x+1.0f); - entity->vec.x = 0.0f; - } -} - diff --git a/src/engine/TODO/entity.h b/src/engine/TODO/entity.h deleted file mode 100644 index fdbeb8a..0000000 --- a/src/engine/TODO/entity.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -#include "maths.h" - -typedef struct { - vec2 pos, vec; - bool is_grounded; - int8_t hp; - //armor/block? -}hh_entity; - -/// @brief detect for collision enity and eviroment -/// @param pos1 position of environment tile to be checked -/// @param pos2 position entity -/// @return true if collision between enity and environment -bool hh_collision(vec2* pos1, vec2* pos2); - -/// @brief solve collisions -/// @param environment position -/// @param entity position -/// @return solved new entity position -void hh_solve_collision(vec2* pos_environment, hh_entity* entity); diff --git a/src/engine/TODO/player_controller.h b/src/engine/TODO/player_controller.h deleted file mode 100644 index 1e9b86c..0000000 --- a/src/engine/TODO/player_controller.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "maths.h" -#include "hh_entity.h" - -// inputs diff --git a/src/engine/TODO/sprite_controller.h b/src/engine/TODO/sprite_controller.h deleted file mode 100644 index c1fadff..0000000 --- a/src/engine/TODO/sprite_controller.h +++ /dev/null @@ -1,6 +0,0 @@ -// handles sprites - -// Bg sprites - - -// Fg or entity sprites diff --git a/src/engine/camera.c b/src/engine/camera.c new file mode 100644 index 0000000..e756bd4 --- /dev/null +++ b/src/engine/camera.c @@ -0,0 +1,34 @@ +#include "engine/camera.h" + +#include "ppu/consts.h" + + +vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ + + //TODO: change floating point math to fix point math + //TODO: fix buggy y-axis ?? + + // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2}); + new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH/2),.y=(new.y+(HH_PPU_SPRITE_HEIGHT/2))*2},(vec2){.x=max.x/2,.y=max.y/2}); + // new.x = new.x << HH_MATH_FIXED_POINT; + // new.y = new.y << HH_MATH_FIXED_POINT; + static vec_cor old; + // old.x = old.x << HH_MATH_FIXED_POINT; + // old.y = old.y << HH_MATH_FIXED_POINT; + + // int16_t some = 0; + // some = some <<= HH_MATH_FIXED_POINT-1; + + new.x = (int)((float)new.x*0.1f + (float)old.x*0.9f); + new.y = (int)((float)new.y*0.1f + (float)old.y*0.9f); + + // old.x = old.x >> HH_MATH_FIXED_POINT; + // old.y = old.y >> HH_MATH_FIXED_POINT; + + + old.x = CLAMP(new.x,min.x,max.x); + old.y = CLAMP(new.y,min.y,max.y); + + return old; +} + diff --git a/src/engine/camera.h b/src/engine/camera.h new file mode 100644 index 0000000..b3ffb52 --- /dev/null +++ b/src/engine/camera.h @@ -0,0 +1,6 @@ +#pragma once + +#include "engine/maths.h" + +vec_cor hh_update_camera(vec_cor new, vec2 min, vec2 max); + diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c new file mode 100644 index 0000000..c4f3389 --- /dev/null +++ b/src/engine/draw_screen.c @@ -0,0 +1,62 @@ +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" + +uint8_t hh_world_to_tile(vec2 pos){ + + FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ + if (!level) { /* check if file opened successfully */ + fprintf(stderr, "Error: Failed to open file.\n"); + return 0; + } + int index = ((pos.y/16)*40 + pos.x/16);//TODO: remove magic number(s) + fseek(level, (index * sizeof(int)) + sizeof(int), SEEK_SET); + int tile;// = (int*)malloc(sizeof(int)); + fread(&tile, sizeof(int), 1, level); // read 1 tile from binary + + fclose(level); + // int val = tile; + // free(tile); + return tile; +} + + +// remeber old value to know which part to update. +vec2 previousViewport = { .x = 0, .y = 0 }; +void hh_draw_screen(vec_cor viewport){ + if (viewport.x == previousViewport.x && viewport.y == previousViewport.y) return; + + hh_ppu_update_aux((hh_s_ppu_loc_aux){ + .bg_shift_x = viewport.x, + .bg_shift_y = viewport.y, + .fg_fetch = 0, + .sysreset = 0, + }); + + // update previous viewport values + previousViewport = viewport; +} + +void hh_setup_screen(){ + //(HH_map_size_X*HH_map_size_Y) + int size = 2400; // max X = 40 en max Y = 80 + FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ + if (!level) { /* check if file opened successfully */ + fprintf(stderr, "Error: Failed to open file.\n"); + return; + } + fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); + int* tile = (int*)malloc(size*sizeof(int)); + fread(tile, sizeof(int), size, level); // read 1 tile from binary + + fclose(level); + + for(int BAM_index = 0; BAM_index < size; BAM_index++){ + hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = hh_get_palette(tile[BAM_index]), + .tilemap_index = tile[BAM_index], + }); + } + free(tile); +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index 4af5865..b181108 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -3,7 +3,19 @@ // every function call for drawing the screen goes here. #include "engine/maths.h" +#include "ppu/ppu.h" +#include #include -uint16_t hh_world_to_tile(vec2 pos); -void hh_draw_screen(vec2 viewport); \ No newline at end of file +#include + + +#define HH_map_size_X 80 +#define HH_map_size_Y 60 + +/** @brief return a single tile from world binary */ +uint8_t hh_world_to_tile(vec2 pos); +/** @brief shift to level if viewport changed position */ +void hh_draw_screen(vec2 viewport); +/** @brief send data to BAM memory from binary level */ +void hh_setup_screen(); diff --git a/src/engine/engine.c b/src/engine/engine.c index f3410a4..799ee7c 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,3 +1,4 @@ #include "engine/draw_screen.h" #include "engine/level.h" #include "engine/maths.h" +#include "engine/sprite_controller.h" diff --git a/src/engine/entity.c b/src/engine/entity.c new file mode 100644 index 0000000..153e7e1 --- /dev/null +++ b/src/engine/entity.c @@ -0,0 +1,46 @@ +#include + +#include "engine/entity.h" +#include "engine/maths.h" + +/* + PLAYER: (pos on X) + ,___, + | | + | X | + |___| + +*/ + +bool hh_collision(vec_cor pos1, vec2 pos2){ + if (pos2.x == CLAMP(pos2.x, pos1.x, pos1.x+16)){// hit x + return true; + } + + if (pos2.y == CLAMP(pos2.y, pos1.y, pos1.y+16)){// hit y + return true; + } + return false; +} + +void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ + if (!hh_collision(pos_environment,entity->pos)) + return; + + printf("BONK!/n"); + // if (entity->vel.y > 0){ + // entity->pos.y = MAX(entity->pos.y,pos_environment.y); + // entity->vel.y = 0; + // } else { + // entity->pos.y = MIN(entity->pos.y,pos_environment.y); + // entity->vel.y = 0; + // } + // if (entity->vel.x <= 0){ + // entity->pos.x = MIN(entity->pos.x,pos_environment.x-16); + // entity->vel.x = 0; + // } else { + // entity->pos.x = MAX(entity->pos.x,pos_environment.x+16); + // entity->vel.x = 0; + // } +} + diff --git a/src/engine/entity.h b/src/engine/entity.h new file mode 100644 index 0000000..f45dae2 --- /dev/null +++ b/src/engine/entity.h @@ -0,0 +1,57 @@ +#pragma once + +#include +#include + +#include "ppu/types.h" + +#include "engine/maths.h" + +typedef uint8_t hh_idx_t; + +typedef enum { + fire, ice, poison +}hh_e_damage_t; + +typedef struct { + hh_s_ppu_loc_fam_entry fam; //screen + hh_idx_t frame0; + hh_idx_t palette; + +}hh_s_rendering; + +typedef struct { + int8_t hp; + int8_t dmg; + hh_e_damage_t dmg_type; + int8_t speed_x, speed_y; + +} hh_s_atributes; + + +typedef struct { + vec2 pos, vel, vec; + bool is_grounded; + int8_t hp; + int8_t speed; + hh_s_rendering render; + //armor/block? +}hh_entity; + +typedef struct { + hh_entity p; + hh_s_atributes atr; +}hh_s_player; + + +/// @brief detect for collision enity and eviroment +/// @param pos1 position of environment tile to be checked +/// @param pos2 position entity +/// @return true if collision between enity and environment +bool hh_collision(vec2 pos1, vec2 pos2); + +/// @brief solve collisions +/// @param environment position +/// @param entity position +/// @return solved new entity position +void hh_solve_collision(vec2 pos_environment, hh_entity* entity); diff --git a/src/engine/maths.c b/src/engine/maths.c new file mode 100644 index 0000000..475bba2 --- /dev/null +++ b/src/engine/maths.c @@ -0,0 +1,19 @@ +#include "engine/maths.h" + +vec2 vec_add(vec2 a, vec2 b){ + return (vec2){a.x + b.x, a.y + b.y}; +} + +vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){ + return (vec_cor){ + .x = in.x - halfDistance.x, + .y = in.y - halfDistance.y, + }; +} + +vec_cen vec_cor2cen(vec_cor in, vec2 halfDistance){ + return (vec_cen){ + .x = in.x + halfDistance.x, + .y = in.y + halfDistance.y, + }; +} diff --git a/src/engine/maths.h b/src/engine/maths.h index c7f1b44..bef287e 100644 --- a/src/engine/maths.h +++ b/src/engine/maths.h @@ -3,12 +3,17 @@ // #include typedef struct { - uint32_t x,y; + int32_t x,y; } vec2; typedef vec2 vec_cen;//centered typedef vec2 vec_cor;//left upper corner +vec2 vec_add(vec2 a, vec2 b); + +vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance); +vec_cor vec_cor2cen(vec_cen in, vec2 halfDistance); + //fixed point at decimal 7lsb (world positions in pixels (with fixed decimal point)) #define HH_MATH_FIXED_POINT 7 diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c new file mode 100644 index 0000000..6735620 --- /dev/null +++ b/src/engine/player_controller.c @@ -0,0 +1,167 @@ +#include "ppu/types.h" +#include "engine/camera.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" +#include "engine/player_controller.h" + +#include "demo.h" +#include + +#include "input.h" + +void hh_player_actions() { + static hh_entity player={ + .hp = 4, + .speed = 6, + .is_grounded = false, + .pos = (vec2){32,32}, + .vel = (vec2){0,0}, + .vec = (vec2){0,0}, + .render = { + .frame0 = 20, + .palette = 7, + .fam = (hh_s_ppu_loc_fam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 2, + } + } + }, player_new = {0}; + + // hh_input_read(); + player.vel = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), + .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; + // const int8_t maa = 3; + // const int8_t mbb = -3; + // if (g_hh_controller_p1.dpad_up) + // + // if (g_hh_controller_p1.dpad_down) + // + // if (g_hh_controller_p1.dpad_left) { + // player.vel.x += mbb; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + // if (g_hh_controller_p1.dpad_right) { + // player.vel.x += maa; + // // g_hh_demo_balls[0].horizontal_flip = true; + // } + // if (g_hh_controller_p1.button_primary /*&& player.is_grounded*/) //JUMP + // player.vel.y += -6; + // // // if (g_hh_controller_p1.button_secondary) + + // player.render.fam.palette_index = 7; + // player.render.fam.tilemap_index = 7; + + // printf("%x ",player.render.fam.palette_index); + + // player.vel.y += 1; //gravity + + + //END OF VECTOR CHANGES + // player.vel.y = CLAMP(player.vel.y,-32,32); + // player.vel.x = CLAMP(player.vel.x,-32,32); + + player_new.pos = (vec2){ + .x = player.pos.x + player.vel.x, + .y = player.pos.y + player.vel.y, + }; + + + + // const uint8_t empty = 0; + // hh_s_tiles tiles[9]; + // const vec2 tile_offset[9] = { + // (vec2){-16,-16},(vec2){0,-16},(vec2){+16,-16}, + // (vec2){-16,0}, (vec2){0,0}, (vec2){+16,0}, + // (vec2){-16,+16},(vec2){0,+16},(vec2){+16,+16}, + // }; + // for (int i = 0; i < 9; i++) { + // vec2 temp_pos = vec_add(player.pos, tile_offset[i]); + // temp_pos =(vec2){ + // .x = temp_pos.x, + // .y = temp_pos.y, + // }; + // hh_s_tiles tile = { + // .pos = temp_pos, + // .idx = hh_world_to_tile(temp_pos) + // }; + // if(hh_colidable(tile.idx)) { + // tiles[i]=tile; + // // printf(" collidable near!"); + // } else { + // tiles[i].idx = 0; + // } + // } + /* + 012 + 345 + 678 + */ + // for (int i = 0; i < 9; i++) + // { + // if (tiles[i].idx != 0){ + // hh_solve_collision(tiles[i].pos, &player); + // } + // } + + player_new.is_grounded = false; + + // solves x collision + if (player.vel.x <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 15}))) { + player_new.pos.x = (player_new.pos.x & ~15) + 16, + player_new.vel.x = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 15}))) { + player_new.pos.x = player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY + player_new.vel.x = 0; + } + } + + //solves y collision + if (player.vel.y <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 15}))) { + player_new.pos.y = (player_new.pos.y & ~15) + 16, + player_new.vel.y = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 16})) || + hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player_new.pos.y + 15}))) { + player_new.pos.y = player_new.pos.y & ~15, + player_new.vel.y = 0; + player_new.is_grounded = true; + } + } + + player = player_new; + + vec_cor cam_pos;//value in tiles + // cam_pos = (vec2){0,0}; + cam_pos = hh_update_camera(player.pos,(vec2){0,0},(vec2){.x=20*16,.y=30*16});//TODO: remove magic number(s) + // printf("%i, %i:%i, %i\n",player.pos.x,player.pos.y,cam_pos.x,cam_pos.y); + hh_draw_screen(cam_pos); + // update player sprite on ppu + player.render.fam.position_x = (player.pos.x-cam_pos.x); + player.render.fam.position_y = (player.pos.y-cam_pos.y); + + + player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant + player.render.fam.palette_index = 7; + hh_ppu_update_foreground(0, player.render.fam); + + + hh_s_ppu_loc_fam_entry sprite = { + .position_x = 16, + .position_y = 16, + .palette_index = 7, + .tilemap_index = 2, + }; + hh_ppu_update_foreground(1, sprite); + +} + diff --git a/src/engine/player_controller.h b/src/engine/player_controller.h new file mode 100644 index 0000000..400c18e --- /dev/null +++ b/src/engine/player_controller.h @@ -0,0 +1,7 @@ +#pragma once + +#include "engine/maths.h" +#include "engine/entity.h" +// inputs + +void hh_player_actions(); diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c new file mode 100644 index 0000000..5d93cf8 --- /dev/null +++ b/src/engine/sprite_controller.c @@ -0,0 +1,22 @@ +#include + +#include "engine/sprite_controller.h" +#include "ppu/types.h" +#include "ppu/consts.h" +#include "ppu/ppu.h" + +uint8_t hh_get_palette(uint8_t tile_idx) { + return hh_g_sprite_palette[tile_idx]; +} + +void hh_setup_palettes(){ + for (int idx = 0; idx < HH_PPU_PALETTE_COUNT; idx++) { + for (int col = 0; col < HH_PPU_PALETTE_COLOR_COUNT; col++) { + hh_ppu_update_color(idx,col,hh_g_palette[idx][col]); + } + } +} + +bool hh_colidable(uint8_t tile_idx){ + return (hh_get_palette(tile_idx) != 0); +} diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h new file mode 100644 index 0000000..001a459 --- /dev/null +++ b/src/engine/sprite_controller.h @@ -0,0 +1,106 @@ +#pragma once +#include + +#include "ppu/types.h" + +// handles sprites + +// Bg sprites + +// Fg or entity sprites + +//TODO: pack data inside of sprite_palette LUT +//HH_PPU_PALETTE_COUNT +#define HH_SPRITE_COUNT 40 +#define HH_PAL_IDX_SKY 0 +#define HH_PAL_IDX_BRICK 1 +const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { + 0,1,1,1,1,1,1,1,1,1, //1+9 + 1,1,1,1,1,1,1,1,1,1, //6+4 + 1,1,1,1,1,1,1,1,1, //9 + 7,7,7,2,7,7,1,2,7 + //other palettes here: +}; + + +const static hh_ppu_loc_palette_table_t hh_g_palette = { + {//palette info here + {0x1,0x2,0x3}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + {//Bricks + {0x1,0x2,0x3},//01 + {0xd,0x8,0xa},//24 + {0x0,0x0,0x1},//25 + {0x1,0x1,0x1},//26 + {0x1,0x1,0x2},//27 + {0x2,0x2,0x3},//28 + {0x3,0x4,0x5},//29 + {0x5,0x1,0x7}}, + {//slime + {0x1,0x2,0x3}, + {0x1,0x3,0x2}, + {0x4,0x8,0x3}, + {0x7,0xa,0x4}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}, + {0x0,0x0,0x0}}, + { + {0x0,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0x0,0xf}, + {0xf,0xf,0x0}, + {0xf,0x0,0x0}, + {0x0,0xf,0x0}, + {0x0,0x0,0xf}, + {0x0,0x0,0x0}} +}; + +void hh_setup_palettes(); + +/** @brief return palette index that belongs to tilemap index */ +uint8_t hh_get_palette(uint8_t tile_idx); + +bool hh_colidable(uint8_t tile_idx); diff --git a/src/makefile b/src/makefile index 96751fb..d7d9087 100644 --- a/src/makefile +++ b/src/makefile @@ -31,7 +31,13 @@ LOCAL_SRCS += main.c \ ppu/internals.c \ ppu/ppu.c \ demo.c \ - engine/engine.c + engine/engine.c \ + engine/sprite_controller.c \ + engine/player_controller.c \ + engine/draw_screen.c \ + engine/camera.c \ + engine/maths.c \ + engine/entity.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index 1fceb82..a5fec45 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,20 +29,21 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + char* filename = "../test/bin/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ + fprintf(stderr,"Error: Failed to load tiles."); return;//error } - + int sprite_size = (HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT); fseek(fp, 0, SEEK_END);//goto EOF - int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; + int _size = ftell(fp)/sprite_size; fseek(fp, 0, 0);//goto start of file for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; + uint8_t data[sprite_size]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + fread(data,sizeof(uint8_t),sprite_size,fp); hh_s_ppu_vram_data sprite = hh_ppu_2nat_sprite(data); sprite.offset = i*HH_PPU_VRAM_TMM_SPRITE_SIZE; diff --git a/test/bin/exportingPalettes.md b/test/bin/exportingPalettes.md new file mode 100644 index 0000000..be4a354 --- /dev/null +++ b/test/bin/exportingPalettes.md @@ -0,0 +1,4 @@ +```sh +cat test.src|head -n 46 | awk '{printf "%02x: {0x%x,0x%x,0x%x}\n",NR,$1/2,$2/2,$3/2 }' > hex_palettes +``` + diff --git a/test/bin/test_file_read.c b/test/bin/test_file_read.c index b3357ce..df93395 100644 --- a/test/bin/test_file_read.c +++ b/test/bin/test_file_read.c @@ -16,19 +16,22 @@ void printData(uint8_t* in) { } void hh_ppu_load_tilemap() { - char* filename = "tiles.bin"; + + + char* filename = "slime.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ return;//error } + int sprite_size = (16 * 16); fseek(fp, 0, SEEK_END); - int _size = ftell(fp)/HH_PPU_VRAM_TMM_SPRITE_SIZE; - fseek(fp, 0, 0); + int _size = ftell(fp)/sprite_size; + rewind(fp); // printf("%i",_size); for (int i = 0; i < _size; i++) { - uint8_t data[HH_PPU_VRAM_TMM_SPRITE_SIZE]; - fread(data,HH_PPU_VRAM_TMM_SPRITE_SIZE,1,fp); + uint8_t data[sprite_size]; + fread(data,1,sprite_size,fp); printData(data); } diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip new file mode 100644 index 0000000..c0c646e --- /dev/null +++ b/test/bin/tilemap.pip @@ -0,0 +1,512 @@ +0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 +0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 +0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 +03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 +04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 +0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 +06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 +0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 +0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 +0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 +0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 +0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 +0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 +0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 +0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 +0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 +0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 +0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 +0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 +0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 +0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 +0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 +0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 +0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 +0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 +0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 +1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 +10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 +10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 +10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 +11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 +11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 +11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 +1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 +1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 +1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 +1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 +1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 +1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 +1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 +1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 +15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 +15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 +15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 +15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 +15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 +16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 +1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 +1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 +1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 +1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 +17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 +17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 +17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 +17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 +17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 +1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 +1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 +1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 +1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 +18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 +18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 +18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 +18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 +1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 +1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 +1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 +1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 +19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 +19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 +19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 +19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 +19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 +1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 +1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 +1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 +1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 +1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 +1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 +1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 +1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 +1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 +1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 +1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 +1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 +1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 +1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 +1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 +1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 +1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00 +1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00 +1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00 +1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 +1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 +1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 +1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 +1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- cgit v1.2.3 From 5c999fb95681ffaff41e59f8f43c82b5cf148e42 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Tue, 14 Mar 2023 17:26:17 +0100 Subject: camera y-axis bug fixed + clean up --- src/engine/camera.c | 5 +++-- src/engine/player_controller.c | 17 ----------------- 2 files changed, 3 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/engine/camera.c b/src/engine/camera.c index e756bd4..2c3e517 100644 --- a/src/engine/camera.c +++ b/src/engine/camera.c @@ -6,10 +6,10 @@ vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ //TODO: change floating point math to fix point math - //TODO: fix buggy y-axis ?? + //TODO: remove magic number at y camera offset // new = vec_cen2cor(new,(vec2){.x=max.x/2,.y=max.y/2}); - new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH/2),.y=(new.y+(HH_PPU_SPRITE_HEIGHT/2))*2},(vec2){.x=max.x/2,.y=max.y/2}); + new = vec_cen2cor((vec2){.x=new.x+(HH_PPU_SPRITE_WIDTH),.y=new.y+(HH_PPU_SPRITE_HEIGHT*8)},(vec2){.x=max.x/2,.y=max.y/2}); // new.x = new.x << HH_MATH_FIXED_POINT; // new.y = new.y << HH_MATH_FIXED_POINT; static vec_cor old; @@ -19,6 +19,7 @@ vec_cor hh_update_camera(vec_cen new, vec2 min, vec2 max){ // int16_t some = 0; // some = some <<= HH_MATH_FIXED_POINT-1; + // Camera smoothing new.x = (int)((float)new.x*0.1f + (float)old.x*0.9f); new.y = (int)((float)new.y*0.1f + (float)old.y*0.9f); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 6735620..22f6eb6 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -4,9 +4,6 @@ #include "engine/sprite_controller.h" #include "engine/player_controller.h" -#include "demo.h" -#include - #include "input.h" void hh_player_actions() { @@ -50,11 +47,6 @@ void hh_player_actions() { // player.vel.y += -6; // // // if (g_hh_controller_p1.button_secondary) - // player.render.fam.palette_index = 7; - // player.render.fam.tilemap_index = 7; - - // printf("%x ",player.render.fam.palette_index); - // player.vel.y += 1; //gravity @@ -154,14 +146,5 @@ void hh_player_actions() { player.render.fam.palette_index = 7; hh_ppu_update_foreground(0, player.render.fam); - - hh_s_ppu_loc_fam_entry sprite = { - .position_x = 16, - .position_y = 16, - .palette_index = 7, - .tilemap_index = 2, - }; - hh_ppu_update_foreground(1, sprite); - } -- cgit v1.2.3 From 0c3292879774e33dfb3e8c7d787b236876508467 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Tue, 14 Mar 2023 19:38:43 +0100 Subject: added hexdump file structures --- src/.gitignore | 4 +- src/engine/sprite_controller.h | 30 +- src/static/background/tilemap.hex | 514 +++++++++++++++++++++++++++++ src/static/foreground/slime.hex | 24 ++ src/static/title_screen_icon.hex | 119 +++++++ src/static/title_screen_letteres_large.hex | 230 +++++++++++++ test/bin/tilemap.pip | 512 ---------------------------- 7 files changed, 904 insertions(+), 529 deletions(-) create mode 100644 src/static/background/tilemap.hex create mode 100644 src/static/foreground/slime.hex create mode 100644 src/static/title_screen_icon.hex create mode 100644 src/static/title_screen_letteres_large.hex delete mode 100644 test/bin/tilemap.pip (limited to 'src') diff --git a/src/.gitignore b/src/.gitignore index 504b995..e3d1207 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,5 +3,5 @@ main.elf main.bin main main.exe -static/ -*.bin +static/*.bin + diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index 001a459..fbb230c 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -51,22 +51,13 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, + {//player {0x0,0x0,0x0}, + {0x1,0x1,0x1}, + {0x4,0x2,0x5}, + {0x7,0x3,0x6}, + {0x1,0x1,0x3}, + {0xe,0xe,0xe}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, { @@ -87,6 +78,15 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, + {//white + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}, + {0xf,0xf,0xf}}, { {0x0,0xf,0xf}, {0xf,0xf,0xf}, diff --git a/src/static/background/tilemap.hex b/src/static/background/tilemap.hex new file mode 100644 index 0000000..446f3dd --- /dev/null +++ b/src/static/background/tilemap.hex @@ -0,0 +1,514 @@ +;TODO split up file +;Tilemap (all current tiles) +0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 +0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 +0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 +03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 +04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 +0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 +06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 +0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 +0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 +0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 +0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 +0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 +0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 +0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 +0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 +0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 +0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 +0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 +0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 +0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 +0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 +0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 +0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 +0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 +0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 +0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 +1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 +10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 +10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 +10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 +11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 +11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 +11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 +1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 +1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 +1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 +1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 +1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 +1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 +1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 +1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 +15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 +15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 +15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 +15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 +15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 +16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 +1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 +1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 +1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 +1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 +17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 +17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 +17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 +17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 +17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 +1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 +1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 +1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 +1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 +18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 +18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 +18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 +18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 +1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 +1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 +1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 +1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 +19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 +19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 +19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 +19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 +19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 +1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 +1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 +1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 +1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 +1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 +1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 +1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 +1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 +1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 +1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 +1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 +1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 +1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 +1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 +1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 +1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 +1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00 +1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 +1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00 +1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 +1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 +1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00 +1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 +1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 +1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 +1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 +1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 +1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 +1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 +1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 diff --git a/src/static/foreground/slime.hex b/src/static/foreground/slime.hex new file mode 100644 index 0000000..ce20533 --- /dev/null +++ b/src/static/foreground/slime.hex @@ -0,0 +1,24 @@ +;slime sprite +;indices: 4 +;23 32 56 +;25 51 45 +;70 130 50 +;117 167 67 + +00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +40: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 +50: 00 00 00 01 03 03 03 03 03 03 01 00 00 00 00 00 +60: 00 00 01 03 03 03 03 03 03 03 03 01 00 00 00 00 +70: 00 01 03 03 03 03 03 03 03 01 02 03 01 00 00 00 +80: 01 03 03 03 01 02 03 03 03 01 01 03 03 01 00 00 +90: 01 03 03 03 01 01 03 03 03 03 03 03 03 03 01 00 +a0: 01 03 03 03 03 03 03 03 02 03 03 03 03 03 02 01 +b0: 01 02 03 03 03 03 03 03 03 03 03 03 03 02 02 01 +c0: 00 01 02 03 03 03 03 03 03 03 03 02 02 02 02 01 +d0: 00 00 01 02 02 03 03 03 02 02 02 02 02 02 01 00 +e0: 00 00 00 01 02 02 02 02 02 02 02 02 02 01 00 00 +f0: 00 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 + diff --git a/src/static/title_screen_icon.hex b/src/static/title_screen_icon.hex new file mode 100644 index 0000000..a1e5f0b --- /dev/null +++ b/src/static/title_screen_icon.hex @@ -0,0 +1,119 @@ +;Main character icon for title screen +;indices: 4 +;23 32 56 +;16 20 31 +;64 39 81 +;122 54 123 + +0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0050: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0060: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0080: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0090: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +00f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +01b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03 +01c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03 +01d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03 +01e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03 +01f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +0220: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 +0230: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 +0240: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +0250: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +0260: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 +0270: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +0280: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +0290: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +02a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +02b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +02c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01 +02d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +02e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +02f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +0300: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0310: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0320: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0330: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0340: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01 +0350: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01 +0360: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +0370: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +0380: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0390: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +03f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0400: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +0410: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +0420: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0430: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0440: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0450: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0460: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0470: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0480: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +0490: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +04a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +04b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +04c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +04d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +04e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +04f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +0500: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +0510: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01 +0520: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 +0530: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +0540: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +0550: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +0560: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 +0580: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +0590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 +05a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 +05b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +05f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0600: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0610: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0620: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0640: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0650: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0660: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0680: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0690: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +06a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +06b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +06c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01 +06d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01 +06e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03 +06f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 diff --git a/src/static/title_screen_letteres_large.hex b/src/static/title_screen_letteres_large.hex new file mode 100644 index 0000000..fea1c77 --- /dev/null +++ b/src/static/title_screen_letteres_large.hex @@ -0,0 +1,230 @@ +;title screen letters (Large) +;indices: 3 +;23 32 56 +;165 48 48 +;207 87 60 + +0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01 +0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 +0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 +0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00 +0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 +0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 +0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00 +0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00 +0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00 +0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00 +0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 +0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00 +03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00 +03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00 +03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00 +0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00 +0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00 +0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 +0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00 +05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00 +05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00 +05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00 +05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00 +0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00 +0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00 +0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00 +06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00 +06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00 +06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00 +0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00 +07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00 +0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00 +0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00 +0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00 +0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00 +08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00 +08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00 +08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00 +08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00 +08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00 +0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00 +0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00 +0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00 +0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 +09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00 +09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00 +09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 +0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00 +0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00 +0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 +0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00 +0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 +0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00 +0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00 +0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00 +0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00 +0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00 +0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00 +0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00 +0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00 +0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00 +0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 +0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00 +0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00 +0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00 +0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00 +0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00 +0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00 +0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00 +0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00 +0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00 +0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 diff --git a/test/bin/tilemap.pip b/test/bin/tilemap.pip deleted file mode 100644 index c0c646e..0000000 --- a/test/bin/tilemap.pip +++ /dev/null @@ -1,512 +0,0 @@ -0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0100: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 -0110: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 -0120: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 -0130: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 -0140: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 -0150: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0160: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0170: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 -0180: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 -0190: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -01a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -01b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -01c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 -01d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 -01e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 -01f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 -0200: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 -0210: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0220: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0240: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0260: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -0290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -02a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -02b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -02c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -02d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -02e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -02f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0300: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 -0310: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 -0320: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 -0330: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 -0340: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 -0350: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0360: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0370: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0380: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0390: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -03a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -03b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 -03c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 -03d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 -03e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 -03f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 -0400: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0410: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0420: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 -0430: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -0440: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 -0450: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0460: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 -0470: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 -0480: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0490: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -04a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -04b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -04c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 -04d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 -04e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 -04f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 -0500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -0510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -0520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -0530: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0540: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0550: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0560: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -0570: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0580: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -0590: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -05a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -05b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -05c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -05d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -05e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -05f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0600: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0610: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0620: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 -0630: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 -0640: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 -0650: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0660: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0670: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0680: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0690: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -06a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -06b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 -06c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 -06d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 -06e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 -06f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 -0700: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0710: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0720: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 -0730: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -0740: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 -0750: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0760: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 -0770: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 -0780: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0790: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -07a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -07b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -07c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 -07d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 -07e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 -07f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 -0800: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -0810: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -0820: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -0830: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0840: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0850: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0860: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -0870: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0880: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -0890: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -08a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -08b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -08c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 -08d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 -08e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 -08f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 -0900: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0910: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 -0920: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 -0930: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 -0940: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 -0950: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0960: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 -0970: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0980: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0990: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -09a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -09b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 -09c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 -09d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 -09e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 -09f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 -0a00: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 -0a10: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 -0a20: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 -0a30: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 -0a40: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 -0a50: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0a60: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 -0a70: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 -0a80: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0a90: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 -0aa0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 -0ab0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 -0ac0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 -0ad0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 -0ae0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 -0af0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 -0b00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 -0b10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0b20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 -0b30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0b40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0b50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -0b60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -0b70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0b80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -0b90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -0ba0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -0bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -0bc0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 -0bd0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 -0be0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 -0bf0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 -0c00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 -0c10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 -0c20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 -0c30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 -0c40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 -0c50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0c60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 -0c70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 -0c80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 -0c90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -0ca0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 -0cb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 -0cc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 -0cd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 -0ce0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 -0cf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 -0d00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 -0d10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 -0d20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 -0d30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 -0d40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 -0d50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 -0d60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 -0d70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 -0d80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 -0d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0db0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 -0dc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 -0dd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 -0de0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 -0df0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 -0e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 -0e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 -0e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 -0e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 -0e60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 -0e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 -0e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 -0e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0eb0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 -0ec0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 -0ed0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 -0ee0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 -0ef0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 -0f00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0f10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 -0f20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 -0f30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 -0f40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 -0f50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 -0f60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 -0f70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 -0f80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 -0f90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0fa0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 -0fb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 -0fc0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 -0fd0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 -0fe0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 -0ff0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 -1000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -10a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -10b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -10c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 -10d0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 -10e0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 -10f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1100: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1110: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -11a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -11b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -11c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 -11d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 -11e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 -11f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1200: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 -1210: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 -1220: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 -1230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -12a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -12b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -12c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -12d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -12e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -12f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1300: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1310: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 -1320: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1330: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1340: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 -1350: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 -1360: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 -1370: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1380: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 -1390: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 -13a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -13b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -13c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -13d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -13e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -13f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1400: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1410: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1420: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1430: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1440: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1450: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1460: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1470: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1480: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1490: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -14f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1530: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 -1540: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 -1550: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 -1560: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 -1570: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1580: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 -1590: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 -15a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 -15b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -15c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 -15d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 -15e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 -15f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1640: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 -1650: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 -1660: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 -1670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1680: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 -1690: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 -16a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 -16b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -16f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 -1710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 -1720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 -1730: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 -1740: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 -1750: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 -1760: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 -1770: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 -1780: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 -1790: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 -17a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 -17b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -17c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 -17d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 -17e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 -17f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1800: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 -1810: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 -1820: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 -1830: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1840: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 -1850: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 -1860: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 -1870: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -1880: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 -1890: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 -18a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 -18b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -18c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 -18d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 -18e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 -18f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -1900: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 -1910: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 -1920: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 -1930: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 -1940: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 -1950: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 -1960: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 -1970: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1980: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 -1990: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 -19a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 -19b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -19c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 -19d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 -19e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 -19f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1a00: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 -1a10: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 -1a20: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 -1a30: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 -1a40: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 -1a50: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 -1a60: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 -1a70: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 -1a80: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 -1a90: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 -1aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 -1ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -1ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -1ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -1af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1b00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1b10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1b20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 -1b30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 -1b40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 -1b50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 -1b60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 -1b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -1b80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 -1b90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 -1ba0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 -1bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -1bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -1be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -1bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1c00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 -1c10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 -1c20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 -1c30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 -1c40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 -1c50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 -1c60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 -1c70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 -1c80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 -1c90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 -1ca0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 -1cb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1cc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 -1cd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 -1ce0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 -1cf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -1d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1d10: 00 00 01 01 01 01 01 00 00 00 01 01 01 00 00 00 -1d20: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d30: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d40: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d50: 00 00 00 00 01 00 00 00 00 01 00 00 00 01 00 00 -1d60: 00 00 00 00 01 00 00 00 00 00 01 01 01 00 00 00 -1d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1d80: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 -1d90: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1da0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1db0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1dc0: 00 00 01 00 00 00 01 00 00 01 00 00 00 01 00 00 -1dd0: 00 00 01 01 01 01 00 00 00 00 01 01 01 00 00 00 -1de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1df0: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00 -1e00: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1e10: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1e20: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e30: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e40: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e50: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e60: 00 00 00 00 00 01 01 01 01 01 01 01 00 00 00 00 -1e70: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1e80: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1e90: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1eb0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1ec0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1ed0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1ee0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -1ef0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1f20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1f30: 00 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 -1f40: 00 00 00 00 00 01 00 00 00 00 01 00 00 00 00 00 -1f50: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 -1f60: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 -1f70: 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 -1f80: 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 -1f90: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -1fa0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 -1fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -1fe0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 -1ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- cgit v1.2.3 From e79c36460f400991caa82598499c0ea7c37ebb90 Mon Sep 17 00:00:00 2001 From: Flenk008 Date: Wed, 15 Mar 2023 18:58:25 +0100 Subject: Player-Enemy collision Added player with enemy collision. Also changed input system to a vector system with friction and gravity. Jump also works. Enemy is 1 stationary object. --- src/demo.c | 175 +++++++---------------------------------- src/engine/entity.c | 81 +++++++++++++++++++ src/engine/entity.h | 25 ++++++ src/engine/player_controller.c | 155 +++++++++++++++++++++++++++--------- src/ppusim/input.c | 1 + 5 files changed, 253 insertions(+), 184 deletions(-) (limited to 'src') diff --git a/src/demo.c b/src/demo.c index baaf73d..d4d1bf7 100644 --- a/src/demo.c +++ b/src/demo.c @@ -1,26 +1,21 @@ #include #include "demo.h" -#include "entity.h" #include "input.h" +#include "entity.h" #include "ppu/ppu.h" -#define HH_DEMO_BALL_COUNT 1 -hh_s_ppu_loc_fam_entry g_hh_demo_balls[HH_DEMO_BALL_COUNT]; +#include "engine/maths.h" +#include "engine/camera.h" +#include "engine/entity.h" +#include "engine/draw_screen.h" +#include "engine/player_controller.h" +#include "engine/sprite_controller.h" -hh_s_entity_player g_hh_player_1 = { - .pos_x = 31000, // 0b0000 0001 0011 0110 - .pos_y = 21000, - .radius = 8, - .speed = 100, - .direction_x = 1, - .rotation = 8, - .in_air = false, -}; -void hh_player_movement(); -uint16_t g_hh_pos_x; // 0b0000 0001 0011 0110 + +uint16_t g_hh_pos_x = 1000; // 0b0000 0001 0011 0110 uint16_t g_hh_pos_y; uint8_t g_hh_left = 0; uint8_t g_hh_right = 0; @@ -29,67 +24,29 @@ uint8_t g_hh_down = 0; uint8_t g_hh_pos_x_bit[2]; uint8_t g_hh_pos_y_bit[2]; uint8_t g_hh_data_send[3]; -int g_hh_tile_x; +int g_hh_tile_size = 8; int g_hh_tile_y; -void hh_demo_setup() { - // load sprites - hh_ppu_update_sprite(0, HH_DBG_SPRITE_BALL); - hh_ppu_update_sprite(1, HH_DBG_SPRITE_CHECKERBOARD); - - // background pattern - hh_ppu_update_color(0, 1, (hh_ppu_rgb_color_t){0x4, 0x4, 0x4}); - for (unsigned i = 0; i < HH_PPU_BG_CANVAS_TILES_H * HH_PPU_BG_CANVAS_TILES_V; i++) { - hh_ppu_update_background(i, (hh_s_ppu_loc_bam_entry){ - .horizontal_flip = false, - .vertical_flip = false, - .palette_index = 0, - .tilemap_index = 1, - }); - } - - // cool colors - hh_ppu_update_color(1, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0xf}); - hh_ppu_update_color(2, 1, (hh_ppu_rgb_color_t){0xf, 0xf, 0xf}); - hh_ppu_update_color(3, 1, (hh_ppu_rgb_color_t){0xf, 0x0, 0x0}); - hh_ppu_update_color(4, 1, (hh_ppu_rgb_color_t){0x0, 0xf, 0xf}); - hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t){0x0, 0x0, 0xf}); - - // balls - for (unsigned i = 0; i < HH_DEMO_BALL_COUNT; i++) { - g_hh_demo_balls[i].horizontal_flip = false; - g_hh_demo_balls[i].vertical_flip = false; - g_hh_demo_balls[i].palette_index = i + 1; - g_hh_demo_balls[i].tilemap_index = 0; - } -} - -void hh_demo_loop(unsigned long frame) { - hh_player_movement(); - // input testing (no hitbox stuff) - // g_hh_player_1.pos_x += ((-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right)) * g_hh_player_1.speed; // -1 = L || 1 == R - // g_hh_player_1.pos_y += ((-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down)) * g_hh_player_1.speed; // -1 = D || 1 == U +typedef struct { + vec2 pos; + uint8_t idx; +}hh_s_tiles; - // adjust map size - g_hh_pos_x = g_hh_player_1.pos_x / 100; - g_hh_pos_y = g_hh_player_1.pos_y / 100; +hh_entity hh_g_player, hh_g_player_new; +void hh_demo_setup() { + hh_setup_palettes(); + hh_setup_screen(); +} - // update player sprite on ppu - g_hh_demo_balls[0].position_x = g_hh_pos_x; - g_hh_demo_balls[0].position_y = g_hh_pos_y; - hh_ppu_update_foreground(0, g_hh_demo_balls[0]); +void hh_demo_loop(unsigned long frame) { - // set background pattern position - hh_ppu_update_aux((hh_s_ppu_loc_aux){ - .bg_shift_x = (frame / 2) % HH_PPU_SPRITE_WIDTH, - .bg_shift_y = (frame / 8) % HH_PPU_SPRITE_HEIGHT, - .fg_fetch = 0, - .sysreset = 0, - }); + + hh_player_actions(); + } // void sendData(uint8_t address, uint16_t data) { @@ -103,84 +60,8 @@ void hh_demo_loop(unsigned long frame) { // HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET); // } -void hh_player_movement() { - int8_t directionX = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); // -1 = L || 1 == R - int8_t directionY = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); // -1 = D || 1 == U - - uint8_t i, j; - uint8_t rotation = 0; // 0-7 - - // rotation calc - for (i = -1; i < 2; i++) { - for (j = -1; j < 2; j++) { - if (directionX == i) { - if (directionY == j) { - if (i != 0 && j != 0) // dont update when player idle - { - g_hh_player_1.rotation = rotation; - } - } - } - rotation++; - } - } - // direction calc - if (directionX != 0) // update direction if player is not idle - { - g_hh_player_1.direction_x = directionX; - } - // collision map x-axis - - // tile calc including radius and direction for background coliision - - uint16_t tileColX; - uint16_t tileColY = (g_hh_player_1.pos_y / 100) / 16; - ; - - // remaining space between grid and exact - uint8_t modTileX; - uint8_t modTileY; - - if (g_hh_player_1.in_air == false && directionX != 0) { - if (directionX == 1) { - tileColX = ((g_hh_player_1.pos_x / 100) + g_hh_player_1.radius) / 16; - modTileX = (g_hh_player_1.pos_x + (100 * g_hh_player_1.radius)) % 1600; - } else if (directionX == -1) { - tileColX = ((g_hh_player_1.pos_x / 100) - g_hh_player_1.radius) / 16; - modTileX = (g_hh_player_1.pos_x - (100 * g_hh_player_1.radius)) % 1600; - } - - if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] != 1) { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set - } - - else if (HH_DEMO_HITBOX_TILEMAP[tileColY][tileColX + directionX] == 1) { - if (modTileX < g_hh_player_1.speed) { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * modTileX); // NEW x set - } else { - g_hh_player_1.pos_x = g_hh_player_1.pos_x + (directionX * g_hh_player_1.speed); // NEW x set - } - } - - } else // if in air different all borders have to be checked - { - } - - - if(directionY != 0) - { - // g_hh_player_1.pos_y = g_hh_player_1.pos_y + (directionY * g_hh_player_1.speed * 2); // NEW x set - } - // collision map floor (y-axis) (falling) - // if falling no jump press (implement) - /* - tileColY = (( g_hh_player_1.pos_y / 100) + g_hh_player_1.radius) / 16; //bottom of player box - modTileY = 1; - if(HH_DEMO_HITBOX_TILEMAP[tileColY+1][tileColX] != 1) //rework after jumping - { - g_hh_player_1.pos_y = g_hh_player_1.pos_y + 5 ;// NEW y set //makew var gravity - //playerStat = falling; //for later use of graphics/sound - } - */ - // else if(HH_DEMO_HITBOX_TILEMAP[]) -} + + + + + diff --git a/src/engine/entity.c b/src/engine/entity.c index 153e7e1..535759d 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -43,4 +43,85 @@ void hh_solve_collision(vec2 pos_environment, hh_entity* entity){ // entity->vel.x = 0; // } } +hh_entity hh_background_collision (hh_entity temp_old_entity,hh_entity temp_new_entity){ + temp_old_entity.is_grounded = false; + +// solves x collision + if (temp_old_entity.vel.x <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_old_entity.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_old_entity.pos.y + 15}))) { + temp_new_entity.pos.x = (temp_new_entity.pos.x & ~15) + 16, + temp_new_entity.vel.x = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 16, .y=temp_old_entity.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 16, .y=temp_old_entity.pos.y + 15}))) { + temp_new_entity.pos.x = temp_new_entity.pos.x & ~15, // <-- magic comma, NOT TOUCHY + temp_new_entity.vel.x = 0; + } + } + + //solves y collision + if (temp_old_entity.vel.y <= 0) { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_new_entity.pos.y + 0})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 15, .y=temp_new_entity.pos.y + 0}))) { + temp_new_entity.pos.y = (temp_new_entity.pos.y & ~15) + 16, + temp_new_entity.vel.y = 0; + } + } else { + if (hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 0, .y=temp_new_entity.pos.y + 15})) || + hh_colidable(hh_world_to_tile((vec2){.x=temp_new_entity.pos.x + 15, .y=temp_new_entity.pos.y + 15}))) { + temp_new_entity.pos.y = temp_new_entity.pos.y & ~15, + temp_new_entity.vel.y = 0; + temp_old_entity.is_grounded = true; + } + } + temp_old_entity.pos = temp_new_entity.pos; + temp_old_entity.vel = temp_new_entity.vel; + return temp_old_entity; +} + +hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy){ + + bool collide = hh_distance_circles( temp_player.pos, temp_enemy.pos, temp_player.radius, temp_enemy.radius); + + if (collide == true && temp_player.is_hit == false) + { + temp_player.is_hit = true; + //angle = atan2( tempEntity.pos_y - tempPlayer.pos_y, tempEntity.pos_x - tempPlayer.pos_x); + if(temp_player.pos.x <= temp_enemy.pos.x) //player left of enemy -- creates flinch movement L or R + { + // printf("BONK-left!/n"); + temp_player.vel.y = -5; + temp_player.vel.x = -8; + } else { + // printf("BONK-right!/n"); + temp_player.vel.y = -5; + temp_player.vel.x = 8; + } + // ghost mode / invulnerable or other things on hit + // temp_player.hp--; + + } else { + temp_player.is_hit = false; + + } + + +return temp_player; +} + + +bool hh_distance_circles (vec2 object_1, vec2 object_2, int radius_1, int radius_2){ + int a_squared = (object_1.x - object_2.x) * (object_1.x - object_2.x); + int b_squared = (object_1.y - object_2.y) * (object_1.y - object_2.y); + int c_squared = a_squared + b_squared; + int radius = ( radius_1 + radius_2) * ( radius_1 + radius_2 ); + + if( c_squared <= radius ){ + return true; + } else { + return false; + } +} diff --git a/src/engine/entity.h b/src/engine/entity.h index f45dae2..cad6ba4 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -2,6 +2,7 @@ #include #include +#include #include "ppu/types.h" @@ -32,6 +33,8 @@ typedef struct { typedef struct { vec2 pos, vel, vec; bool is_grounded; + bool is_hit; + uint8_t radius; int8_t hp; int8_t speed; hh_s_rendering render; @@ -55,3 +58,25 @@ bool hh_collision(vec2 pos1, vec2 pos2); /// @param entity position /// @return solved new entity position void hh_solve_collision(vec2 pos_environment, hh_entity* entity); + +/// @brief solve collision of entity with background tiles +/// @param temp_old_entity old data of entity +/// @param temp_new_entity new data of entity where it wants to go to +/// @return updated new entity where it actually can go to +hh_entity hh_background_collision (hh_entity temp_old_entity, hh_entity temp_new_entity); + +/// @brief solve collision of player with enemy +/// @param temp_player data of player +/// @param temp_enemy data of enemy +/// @return updated player with new stats if hitted with enemy +hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy); + +/// @brief calculate if circles (entity) hit each other +/// @param object_1 position of first object (entity) +/// @param object_2 position of second object (entity) +/// @param radius_1 radius of first object (entity) +/// @param radius_2 radius of second object (entity) +/// @return true if objects collids +bool hh_distance_circles (vec2 object_1, vec2 object_2, int radius_1, int radius_2); + + diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 22f6eb6..d351bee 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -11,6 +11,8 @@ void hh_player_actions() { .hp = 4, .speed = 6, .is_grounded = false, + .is_hit = false, + .radius = 8, .pos = (vec2){32,32}, .vel = (vec2){0,0}, .vec = (vec2){0,0}, @@ -26,9 +28,113 @@ void hh_player_actions() { } }, player_new = {0}; + + static hh_entity enemy={ + .hp = 4, + .speed = 6, + .is_grounded = false, + .is_hit = false, + .radius = 8, + .pos = (vec2){128,48}, + .vel = (vec2){0,0}, + .vec = (vec2){0,0}, + .render = { + .frame0 = 20, + .palette = 7, + .fam = (hh_s_ppu_loc_fam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 1, + } + } + }; + player_new = player; // hh_input_read(); + static uint8_t hit = 0; + int8_t hit_timer = 0; + int8_t direction_x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right); + int8_t direction_y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down); + + if(player.is_hit == true){ + hit_timer = 9; + player.is_hit = false; + } + if(hit_timer > -10){ + hit_timer--; + } + + if(hit_timer <= 0){ + if(direction_x != 0){ + if(player.vel.x > -1 * player.speed && player.vel.x < player.speed) { + player.vel.x = player.vel.x + direction_x; + } else { + if (player.vel.x > 0) { + player.vel.x--; + } else if(player.vel.x < 0) { + player.vel.x++; + } + } + } else { + if (player.vel.x > 0) { + player.vel.x--; + } else if(player.vel.x < 0) { + player.vel.x++; + } + } + + /* // movement Y (w-s) disable gravity to use this + if(direction_y != 0){ + if(player.vel.y > -4 && player.vel.y < 4 ) { + player.vel.y = player.vel.y + direction_y; + } + } else { + if (player.vel.y > 0) { + player.vel.y--; + } else if(player.vel.y < 0) { + player.vel.y++; + } + } + + */ + } else { + if (player.vel.x > 0) { + player.vel.x--; + } else if(player.vel.x < 0) { + player.vel.x++; + } + player.vel.y++; + } + + + if (g_hh_controller_p1.button_primary && player.is_grounded == true) {//JUMP + player.vel.y = -10; + player.is_grounded = false; + } else if (player.vel.y < 6){ + player.vel.y += 1; //gravity + } + + + + +/* player.vel = (vec2){.x = (-1 * g_hh_controller_p1.dpad_left) + (1 * g_hh_controller_p1.dpad_right), .y = (-1 * g_hh_controller_p1.dpad_up) + (1 * g_hh_controller_p1.dpad_down) }; + + player_new.vel = (vec2){ + .x = player.vel.x, + .y = player.vel.y, + }; +*/ + + player_new.vel = (vec2){ + .x = player.vel.x, + .y = player.vel.y, + }; + + player_new = hh_enemy_collision(player, enemy); + + // const int8_t maa = 3; // const int8_t mbb = -3; // if (g_hh_controller_p1.dpad_up) @@ -55,8 +161,8 @@ void hh_player_actions() { // player.vel.x = CLAMP(player.vel.x,-32,32); player_new.pos = (vec2){ - .x = player.pos.x + player.vel.x, - .y = player.pos.y + player.vel.y, + .x = player.pos.x + player_new.vel.x, + .y = player.pos.y + player_new.vel.y, }; @@ -96,41 +202,10 @@ void hh_player_actions() { // hh_solve_collision(tiles[i].pos, &player); // } // } - - player_new.is_grounded = false; - - // solves x collision - if (player.vel.x <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player.pos.y + 15}))) { - player_new.pos.x = (player_new.pos.x & ~15) + 16, - player_new.vel.x = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player.pos.y + 15}))) { - player_new.pos.x = player_new.pos.x & ~15, // <-- magic comma, NOT TOUCHY - player_new.vel.x = 0; - } - } - - //solves y collision - if (player.vel.y <= 0) { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 0})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 15}))) { - player_new.pos.y = (player_new.pos.y & ~15) + 16, - player_new.vel.y = 0; - } - } else { - if (hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 0, .y=player_new.pos.y + 16})) || - hh_colidable(hh_world_to_tile((vec2){.x=player_new.pos.x + 16, .y=player_new.pos.y + 15}))) { - player_new.pos.y = player_new.pos.y & ~15, - player_new.vel.y = 0; - player_new.is_grounded = true; - } - } - - player = player_new; + + player = hh_background_collision ( player, player_new); + + //player = player_new; vec_cor cam_pos;//value in tiles // cam_pos = (vec2){0,0}; @@ -141,10 +216,16 @@ void hh_player_actions() { player.render.fam.position_x = (player.pos.x-cam_pos.x); player.render.fam.position_y = (player.pos.y-cam_pos.y); + enemy.render.fam.position_x = (enemy.pos.x-cam_pos.x); + enemy.render.fam.position_y = (enemy.pos.y-cam_pos.y); player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant player.render.fam.palette_index = 7; hh_ppu_update_foreground(0, player.render.fam); + hh_ppu_update_foreground(1, enemy.render.fam); + } + + diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 08bc382..5323fb1 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -12,4 +12,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_down = kb[SDL_SCANCODE_S]; g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; + g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE]; } -- cgit v1.2.3 From 623bcb03aead264b412bcba9fed75df22e115fab Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Wed, 15 Mar 2023 20:44:06 +0100 Subject: added title screen --- src/engine/draw_screen.c | 33 +- src/engine/draw_screen.h | 5 + src/engine/sprite_controller.c | 4 +- src/engine/sprite_controller.h | 31 +- src/engine/title_screen.c | 93 +++++ src/engine/title_screen.h | 3 + src/makefile | 3 +- src/static/background/shop.hex | 331 +++++++++++++++ src/static/background/shop_ext.hex | 459 +++++++++++++++++++++ src/static/background/title_screen_icon.hex | 102 +++++ .../foreground/title_screen_letteres_large.hex | 230 +++++++++++ src/static/title_screen_icon.hex | 119 ------ src/static/title_screen_letteres_large.hex | 230 ----------- 13 files changed, 1278 insertions(+), 365 deletions(-) create mode 100644 src/engine/title_screen.c create mode 100644 src/engine/title_screen.h create mode 100644 src/static/background/shop.hex create mode 100644 src/static/background/shop_ext.hex create mode 100644 src/static/background/title_screen_icon.hex create mode 100644 src/static/foreground/title_screen_letteres_large.hex delete mode 100644 src/static/title_screen_icon.hex delete mode 100644 src/static/title_screen_letteres_large.hex (limited to 'src') diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index c4f3389..58553bd 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -2,8 +2,8 @@ #include "engine/sprite_controller.h" uint8_t hh_world_to_tile(vec2 pos){ - - FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ + //TODO: remove magic file name here + FILE* level = fopen("static/tiles.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ fprintf(stderr, "Error: Failed to open file.\n"); return 0; @@ -39,9 +39,10 @@ void hh_draw_screen(vec_cor viewport){ void hh_setup_screen(){ //(HH_map_size_X*HH_map_size_Y) int size = 2400; // max X = 40 en max Y = 80 - FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ + //TODO: remove magic file name here + FILE* level = fopen("static/level1_test.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ - fprintf(stderr, "Error: Failed to open file.\n"); + fprintf(stderr, "Error: Failed to open level file.\n"); return; } fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); @@ -60,3 +61,27 @@ void hh_setup_screen(){ } free(tile); } + +void hh_clear_screen(){ + // (HH_PPU_SCREEN_HEIGHT*HH_PPU_SCREEN_WIDTH)/(HH_PPU_SPRITE_HEIGHT*HH_PPU_SPRITE_WIDTH) + for (int i = 0; i < HH_PPU_BG_CANVAS_TILES_H*HH_PPU_BG_CANVAS_TILES_V; i++) { + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false,.horizontal_flip = false, + .palette_index = 3,.tilemap_index = 0 + }; + hh_ppu_update_background(i,temp); + hh_ppu_update_color(3,0,(hh_ppu_rgb_color_t){0x0,0x0,0x0}); + } + hh_ppu_update_aux((hh_s_ppu_loc_aux){ + .bg_shift_x = 0, + .bg_shift_y = 0, + .fg_fetch = 0, + .sysreset = 0, + }); +} + +void hh_clear_sprite(){ + for (int i = 0; i < HH_PPU_FG_SPRITE_COUNT; i++) { + hh_ppu_update_sprite(i,(hh_s_ppu_loc_sprite){0}); + } +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index b181108..95765e5 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -3,6 +3,7 @@ // every function call for drawing the screen goes here. #include "engine/maths.h" +#include "ppu/consts.h" #include "ppu/ppu.h" #include @@ -19,3 +20,7 @@ uint8_t hh_world_to_tile(vec2 pos); void hh_draw_screen(vec2 viewport); /** @brief send data to BAM memory from binary level */ void hh_setup_screen(); +/** @brief send black screen to background memory */ +void hh_clear_screen(); +/** @brief clears all sprite data */ +void hh_clear_sprite(); diff --git a/src/engine/sprite_controller.c b/src/engine/sprite_controller.c index 5d93cf8..b38b647 100644 --- a/src/engine/sprite_controller.c +++ b/src/engine/sprite_controller.c @@ -10,11 +10,13 @@ uint8_t hh_get_palette(uint8_t tile_idx) { } void hh_setup_palettes(){ + //TODO: use simpler function for (int idx = 0; idx < HH_PPU_PALETTE_COUNT; idx++) { for (int col = 0; col < HH_PPU_PALETTE_COLOR_COUNT; col++) { hh_ppu_update_color(idx,col,hh_g_palette[idx][col]); } - } + } + // hh_ppu_update_palette_table(hh_g_palette); } bool hh_colidable(uint8_t tile_idx){ diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index fbb230c..c6ebc93 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -11,14 +11,25 @@ //TODO: pack data inside of sprite_palette LUT //HH_PPU_PALETTE_COUNT -#define HH_SPRITE_COUNT 40 +#define HH_SPRITE_COUNT 80 #define HH_PAL_IDX_SKY 0 #define HH_PAL_IDX_BRICK 1 const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { + //TODO: make a buffer of 16 no-collider sprites (instead of the current 1) 0,1,1,1,1,1,1,1,1,1, //1+9 1,1,1,1,1,1,1,1,1,1, //6+4 1,1,1,1,1,1,1,1,1, //9 - 7,7,7,2,7,7,1,2,7 + 7,7,7,2,7,7,1,2,7, + 7,7,7,7, //?? + + 7,6,6,6,6,6,6,6, //baskets + 7,7,7,7,7,7,7,7,7,7, //shop + 7,7,7,7,7, //shop + 6,6,6,6,6, //(hi-)score + + 3,3,3,3,3,3, //title_screen icon + 6,6,6,6,/*6,6,6,6,6,6, //title_screen large letters + 6,6,6,6,*/ //other palettes here: }; @@ -51,14 +62,14 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - {//player + {//player //TODO: use one less color && update player indexed sprites {0x0,0x0,0x0}, {0x1,0x1,0x1}, {0x4,0x2,0x5}, - {0x7,0x3,0x6}, - {0x1,0x1,0x3}, - {0xe,0xe,0xe}, - {0x0,0x0,0x0}, + {0x7,0x3,0x7}, + {0x1,0x1,0x3}, + {0xe,0xe,0xe}, + {0x0,0x0,0x0}, {0x0,0x0,0x0}}, { {0x0,0x0,0x0}, @@ -69,7 +80,7 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - { + {//elemental {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}, @@ -79,7 +90,7 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0x0,0x0,0x0}, {0x0,0x0,0x0}}, {//white - {0xf,0xf,0xf}, + {0x1,0x2,0x3}, {0xf,0xf,0xf}, {0xf,0xf,0xf}, {0xf,0xf,0xf}, @@ -87,7 +98,7 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0xf,0xf,0xf}, {0xf,0xf,0xf}, {0xf,0xf,0xf}}, - { + {//Dev palette (7) {0x0,0xf,0xf}, {0xf,0xf,0xf}, {0xf,0x0,0xf}, diff --git a/src/engine/title_screen.c b/src/engine/title_screen.c new file mode 100644 index 0000000..9c7ed48 --- /dev/null +++ b/src/engine/title_screen.c @@ -0,0 +1,93 @@ +#include "ppu/ppu.h" +#include "ppu/types.h" +#include "ppu/consts.h" + + +#include "engine/draw_screen.h" +#include "engine/entity.h" + +void hh_init_title_screen(){ + + // hh_clear_screen(); + + //send data + uint8_t idx = 0; + const uint8_t tilemap_offset = 59; + int tiles_h = HH_PPU_BG_CANVAS_TILES_H; + int vp_h = HH_PPU_SCREEN_WIDTH/HH_PPU_SPRITE_WIDTH; //screen_h in tiles + int vert_offset = tiles_h*3; + + const uint8_t arr[4][4] = { + {0,1,1,0}, + {2,3,3,2}, + {4,0,0,4}, + {5,6,6,5}, + }; + int val, counter =0; + hh_ppu_update_color(5, 0, (hh_ppu_rgb_color_t) {0x1, 0x1, 0x1}); + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + val = arr[i][j]; + + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false, .horizontal_flip = ((j % 4 < 2) ? false : true), + .palette_index = (counter == 9 || counter == 10? 5:3), .tilemap_index = (val > 0 ? (tilemap_offset + val) : 0) + }; + + int vert_pos = tiles_h*i; + int x_pos = j; + idx = vert_offset + vert_pos + x_pos + vp_h/2-2; + + hh_ppu_update_background(idx,temp); + counter++; + } + + } + + + const uint8_t letters_offset = 66; + const int _size_hooded = 7, _size_v = 2; + + // char* hh = "hooded"; + int hooded_lookup[7][2]={ + {0,1},{0,2},//H + {3,4},{3,4},//oo + {5,6},{13,9},//de + {5,6}//d + }; + + counter = 8; + for (int i = 0; i < _size_hooded; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = false, + .palette_index = 6, .tilemap_index = letters_offset + hooded_lookup[i][vert-1], + .position_x = (16*i + 64+48), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+16 +(i==2 || i==3 ? 6:0)) + }); + } + } + + + hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t) {0xa, 0x3, 0x3}); + hh_ppu_update_color(5, 2, (hh_ppu_rgb_color_t) {0xc, 0x5, 0x3}); + + const int _size_havoc = 6; + int lookup_havoc[6][2]={ + {0,1},{0,2},//H + {13,10},{7,8},//av + {13,11},{13,12}//oc + }; + + counter = 8 + (_size_hooded * _size_v); + for (int i = 0; i < _size_havoc; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = (i > 4 && vert==0 ? 1:0), + .palette_index = 5, .tilemap_index = letters_offset + lookup_havoc[i][vert-1], + .position_x = (16*i +64+32+8), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+48) + }); + } + } +} diff --git a/src/engine/title_screen.h b/src/engine/title_screen.h new file mode 100644 index 0000000..b5eda63 --- /dev/null +++ b/src/engine/title_screen.h @@ -0,0 +1,3 @@ +#pragma once + +void hh_init_title_screen(); diff --git a/src/makefile b/src/makefile index d7d9087..4e9e745 100644 --- a/src/makefile +++ b/src/makefile @@ -37,7 +37,8 @@ LOCAL_SRCS += main.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ - engine/entity.c + engine/entity.c \ + engine/title_screen.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/static/background/shop.hex b/src/static/background/shop.hex new file mode 100644 index 0000000..8c08feb --- /dev/null +++ b/src/static/background/shop.hex @@ -0,0 +1,331 @@ +;indices: 9 +;75 24 38 +;a5 30 30 +;cf 57 3c +;1e 1d 39 +;40 27 51 +;7a 36 7b +;10 14 1f +;eb ed e9 +;17 20 38 + +000000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000040: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000050: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000070: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000a0: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000b0: 06 06 01 00 00 00 00 00 00 00 00 00 00 00 01 06 +0000c0: 06 06 06 01 00 00 00 00 00 00 00 00 00 01 06 06 +0000d0: 06 06 06 06 01 01 00 00 00 00 00 01 01 06 06 06 +0000e0: 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +0000f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000120: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000130: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000140: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000150: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000160: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000170: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000180: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000190: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001a0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001b0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001c0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001d0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001e0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0001f0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000220: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000230: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000240: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000250: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000260: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000270: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000280: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000290: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0002f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000320: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000330: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000340: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000350: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000360: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000370: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000380: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000390: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003a0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003b0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003c0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003d0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003e0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0003f0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000400: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000410: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000420: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000430: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000440: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000450: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000460: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000470: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000480: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000490: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0004f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000500: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000510: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000520: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000530: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000540: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000550: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000560: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000570: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000580: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000590: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0005e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0005f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000600: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000610: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000620: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000630: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000640: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000650: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000660: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000670: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000680: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000690: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006a0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006b0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006c0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006d0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +0006e0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +0006f0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000700: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000710: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +000720: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +000730: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +000740: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +000750: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +000760: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +000770: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000780: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000790: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +0007a0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +0007b0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +0007c0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +0007d0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +0007e0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +0007f0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000800: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000810: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000820: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000830: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000840: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000850: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000860: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000870: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000880: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000890: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +0008a0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +0008b0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +0008c0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +0008d0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +0008e0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +0008f0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000900: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000910: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000920: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000930: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000940: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000950: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a10: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000a20: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000a30: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000a40: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000a50: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000a60: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000a70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a80: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000a90: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000aa0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000ab0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000ac0: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000ad0: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000ae0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000af0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b00: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b10: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b20: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b30: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b40: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b50: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b60: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b70: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b80: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000b90: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ba0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bb0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bc0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bd0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000be0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000bf0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c10: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000c60: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000c70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000c80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000c90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000ca0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000cb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000cc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000cd0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +000ce0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +000cf0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000d00: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000d10: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +000d20: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +000d30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000d40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000d50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000d60: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +000d70: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +000d80: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000d90: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +000da0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +000db0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +000dc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000dd0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000de0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000df0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000e00: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +000e10: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +000e20: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +000e30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e60: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +000e70: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 +000e80: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +000e90: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +000ea0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +000eb0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +000ec0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ed0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ee0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ef0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f10: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +000f20: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +000f30: 06 07 07 07 07 06 06 07 07 06 06 07 07 07 07 06 +000f40: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +000f50: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +000f60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f70: 06 07 07 07 07 07 07 07 07 07 07 07 07 07 07 06 +000f80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000fa0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +000fb0: 06 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 +000fc0: 06 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 +000fd0: 06 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 +000fe0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +000ff0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001000: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001010: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001020: 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 07 +001030: 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001040: 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001050: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001060: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001070: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001080: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001090: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010a0: 07 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 +0010b0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 +0010c0: 07 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 +0010d0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 +0010e0: 07 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 +0010f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001110: 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 06 +001120: 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 07 +001130: 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 07 +001140: 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 07 +001150: 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 07 +001160: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001170: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001180: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001190: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011a0: 06 07 07 07 06 06 06 06 06 07 07 06 06 06 06 07 +0011b0: 07 06 07 07 06 06 06 06 07 07 07 06 06 06 06 06 +0011c0: 06 07 07 06 06 06 06 07 07 07 06 06 06 07 07 07 +0011d0: 07 07 06 06 06 06 07 07 07 06 06 06 07 07 06 06 +0011e0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +0011f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001210: 07 07 07 06 06 07 07 07 07 07 06 06 06 06 07 07 +001220: 07 07 06 06 06 06 06 07 07 07 06 06 06 07 06 07 +001230: 07 06 06 06 06 06 07 07 07 06 06 06 07 07 07 07 +001240: 07 06 06 06 06 07 07 07 06 06 06 07 06 07 07 06 +001250: 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 +001260: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001270: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001280: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001290: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012a0: 07 07 06 06 06 06 07 07 07 06 06 06 07 06 06 07 +0012b0: 07 07 06 06 07 06 06 07 07 06 06 07 06 06 07 07 +0012c0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +0012d0: 06 06 06 07 06 07 07 06 06 06 06 07 07 07 06 06 +0012e0: 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 06 +0012f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001310: 07 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 +001320: 07 06 06 06 07 06 07 07 06 06 06 06 06 06 06 06 +001330: 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 +001340: 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 +001350: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +001360: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001370: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001380: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001390: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0013a0: 06 06 06 07 07 07 07 06 06 06 06 06 06 06 06 06 +0013b0: 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +0013c0: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +0013d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0013e0: 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +0013f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 \ No newline at end of file diff --git a/src/static/background/shop_ext.hex b/src/static/background/shop_ext.hex new file mode 100644 index 0000000..d151156 --- /dev/null +++ b/src/static/background/shop_ext.hex @@ -0,0 +1,459 @@ +;indices: 9 +;75 24 38 +;a5 30 30 +;cf 57 3c +;1e 1d 39 +;40 27 51 +;7a 36 7b +;10 14 1f +;eb ed e9 +;17 20 38 + +000000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000040: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000050: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000070: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000a0: 06 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000b0: 06 06 01 00 00 00 00 00 00 00 00 00 00 00 01 06 +0000c0: 06 06 06 01 00 00 00 00 00 00 00 00 00 01 06 06 +0000d0: 06 06 06 06 01 01 00 00 00 00 00 01 01 06 06 06 +0000e0: 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +0000f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000120: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000130: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000140: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000150: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000160: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000170: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000180: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000190: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +0001f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 +000200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000220: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000230: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000240: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000250: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000260: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000270: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000280: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000290: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002a0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002b0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002c0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002d0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002e0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0002f0: 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000320: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000330: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000340: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000350: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000360: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000370: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000380: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000390: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0003f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000400: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000410: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000420: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000430: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000440: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000450: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000460: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000470: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000480: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000490: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004a0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004b0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004c0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004d0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004e0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +0004f0: 06 06 06 06 06 06 06 07 07 06 06 06 06 06 06 06 +000500: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000510: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000520: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000530: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000540: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000550: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000560: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000570: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000580: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000590: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005a0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005b0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005c0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005e0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0005f0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000600: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000610: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000620: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000630: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000640: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000650: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000660: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000670: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000680: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000690: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006a0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006b0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006c0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006d0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006e0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +0006f0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +000700: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000710: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000720: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000730: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000740: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000750: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000760: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000770: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000780: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000790: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007a0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007b0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007c0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007d0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007e0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +0007f0: 06 06 06 06 06 06 06 06 06 06 06 07 07 06 06 06 +000800: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +000810: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +000820: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000830: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000840: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000850: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000860: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000870: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000880: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +000890: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008a0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008b0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008c0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008d0: 06 06 06 06 06 06 06 06 01 01 06 06 06 06 06 06 +0008e0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +0008f0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 01 01 +000900: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000910: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000920: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000930: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000940: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000950: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0009f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000a00: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000a10: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000a20: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a30: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a40: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a50: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a60: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a70: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a80: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000a90: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000aa0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ab0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ac0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ad0: 06 06 06 06 06 06 01 01 06 06 06 06 06 06 06 06 +000ae0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000af0: 01 01 01 01 01 01 01 01 06 06 06 06 06 06 06 06 +000b00: 01 01 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000b10: 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000b20: 01 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000b30: 01 01 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000b40: 01 01 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000b50: 01 01 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000b60: 01 01 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000b70: 01 01 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000b80: 01 01 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000b90: 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000ba0: 01 01 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000bb0: 01 01 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000bc0: 01 01 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000bd0: 01 01 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000be0: 01 01 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000bf0: 01 01 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000c00: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000c10: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000c20: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000c30: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000c40: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000c50: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000c60: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000c70: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000c80: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 +000c90: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 +000ca0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 +000cb0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 +000cc0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 +000cd0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 +000ce0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 +000cf0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 06 06 +000d00: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000d10: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +000d20: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +000d30: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +000d40: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +000d50: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +000d60: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +000d70: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000d80: 06 06 06 06 06 06 06 01 06 06 06 06 06 06 01 01 +000d90: 06 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 +000da0: 06 06 06 06 06 01 06 06 06 06 06 06 06 01 01 01 +000db0: 06 06 06 06 01 06 06 06 06 06 06 06 01 06 01 01 +000dc0: 06 06 06 01 06 06 06 06 06 06 06 01 06 06 01 01 +000dd0: 06 06 01 06 06 06 06 06 06 06 01 06 06 06 01 01 +000de0: 06 01 06 06 06 06 06 06 06 01 06 06 06 06 01 01 +000df0: 01 06 06 06 06 06 06 06 01 06 06 06 06 06 01 01 +000e00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000e10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000e20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000e90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ea0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000eb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ec0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ed0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ee0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ef0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f10: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000f20: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000f30: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000f40: 06 01 01 01 01 01 01 06 06 06 06 06 06 06 06 06 +000f50: 06 06 01 01 01 01 06 06 06 06 06 06 06 06 06 06 +000f60: 06 06 06 01 01 06 06 06 06 06 06 06 06 06 06 06 +000f70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000f80: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000f90: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000fa0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000fb0: 06 06 06 06 06 06 06 06 01 01 01 01 01 01 06 06 +000fc0: 06 06 06 06 06 06 06 06 06 01 01 01 01 06 06 06 +000fd0: 06 06 06 06 06 06 06 06 06 06 01 01 06 06 06 06 +000fe0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ff0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001000: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001010: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001020: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001030: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001040: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001050: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001060: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001070: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001080: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001090: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010a0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010b0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010c0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010d0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010e0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +0010f0: 06 01 01 06 06 06 06 06 06 06 06 06 06 06 06 06 +001100: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001110: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001120: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001130: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001140: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001150: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001160: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001170: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001180: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001190: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011a0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011b0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0011d0: 01 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +0011e0: 01 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +0011f0: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +001200: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001210: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001220: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001230: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001240: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001250: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001260: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001270: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001280: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001290: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0012d0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +0012e0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 +0012f0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +001300: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001310: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001320: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001330: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001340: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001350: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001360: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001370: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001380: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001390: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013a0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013b0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0013d0: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +0013e0: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +0013f0: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +001400: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +001410: 01 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 +001420: 01 06 06 06 06 06 06 06 01 01 01 01 06 06 06 06 +001430: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001440: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001450: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001460: 01 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +001470: 01 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 +001480: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +001490: 01 06 06 06 06 06 01 01 01 01 01 01 06 06 06 06 +0014a0: 01 06 06 06 06 06 06 01 01 01 01 01 06 06 06 06 +0014b0: 01 06 06 06 06 06 06 06 01 01 01 01 06 06 06 06 +0014c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0014d0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0014e0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0014f0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001500: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +001510: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +001520: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +001530: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001540: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001550: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001560: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 06 +001570: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 +001580: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +001590: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 06 +0015a0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 06 +0015b0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 06 +0015c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0015d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0015e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0015f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001600: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +001610: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +001620: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +001630: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001640: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001650: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001660: 06 06 06 06 06 06 01 01 01 01 06 06 06 06 06 01 +001670: 06 06 06 06 06 01 01 01 01 01 06 06 06 06 06 01 +001680: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +001690: 06 06 06 06 01 01 01 01 01 01 06 06 06 06 06 01 +0016a0: 06 06 06 06 01 01 01 01 01 06 06 06 06 06 06 01 +0016b0: 06 06 06 06 01 01 01 01 06 06 06 06 06 06 06 01 +0016c0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0016d0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0016e0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +0016f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +001700: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001710: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +001720: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +001730: 06 07 07 07 07 06 06 07 07 06 06 07 07 07 07 06 +001740: 06 07 07 06 07 06 06 07 07 06 06 06 06 06 06 06 +001750: 06 07 07 06 07 06 07 07 07 07 06 06 06 06 06 06 +001760: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001770: 06 07 07 07 07 07 07 07 07 07 07 07 07 07 07 06 +001780: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001790: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0017a0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +0017b0: 06 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 +0017c0: 06 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 +0017d0: 06 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 +0017e0: 06 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 +0017f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001800: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001810: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001820: 07 06 06 06 06 07 07 06 06 06 07 07 06 07 06 07 +001830: 07 07 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001840: 06 06 07 07 06 07 07 06 06 06 07 07 06 07 06 07 +001850: 07 07 07 07 06 07 07 07 07 06 07 07 07 07 06 07 +001860: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001870: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001880: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001890: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0018a0: 07 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 +0018b0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 +0018c0: 07 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 +0018d0: 07 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 +0018e0: 07 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 +0018f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001900: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001910: 07 07 07 06 07 07 07 07 06 07 07 06 06 06 06 06 +001920: 07 06 07 06 07 07 06 06 06 07 07 06 06 06 06 07 +001930: 07 07 06 06 07 07 07 07 06 06 06 06 06 06 07 07 +001940: 07 06 07 06 07 07 06 06 06 07 07 06 06 07 06 07 +001950: 07 06 07 06 07 07 07 07 06 07 07 06 06 07 07 07 +001960: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001970: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001980: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001990: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0019a0: 06 07 07 07 06 06 06 06 06 07 07 06 06 06 06 07 +0019b0: 07 06 07 07 06 06 06 06 07 07 07 06 06 06 06 06 +0019c0: 06 07 07 06 06 06 06 07 07 07 06 06 06 07 07 07 +0019d0: 07 07 06 06 06 06 07 07 07 06 06 06 07 07 06 06 +0019e0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +0019f0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a10: 07 07 07 06 06 07 07 07 07 07 06 06 06 06 07 07 +001a20: 07 07 06 06 06 06 06 07 07 07 06 06 06 07 06 07 +001a30: 07 06 06 06 06 06 07 07 07 06 06 06 07 07 07 07 +001a40: 07 06 06 06 06 07 07 07 06 06 06 07 06 07 07 06 +001a50: 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 +001a60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001a90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001aa0: 07 07 06 06 06 06 07 07 07 06 06 06 07 06 06 07 +001ab0: 07 07 06 06 07 06 06 07 07 06 06 07 06 06 07 07 +001ac0: 07 06 06 06 06 07 07 07 06 06 06 06 07 07 07 06 +001ad0: 06 06 06 07 06 07 07 06 06 06 06 07 07 07 06 06 +001ae0: 06 06 06 07 07 07 06 06 06 06 07 07 07 06 06 06 +001af0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b10: 07 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 +001b20: 07 06 06 06 07 06 07 07 06 06 06 06 06 06 06 06 +001b30: 06 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 +001b40: 06 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 +001b50: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +001b60: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b70: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001b90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +001ba0: 06 06 06 07 07 07 07 06 06 06 06 06 06 06 06 06 +001bb0: 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +001bc0: 06 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 +001bd0: 06 06 06 07 07 06 06 06 06 06 06 06 06 06 06 06 +001be0: 06 07 07 07 06 06 06 06 06 06 06 06 06 06 06 06 +001bf0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 \ No newline at end of file diff --git a/src/static/background/title_screen_icon.hex b/src/static/background/title_screen_icon.hex new file mode 100644 index 0000000..120eaa1 --- /dev/null +++ b/src/static/background/title_screen_icon.hex @@ -0,0 +1,102 @@ +;indices: 4 +;17 20 38 +;10 14 1f +;40 27 51 +;7a 36 7b + +000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +0000b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03 +0000c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03 +0000d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03 +0000e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03 +0000f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 +000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +000120: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 +000130: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 +000140: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +000150: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 +000160: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 +000170: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +000180: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 +000190: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +0001a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +0001b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 +0001c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01 +0001d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +0001e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 +0001f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +000200: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000210: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000220: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000230: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000240: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01 +000250: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01 +000260: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +000270: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +000280: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000290: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0002f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000300: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +000310: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 +000320: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000330: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000340: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000350: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000360: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000370: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000380: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 +000390: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +0003a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +0003b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 +0003c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +0003d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +0003e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 +0003f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +000400: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 +000410: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01 +000420: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 +000430: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +000440: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 +000450: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +000460: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 +000470: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 +000480: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 +000490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 +0004a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 +0004b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0004f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000500: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000510: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000520: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000530: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000540: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000550: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000560: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000570: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000580: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000590: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0005a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 +0005b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 +0005c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01 +0005d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01 +0005e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03 +0005f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 \ No newline at end of file diff --git a/src/static/foreground/title_screen_letteres_large.hex b/src/static/foreground/title_screen_letteres_large.hex new file mode 100644 index 0000000..fea1c77 --- /dev/null +++ b/src/static/foreground/title_screen_letteres_large.hex @@ -0,0 +1,230 @@ +;title screen letters (Large) +;indices: 3 +;23 32 56 +;165 48 48 +;207 87 60 + +0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 +0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 +0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 +0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 +0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 +00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00 +00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01 +0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 +0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 +0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 +0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00 +0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 +0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 +0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00 +0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 +0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 +02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00 +0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00 +0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00 +0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 +0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00 +03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 +03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00 +03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00 +03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00 +0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00 +0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 +0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00 +0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 +0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 +0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 +05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00 +05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00 +05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00 +05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00 +05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00 +0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00 +0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00 +0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 +0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 +06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 +06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00 +06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00 +06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00 +06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00 +0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00 +07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00 +0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00 +0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00 +0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00 +0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00 +08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00 +08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00 +08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00 +08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00 +08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 +08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 +0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00 +0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 +0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00 +0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00 +0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00 +0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 +09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00 +09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00 +09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 +0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 +0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 +0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00 +0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00 +0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 +0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00 +0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 +0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00 +0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00 +0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00 +0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00 +0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00 +0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 +0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00 +0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 +0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00 +0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00 +0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00 +0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00 +0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 +0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 +0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 +0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 +0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00 +0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 +0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 +0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 +0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00 +0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00 +0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00 +0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00 +0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 +0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00 +0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00 +0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00 +0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00 +0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 diff --git a/src/static/title_screen_icon.hex b/src/static/title_screen_icon.hex deleted file mode 100644 index a1e5f0b..0000000 --- a/src/static/title_screen_icon.hex +++ /dev/null @@ -1,119 +0,0 @@ -;Main character icon for title screen -;indices: 4 -;23 32 56 -;16 20 31 -;64 39 81 -;122 54 123 - -0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0050: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0060: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0080: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0090: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -00f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 -01b0: 00 00 00 00 00 00 00 00 00 00 02 02 02 02 03 03 -01c0: 00 00 00 00 00 00 00 02 02 02 03 03 03 03 03 03 -01d0: 00 00 00 00 02 02 02 03 03 03 03 03 03 03 03 03 -01e0: 00 00 02 02 03 03 03 03 03 03 03 03 03 03 03 03 -01f0: 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 02 -0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 -0220: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 -0230: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 -0240: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 -0250: 00 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 -0260: 00 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 -0270: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 -0280: 00 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 -0290: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 -02a0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 -02b0: 00 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 -02c0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 03 01 -02d0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 -02e0: 00 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 -02f0: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 -0300: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0310: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0320: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0330: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 -0340: 03 03 03 03 03 03 03 03 03 03 01 01 01 01 01 01 -0350: 03 03 03 03 03 03 03 01 01 01 01 01 01 01 01 01 -0360: 03 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 -0370: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 -0380: 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0390: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -03f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0400: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 -0410: 00 00 00 00 00 02 03 03 03 03 03 03 03 01 01 01 -0420: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0430: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0440: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0450: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0460: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0470: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0480: 00 00 00 00 00 02 03 03 03 03 03 03 01 01 01 01 -0490: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 -04a0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 -04b0: 00 00 00 00 00 00 02 03 03 03 03 03 01 01 01 01 -04c0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 -04d0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 -04e0: 00 00 00 00 00 00 00 02 03 03 03 03 01 01 01 01 -04f0: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 -0500: 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 01 -0510: 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 01 -0520: 00 00 00 00 00 00 00 00 00 02 03 03 03 01 01 01 -0530: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 -0540: 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 01 -0550: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 -0560: 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 01 -0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 01 -0580: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 03 -0590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 03 -05a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 -05b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -05f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0600: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0610: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0620: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0630: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0640: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0650: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0660: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0670: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0680: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -0690: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -06a0: 03 03 03 01 01 01 01 01 01 01 01 01 01 01 01 01 -06b0: 02 03 03 03 03 01 01 01 01 01 01 01 01 01 01 01 -06c0: 00 02 02 03 03 03 03 01 01 01 01 01 01 01 01 01 -06d0: 00 00 00 02 02 02 03 03 03 03 03 03 01 01 01 01 -06e0: 00 00 00 00 00 00 02 02 02 02 02 03 03 03 03 03 -06f0: 00 00 00 00 00 00 00 00 00 00 00 02 02 02 02 02 diff --git a/src/static/title_screen_letteres_large.hex b/src/static/title_screen_letteres_large.hex deleted file mode 100644 index fea1c77..0000000 --- a/src/static/title_screen_letteres_large.hex +++ /dev/null @@ -1,230 +0,0 @@ -;title screen letters (Large) -;indices: 3 -;23 32 56 -;165 48 48 -;207 87 60 - -0000: 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 00 -0010: 00 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 -0020: 00 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 -0030: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0040: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0050: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0060: 00 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 -0070: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -0080: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -0090: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00a0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00b0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00c0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00d0: 00 00 00 00 00 00 02 02 02 00 00 00 00 00 00 00 -00e0: 00 00 00 00 00 00 02 02 01 00 00 00 00 00 00 00 -00f0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0100: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0110: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0120: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0130: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 01 -0140: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 -0150: 00 00 00 00 00 00 01 01 01 01 01 01 01 01 01 01 -0160: 00 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 -0170: 00 00 00 00 01 01 01 01 01 01 00 00 00 00 00 00 -0180: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0190: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01a0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01b0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01c0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01d0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01e0: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -01f0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -0200: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0210: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0220: 00 00 00 00 00 00 01 01 01 01 00 00 00 00 00 00 -0230: 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 -0240: 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 -0250: 01 01 01 00 00 00 01 01 01 00 00 00 00 00 00 00 -0260: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0270: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0280: 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 00 -0290: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -02a0: 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 -02b0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -02c0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -02d0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -02e0: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 -02f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0350: 00 00 00 00 00 00 02 02 02 02 00 00 00 00 00 00 -0360: 00 00 00 00 00 02 02 02 02 02 02 00 00 00 00 00 -0370: 00 00 00 00 02 02 02 02 02 02 02 02 00 00 00 00 -0380: 00 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 -0390: 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 00 -03a0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 -03b0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 -03c0: 00 00 02 02 02 02 02 02 02 02 02 02 02 02 00 00 -03d0: 00 00 02 02 02 02 02 02 02 02 02 02 01 01 00 00 -03e0: 00 00 02 02 02 02 02 02 02 02 01 01 01 01 00 00 -03f0: 00 00 02 02 02 02 02 01 01 01 01 01 01 01 00 00 -0400: 00 00 02 02 01 01 01 01 01 01 01 01 01 01 00 00 -0410: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0420: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0430: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0440: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0450: 00 00 01 01 01 01 01 01 01 01 01 01 01 01 00 00 -0460: 00 00 01 01 01 01 01 01 01 01 01 01 01 00 00 00 -0470: 00 00 00 01 01 01 01 01 01 01 01 01 01 00 00 00 -0480: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 -0490: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -04a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -04f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0500: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -0510: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0520: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0530: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0540: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0550: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0560: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0570: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 02 00 -0580: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -0590: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -05a0: 00 00 00 00 00 00 00 00 00 00 00 00 02 02 00 00 -05b0: 00 00 00 00 00 02 02 02 02 00 00 00 02 02 00 00 -05c0: 00 00 00 00 02 02 02 02 02 02 00 00 02 02 00 00 -05d0: 00 00 00 00 02 02 02 00 00 00 02 00 02 02 00 00 -05e0: 00 00 00 02 02 02 00 00 00 00 00 02 02 02 00 00 -05f0: 00 00 00 02 02 00 00 00 00 00 00 02 02 02 00 00 -0600: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0610: 00 00 02 02 00 00 00 00 00 00 00 00 01 01 00 00 -0620: 00 00 02 01 00 00 00 00 00 00 00 00 01 01 00 00 -0630: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 00 00 -0640: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 -0650: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 -0660: 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 00 -0670: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 -0680: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 -0690: 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 00 -06a0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 -06b0: 00 01 01 00 00 00 00 00 00 00 01 01 01 01 00 00 -06c0: 00 00 01 01 00 00 00 00 00 01 01 01 01 01 00 00 -06d0: 00 00 01 01 01 00 00 00 01 01 01 00 01 01 00 00 -06e0: 00 00 00 01 01 01 01 01 01 01 00 00 01 01 00 00 -06f0: 00 00 00 00 01 01 01 01 01 00 00 00 00 01 01 00 -0700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -07a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -07b0: 00 02 02 00 00 00 00 00 00 00 00 00 00 02 02 00 -07c0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -07d0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -07e0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -07f0: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0800: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0810: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0820: 00 00 02 02 00 00 00 00 00 00 00 00 02 02 02 00 -0830: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0840: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0850: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0860: 00 00 00 02 02 00 00 00 00 00 00 00 02 01 00 00 -0870: 00 00 00 02 01 01 00 00 00 00 00 00 01 00 00 00 -0880: 00 00 00 01 01 01 00 00 00 00 00 01 01 00 00 00 -0890: 00 00 00 00 01 01 00 00 00 00 00 01 01 00 00 00 -08a0: 00 00 00 00 01 01 01 00 00 00 00 01 01 00 00 00 -08b0: 00 00 00 00 00 01 01 00 00 00 00 01 00 00 00 00 -08c0: 00 00 00 00 00 01 01 01 00 00 01 01 00 00 00 00 -08d0: 00 00 00 00 00 00 01 01 00 00 01 00 00 00 00 00 -08e0: 00 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 -08f0: 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 00 -0900: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0910: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0920: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0930: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 02 00 -0940: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 -0950: 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 00 -0960: 00 00 02 02 02 02 00 00 00 00 02 02 02 00 00 00 -0970: 00 00 02 02 02 02 02 02 02 02 02 02 00 00 00 00 -0980: 00 00 02 02 00 00 02 02 02 02 00 00 00 00 00 00 -0990: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 -09a0: 00 00 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -09b0: 00 00 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -09c0: 00 00 00 01 01 00 00 00 00 00 00 01 01 01 00 00 -09d0: 00 00 00 01 01 01 00 00 00 00 01 01 01 01 00 00 -09e0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 -09f0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -0a00: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 02 00 -0a10: 00 00 00 02 02 00 00 00 00 00 00 00 02 02 02 00 -0a20: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 -0a30: 00 00 00 02 02 00 00 00 00 00 00 00 00 02 02 00 -0a40: 00 00 00 00 02 00 00 00 00 00 00 00 00 02 02 00 -0a50: 00 00 00 00 00 00 02 02 02 02 02 02 02 02 02 00 -0a60: 00 00 00 00 02 02 02 02 02 02 02 02 02 02 02 00 -0a70: 00 00 00 01 02 02 02 00 00 00 00 00 02 02 01 00 -0a80: 00 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 -0a90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0aa0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -0ab0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -0ac0: 00 01 01 01 01 00 00 00 00 00 00 01 01 01 01 00 -0ad0: 00 00 01 01 01 01 01 00 01 01 01 01 01 01 01 00 -0ae0: 00 00 00 01 01 01 01 01 01 01 01 01 00 01 01 00 -0af0: 00 00 00 00 00 01 01 01 01 01 00 00 00 01 01 00 -0b00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0b10: 00 00 02 02 02 00 00 00 00 00 00 00 00 02 00 00 -0b20: 00 00 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b30: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b40: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b50: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 02 00 -0b60: 00 02 02 02 00 00 00 00 00 00 00 00 00 02 01 00 -0b70: 00 02 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0b80: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0b90: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 01 00 -0ba0: 00 01 01 01 00 00 00 00 00 00 00 00 01 01 00 00 -0bb0: 00 00 01 01 01 00 00 00 00 00 00 00 01 01 00 00 -0bc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 00 00 00 -0bd0: 00 00 00 01 01 01 01 01 00 00 01 01 01 00 00 00 -0be0: 00 00 00 00 01 01 01 01 01 01 01 01 00 00 00 00 -0bf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -0c00: 00 00 02 02 02 00 00 00 00 00 00 00 02 02 00 00 -0c10: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 -0c20: 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 00 -0c30: 00 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 -0c40: 00 02 02 02 00 00 00 00 00 00 02 00 00 00 00 00 -0c50: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 -0c60: 00 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 -0c70: 00 02 01 01 00 00 00 00 00 00 00 00 00 00 00 00 -0c80: 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 -0c90: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0ca0: 00 01 01 01 00 00 00 00 00 00 00 00 00 01 01 00 -0cb0: 00 01 01 01 01 00 00 00 00 00 00 00 01 01 01 00 -0cc0: 00 00 01 01 01 00 00 00 00 00 00 01 01 01 00 00 -0cd0: 00 00 00 01 01 01 00 00 00 01 01 01 01 00 00 00 -0ce0: 00 00 00 01 01 01 01 01 01 01 01 01 00 00 00 00 -0cf0: 00 00 00 00 00 01 01 01 01 01 00 00 00 00 00 00 -0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0db0: 00 00 00 00 00 00 00 02 02 02 02 02 00 00 00 00 -0dc0: 00 00 00 00 00 00 02 02 02 02 02 02 02 00 00 00 -0dd0: 00 00 00 00 00 02 02 00 00 00 02 02 02 00 00 00 -0de0: 00 00 00 00 02 02 00 00 00 00 00 02 02 02 00 00 -0df0: 00 00 00 02 02 02 00 00 00 00 00 00 02 02 00 00 -- cgit v1.2.3 From 0f93aaf6edd9ae46c6a9e729552e91312ccc41ce Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Wed, 15 Mar 2023 21:26:50 +0100 Subject: updated file fetch --- src/ppusim/sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ppusim/sim.c b/src/ppusim/sim.c index a5fec45..8b67acc 100644 --- a/src/ppusim/sim.c +++ b/src/ppusim/sim.c @@ -29,7 +29,8 @@ void hh_ppu_init() { } void hh_ppu_load_tilemap() { - char* filename = "../test/bin/tiles.bin"; + //TODO: remove magic file name here + char* filename = "static/tiles.bin"; FILE* fp = fopen(filename,"rb"); if (!fp){ fprintf(stderr,"Error: Failed to load tiles."); -- cgit v1.2.3 From 72295b9df9c0de9e585cce3f41437965eb0390cb Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Mon, 20 Mar 2023 19:11:41 +0100 Subject: demo version --- .vscode/settings.json | 4 +- src/GameLoop/shop.c | 30 ++++++++++++++ src/GameLoop/shop.h | 16 ++++++++ src/GameLoop/startingScreen.c | 32 +++++++++++++++ src/GameLoop/startingScreen.h | 14 +++++++ src/demo.c | 54 ++++++++++++++++++++++-- src/engine/bullet.c | 44 ++++++++++++++++++++ src/engine/bullet.h | 16 ++++++++ src/engine/draw_screen.c | 26 ++++++++++++ src/engine/draw_screen.h | 5 +++ src/engine/player_controller.c | 35 ++++++++++++---- src/engine/title_screen.c | 93 ++++++++++++++++++++++++++++++++++++++++++ src/engine/title_screen.h | 3 ++ src/makefile | 6 ++- src/ppusim/input.c | 1 + 15 files changed, 367 insertions(+), 12 deletions(-) create mode 100644 src/GameLoop/shop.c create mode 100644 src/GameLoop/shop.h create mode 100644 src/GameLoop/startingScreen.c create mode 100644 src/GameLoop/startingScreen.h create mode 100644 src/engine/bullet.c create mode 100644 src/engine/bullet.h create mode 100644 src/engine/title_screen.c create mode 100644 src/engine/title_screen.h (limited to 'src') diff --git a/.vscode/settings.json b/.vscode/settings.json index d027762..f4d72ed 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,7 @@ } }, "cmake.configureOnOpen": false, - "files.eol": "\n" + "files.eol": "\n", + "nrf-connect.topdir": "${nrf-connect.sdk:2.1.2}", + "nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.1.2}" } diff --git a/src/GameLoop/shop.c b/src/GameLoop/shop.c new file mode 100644 index 0000000..eb6bed5 --- /dev/null +++ b/src/GameLoop/shop.c @@ -0,0 +1,30 @@ +#include "shop.h" + + +bool hh_show_Shop(){ + static hh_e_ShopStates hh_e_Shop = hh_e_STATE_SHOW; + + switch (hh_e_Shop) + { + case hh_e_STATE_SHOW: + //hh_clear_screen(); + + //hh_setup_shop(); + hh_e_Shop = hh_e_STATE_Input; + return false; + break; + case hh_e_STATE_Input: + if(g_hh_controller_p1.button_primary){ + hh_e_Shop = hh_e_STATE_END; + } + break; + case hh_e_STATE_END: + hh_e_Shop = hh_e_STATE_SHOW; + return true; + break; + default: + hh_e_Shop = hh_e_STATE_SHOW; + break; + } + return false; +} diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h new file mode 100644 index 0000000..4014f58 --- /dev/null +++ b/src/GameLoop/shop.h @@ -0,0 +1,16 @@ +#include "input.h" +#include "engine/draw_screen.h" + + + +#include +#include + +typedef enum { + hh_e_STATE_SHOW, + hh_e_STATE_Input, + hh_e_STATE_END +} hh_e_ShopStates; + + +bool hh_show_Shop(); diff --git a/src/GameLoop/startingScreen.c b/src/GameLoop/startingScreen.c new file mode 100644 index 0000000..4fc5af9 --- /dev/null +++ b/src/GameLoop/startingScreen.c @@ -0,0 +1,32 @@ +#include "startingScreen.h" +#include "input.h" +#include "engine/title_screen.h" +#include "engine/draw_screen.h" +// #include "engine/player_controller.h" + +bool hh_show_startingScreen(){ + static hh_e_screenStates hh_e_startingScreen = hh_e_STATE_SHOW; + + switch (hh_e_startingScreen) + { + case hh_e_STATE_SHOW: + hh_clear_screen(); + hh_init_title_screen(); + hh_e_startingScreen = hh_e_STATE_Input; + return false; + break; + case hh_e_STATE_Input: + if(g_hh_controller_p1.button_primary){ + hh_e_startingScreen = hh_e_STATE_END; + } + break; + case hh_e_STATE_END: + hh_e_startingScreen = hh_e_STATE_SHOW; + return true; + break; + default: + hh_e_startingScreen = hh_e_STATE_SHOW; + break; + } + return false; +} diff --git a/src/GameLoop/startingScreen.h b/src/GameLoop/startingScreen.h new file mode 100644 index 0000000..f51cc66 --- /dev/null +++ b/src/GameLoop/startingScreen.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +typedef enum { + hh_e_STATE_SHOW, + hh_e_STATE_Input, + hh_e_STATE_END +} hh_e_screenStates; + + +bool hh_show_startingScreen(); + diff --git a/src/demo.c b/src/demo.c index d4d1bf7..22ee8b7 100644 --- a/src/demo.c +++ b/src/demo.c @@ -11,8 +11,18 @@ #include "engine/draw_screen.h" #include "engine/player_controller.h" #include "engine/sprite_controller.h" +#include "GameLoop/startingScreen.h" +typedef enum { + hh_e_STATE_startingScreen, + hh_e_STATE_Shop, + hh_e_STATE_Gameplay, + hh_e_STATE_GameOver, + hh_e_STATE_HighScore +} hh_e_GameState; +hh_e_GameState hh_gameStates; + uint16_t g_hh_pos_x = 1000; // 0b0000 0001 0011 0110 @@ -37,7 +47,7 @@ hh_entity hh_g_player, hh_g_player_new; void hh_demo_setup() { hh_setup_palettes(); - hh_setup_screen(); + // hh_setup_screen(); } @@ -45,8 +55,46 @@ void hh_demo_setup() { void hh_demo_loop(unsigned long frame) { - hh_player_actions(); - + switch (hh_gameStates) + { + case hh_e_STATE_startingScreen: + bool ret = hh_show_startingScreen(); + if(ret){ + hh_gameStates = hh_e_STATE_Shop; + } + break; + case hh_e_STATE_Shop: + // TODO: + // if(hh_show_Shop()){ + hh_clear_screen(); + hh_clear_sprite(); + hh_setup_screen(); + hh_clear_sprite(); + hh_gameStates = hh_e_STATE_Gameplay; + // } + // function: new level is chosen goto level + break; + case hh_e_STATE_Gameplay: + hh_player_actions(); + + // TODO: + // function: if level complete goto shop + // function: if player is dead goto game over + break; + case hh_e_STATE_GameOver: + // TODO: + // function: show game over screen + // function: after time goto high score + break; + case hh_e_STATE_HighScore: + // TODO: + // fucntion: show all previously scored points + // function: button pressed goto starting screen + break; + default: + hh_gameStates = hh_e_STATE_startingScreen; + break; + } } // void sendData(uint8_t address, uint16_t data) { diff --git a/src/engine/bullet.c b/src/engine/bullet.c new file mode 100644 index 0000000..5aa9e51 --- /dev/null +++ b/src/engine/bullet.c @@ -0,0 +1,44 @@ +#include "bullet.h" +#include "engine/sprite_controller.h" + + +void shootBullet(vec2 playerPos, Bullet* bullet){ + // Set bullet's x and y coordinates to player's coordinates + bullet->x = playerPos.x; + bullet->y = playerPos.y; + // Set bullet's velocity to a fixed value + bullet->velocity = 1; + // Set bullet's status to active + bullet->isActive = true; +} +void updateBullet(Bullet* bullet, int deltaTime){ + // Only update bullet if it is active + static int latestLocationBullet = 0; + if (bullet->isActive) { + // Move bullet based on velocity and deltaTime + bullet->x += bullet->velocity * deltaTime; + drawBullet(bullet); + // Check if bullet has moved 16 pixels + if (bullet->x - latestLocationBullet > 32) { + // Set bullet's status to inactive + bullet->isActive = false; + drawBullet(&(Bullet){.x = -16,.y = -16. }); + } + } + else{ + latestLocationBullet = bullet->x; + } +} +void drawBullet(Bullet* bullet){ + + + hh_ppu_update_foreground(10, (hh_s_ppu_loc_fam_entry) + { + .position_x = bullet->x, + .position_y = bullet->y, + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 7, + .tilemap_index = 84, // change tilemap to the correct foreground index; + }); +} diff --git a/src/engine/bullet.h b/src/engine/bullet.h new file mode 100644 index 0000000..ad67d84 --- /dev/null +++ b/src/engine/bullet.h @@ -0,0 +1,16 @@ +#pragma once +#include "player_controller.h" + +typedef struct { + int x; + int y; + int velocity; + int isActive; + int hit; +} Bullet; + + +//Bullet* createBullet(float x, float y, float velocity, float direction); +void shootBullet(vec2 playerPos, Bullet* bullet); +void updateBullet(Bullet* bullet, int deltaTime); +void drawBullet(Bullet* bullet); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index c4f3389..fed2cfa 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -60,3 +60,29 @@ void hh_setup_screen(){ } free(tile); } +void hh_clear_screen(){ + // (HH_PPU_SCREEN_HEIGHT*HH_PPU_SCREEN_WIDTH)/(HH_PPU_SPRITE_HEIGHT*HH_PPU_SPRITE_WIDTH) + for (int i = 0; i < HH_PPU_BG_CANVAS_TILES_H*HH_PPU_BG_CANVAS_TILES_V; i++) { + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false,.horizontal_flip = false, + .palette_index = 3,.tilemap_index = 0 + }; + hh_ppu_update_background(i,temp); + hh_ppu_update_color(3,0,(hh_ppu_rgb_color_t){0x0,0x0,0x0}); + } + hh_ppu_update_aux((hh_s_ppu_loc_aux){ + .bg_shift_x = 0, + .bg_shift_y = 0, + .fg_fetch = 0, + .sysreset = 0, + }); +} + +void hh_clear_sprite(){ + for (int i = 0; i < HH_PPU_FG_SPRITE_COUNT; i++) { + hh_ppu_update_foreground(i,(hh_s_ppu_loc_fam_entry){ + .position_x = -16, + .position_y = -16, + }); + } +} diff --git a/src/engine/draw_screen.h b/src/engine/draw_screen.h index b181108..d3abca6 100644 --- a/src/engine/draw_screen.h +++ b/src/engine/draw_screen.h @@ -19,3 +19,8 @@ uint8_t hh_world_to_tile(vec2 pos); void hh_draw_screen(vec2 viewport); /** @brief send data to BAM memory from binary level */ void hh_setup_screen(); + +/** @brief send black screen to background memory */ +void hh_clear_screen(); +/** @brief clears all sprite data */ +void hh_clear_sprite(); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index d351bee..647b00c 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -6,7 +6,11 @@ #include "input.h" +#include "engine/bullet.h" void hh_player_actions() { + static Bullet bullet ={ + .isActive=false, + }; static hh_entity player={ .hp = 4, .speed = 6, @@ -17,13 +21,13 @@ void hh_player_actions() { .vel = (vec2){0,0}, .vec = (vec2){0,0}, .render = { - .frame0 = 20, - .palette = 7, + .frame0 = 80, + .palette = 3, .fam = (hh_s_ppu_loc_fam_entry){ .horizontal_flip = false, .vertical_flip = false, - .palette_index = 7, - .tilemap_index = 2, + .palette_index = 2, + .tilemap_index = 60, } } }, player_new = {0}; @@ -114,6 +118,10 @@ void hh_player_actions() { player.vel.y += 1; //gravity } + if(g_hh_controller_p1.button_secondary==true){ + shootBullet(player.pos,&bullet); + } + updateBullet(&bullet,5); @@ -202,7 +210,7 @@ void hh_player_actions() { // hh_solve_collision(tiles[i].pos, &player); // } // } - + player = hh_background_collision ( player, player_new); //player = player_new; @@ -221,9 +229,22 @@ void hh_player_actions() { player.render.fam.tilemap_index = 2;//TODO: these two lines should be redundant player.render.fam.palette_index = 7; - hh_ppu_update_foreground(0, player.render.fam); + // hh_ppu_update_foreground(0, player.render.fam); + + for (int i = 0; i < 4; i++) + { + hh_s_ppu_loc_fam_entry temp = player.render.fam; + temp.position_x = player.render.fam.position_x+(!(player.vel.x>0)?-1:1)*(i%2?8:-8); + temp.position_y = player.render.fam.position_y+(i>1?0:-16); + temp.tilemap_index = player.render.frame0 + i; + temp.palette_index = player.render.palette; + temp.horizontal_flip = !(player.vel.x>0); + hh_ppu_update_foreground(i,temp); + } + + - hh_ppu_update_foreground(1, enemy.render.fam); + hh_ppu_update_foreground(4, enemy.render.fam); } diff --git a/src/engine/title_screen.c b/src/engine/title_screen.c new file mode 100644 index 0000000..9c7ed48 --- /dev/null +++ b/src/engine/title_screen.c @@ -0,0 +1,93 @@ +#include "ppu/ppu.h" +#include "ppu/types.h" +#include "ppu/consts.h" + + +#include "engine/draw_screen.h" +#include "engine/entity.h" + +void hh_init_title_screen(){ + + // hh_clear_screen(); + + //send data + uint8_t idx = 0; + const uint8_t tilemap_offset = 59; + int tiles_h = HH_PPU_BG_CANVAS_TILES_H; + int vp_h = HH_PPU_SCREEN_WIDTH/HH_PPU_SPRITE_WIDTH; //screen_h in tiles + int vert_offset = tiles_h*3; + + const uint8_t arr[4][4] = { + {0,1,1,0}, + {2,3,3,2}, + {4,0,0,4}, + {5,6,6,5}, + }; + int val, counter =0; + hh_ppu_update_color(5, 0, (hh_ppu_rgb_color_t) {0x1, 0x1, 0x1}); + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + val = arr[i][j]; + + hh_s_ppu_loc_bam_entry temp = { + .vertical_flip=false, .horizontal_flip = ((j % 4 < 2) ? false : true), + .palette_index = (counter == 9 || counter == 10? 5:3), .tilemap_index = (val > 0 ? (tilemap_offset + val) : 0) + }; + + int vert_pos = tiles_h*i; + int x_pos = j; + idx = vert_offset + vert_pos + x_pos + vp_h/2-2; + + hh_ppu_update_background(idx,temp); + counter++; + } + + } + + + const uint8_t letters_offset = 66; + const int _size_hooded = 7, _size_v = 2; + + // char* hh = "hooded"; + int hooded_lookup[7][2]={ + {0,1},{0,2},//H + {3,4},{3,4},//oo + {5,6},{13,9},//de + {5,6}//d + }; + + counter = 8; + for (int i = 0; i < _size_hooded; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = false, + .palette_index = 6, .tilemap_index = letters_offset + hooded_lookup[i][vert-1], + .position_x = (16*i + 64+48), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+16 +(i==2 || i==3 ? 6:0)) + }); + } + } + + + hh_ppu_update_color(5, 1, (hh_ppu_rgb_color_t) {0xa, 0x3, 0x3}); + hh_ppu_update_color(5, 2, (hh_ppu_rgb_color_t) {0xc, 0x5, 0x3}); + + const int _size_havoc = 6; + int lookup_havoc[6][2]={ + {0,1},{0,2},//H + {13,10},{7,8},//av + {13,11},{13,12}//oc + }; + + counter = 8 + (_size_hooded * _size_v); + for (int i = 0; i < _size_havoc; i++) { + for (int vert = 1; vert <= _size_v; vert++) { + //TODO: move 'H' a few pixels to the right for a more cohesive font spacing + hh_ppu_update_foreground(counter++, (hh_s_ppu_loc_fam_entry) { + .vertical_flip = false, .horizontal_flip = (i > 4 && vert==0 ? 1:0), + .palette_index = 5, .tilemap_index = letters_offset + lookup_havoc[i][vert-1], + .position_x = (16*i +64+32+8), .position_y = (16*(vert > 1 ? 0:1)*-1 + 64+8+48) + }); + } + } +} diff --git a/src/engine/title_screen.h b/src/engine/title_screen.h new file mode 100644 index 0000000..b5eda63 --- /dev/null +++ b/src/engine/title_screen.h @@ -0,0 +1,3 @@ +#pragma once + +void hh_init_title_screen(); diff --git a/src/makefile b/src/makefile index d7d9087..cd248e2 100644 --- a/src/makefile +++ b/src/makefile @@ -37,7 +37,11 @@ LOCAL_SRCS += main.c \ engine/draw_screen.c \ engine/camera.c \ engine/maths.c \ - engine/entity.c + engine/entity.c \ + engine/bullet.c \ + engine/title_screen.c \ + GameLoop/shop.c \ + GameLoop/startingScreen.c CFLAGS += $(SHARED_FLAGS) LFLAGS += $(SHARED_FLAGS) diff --git a/src/ppusim/input.c b/src/ppusim/input.c index 5323fb1..4bc7018 100644 --- a/src/ppusim/input.c +++ b/src/ppusim/input.c @@ -13,4 +13,5 @@ void hh_input_read() { g_hh_controller_p1.dpad_left = kb[SDL_SCANCODE_A]; g_hh_controller_p1.dpad_right = kb[SDL_SCANCODE_D]; g_hh_controller_p1.button_primary = kb[SDL_SCANCODE_SPACE]; + g_hh_controller_p1.button_secondary = kb[SDL_SCANCODE_R]; } -- cgit v1.2.3