From 433cbd970797d4472d12c704163719aec7340202 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Mon, 3 Apr 2023 13:25:33 +0200 Subject: shop selections done --- src/game_loop/shop.c | 39 ++++++++++++++++++++++++--------------- src/game_loop/shop.h | 6 ++++-- 2 files changed, 28 insertions(+), 17 deletions(-) (limited to 'src/game_loop') diff --git a/src/game_loop/shop.c b/src/game_loop/shop.c index ea75d46..6a97d25 100644 --- a/src/game_loop/shop.c +++ b/src/game_loop/shop.c @@ -6,6 +6,7 @@ void hh_shop(hh_e_game_state* hh_game_state){ static hh_e_shop_states hh_e_shop = hh_e_shop_show; static hh_e_upgrades upgrades[HH_SHOP_UPG_DISPLAY] = {0}; static uint8_t selected = 0; + static bool pressed_LR = false; switch (hh_e_shop) { @@ -16,23 +17,28 @@ void hh_shop(hh_e_game_state* hh_game_state){ //hh_setup_shop(); hh_shop_init(&upgrades); selected = HH_SHOP_UPG_DISPLAY/2; - // hh_shop_display(selected, &upgrades); + hh_shop_display(selected, &upgrades); hh_e_shop = hh_e_shop_main; break; case hh_e_shop_main: if(g_hh_controller_p1.dpad_left || g_hh_controller_p1.dpad_right){ - hh_shift_selected(&selected,(g_hh_controller_p1.dpad_right?1:0),0,HH_SHOP_UPG_DISPLAY); - // hh_shop_display(selected, &upgrades); + if (!pressed_LR) { + hh_shift_selected(&selected,(g_hh_controller_p1.dpad_right?1:0),0,HH_SHOP_UPG_DISPLAY-1); + hh_shop_display(selected, &upgrades); + } + pressed_LR = true; + } else { + pressed_LR = false; + } + if(g_hh_controller_p1.button_primary){ + //apply selected upgrade + hh_e_shop = hh_e_shop_end; } - // if(g_hh_controller_p1.button_primary){ - // //apply selected upgrade - // hh_e_shop = hh_e_shop_end; - // } if(g_hh_controller_p1.button_secondary){//Quick exit hh_e_shop = hh_e_shop_end; } break; - case hh_e_shop_end: + case hh_e_shop_end: // delay? hh_e_shop = hh_e_shop_show; *hh_game_state = hh_e_state_gameplay; break; @@ -42,6 +48,10 @@ void hh_shop(hh_e_game_state* hh_game_state){ } } +uint8_t hh_shop_translate_upgrades(hh_e_upgrades upg) { + return upg+10; +} + void hh_shop_init(hh_e_upgrades* in) { for (int i = 0; i < HH_SHOP_UPG_DISPLAY; i++) { in[i] = i%HH_SHOP_UPG_COUNT; @@ -57,20 +67,19 @@ void hh_shop_display(uint8_t selected, hh_e_upgrades* upgrades) { hh_ppu_update_foreground(i+16, (hh_s_ppu_loc_fam_entry){ .horizontal_flip = false, .vertical_flip = false, - .position_x = i*space+start.x, .position_y = start.y + (i==selected?up:0), + .position_x = i*space+start.x, .position_y = start.y + (i==selected?-up:0), .palette_index = 7, - .tilemap_index = 8 + .tilemap_index = hh_shop_translate_upgrades(upgrades[i]) }); } } -void hh_shift_selected(uint8_t* pos, bool dir, uint8_t min, uint8_t max) { +void hh_shift_selected(uint8_t *pos, bool dir, uint8_t min, uint8_t max) { if (dir) { - pos = CLAMP(++pos,min,max); + *pos = MIN(*pos+1,max); } else { - if (pos > 0) { - pos--; - } + *pos = MAX(*pos-1,min); } + // printf("b: %d sel: %d\n",dir, *pos); } diff --git a/src/game_loop/shop.h b/src/game_loop/shop.h index b0ad5e4..642bcc3 100644 --- a/src/game_loop/shop.h +++ b/src/game_loop/shop.h @@ -15,12 +15,14 @@ typedef enum { } hh_e_shop_states; /** @brief amount of upgrade types */ -#define HH_SHOP_UPG_COUNT 2 +#define HH_SHOP_UPG_COUNT 5 /** @brief count of visible upgrades in shop */ -#define HH_SHOP_UPG_DISPLAY 4 +#define HH_SHOP_UPG_DISPLAY 5 /** @brief all possible upgrades */ typedef enum { hh_e_upg_jump, + hh_e_upg_speed, + hh_e_upg_damage, hh_e_upg_heal, hh_e_upg_max_health, } hh_e_upgrades; -- cgit v1.2.3 From 2ff7020ed6327a49abd3c57491c1286c34a62d40 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Tue, 4 Apr 2023 14:38:48 +0200 Subject: dynamic tilemap integration (without pallets) --- src/engine/level_const.c | 6 +- src/engine/player_controller.c | 6 +- src/engine/sprite_controller.h | 19 +- src/engine/title_screen.c | 6 +- src/game_loop/shop.c | 1 + src/static/.gitignore | 3 + src/static/Source.cpp | 42 ++++ src/static/background/bricks.hex | 457 +++++++++++++++++++++++++++++++++++ src/static/background/crates.hex | 39 +++ src/static/background/shop_stall.hex | 202 ++++++++++++++++ src/static/epic.py | 41 ++++ src/static/makefile | 10 +- 12 files changed, 814 insertions(+), 18 deletions(-) create mode 100644 src/static/Source.cpp create mode 100644 src/static/background/bricks.hex create mode 100644 src/static/background/crates.hex create mode 100644 src/static/background/shop_stall.hex create mode 100644 src/static/epic.py (limited to 'src/game_loop') diff --git a/src/engine/level_const.c b/src/engine/level_const.c index 3847ad8..58b2514 100644 --- a/src/engine/level_const.c +++ b/src/engine/level_const.c @@ -7,16 +7,16 @@ hh_g_all_levels hh_init_game_levels(){ levels.current_level=0; levels.level[0].size.x=40; - levels.level[0].size.y=100; + levels.level[0].size.y=15; levels.level[0].hh_level_completed=false; levels.level[1].size.x=100; levels.level[1].size.y=28; levels.level[1].hh_level_completed=false; - FILE *fp = fopen("../test/bin/level1_test.bin", "rb"); + FILE *fp = fopen("static/shop_new.bin", "rb"); if (fp == NULL) { - printf("level1_test.bin not found!\n"); + printf("shop_new.bin not found!\n"); return levels; } fseek(fp, 0, SEEK_END); diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 0fed82d..1b4eec8 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -5,6 +5,8 @@ #include "engine/player_controller.h" #include "input.h" +#include "static/tilemap.h" + #include "engine/animator.h" #include "engine/bullet.h" void hh_player_actions() { @@ -18,14 +20,14 @@ void hh_player_actions() { .vel = (vec2){0,0}, .size = (vec2){32,32}, .render = { - .frame0 = 80, + .frame0 = HH_TM_SLIME_OFFSET, .palette = 3, .ppu_foreground_index = 0, .fam = (hh_s_ppu_loc_fam_entry){ .horizontal_flip = false, .vertical_flip = false, .palette_index = 3, - .tilemap_index = 80, + .tilemap_index = HH_TM_SLIME_OFFSET, } } }, player_new = {0}; diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h index fc6d3d3..244181c 100644 --- a/src/engine/sprite_controller.h +++ b/src/engine/sprite_controller.h @@ -15,6 +15,7 @@ #define HH_PAL_IDX_SKY 512 #define HH_PAL_IDX_BRICK 1 const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = { + //TODO: FIGURE OUT HOW TO DEAL WITH DYNAMIC PALLETS //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 @@ -47,13 +48,13 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {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}}, + {0x5,0x1,0x7}, + {0xd,0x8,0xa}},//24 {//slime {0x1,0x2,0x3}, {0x1,0x3,0x2}, @@ -72,16 +73,16 @@ const static hh_ppu_loc_palette_table_t hh_g_palette = { {0xe,0xe,0xe}, //elemental {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - { - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, - {0x0,0x0,0x0}, + {//crates + {0x5,0x7,0x7}, + {0x3,0x1,0x2}, + {0x6,0x2,0x2}, + {0x7,0x4,0x4}, + {0xa,0x7,0x5}, {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}}, - {//elemental + { {0x0,0x0,0x0}, {0x0,0x0,0x0}, {0x0,0x0,0x0}, diff --git a/src/engine/title_screen.c b/src/engine/title_screen.c index 9c7ed48..1e9e586 100644 --- a/src/engine/title_screen.c +++ b/src/engine/title_screen.c @@ -2,6 +2,8 @@ #include "ppu/types.h" #include "ppu/consts.h" +#include "static/tilemap.h" + #include "engine/draw_screen.h" #include "engine/entity.h" @@ -12,7 +14,7 @@ void hh_init_title_screen(){ //send data uint8_t idx = 0; - const uint8_t tilemap_offset = 59; + const uint8_t tilemap_offset = HH_TM_TITLE_SCREEN_ICON_OFFSET; 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; @@ -45,7 +47,7 @@ void hh_init_title_screen(){ } - const uint8_t letters_offset = 66; + const uint8_t letters_offset = HH_TM_TITLE_SCREEN_LETTERES_LARGE_OFFSET; const int _size_hooded = 7, _size_v = 2; // char* hh = "hooded"; diff --git a/src/game_loop/shop.c b/src/game_loop/shop.c index 6a97d25..eb41248 100644 --- a/src/game_loop/shop.c +++ b/src/game_loop/shop.c @@ -14,6 +14,7 @@ void hh_shop(hh_e_game_state* hh_game_state){ hh_clear_screen(); hh_clear_sprite(); // TODO: make function to show shop + // hh_setup_screen(); //hh_setup_shop(); hh_shop_init(&upgrades); selected = HH_SHOP_UPG_DISPLAY/2; diff --git a/src/static/.gitignore b/src/static/.gitignore index 348c5b9..6111050 100644 --- a/src/static/.gitignore +++ b/src/static/.gitignore @@ -4,3 +4,6 @@ manifest.txt tilemap.h tiled/* tiled.mk +*.tsx +*.csv +*.out diff --git a/src/static/Source.cpp b/src/static/Source.cpp new file mode 100644 index 0000000..0bba7c6 --- /dev/null +++ b/src/static/Source.cpp @@ -0,0 +1,42 @@ +#include +#include +#include +#include + +int main(int argc, char** argv) { + + std::ifstream f; + f.open("out.csv"); /* open file with filename as argument */ + if (!f.is_open()) { /* validate file open for reading */ + std::cerr << "error: file open failed '" << argv[1] << "'.\n"; + return 0; + } + + + std::string line, val; /* string for line & value */ + std::vector> array; /* vector of vector */ + + while (std::getline(f, line)) { /* read each line */ + std::vector v; /* row vector v */ + std::stringstream s(line); /* stringstream line */ + while (getline(s, val, ',')) /* get each value (',' delimited) */ + v.push_back(std::stoi(val)); /* add to row vector */ + array.push_back(v); /* add row vector to array */ + } + + std::vector flat_array; /* create 1D vector */ + for (auto& row : array) { /* iterate over rows */ + for (auto& val : row) /* iterate over vals */ + flat_array.push_back(val); /* add to 1D vector */ + } + + int* array1d = flat_array.data(); /* get pointer to data */ + int size = flat_array.size(); /* get size of 1D array */ + + std::ofstream out_file("out.bin", std::ios::binary); /* create binary file */ + out_file.write((char*)&size, sizeof(size)); /* write size of 1D array to file */ + out_file.write((char*)array1d, size * sizeof(int)); /* write 1D array to file */ + out_file.close(); /* close file */ + + return 0; +} diff --git a/src/static/background/bricks.hex b/src/static/background/bricks.hex new file mode 100644 index 0000000..717b91d --- /dev/null +++ b/src/static/background/bricks.hex @@ -0,0 +1,457 @@ +;indices: 7 +;25 3a 5e +;09 0a 14 +;10 14 1f +;15 1d 28 +;20 2e 37 +;39 4a 50 +;57 72 77 + +000000: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +000010: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +000020: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +000030: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +000040: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +000050: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +000060: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +000070: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +000080: 06 06 04 04 04 04 04 02 02 02 03 03 03 03 02 02 +000090: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0000a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0000b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0000c0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +0000d0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +0000e0: 00 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 +0000f0: 06 06 06 05 05 05 02 02 02 02 02 02 02 02 02 02 +000100: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +000110: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +000120: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +000130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000140: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000160: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +000170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +000190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0001a0: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0001b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0001c0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0001d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0001e0: 02 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0001f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000200: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +000210: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +000220: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +000230: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +000240: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +000250: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +000260: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +000270: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +000280: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +000290: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0002a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0002b0: 02 02 02 02 02 02 02 02 02 02 02 05 05 06 06 06 +0002c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +0002d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +0002e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +0002f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +000300: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000310: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000320: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +000330: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +000340: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +000350: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +000360: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +000370: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +000380: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000390: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0003a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0003b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0003c0: 00 05 05 04 04 04 04 03 02 03 03 03 03 03 03 03 +0003d0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +0003e0: 00 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 +0003f0: 00 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 +000400: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +000410: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +000420: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +000430: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000440: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +000450: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000460: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +000470: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000480: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +000490: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0004a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0004b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0004c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +0004d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0004e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +0004f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000500: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +000510: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +000520: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +000530: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +000540: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +000550: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +000560: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +000570: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +000580: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +000590: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0005a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0005b0: 02 02 02 02 02 02 02 02 02 02 02 03 03 06 06 06 +0005c0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 06 +0005d0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +0005e0: 03 02 03 03 03 03 03 03 03 02 04 04 04 04 04 05 +0005f0: 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 05 +000600: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000610: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000620: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 02 02 +000630: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +000640: 00 05 04 04 04 03 02 03 03 03 03 03 03 02 03 03 +000650: 00 05 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +000660: 00 04 04 04 04 02 03 03 03 03 03 02 02 02 02 03 +000670: 06 06 05 05 02 02 02 02 02 02 02 02 02 02 02 02 +000680: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000690: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0006a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0006b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0006c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +0006d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +0006e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +0006f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +000700: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +000710: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +000720: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +000730: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000740: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +000750: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000760: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +000770: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000780: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +000790: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0007a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0007b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0007c0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +0007d0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +0007e0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +0007f0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +000800: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +000810: 03 03 03 02 03 03 03 03 03 03 03 02 04 04 05 00 +000820: 03 03 02 02 03 03 03 03 03 03 03 02 04 04 04 00 +000830: 02 02 02 02 02 02 02 02 02 02 02 02 02 06 06 06 +000840: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 06 +000850: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +000860: 03 03 03 03 03 02 03 03 03 02 04 04 04 04 04 05 +000870: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +000880: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +000890: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0008a0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +0008b0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +0008c0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +0008d0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +0008e0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +0008f0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +000900: 06 06 06 06 06 05 06 06 06 06 06 05 06 06 06 06 +000910: 06 05 05 05 05 03 05 05 05 05 05 03 05 05 05 05 +000920: 06 05 04 04 04 03 05 05 05 05 05 03 05 05 05 05 +000930: 06 04 04 04 04 02 02 02 02 02 02 02 02 02 02 02 +000940: 06 04 04 04 04 02 02 03 03 03 03 03 03 02 03 03 +000950: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +000960: 05 04 04 04 04 02 03 03 03 03 03 03 03 02 03 03 +000970: 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 02 +000980: 06 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +000990: 05 04 04 04 04 04 04 02 03 03 03 03 03 03 03 02 +0009a0: 05 04 04 04 04 04 04 02 02 03 03 03 03 03 03 02 +0009b0: 05 03 03 03 03 03 02 02 02 02 02 02 02 02 02 02 +0009c0: 00 05 05 04 04 04 04 04 04 04 04 02 02 02 02 04 +0009d0: 00 05 05 04 04 04 04 04 04 04 04 04 02 04 04 04 +0009e0: 00 06 05 05 05 04 04 04 04 04 04 04 03 04 04 04 +0009f0: 00 06 06 06 05 05 05 05 05 05 05 05 03 05 05 05 +000a00: 06 06 06 05 06 06 06 06 06 06 06 05 06 06 06 06 +000a10: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +000a20: 05 05 05 03 05 05 05 05 05 05 05 03 05 05 05 05 +000a30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000a40: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000a50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000a60: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +000a70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000a80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +000a90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +000aa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +000ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000ac0: 04 04 04 04 04 04 04 04 03 03 03 04 04 04 04 04 +000ad0: 04 04 04 04 04 04 04 04 04 03 03 04 04 04 04 04 +000ae0: 04 04 04 04 04 04 04 04 04 03 04 04 04 04 04 04 +000af0: 05 05 05 05 05 05 05 05 05 03 05 05 05 05 05 05 +000b00: 06 06 06 05 06 06 06 06 06 06 05 06 06 06 06 06 +000b10: 05 05 05 03 05 05 05 05 05 05 03 05 05 05 05 06 +000b20: 05 05 05 03 05 05 05 05 05 05 03 04 04 05 05 06 +000b30: 02 02 02 02 02 02 02 02 02 02 02 04 04 04 04 06 +000b40: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 06 +000b50: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +000b60: 03 03 03 03 03 02 03 03 03 03 02 04 04 04 04 05 +000b70: 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 05 +000b80: 03 03 03 03 03 03 03 02 04 04 04 04 04 05 05 00 +000b90: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +000ba0: 03 03 03 03 03 03 03 02 04 04 04 04 04 04 05 00 +000bb0: 02 02 02 02 02 02 03 03 03 03 03 03 03 06 06 06 +000bc0: 04 04 03 03 03 04 04 04 04 04 04 04 04 04 05 06 +000bd0: 04 04 04 03 03 04 04 04 04 04 04 04 04 05 05 05 +000be0: 04 04 04 03 04 04 04 04 04 04 04 05 05 05 05 06 +000bf0: 05 05 05 03 05 05 05 05 05 05 05 05 05 06 06 06 +000c00: 06 06 06 06 06 05 06 06 06 06 05 06 06 06 06 06 +000c10: 06 05 05 05 05 03 05 05 05 05 03 05 05 05 05 06 +000c20: 06 05 04 04 04 03 05 05 05 05 03 04 04 05 05 06 +000c30: 06 04 04 04 04 02 02 02 02 02 02 04 04 04 04 06 +000c40: 06 04 04 04 04 02 02 03 03 03 02 04 04 04 04 06 +000c50: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +000c60: 05 04 04 04 04 02 03 03 03 03 02 04 04 04 04 05 +000c70: 03 03 03 03 03 02 02 02 02 02 02 03 03 03 03 05 +000c80: 06 06 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +000c90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +000ca0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +000cb0: 05 03 03 03 03 03 02 02 02 02 02 05 05 06 06 06 +000cc0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +000cd0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 06 +000ce0: 00 05 04 04 04 04 04 04 03 02 04 04 04 04 04 05 +000cf0: 06 06 06 05 05 05 02 02 02 02 02 02 03 03 03 05 +000d00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +000d10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +000d20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +000d30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +000d40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +000d50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +000d60: 00 04 04 04 04 02 03 03 03 02 03 04 04 04 04 05 +000d70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +000d80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +000d90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +000da0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +000db0: 05 03 03 03 03 03 02 02 02 02 02 03 03 06 06 06 +000dc0: 00 05 05 04 04 04 03 03 03 03 03 04 04 04 04 06 +000dd0: 00 05 04 04 04 04 03 03 03 03 04 04 04 04 04 05 +000de0: 00 05 04 04 04 03 03 03 03 03 04 04 04 04 04 05 +000df0: 00 05 03 03 03 03 03 02 02 02 02 02 03 03 03 05 +000e00: 06 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +000e10: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 05 00 +000e20: 05 04 04 04 04 04 04 02 03 03 03 02 04 04 04 00 +000e30: 05 03 03 03 03 03 02 02 02 02 02 02 02 06 06 06 +000e40: 00 05 04 04 04 03 02 03 03 02 04 04 04 04 04 06 +000e50: 00 05 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +000e60: 00 04 04 04 04 02 03 03 03 02 04 04 04 04 04 05 +000e70: 06 06 05 05 02 02 02 02 02 02 02 03 03 03 03 05 +000e80: 06 04 04 04 04 04 04 02 04 04 04 04 04 05 05 00 +000e90: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +000ea0: 05 04 04 04 04 04 04 02 04 04 04 04 04 04 05 00 +000eb0: 05 03 03 03 03 03 02 02 03 03 03 03 03 06 06 06 +000ec0: 00 05 05 04 04 04 04 04 04 04 04 04 04 04 05 06 +000ed0: 00 05 05 04 04 04 04 04 04 04 04 04 04 05 05 05 +000ee0: 00 06 05 05 05 04 04 04 04 04 04 05 05 05 05 06 +000ef0: 00 06 06 06 05 05 05 05 05 05 05 05 05 06 06 06 +000f00: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +000f10: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +000f20: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +000f30: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000f40: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +000f50: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +000f60: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +000f70: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000f80: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +000f90: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +000fa0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +000fb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000fc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 04 04 04 +000fd0: 03 02 03 03 03 03 03 03 03 02 03 03 04 04 04 04 +000fe0: 03 02 03 03 03 03 03 03 02 02 02 03 04 04 04 04 +000ff0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001000: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +001010: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +001020: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +001030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001040: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +001050: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +001060: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +001070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001080: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +001090: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0010a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0010b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0010c0: 02 02 02 04 04 03 03 03 03 02 03 03 03 03 03 03 +0010d0: 04 02 04 04 04 04 03 03 03 02 03 03 03 03 03 03 +0010e0: 04 02 04 04 04 04 03 03 02 02 02 03 03 03 03 03 +0010f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001100: 03 03 02 02 02 03 03 03 03 03 03 02 02 05 05 05 +001110: 03 03 03 02 03 03 03 03 03 03 03 02 03 05 05 05 +001120: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 05 05 +001130: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001140: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +001150: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +001160: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +001170: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001180: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +001190: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0011a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0011b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0011c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +0011d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0011e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +0011f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001200: 06 05 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +001210: 05 05 05 02 03 03 03 03 03 03 03 02 03 03 03 03 +001220: 05 05 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +001230: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001240: 03 03 03 03 02 02 03 03 03 03 03 03 03 02 03 03 +001250: 03 03 03 03 03 02 03 03 03 03 03 03 03 02 03 03 +001260: 03 03 03 03 03 02 03 03 03 03 03 03 02 02 02 03 +001270: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001280: 02 03 03 03 03 03 03 02 03 03 03 03 03 03 02 02 +001290: 03 03 03 03 03 03 03 02 03 03 03 03 03 03 03 02 +0012a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0012b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0012c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +0012d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0012e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +0012f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001300: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001310: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001320: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001330: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001340: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001350: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001360: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001370: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001380: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001390: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0013a0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0013b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0013c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0013d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0013e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0013f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001400: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +001410: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +001420: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +001430: 02 02 02 02 02 02 02 02 02 02 02 02 02 01 01 01 +001440: 03 03 03 03 02 02 03 03 02 02 02 02 02 01 02 02 +001450: 03 03 03 03 03 02 02 02 02 02 02 02 02 01 02 02 +001460: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +001470: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +001480: 02 03 03 03 02 02 02 01 02 02 02 02 02 02 01 01 +001490: 03 03 03 03 02 02 02 01 02 02 02 02 02 02 02 01 +0014a0: 03 03 03 03 02 02 01 01 01 01 02 02 02 02 01 01 +0014b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +0014c0: 02 02 02 03 03 02 02 02 02 01 02 02 02 01 01 01 +0014d0: 03 02 03 03 03 02 02 02 02 01 02 02 01 01 01 01 +0014e0: 03 02 03 03 03 03 02 02 01 01 01 02 01 01 01 01 +0014f0: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +001500: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +001510: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +001520: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +001530: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001540: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +001550: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +001560: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +001570: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001580: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +001590: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +0015a0: 01 02 02 02 01 01 01 01 01 01 02 02 02 02 02 01 +0015b0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0015c0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0015d0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0015e0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +0015f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001600: 03 03 02 02 02 03 03 03 03 03 03 02 02 03 03 03 +001610: 03 03 03 02 03 03 03 03 03 03 03 02 03 03 03 03 +001620: 03 03 03 02 03 03 03 03 03 03 02 02 02 03 03 03 +001630: 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 +001640: 02 02 02 02 01 01 03 03 03 03 03 03 03 02 03 03 +001650: 02 02 02 02 02 01 02 02 03 03 03 03 03 02 03 03 +001660: 02 02 02 02 02 01 02 02 02 03 03 03 02 02 02 03 +001670: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +001680: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +001690: 02 02 02 02 02 02 02 01 02 02 02 03 03 03 03 02 +0016a0: 02 02 02 02 02 02 01 01 01 01 02 03 03 03 03 02 +0016b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +0016c0: 01 01 01 02 02 02 02 02 02 01 02 03 03 03 03 03 +0016d0: 01 01 02 02 02 02 02 02 02 01 02 03 03 03 03 03 +0016e0: 01 01 02 02 02 02 02 02 01 01 01 03 03 03 03 03 +0016f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +001700: 03 03 02 02 02 02 02 02 02 02 02 01 01 01 01 01 +001710: 03 03 03 02 03 02 02 02 02 02 02 01 01 01 01 01 +001720: 03 03 03 02 03 02 02 02 02 02 01 01 01 01 01 01 +001730: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +001740: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +001750: 03 03 03 03 02 01 02 02 02 02 02 02 01 01 01 01 +001760: 03 03 03 03 02 01 02 02 02 02 02 01 01 01 01 01 +001770: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +001780: 02 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +001790: 03 03 03 03 02 02 02 01 02 02 02 01 01 01 01 01 +0017a0: 03 03 03 03 02 02 01 01 01 01 02 01 01 01 01 01 +0017b0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +0017c0: 02 02 02 03 02 02 02 02 02 01 02 02 01 01 01 01 +0017d0: 03 02 03 03 03 02 02 02 02 01 02 02 02 01 01 01 +0017e0: 03 02 03 03 02 02 02 02 01 01 01 02 02 01 01 01 +0017f0: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +001800: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +001810: 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 03 +001820: 01 01 01 01 02 02 02 02 02 02 02 02 02 03 03 03 +001830: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +001840: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +001850: 01 01 01 01 01 02 02 02 02 02 03 03 03 02 03 03 +001860: 01 01 01 01 01 01 02 02 02 02 03 03 02 02 02 03 +001870: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +001880: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 02 02 +001890: 01 01 01 01 02 02 02 01 02 02 02 03 03 03 03 02 +0018a0: 01 01 01 01 01 02 01 01 01 01 02 03 03 03 03 02 +0018b0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +0018c0: 01 01 01 01 01 02 02 02 02 01 02 03 03 03 03 03 +0018d0: 01 01 01 01 02 02 02 02 02 01 02 03 03 03 03 03 +0018e0: 01 01 01 01 02 02 02 02 01 01 02 03 03 03 03 03 +0018f0: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +001900: 03 03 02 02 01 02 02 02 02 02 02 01 01 02 01 01 +001910: 03 03 03 02 02 02 02 02 02 02 02 01 02 02 02 01 +001920: 03 03 03 02 02 02 02 02 02 02 01 01 01 02 02 02 +001930: 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 01 +001940: 03 03 03 03 01 01 02 02 02 02 02 02 02 01 02 02 +001950: 03 03 03 03 02 01 02 02 02 02 02 02 02 01 02 02 +001960: 03 03 03 03 03 01 02 02 02 02 02 02 01 01 01 02 +001970: 02 02 02 02 02 01 01 01 01 01 01 01 01 01 01 01 +001980: 02 03 03 03 03 03 02 01 02 02 02 02 02 02 01 01 +001990: 03 03 03 03 03 03 03 02 02 02 02 02 02 02 02 01 +0019a0: 03 03 03 03 03 03 02 02 02 02 03 03 03 03 03 02 +0019b0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +0019c0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +0019d0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +0019e0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +0019f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001a00: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001a10: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001a20: 02 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 +001a30: 01 01 01 01 01 01 01 01 02 02 02 02 01 01 01 01 +001a40: 02 02 02 02 01 01 02 02 02 02 02 02 02 01 02 02 +001a50: 02 02 02 02 02 01 02 02 02 02 02 02 02 01 02 02 +001a60: 02 02 02 02 02 01 02 02 02 02 02 02 01 01 01 02 +001a70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +001a80: 01 02 02 02 02 02 02 01 02 02 02 02 02 02 01 01 +001a90: 02 02 02 02 02 02 02 01 02 02 02 02 02 02 02 01 +001aa0: 03 03 02 02 02 02 01 01 01 01 02 02 02 02 02 01 +001ab0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001ac0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +001ad0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +001ae0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +001af0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001b00: 01 01 01 01 01 02 02 02 02 02 02 02 02 03 03 03 +001b10: 02 02 02 01 02 02 02 02 02 02 02 02 03 03 03 03 +001b20: 02 02 02 01 02 02 02 02 02 02 01 02 02 03 03 03 +001b30: 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 +001b40: 02 02 02 02 01 01 02 02 02 02 02 03 03 02 03 03 +001b50: 02 02 02 02 02 01 02 02 02 02 02 03 03 02 03 03 +001b60: 02 02 02 02 02 01 02 02 02 02 02 03 02 02 02 03 +001b70: 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 +001b80: 01 02 02 02 02 02 02 01 02 02 03 03 03 03 02 02 +001b90: 02 02 02 02 02 02 02 01 02 03 03 03 03 03 03 02 +001ba0: 02 02 02 02 02 02 01 02 02 02 03 03 03 03 03 02 +001bb0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +001bc0: 02 02 02 03 03 03 03 03 03 02 03 03 03 03 03 03 +001bd0: 03 02 03 03 03 03 03 03 03 02 03 03 03 03 03 03 +001be0: 03 02 03 03 03 03 03 03 02 02 02 03 03 03 03 03 +001bf0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 \ No newline at end of file diff --git a/src/static/background/crates.hex b/src/static/background/crates.hex new file mode 100644 index 0000000..3d8b332 --- /dev/null +++ b/src/static/background/crates.hex @@ -0,0 +1,39 @@ +;indices: 5 +;57 72 77 +;34 1c 27 +;60 2c 2c +;7a 48 41 +;ad 77 57 + +000000: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 +000010: 03 04 04 04 04 04 04 04 04 04 04 04 04 04 04 03 +000020: 03 03 03 04 01 01 01 01 01 01 01 01 04 03 03 03 +000030: 03 03 02 03 04 01 01 01 01 01 01 04 03 02 03 03 +000040: 03 03 01 02 03 04 01 01 01 01 04 03 02 01 03 03 +000050: 03 03 01 01 02 03 04 01 01 04 03 02 01 01 03 03 +000060: 03 03 01 01 01 02 03 04 04 03 02 01 01 01 03 03 +000070: 03 03 01 01 01 01 02 03 03 02 01 01 01 01 03 03 +000080: 03 03 01 01 01 01 04 03 03 04 01 01 01 01 03 03 +000090: 03 03 01 01 01 04 03 02 02 03 04 01 01 01 03 03 +0000a0: 03 03 01 01 04 03 02 01 01 02 03 04 01 01 03 03 +0000b0: 03 03 01 04 03 02 01 01 01 01 02 03 04 01 03 03 +0000c0: 03 03 04 03 02 01 01 01 01 01 01 02 03 04 03 03 +0000d0: 03 03 03 02 01 01 01 01 01 01 01 01 02 03 03 03 +0000e0: 03 02 02 02 02 02 02 02 02 02 02 02 02 02 02 03 +0000f0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000100: 01 01 01 02 01 01 01 01 01 01 01 01 02 01 01 01 +000110: 01 03 03 01 03 03 03 03 03 03 03 03 01 03 03 01 +000120: 01 03 00 01 03 03 03 03 03 03 03 03 01 00 03 01 +000130: 01 03 03 01 04 04 04 04 04 04 04 04 01 03 03 01 +000140: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +000150: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +000160: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +000170: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +000180: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +000190: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +0001a0: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +0001b0: 01 03 03 01 02 02 01 02 02 01 02 02 01 03 03 01 +0001c0: 01 03 03 01 04 04 04 04 04 04 04 04 01 03 03 01 +0001d0: 01 03 00 01 03 03 03 03 03 03 03 03 01 00 03 01 +0001e0: 01 03 03 01 03 03 03 03 03 03 03 03 01 03 03 01 +0001f0: 01 01 01 02 01 01 01 01 01 01 01 01 02 01 01 01 \ No newline at end of file diff --git a/src/static/background/shop_stall.hex b/src/static/background/shop_stall.hex new file mode 100644 index 0000000..e156bd1 --- /dev/null +++ b/src/static/background/shop_stall.hex @@ -0,0 +1,202 @@ +;indices: 8 +;17 20 38 +;09 0a 14 +;60 2c 2c +;7a 48 41 +;c0 94 73 +;d7 b5 94 +;39 4a 50 +;81 97 96 + +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 00 00 +0000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 +0000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 05 +000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0001a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0001b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0001c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0001d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0001e0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0001f0: 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +0002a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +0002b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +0002c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +0002d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +0002e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +0002f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 +000300: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000310: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000320: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000330: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000340: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000350: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000360: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000370: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000380: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000390: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0003a0: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0003b0: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0003c0: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0003d0: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0003e0: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0003f0: 04 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +000400: 05 01 04 05 05 05 05 05 05 05 05 05 05 05 05 05 +000410: 04 01 04 04 04 04 04 04 04 04 04 04 04 04 04 04 +000420: 04 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000430: 04 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 +000440: 04 01 02 02 02 02 02 02 02 02 02 02 03 03 03 03 +000450: 04 01 02 02 02 02 03 03 03 03 03 03 03 03 03 03 +000460: 04 01 02 02 03 03 03 03 03 03 03 03 03 03 03 03 +000470: 04 01 02 03 03 03 03 03 03 03 03 03 03 03 03 03 +000480: 04 01 02 03 03 03 03 03 03 03 03 03 03 03 03 03 +000490: 04 01 02 03 03 03 03 03 03 03 03 03 03 03 03 03 +0004a0: 04 01 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0004b0: 04 01 02 03 03 03 03 03 03 03 03 03 03 03 03 03 +0004c0: 04 01 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0004d0: 04 01 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0004e0: 04 01 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0004f0: 04 01 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000500: 00 00 00 00 00 00 00 00 00 01 01 01 01 01 01 01 +000510: 00 00 00 00 00 00 00 00 01 04 04 04 04 04 04 04 +000520: 00 00 00 00 00 00 00 00 01 04 04 04 04 04 04 04 +000530: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +000540: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +000550: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +000560: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +000570: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +000580: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +000590: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +0005a0: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +0005b0: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +0005c0: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +0005d0: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +0005e0: 00 00 00 00 00 00 00 00 01 03 03 03 03 03 03 03 +0005f0: 00 00 00 00 00 00 00 00 00 01 01 01 01 01 01 01 +000600: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000610: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 +000620: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 +000630: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000640: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000650: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000660: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000670: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000680: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +000690: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0006a0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0006b0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0006c0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0006d0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0006e0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 +0006f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000700: 05 05 05 05 05 05 05 05 05 05 05 05 05 04 01 05 +000710: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 01 04 +000720: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 01 04 +000730: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 01 04 +000740: 03 03 03 03 02 02 02 02 02 02 02 02 02 02 01 04 +000750: 03 03 03 03 03 03 03 03 03 03 02 02 02 02 01 04 +000760: 03 03 03 03 03 03 03 03 03 03 03 03 02 02 01 04 +000770: 03 03 03 03 03 03 03 03 03 03 03 03 03 02 01 04 +000780: 03 03 03 03 03 03 03 03 03 03 03 03 03 02 01 04 +000790: 03 03 03 03 03 03 03 03 03 03 03 03 03 02 01 04 +0007a0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 01 04 +0007b0: 03 03 03 03 03 03 03 03 03 03 03 03 03 02 01 04 +0007c0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 01 04 +0007d0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 01 04 +0007e0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 01 04 +0007f0: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 01 04 +000800: 01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 00 +000810: 04 04 04 04 04 04 04 01 00 00 00 00 00 00 00 00 +000820: 04 04 04 04 04 04 04 01 00 00 00 00 00 00 00 00 +000830: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +000840: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +000850: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +000860: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +000870: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +000880: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +000890: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +0008a0: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +0008b0: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +0008c0: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +0008d0: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +0008e0: 03 03 03 03 03 03 03 01 00 00 00 00 00 00 00 00 +0008f0: 01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 00 +000900: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000910: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000920: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000930: 01 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000940: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000950: 01 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000960: 01 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000970: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000980: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000990: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009a0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009b0: 01 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009c0: 01 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009d0: 01 07 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +0009e0: 01 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +0009f0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000a00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a10: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a60: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000a70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000a80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000a90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000aa0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ab0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ac0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ad0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 +000ae0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 +000af0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000b00: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000b10: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000b20: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000b30: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 01 +000b40: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000b50: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 01 +000b60: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 01 +000b70: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 +000b80: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000b90: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000ba0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000bb0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 01 +000bc0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 01 +000bd0: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 07 01 +000be0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 01 +000bf0: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 \ No newline at end of file diff --git a/src/static/epic.py b/src/static/epic.py new file mode 100644 index 0000000..9f697ef --- /dev/null +++ b/src/static/epic.py @@ -0,0 +1,41 @@ +#!/bin/python3 +import re + +# Read in the first file and extract the id and image filename for each tile +tile_info = {} +with open('stuff1.tsx', 'r') as f: + for line in f: + id_match = re.match(r'', line.strip()) + if id_match: + tile_id = int(id_match.group(1)) + else: + image_match = re.search(r'source=".*?/(\w+_\d+\.png)"', line.strip()) + if image_match: + image_filename = image_match.group(1) + tile_info[tile_id] = image_filename + +# Read in the second file and extract the size for each tile +tile_sizes = {} +with open('tilemap.h', 'r') as f: + for line in f: + size_match = re.match(r'#define HH_TM_(\w+)_OFFSET (\d+)', line.strip(), re.IGNORECASE) + if size_match: + tile_type = size_match.group(1).lower() + size = int(size_match.group(2)) + tile_sizes[tile_type] = size + +# Read in the third file, update the values, and write to the output file +with open('map.csv', 'r') as input_file, open('out.csv', 'w') as output_file: + for line in input_file: +# #OK + tile_ids = [int(tile_id) for tile_id in line.strip().split(',')] + updated_tile_ids = [] + for tile_id in tile_ids: + image_filename = re.match(r'(\w+)_(\d+)\.png', tile_info[tile_id]) + tile_type = image_filename.group(1).lower() + offset = int(image_filename.group(2)) + size = tile_sizes[tile_type] + updated_tile_id = offset + size + updated_tile_ids.append(str(updated_tile_id)) + output_file.write(','.join(updated_tile_ids) + '\n') + diff --git a/src/static/makefile b/src/static/makefile index 6025a55..9a17326 100644 --- a/src/static/makefile +++ b/src/static/makefile @@ -5,8 +5,14 @@ TILEDMK := ../../scripts/tiled.mk.awk TILEMAP2TILED := ../../scripts/tilemap2tiled INPUT += air.hex \ - shop.hex \ - slime.hex \ + background/bricks.hex \ + background/crates.hex \ + background/shop_stall.hex \ + background/shop.hex \ + background/title_screen_icon.hex \ + foreground/title_screen_letteres_large.hex\ + foreground/slime.hex \ + foreground/font.hex \ world.hex USER_META += world.h -- cgit v1.2.3 From dc5e246ff1e8d89e59acf70c149f180fb41dd584 Mon Sep 17 00:00:00 2001 From: NielsCoding <48092678+heavydemon21@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:46:53 +0200 Subject: enemy and ai, bullets and gameplay ai needs finetuning --- src/demo.c | 4 +- src/engine/bullet.c | 40 +++++++++++++++-- src/engine/enemy.c | 10 ++--- src/engine/enemy.h | 5 +-- src/engine/enemy_ai.c | 99 +++++++++++++++++++++++++++++++++++++++++ src/engine/enemy_ai.h | 10 +++++ src/engine/entity.c | 31 +++++++++++-- src/engine/entity.h | 5 ++- src/engine/level_const.c | 2 +- src/engine/player_controller.c | 2 +- src/engine/types.h | 4 ++ src/game_loop/gameplay.c | 46 ++++++++++++++----- src/game_loop/gameplay.h | 3 +- src/game_loop/starting_screen.c | 1 + src/makefile | 1 + 15 files changed, 230 insertions(+), 33 deletions(-) create mode 100644 src/engine/enemy_ai.c create mode 100644 src/engine/enemy_ai.h (limited to 'src/game_loop') diff --git a/src/demo.c b/src/demo.c index aae1729..8e7af93 100644 --- a/src/demo.c +++ b/src/demo.c @@ -65,14 +65,16 @@ void hh_demo_loop(unsigned long frame) { hh_gameplay(&hh_game, &hh_game_states); break; case hh_e_state_game_over: - // todo: + // TODO: // function: show game over screen // function: after time goto high score + hh_game_states = hh_e_state_high_score; break; case hh_e_state_high_score: // todo: // fucntion: show all previously scored points // function: button pressed goto starting screen + hh_game_states = hh_e_state_starting_screen; break; default: hh_game_states = hh_e_state_starting_screen; diff --git a/src/engine/bullet.c b/src/engine/bullet.c index 55b20cc..eb9a8bb 100644 --- a/src/engine/bullet.c +++ b/src/engine/bullet.c @@ -42,12 +42,47 @@ bool rising_edge(bool signal, bool* prev) { return edge; } bool prev_signal = false; +void hh_handle_bullet_direction(hh_entity* bullet){ + bullet->vel = (vec2){0,0}; + if (g_hh_controller_p1.dpad_left) { + if (g_hh_controller_p1.dpad_up) { + bullet->vel.x = -1; + bullet->vel.y = -1; + } else if (g_hh_controller_p1.dpad_down) { + bullet->vel.x = -1; + bullet->vel.y = 1; + } else { + bullet->vel.x = -1; + } + }else if (g_hh_controller_p1.dpad_right) { + if (g_hh_controller_p1.dpad_up) { + bullet->vel.x = 1; + bullet->vel.y = -1; + } else if (g_hh_controller_p1.dpad_down) { + bullet->vel.x = 1; + bullet->vel.y = 1; + } else { + bullet->vel.x = 1; + } + } else if (g_hh_controller_p1.dpad_up){ + bullet->vel.y = -1; + } else if (g_hh_controller_p1.dpad_down){ + bullet->vel.y = 1; + } + else{ + bullet->vel.x = 1; + } + bullet->render.fam.horizontal_flip = (bullet->vel.x < 0); + bullet->render.fam.vertical_flip = (bullet->vel.y != 0); + +} void hh_shoot_bullet(vec2 player, hh_entity* bullet){ vec2 temp; if(rising_edge(g_hh_controller_p1.button_secondary,&prev_signal) && bullet->is_grounded){ bullet->is_grounded=false; bullet->pos = player; current_bullet = (current_bullet + 1) % bullets_size; + hh_handle_bullet_direction(bullet); } } @@ -55,11 +90,10 @@ void hh_shoot_bullet(vec2 player, hh_entity* bullet){ void hh_update_bullet(hh_entity* bullet){ if(hh_background_collision_bulllet(*bullet)){ hh_bullet_death(bullet); - - // printf("x %d y %d\n",(bullet->pos.x-cam_pos.x),(bullet->pos.y-cam_pos.y)); } else{ - bullet->pos.x += bullet->speed; + bullet->pos.x = bullet->pos.x + bullet->vel.x * bullet->speed; + bullet->pos.y = bullet->pos.y + bullet->vel.y * bullet->speed; } } diff --git a/src/engine/enemy.c b/src/engine/enemy.c index 186cfa0..4ed48a2 100644 --- a/src/engine/enemy.c +++ b/src/engine/enemy.c @@ -1,14 +1,9 @@ #include "engine/enemy.h" -void hh_update_enemy(hh_entity* enemy, vec_cor cam_pos){ - //Bjorn functions - -} - -void hh_multiple_enemies( vec_cor cam_pos, hh_entity* enemies, int total_enemies){ +void hh_multiple_enemies(hh_entity* enemies, hh_entity player, vec_cor cam_pos, int total_enemies){ for(int i=0; i < total_enemies;i++){ - hh_update_enemy(&enemies[i] , cam_pos); + hh_update_enemy(&enemies[i] , player, cam_pos); } } @@ -22,6 +17,7 @@ void hh_enemy_death_check(hh_entity* enemy){ enemy->hp--; } } + void hh_solve_hitted_enemies(hh_entity* enemies, int total_enemies){ for(int i = 0; i < total_enemies; i++){ if(enemies[i].is_hit){ diff --git a/src/engine/enemy.h b/src/engine/enemy.h index 80498f5..c8a3f20 100644 --- a/src/engine/enemy.h +++ b/src/engine/enemy.h @@ -1,14 +1,13 @@ #pragma once #include "player_controller.h" #include "engine/sprite_controller.h" +#include "engine/enemy_ai.h" #include "types.h" #include "input.h" -/** @brief updates a single enemy locations TODO: Bjorn sets functions in here*/ -void hh_update_enemy(hh_entity* , vec_cor ); /** @brief calculates all the given enemies positions*/ -void hh_multiple_enemies( vec_cor cam_pos, hh_entity* enemies, int total_enemies); +void hh_multiple_enemies(hh_entity* enemies, hh_entity player, vec_cor cam_pos, int total_enemies); /** @brief checks if the enemy has zero hp else it takes hp from the enemy */ void hh_enemy_death_check(hh_entity* enemy); diff --git a/src/engine/enemy_ai.c b/src/engine/enemy_ai.c new file mode 100644 index 0000000..81d04d9 --- /dev/null +++ b/src/engine/enemy_ai.c @@ -0,0 +1,99 @@ +#include "engine/enemy_ai.h" + +int8_t hh_get_direction(int32_t player_x, int32_t enemy_x){ + int movement_direction = player_x - enemy_x; // = player.pos.x - player.prev_pos.x; + if (movement_direction > 0) { + return 1; // move in positive direction + } else if (movement_direction < 0) { + return -1; // move in negative direction + } else { + return 0; // don't move + } +} +void hh_update_enemy_movement(hh_entity* enemy){ + hh_entity enemy_new = {0}; + enemy_new = *enemy; + enemy_new.vel = (vec2){ + .x = enemy->vel.x, + .y = enemy->vel.y, + }; + + enemy_new.pos = (vec2){ + .x = enemy->pos.x + enemy_new.vel.x, + .y = enemy->pos.y + enemy_new.vel.y, + }; + + + *enemy = hh_background_collision ( *enemy, enemy_new); +} +void hh_slime_ai(hh_entity* enemy, hh_entity player){ + int8_t direction = hh_get_direction(player.pos.x, enemy->pos.x); + if((player.pos.x - enemy->pos.x) >= -hunt_player && (player.pos.x - enemy->pos.x) <= hunt_player){ + hh_movement_entity(enemy, direction); + } + hh_gravity_entity(enemy); + hh_update_enemy_movement(enemy); + +} + +void hh_jump_slime_ai(hh_entity* enemy, hh_entity player){ + int8_t direction = hh_get_direction(player.pos.x, enemy->pos.x); + hh_gravity_entity(enemy); + if((player.pos.x - enemy->pos.x) >= -hunt_player && (player.pos.x - enemy->pos.x) <= hunt_player){ + hh_movement_entity(enemy, direction); + // TODO: fix this if statement and make it cleaner. this makes the enemy jump when the player mets the condition + if((player.pos.y - enemy->pos.y) < -16 && (player.pos.y - enemy->pos.y) >= -100 && (player.pos.x - enemy->pos.x) >= -10 && (player.pos.x - enemy->pos.x) <= 10){ + hh_jump_entity(enemy); + } + } + + hh_update_enemy_movement(enemy); + +} +#define terror_owl_attack_timer 100 +#define terror_owl_follow_player_delay 5 +#define terror_owl_attack_player_delay 12 +#define terror_owl_dive_speed 3 +#define delay_frames 2 +#define terror_owl_minimal_distance_from_player 100 +void hh_terror_owl_ai(hh_entity* enemy, hh_entity player){ + static int count=0; + static int last_y_location=0; + + if (count < terror_owl_attack_timer) { + // Move towards player position smoothly + int delta_x = (-50 + player.pos.x - enemy->pos.x) / terror_owl_follow_player_delay; + enemy->pos.x += delta_x; + enemy->pos.y = player.pos.y - terror_owl_minimal_distance_from_player; + + count++; + last_y_location=player.pos.y; + } else { + if(enemy->pos.y <= last_y_location){ + int delta_x = (player.pos.x - enemy->pos.x) / terror_owl_attack_player_delay; + enemy->pos.x += delta_x; + enemy->pos.y += terror_owl_dive_speed; + } + else{ + count = 0; + } + } + +} +void hh_update_enemy(hh_entity* enemy , hh_entity player, vec_cor cam_pos){ + // static hh_e_entity_type type; + switch (enemy->object_type) + { + case slime: + hh_slime_ai(enemy,player); + break; + case jumping_slime: + hh_jump_slime_ai(enemy,player); + break; + case terror_owl: + hh_terror_owl_ai(enemy,player); + break; + default: + break; + } +} diff --git a/src/engine/enemy_ai.h b/src/engine/enemy_ai.h new file mode 100644 index 0000000..d68f50f --- /dev/null +++ b/src/engine/enemy_ai.h @@ -0,0 +1,10 @@ +#pragma once +#include "player_controller.h" +#include "engine/sprite_controller.h" +#include "types.h" +#include "input.h" +#include + + +#define hunt_player 100 +void hh_update_enemy(hh_entity* enemy , hh_entity player, vec_cor cam_pos); diff --git a/src/engine/entity.c b/src/engine/entity.c index 1cb88be..eba6481 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -43,6 +43,7 @@ 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_new_entity.is_grounded = false; @@ -119,6 +120,7 @@ bool hh_background_collision_bulllet (hh_entity temp_old_entity){ // temp_old_entity.vel = temp_new_entity.vel; return false; } + 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); @@ -138,7 +140,7 @@ hh_entity hh_enemy_collision(hh_entity temp_player, hh_entity temp_enemy){ temp_player.vel.x = 8; } // ghost mode / invulnerable or other things on hit - // temp_player.hp--; + temp_player.hp--; } else { temp_player.is_hit = false; @@ -170,14 +172,35 @@ void hh_jump_entity(hh_entity* object_1){ } } void hh_gravity_entity(hh_entity* object_1){ - if (object_1->is_grounded == false && object_1->vel.y < 6) { + if (object_1->is_grounded == false) { object_1->vel.y += 1; //gravity } } -void hh_hit_entity(hh_entity* object_1, int8_t* hit_timer, int8_t* direction){ + +void hh_movement_entity(hh_entity* object_1, int8_t* direction){ + if(direction != 0){ + if(object_1->vel.x > -1 * object_1->speed && object_1->vel.x < object_1->speed) { + object_1->vel.x = object_1->vel.x + direction; + } else { + if (object_1->vel.x > 0) { + object_1->vel.x--; + } else if(object_1->vel.x < 0) { + object_1->vel.x++; + } + } + } else { + if (object_1->vel.x > 0) { + object_1->vel.x--; + } else if(object_1->vel.x < 0) { + object_1->vel.x++; + } + } + +} +void hh_player_move_hit(hh_entity* object_1, int8_t* hit_timer, int8_t* direction){ if(object_1->is_hit == true){ hit_timer = 9; - object_1->is_hit = false; + //object_1->is_hit = false; } if(hit_timer > -10){ hit_timer--; diff --git a/src/engine/entity.h b/src/engine/entity.h index fde9341..fb1c905 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -51,9 +51,12 @@ void hh_jump_entity(hh_entity* ); /** @brief looks if the player is grounded and if not it sets the position down */ void hh_gravity_entity(hh_entity* ); /** @brief if object is hit bounches in specific direction and moves the object */ -void hh_hit_entity(hh_entity* object_1, int8_t* hit_timer, int8_t* direction); +void hh_player_move_hit(hh_entity* object_1, int8_t* hit_timer, int8_t* direction); + +void hh_movement_entity(hh_entity* object_1, int8_t* direction); /** @brief specific bullet background collisions detection */ bool hh_background_collision_bulllet (hh_entity temp_old_entity); /** @brief checks any entity has a hit on each othe*/ void hh_check_all_collisions(hh_entity* player, hh_entity* enemies, int total_enemies, hh_entity* bullets, int total_bullets, vec_cor cam_pos); + diff --git a/src/engine/level_const.c b/src/engine/level_const.c index 896d0e0..a6a7c84 100644 --- a/src/engine/level_const.c +++ b/src/engine/level_const.c @@ -4,7 +4,7 @@ hh_g_all_levels hh_init_game_levels(){ hh_g_all_levels levels; - levels.current_level=0; + levels.current_level=1; levels.level[0].size.x=40; levels.level[0].size.y=100; diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c index 83c5966..5b0da99 100644 --- a/src/engine/player_controller.c +++ b/src/engine/player_controller.c @@ -16,7 +16,7 @@ void hh_player_actions(hh_entity* player){ 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); - hh_hit_entity(player,hit_timer,direction_x); + hh_player_move_hit(player,hit_timer,direction_x); hh_gravity_entity(player); if(g_hh_controller_p1.button_primary){ hh_jump_entity(player); diff --git a/src/engine/types.h b/src/engine/types.h index 00b381b..8040e46 100644 --- a/src/engine/types.h +++ b/src/engine/types.h @@ -4,6 +4,9 @@ typedef uint8_t hh_ppu_fg_idx; // typedef uint16_t hh_bg_idx; +typedef enum { + slime, jumping_slime, terror_owl, +}hh_e_all_objects_game_type; typedef enum { fire, ice, poison @@ -31,6 +34,7 @@ typedef struct { vec2 pos, vel, size; bool is_grounded; bool is_hit; + hh_e_all_objects_game_type object_type; uint8_t radius; int8_t hp; int8_t speed; diff --git a/src/game_loop/gameplay.c b/src/game_loop/gameplay.c index da029f3..b7da04f 100644 --- a/src/game_loop/gameplay.c +++ b/src/game_loop/gameplay.c @@ -1,6 +1,5 @@ #include "gameplay.h" #include "engine/entity.h" -// player struct void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state){ @@ -11,7 +10,7 @@ void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state){ .speed = 6, .is_grounded = false, .is_hit = false, - .radius = 8, + .radius = 16, .pos = (vec2){32,32}, .size = (vec2){32,32}, .vel = (vec2){0,0}, @@ -28,12 +27,13 @@ void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state){ }; // enemy gets replaced here is just for reference static hh_entity enemy={ + .object_type = jumping_slime, .hp = 4, - .speed = 6, + .speed = 2, .is_grounded = false, .is_hit = false, .radius = 8, - .pos = (vec2){128,24}, + .pos = (vec2){200,200}, .size = (vec2){16,16}, .vel = (vec2){0,0}, // .vec = (vec2){0,0}, @@ -52,19 +52,17 @@ void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state){ switch (gameplay) { case hh_e_setup_screen: - printf("%d\n",game->current_level); bullets = hh_init_bullets(total_bullets); hh_setup_screen(game->level[game->current_level]); gameplay = hh_e_play_level; - enemy.hp=4; break; case hh_e_play_level: - // TODO: here come all the different functions for the gameplay - vec_cor cam_pos;//value in tiles + + vec_cor cam_pos; cam_pos = hh_draw_screen(player1.pos); hh_player_actions(&player1); hh_multiple_bullets(player1.pos,bullets); - hh_multiple_enemies(cam_pos, &enemy,1); + hh_multiple_enemies(&enemy, player1, cam_pos, 1); hh_check_all_collisions(&player1,&enemy,1,bullets,total_bullets,cam_pos); hh_solve_hitted_enemies(&enemy,1); hh_render_all_entities(&player1,bullets,&enemy,total_bullets,1, cam_pos); @@ -74,19 +72,24 @@ void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state){ if(game->level[game->current_level].hh_level_completed){ gameplay = hh_e_level_complete; } + else if(player1.hp == 0){ + gameplay = hh_e_game_over; + } break; case hh_e_level_complete: + // TODO: from complete to shop or game_over if(game->current_level < 3){ game->current_level+=1; gameplay = hh_e_setup_screen; } else { + gameplay = hh_e_game_over; } break; case hh_e_game_over: // todo make reset levels - hh_reset_levels(); + hh_reset_levels(&player1); gameplay = hh_e_setup_screen; *hh_game_state = hh_e_state_game_over; break; @@ -95,7 +98,28 @@ void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state){ } } -void hh_reset_levels(){} +void hh_reset_levels(hh_entity* player){ + *player = (hh_entity){ + .hp = 4, + .speed = 6, + .is_grounded = false, + .is_hit = false, + .radius = 16, + .pos = (vec2){32,32}, + .size = (vec2){32,32}, + .vel = (vec2){0,0}, + .render = { + .frame0 = 3, + .palette = 3, + .fam = (hh_s_ppu_loc_fam_entry){ + .horizontal_flip = false, + .vertical_flip = false, + .palette_index = 3, + .tilemap_index = 80, + } + } + }; +} void hh_render_all_entities(hh_entity* player, hh_entity* bullets, hh_entity* enemies, int bullet_size, int enemy_size, vec_cor cam_pos){ diff --git a/src/game_loop/gameplay.h b/src/game_loop/gameplay.h index 9d66c37..8adddb4 100644 --- a/src/game_loop/gameplay.h +++ b/src/game_loop/gameplay.h @@ -15,8 +15,9 @@ typedef enum { hh_e_level_complete, hh_e_game_over, }hh_e_gameplay; + /** @brief resets all the levels the first condition */ -void hh_reset_levels(); +void hh_reset_levels(hh_entity* player); /** @brief game loop function to handle the gameplay*/ void hh_gameplay(hh_g_all_levels* game, hh_e_game_state* hh_game_state); /** @brief renders all the entities*/ diff --git a/src/game_loop/starting_screen.c b/src/game_loop/starting_screen.c index c11e4fc..d9f8ea6 100644 --- a/src/game_loop/starting_screen.c +++ b/src/game_loop/starting_screen.c @@ -11,6 +11,7 @@ bool hh_show_starting_screen(){ { case hh_e_state_show: hh_clear_screen(); + hh_clear_sprite(); hh_init_title_screen(); hh_e_starting_screen = hh_e_state_input; return false; diff --git a/src/makefile b/src/makefile index fdd8ab5..7f2cdc1 100644 --- a/src/makefile +++ b/src/makefile @@ -42,6 +42,7 @@ LOCAL_SRCS += main.c \ engine/title_screen.c \ engine/level_const.c \ engine/enemy.c \ + engine/enemy_ai.c \ engine/animator.c \ game_loop/shop.c \ game_loop/gameplay.c \ -- cgit v1.2.3