diff options
author | Astatin <[email protected]> | 2025-06-10 18:27:13 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-06-10 18:27:13 +0200 |
commit | a9142d0163f41c89196ea201ce8245899c701b82 (patch) | |
tree | fee05913dc30343798c4ccc9062ece30bdacbbec | |
parent | 9690f6f39bdabcaa62211fd10027c3dba3169e94 (diff) |
Add support for multi bank data
-rw-r--r-- | definitions.gbasm | 65 | ||||
-rw-r--r-- | dialogues/dialogues.gbasm | 254 | ||||
-rw-r--r-- | dialogues/functions.gbasm | 261 | ||||
-rw-r--r-- | dialogues/game.gbasm | 26 | ||||
-rw-r--r-- | dialogues/utils.gbasm | 8 | ||||
-rw-r--r-- | entity/init.gbasm | 28 | ||||
-rw-r--r-- | entity/list.gbasm | 21 | ||||
-rw-r--r-- | gui.gbasm | 5 | ||||
-rw-r--r-- | main.gbasm | 10 | ||||
-rw-r--r-- | map/dungeons.gbasm | 99 | ||||
-rw-r--r-- | map/dungeons/morningforest.gbasm | 12 | ||||
-rw-r--r-- | map/generationevents.gbasm | 30 | ||||
-rw-r--r-- | map/loaddungeon.gbasm | 88 | ||||
-rw-r--r-- | map/maps/test.ldtk | 577 | ||||
-rw-r--r-- | map/maps/test/backups/a44281a0-3740-11f0-9e9d-278017e89d25_2025-06-06_14-16-58_crash/test.ldtk | 485 | ||||
-rw-r--r-- | map/objects.gbasm | 10 | ||||
-rw-r--r-- | modes/dungeongeneration.gbasm | 8 | ||||
-rw-r--r-- | modes/maploading.gbasm | 13 | ||||
-rw-r--r-- | playerattacks.gbasm | 30 | ||||
-rw-r--r-- | sprites/bg/tree-tileset-16x16.png | bin | 0 -> 585 bytes | |||
-rw-r--r-- | tiles.gbasm | 22 | ||||
-rw-r--r-- | utils.gbasm | 20 |
22 files changed, 1347 insertions, 725 deletions
diff --git a/definitions.gbasm b/definitions.gbasm index b9e3c68..20724dc 100644 --- a/definitions.gbasm +++ b/definitions.gbasm @@ -12,6 +12,7 @@ .DEFINE reg_window_y ($4a) .DEFINE reg_window_x ($4b) .DEFINE reg_interrupt_enable ($ff) +.DEFINE reg_rom_bank ($2000) .DEFINE VRAM_start $8000 .DEFINE OAM_start $FE00 @@ -21,6 +22,8 @@ .DEFINE dungeon_generation_step $20 .DEFINE intial_duplication_probablity $01 +.DEFINE entity_sprite_data_bank $01 + .DEFINE mem_button_direction ($c002) .DEFINE mem_button_action ($c003) .DEFINE mem_moving_animation_step ($c004) @@ -133,7 +136,7 @@ .DEFINE mem_floor_count ($c03c) -.DEFINE mem_loop_frame_timer ($c03d) +.DEFINE mem_dialogue_script_bank ($c03d) .DEFINE mem_dialogue_script_program_counter $c03e ; takes c03e and c03f @@ -147,13 +150,16 @@ .DEFINE mem_number_of_attacks ($c047) .DEFINE mem_cursor_max_position ($c048) -.DEFINE mem_learn_attack_dialogue_ret_ptr $c049 ; Takes $c049 and $c04a -.DEFINE mem_learn_attack_attack_name_ptr $c04b ; Takes $c04b and $c04c +.DEFINE mem_learn_attack_dialogue_ret_ptr $c049 ; Takes $c049 and $c04b (bank + ptr) +.DEFINE mem_learn_attack_attack_name_ptr $c04c ; Takes $c04c and $c04e (bank + ptr) + +.DEFINE mem_loop_frame_timer ($c04f) + +.DEFINE mem_bunny_status_tile ($c050) -.DEFINE mem_entity_spawning_pattern ($c04d) -.DEFINE mem_floor_count_bin ($c04e) +.DEFINE mem_floor_count_bin ($c051) -.DEFINE mem_bunny_status_tile ($c04f) +.DEFINE mem_entity_spawning_pattern ($c052) ; ## WARNING THE SPACE BETWEEN $c400 and $c800 is used as a buffer for the loading map function during dungeon generation .DEFINE mem_map_loading_buffer $c400 @@ -198,20 +204,6 @@ ; _padding: u32 ; } -.DEFINE mem_dungeon_generation_events $c9c0 ; Takes the memory from c9c0 to c9ff (16 events) -; struct events { -; floor_idx: u8, -; -; dungeon_gen_event_jump_table_index: u8 -; 00: Nothing -; 01: Start dialogue at the beggining -; 02: Spawn a special entity (should not be used twice on the same floor -; -; free_parameters: (u16) -; 01: Dialogue script address -; 02: Entity template index (u8 + padding8) -; } - .DEFINE mem_oam_buffer $ca00 ; Until $ca9f .DEFINE mem_oam_buffer_low ($c980) @@ -282,6 +274,23 @@ ; health, max health, list of possible attacks, maybe remaining attacks ? AI status (blind, scared, slow, etc..) ; } +.DEFINE mem_dungeon_generation_events $cc80 ; Takes the memory from cc80 to ccff (16 events) +; struct events { +; floor_idx: u8, +; +; dungeon_gen_event_jump_table_index: u8 +; 00: Nothing +; 01: Start dialogue at the beggining +; 02: Spawn a special entity (should not be used twice on the same floor +; 03: Remove stairs +; +; free_parameters: (u24) +; 01: Dialogue script address (bank + address) +; 02: Entity template index (u8 + padding16) + +; _padding: u24 +; } + .DEFINE dbg_var ($dfff) .DEFINE enum_direction_left $01 @@ -319,13 +328,15 @@ ; HIGH_RAM: ; -; 80-85 ; Free to use as temporary variables -.DEFINE tmp_var_1 ($80) -.DEFINE tmp_var_2 ($81) -.DEFINE tmp_var_3 ($82) -.DEFINE tmp_var_4 ($83) -.DEFINE tmp_var_5 ($84) -.DEFINE tmp_var_6 ($85) +.DEFINE saved_rom_bank ($80) + +; 81-86 ; Free to use as temporary variables +.DEFINE tmp_var_1 ($81) +.DEFINE tmp_var_2 ($82) +.DEFINE tmp_var_3 ($83) +.DEFINE tmp_var_4 ($84) +.DEFINE tmp_var_5 ($85) +.DEFINE tmp_var_6 ($86) ; 86-90 ; OAM_DMA_Transfer_routine .DEFINE OAM_DMA_Transfer_routine $ff86 diff --git a/dialogues/dialogues.gbasm b/dialogues/dialogues.gbasm index 02b6f79..1f974cf 100644 --- a/dialogues/dialogues.gbasm +++ b/dialogues/dialogues.gbasm @@ -1,255 +1,3 @@ -Dialogue_script_step: - LD A, ($mem_dialogue_script_program_counter) - LD H, A - LD A, ($mem_dialogue_script_program_counter+1) - LD L, A - - .next: - LD A, (HL+) - - LD BC, =Dialogue_script_instruction_Jump_Table - - .JUMP_TABLE - - LD A, H - LD ($mem_dialogue_script_program_counter), A - LD A, L - LD ($mem_dialogue_script_program_counter+1), A - - RET - -Dialogue_script_instruction_Jump_Table: - ; 00 - JP =Exit_Menu - NOP - - ; 01 - JP =.Text - NOP - - ; 02 - JP =.TextB - NOP - - ; 03 - JP =.Learn_Attack - NOP - - ; 04 - JP =.TextB_Indirect - NOP - - ; 05 - JP =.Learn_Attack_Return - NOP - - .Text: - PUSH HL - LD HL, $dialogue_first_line - LD BC, $12 - CALL =bzero - POP HL - - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - PUSH HL - LD HL, $dialogue_first_line - CALL =Print_str - POP HL - - PUSH HL - LD HL, $dialogue_third_line - LD BC, $12 - CALL =bzero - POP HL - - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - PUSH HL - LD HL, $dialogue_third_line - CALL =Print_str - POP HL - - LD A, $mem_display_flag - AND $40 ; Keeping the object ones - OR $05 - LD $mem_display_flag, A - - RET - - .TextB: - PUSH HL - LD HL, $dialogue_first_line - LD BC, $12 - CALL =bzero - POP HL - - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - PUSH HL - LD HL, $dialogue_first_line - CALL =Print_str - POP HL - - PUSH HL - LD HL, $dialogue_third_line - LD BC, $12 - CALL =bzero - POP HL - - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - PUSH HL - LD HL, $dialogue_third_line - CALL =Print_str - POP HL - - LD A, $mem_display_flag - AND $40 ; Keeping the object ones - OR $07 - LD $mem_display_flag, A - - RET - - .TextB_Indirect: - PUSH HL - LD HL, $dialogue_first_line - LD BC, $12 - CALL =bzero - POP HL - - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - PUSH DE - LD A, (BC) - LD D, A - INC BC - LD A, (BC) - LD E, A - LD B, D - LD C, E - POP DE - PUSH HL - LD HL, $dialogue_first_line - CALL =Print_str - POP HL - - - PUSH HL - LD HL, $dialogue_third_line - LD BC, $12 - CALL =bzero - POP HL - - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - PUSH HL - LD HL, $dialogue_third_line - CALL =Print_str - POP HL - - LD A, $mem_display_flag - AND $40 ; Keeping the object ones - OR $07 - LD $mem_display_flag, A - - RET - - .Learn_Attack: - LD A, (HL+) - LD E, A - - LD B, $00 - LD C, A - SLA C - RR B - SLA C - RR B - SLA C - RR B - LD A, C - ADD low(=Attack_List) - LD C, A - LD A, B - ADC high(=Attack_List) - LD B, A - - LD A, (BC) - LD ($mem_learn_attack_attack_name_ptr), A - INC BC - LD A, (BC) - LD ($mem_learn_attack_attack_name_ptr+1), A - - LD A, H - LD ($mem_learn_attack_dialogue_ret_ptr), A - LD A, L - LD ($mem_learn_attack_dialogue_ret_ptr+1), A - - CALL =Check_attack_already_learnt - CP $01 - JR Z, =.Learn_Attack.Duplicate - - LD A, $mem_number_of_attacks - CP $04 - JR NC, =.Learn_Attack.Not_enough_slot - - .Learn_Attack.Success: - LD A, $mem_number_of_attacks - LD HL, $mem_bunny_attacks - ADD L - LD L, A - LD (HL), E - LD A, $mem_number_of_attacks - INC A - LD $mem_number_of_attacks, A - - LD HL, =.Learn_Attack.Dialogue - JP =Dialogue_script_step.next - .Learn_Attack.Dialogue: - .TEXT =New_attack_1t =New_attack_1b - .TEXTB_INDIRECT $mem_learn_attack_attack_name_ptr =Double_Exclamation - .LEARN_ATTACK_RET - - - .Learn_Attack.Not_enough_slot: - - LD HL, =.Learn_Attack.Not_enough_slot.Dialogue - JP =Dialogue_script_step.next - .Learn_Attack.Not_enough_slot.Dialogue: - .TEXT =No_attslot_1t =No_attslot_1b - .TEXTB_INDIRECT $mem_learn_attack_attack_name_ptr =Double_Exclamation - .TEXT =No_attslot_3t =No_attslot_3b - .TEXT =No_attslot_4t =Empty - .LEARN_ATTACK_RET - - .Learn_Attack.Duplicate: - LD HL, =.Learn_Attack.Duplicate.Dialogue - JP =Dialogue_script_step.next - .Learn_Attack.Duplicate.Dialogue: - .TEXT =dup_attack_1t =dup_attack_1b - .TEXTB_INDIRECT $mem_learn_attack_attack_name_ptr =Double_Exclamation - .TEXT =dup_attack_3t =dup_attack_3b - .TEXT =dup_attack_4t =Empty - .LEARN_ATTACK_RET - - .Learn_Attack_Return: - LD A, ($mem_learn_attack_dialogue_ret_ptr) - LD H, A - LD A, ($mem_learn_attack_dialogue_ret_ptr+1) - LD L, A - JP =Dialogue_script_step.next - .INCLUDE "dialogues/text.gbasm" +.INCLUDE "dialogues/game.gbasm" .INCLUDE "dialogues/demo_quest.gbasm" diff --git a/dialogues/functions.gbasm b/dialogues/functions.gbasm new file mode 100644 index 0000000..366abf9 --- /dev/null +++ b/dialogues/functions.gbasm @@ -0,0 +1,261 @@ +Dialogue_script_step: + .ASSERT bank(.) $00 + + LD A, $mem_dialogue_script_bank + .CHANGE_BANK_TO_A + LD A, ($mem_dialogue_script_program_counter) + LD H, A + LD A, ($mem_dialogue_script_program_counter+1) + LD L, A + + .next: + LD A, (HL+) + + LD BC, =Dialogue_script_instruction_Jump_Table + + .JUMP_TABLE + + LD A, H + LD ($mem_dialogue_script_program_counter), A + LD A, L + LD ($mem_dialogue_script_program_counter+1), A + + RET + +Dialogue_script_instruction_Jump_Table: + ; 00 + JP =Exit_Menu + NOP + + ; 01 + JP =.Text + NOP + + ; 02 + JP =.TextB + NOP + + ; 03 + JP =.Learn_Attack + NOP + + ; 04 + JP =.TextB_Indirect + NOP + + ; 05 + JP =.Learn_Attack_Return + NOP + + .Text: + PUSH HL + LD HL, $dialogue_first_line + LD BC, $12 + CALL =bzero + POP HL + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + PUSH HL + LD HL, $dialogue_first_line + CALL =Print_str + POP HL + + PUSH HL + LD HL, $dialogue_third_line + LD BC, $12 + CALL =bzero + POP HL + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + PUSH HL + LD HL, $dialogue_third_line + CALL =Print_str + POP HL + + LD A, $mem_display_flag + AND $40 ; Keeping the object ones + OR $05 + LD $mem_display_flag, A + + RET + + .TextB: + PUSH HL + LD HL, $dialogue_first_line + LD BC, $12 + CALL =bzero + POP HL + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + PUSH HL + LD HL, $dialogue_first_line + CALL =Print_str + POP HL + + PUSH HL + LD HL, $dialogue_third_line + LD BC, $12 + CALL =bzero + POP HL + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + PUSH HL + LD HL, $dialogue_third_line + CALL =Print_str + POP HL + + LD A, $mem_display_flag + AND $40 ; Keeping the object ones + OR $07 + LD $mem_display_flag, A + + RET + + .TextB_Indirect: + PUSH HL + LD HL, $dialogue_first_line + LD BC, $12 + CALL =bzero + POP HL + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + + LD A, $saved_rom_bank + LD $tmp_var_1, A + + LD A, (BC) + .CHANGE_BANK_TO_A + INC BC + + PUSH DE + LD A, (BC) + LD D, A + INC BC + LD A, (BC) + LD E, A + LD B, D + LD C, E + POP DE + + PUSH HL + LD HL, $dialogue_first_line + CALL =Print_str + POP HL + + LD A, $tmp_var_1 + .CHANGE_BANK_TO_A + + PUSH HL + LD HL, $dialogue_third_line + LD BC, $12 + CALL =bzero + POP HL + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + PUSH HL + LD HL, $dialogue_third_line + CALL =Print_str + POP HL + + LD A, $mem_display_flag + AND $40 ; Keeping the object ones + OR $07 + LD $mem_display_flag, A + + RET + + .Learn_Attack: + LD A, (HL+) + LD E, A + + LD B, $00 + LD C, A + SLA C + RR B + SLA C + RR B + SLA C + RR B + LD A, C + ADD low(=Attack_List) + LD C, A + LD A, B + ADC high(=Attack_List) + LD B, A + + ; TODO: FIX BANK SHENANIGANS + + LD A, (BC) + LD ($mem_learn_attack_attack_name_ptr), A + INC BC + LD A, (BC) + LD ($mem_learn_attack_attack_name_ptr+1), A + INC BC + LD A, (BC) + LD ($mem_learn_attack_attack_name_ptr+2), A + + LD A, $mem_dialogue_script_bank + LD ($mem_learn_attack_dialogue_ret_ptr), A + LD A, H + LD ($mem_learn_attack_dialogue_ret_ptr+1), A + LD A, L + LD ($mem_learn_attack_dialogue_ret_ptr+2), A + + CALL =Check_attack_already_learnt + CP $01 + JR Z, =.Learn_Attack.Duplicate + + LD A, $mem_number_of_attacks + CP $04 + JR NC, =.Learn_Attack.Not_enough_slot + + .Learn_Attack.Success: + LD A, $mem_number_of_attacks + LD HL, $mem_bunny_attacks + ADD L + LD L, A + LD (HL), E + LD A, $mem_number_of_attacks + INC A + LD $mem_number_of_attacks, A + + LD HL, ptr(=Learn_Attack_Dialogue_Script) + .LOAD_BANK_OF =Learn_Attack_Dialogue_Script + JP =Dialogue_script_step.next + + .Learn_Attack.Not_enough_slot: + LD HL, ptr(=Learn_Attack_Not_Enough_Slot_Dialogue_Script) + .LOAD_BANK_OF =Learn_Attack_Not_Enough_Slot_Dialogue_Script + JP =Dialogue_script_step.next + + .Learn_Attack.Duplicate: + LD HL, ptr(=Learn_Attack_Duplicate_Dialogue_Script) + .LOAD_BANK_OF =Learn_Attack_Duplicate_Dialogue_Script + JP =Dialogue_script_step.next + + .Learn_Attack_Return: + LD A, ($mem_learn_attack_dialogue_ret_ptr) + .CHANGE_BANK_TO_A + LD A, ($mem_learn_attack_dialogue_ret_ptr+1) + LD H, A + LD A, ($mem_learn_attack_dialogue_ret_ptr+2) + LD L, A + JP =Dialogue_script_step.next diff --git a/dialogues/game.gbasm b/dialogues/game.gbasm new file mode 100644 index 0000000..704f19c --- /dev/null +++ b/dialogues/game.gbasm @@ -0,0 +1,26 @@ +Fimsh_Dialogue_Script: + .TEXT =fimsh_eegg_1t =fimsh_eegg_1b + .TEXT =fimsh_eegg_2t =Empty + .TEXT =fimsh_eegg_3t =fimsh_eegg_3b + .TEXT =fimsh_eegg_4t =Empty + .END + +Learn_Attack_Dialogue_Script: + .TEXT =New_attack_1t =New_attack_1b + .TEXTB_INDIRECT $mem_learn_attack_attack_name_ptr =Double_Exclamation + .LEARN_ATTACK_RET + +Learn_Attack_Not_Enough_Slot_Dialogue_Script: + .TEXT =No_attslot_1t =No_attslot_1b + .TEXTB_INDIRECT $mem_learn_attack_attack_name_ptr =Double_Exclamation + .TEXT =No_attslot_3t =No_attslot_3b + .TEXT =No_attslot_4t =Empty + .LEARN_ATTACK_RET + +Learn_Attack_Duplicate_Dialogue_Script: + .TEXT =dup_attack_1t =dup_attack_1b + .TEXTB_INDIRECT $mem_learn_attack_attack_name_ptr =Double_Exclamation + .TEXT =dup_attack_3t =dup_attack_3b + .TEXT =dup_attack_4t =Empty + .LEARN_ATTACK_RET + diff --git a/dialogues/utils.gbasm b/dialogues/utils.gbasm index 51c0083..051c0c8 100644 --- a/dialogues/utils.gbasm +++ b/dialogues/utils.gbasm @@ -1,7 +1,9 @@ -.MACRODEF START_SCRIPT script - LD A, high($script) +.MACRODEF START_SCRIPT =script + LD A, bank(=script) + LD $mem_dialogue_script_bank, A + LD A, high(ptr(=script)) LD ($mem_dialogue_script_program_counter), A - LD A, low($script) + LD A, low(ptr(=script)) LD ($mem_dialogue_script_program_counter+1), A CALL =Dialogue_script_step .END diff --git a/entity/init.gbasm b/entity/init.gbasm index e0272be..6e75082 100644 --- a/entity/init.gbasm +++ b/entity/init.gbasm @@ -36,29 +36,7 @@ Initialize_Entities: LD A, $tmp_var_1 LD $mem_bunny_current_room_idx, A - CALL =Reset_Entities_Collision_Map - -Reset_viewport_thingies: - LD A, $mem_bunny_x - SUB $05 - LD $mem_viewport_x, A - - LD A, $mem_bunny_y - SUB $04 - LD $mem_viewport_y, A - - LD A, $mem_viewport_x - SWAP A - AND $f0 - OR $08 - LD $mem_prepared_viewport_x, A - - LD A, $mem_viewport_y - SWAP A - AND $f0 - OR $08 - LD $mem_prepared_viewport_y, A - + JP =Reset_Entities_Collision_Map RET Initialize_Bunny_Random_room: @@ -158,10 +136,8 @@ Initialize_Entity: ; HL => pointer to entity struct, A => entity loaded index, 1 POP BC - INC HL - ; Direction - LD A, $03 + LD A, $33 LD (HL+), A LD A, E diff --git a/entity/list.gbasm b/entity/list.gbasm index 34e9a77..7623b39 100644 --- a/entity/list.gbasm +++ b/entity/list.gbasm @@ -1,7 +1,12 @@ +.MACRODEF SPRITE =sprite_addr + .ASSERT bank(=sprite_addr) $entity_sprite_data_bank + .DB ptr(=sprite_addr) +.END + Entity_list: .Fox: ; Sprite address - .DB =Entity_Tile_Image_Data.Fox + .SPRITE =Entity_Tile_Image_Data.Fox ; Turn Jump Table index .DB $02 @@ -25,7 +30,7 @@ Entity_list: .Frog: ; Sprite address - .DB =Entity_Tile_Image_Data.Frog + .SPRITE =Entity_Tile_Image_Data.Frog ; Turn Jump Table index .DB $08 @@ -49,7 +54,7 @@ Entity_list: .Cat: ; Sprite address - .DB =Entity_Tile_Image_Data.Cat + .SPRITE =Entity_Tile_Image_Data.Cat ; Turn Jump Table index .DB $03 @@ -73,7 +78,7 @@ Entity_list: .Penguin: ; Sprite address - .DB =Entity_Tile_Image_Data.Penguin + .SPRITE =Entity_Tile_Image_Data.Penguin ; Turn Jump Table index .DB $04 @@ -97,7 +102,7 @@ Entity_list: .Mouse: ; Sprite address - .DB =Entity_Tile_Image_Data.Mouse + .SPRITE =Entity_Tile_Image_Data.Mouse ; Turn Jump Table index .DB $07 @@ -121,7 +126,7 @@ Entity_list: .Fimsh: ; Sprite address - .DB =Entity_Tile_Image_Data.Fimsh + .SPRITE =Entity_Tile_Image_Data.Fimsh ; Turn Jump Table index .DB $06 @@ -145,7 +150,7 @@ Entity_list: .QuestGoalBunny: ; Sprite address - .DB =Entity_Tile_Image_Data.Bunny + .SPRITE =Entity_Tile_Image_Data.Bunny ; Turn Jump Table index .DB $05 @@ -169,7 +174,7 @@ Entity_list: .Bug: ; Sprite address - .DB =Entity_Tile_Image_Data.Bug + .SPRITE =Entity_Tile_Image_Data.Bug ; Turn Jump Table index .DB $09 @@ -64,6 +64,9 @@ Init_Attack_Menu: ADC D LD H, A + LD A, (HL+) + .CHANGE_BANK_TO_A + ; Printing txt into dialogue buffer LD A, (HL+) LD B, A @@ -222,7 +225,7 @@ Reload_EP_Cost: LD H, A LD A, L - ADD $04 + ADD $05 LD L, A LD A, H ADC $00 @@ -121,11 +121,11 @@ Entrypoint: CALL =Load_Tile - JP =Map_Loading + JP =New_Dungeon +.INCLUDE "utils.gbasm" .INCLUDE "tiles.gbasm" .INCLUDE "rng.gbasm" -.INCLUDE "utils.gbasm" .INCLUDE "dialogues/utils.gbasm" .INCLUDE "buttons.gbasm" .INCLUDE "map/utils.gbasm" @@ -133,7 +133,6 @@ Entrypoint: .INCLUDE "map/generation.gbasm" .INCLUDE "map/objects.gbasm" .INCLUDE "map/generationevents.gbasm" -.INCLUDE "map/dungeons.gbasm" .INCLUDE "gui.gbasm" .INCLUDE "modes/vblank_handler_list.gbasm" .INCLUDE "entity/utils.gbasm" @@ -146,7 +145,12 @@ Entrypoint: .INCLUDE "animation.gbasm" .INCLUDE "playerattacks.gbasm" .INCLUDE "enemiesattacks.gbasm" +.INCLUDE "dialogues/functions.gbasm" +.INCLUDE "map/loaddungeon.gbasm" + +.PADTO $4000 .INCLUDE "tileset.gbasm" .INCLUDE "text.gbasm" .INCLUDE "dialogues/dialogues.gbasm" .INCLUDE "map/maps.gbasm" +.INCLUDE "map/dungeons.gbasm" diff --git a/map/dungeons.gbasm b/map/dungeons.gbasm index 5fb5a2c..4a37830 100644 --- a/map/dungeons.gbasm +++ b/map/dungeons.gbasm @@ -1,98 +1 @@ -Load_Dungeon_Txt: ; pointer to Dungeon struct in HL - LD A, (HL+) - LD B, A - LD A, (HL+) - LD C, A - - PUSH BC - LD H, B - LD L, C - - CALL =strlen - LD B, A - - LD A, $14 - SUB B - SRA A - - LD HL, $9e80 - ADD L - LD L, A - LD A, H - ADC $00 - LD H, A - POP BC - CALL =Print_str - - RET - -Load_Dungeon_Spawn_patterns: ; pointer to Dungeon struct in HL - INC HL - INC HL - INC HL - - ; TODO FIX THE THING WHEN THERE'S MORE THAN 256/7 FLOORS - LD A, $mem_floor_count_bin - LD C, A - LD B, $07 - CALL =MUL - LD C, A - LD B, (HL) - CALL =MUL - CALL =RNG_Step - AND $01 - ADD E - LD E, A - LD D, $00 - LD B, D - LD C, E - SLA E - RL D - SLA E - RL D - LD A, E - ADD C - LD E, A - LD A, D - ADC B - LD D, A - - - INC HL - LD A, L - ADD E - LD L, A - LD A, H - ADC D - LD H, A - - LD BC, $mem_loaded_enemies_indices - LD A, (HL+) - LD (BC), A - INC BC - LD A, (HL+) - LD (BC), A - INC BC - LD A, (HL+) - LD (BC), A - INC BC - LD A, (HL+) - LD (BC), A - - LD A, (HL) - LD $mem_entity_spawning_pattern, A - - RET - -Dungeon: - .name: .DB =Dungeon_Name_1_Txt - .max_floor: .DB 0x0a, inv(0x0a) - .spawning_patterns: - .DB $entity_cat_index, $entity_cat_index, $entity_cat_index, $entity_fimsh_index, 0b00000010 - .DB $entity_cat_index, $entity_cat_index, $entity_penguin_index, $entity_fimsh_index, 0b00100011 - .DB $entity_cat_index, $entity_cat_index, $entity_fox_index, $entity_fimsh_index, 0b00100111 - .DB $entity_fox_index, $entity_cat_index, $entity_penguin_index, $entity_fimsh_index, 0b00011101 - .DB $entity_cat_index, $entity_cat_index, $entity_mouse_index, $entity_fimsh_index, 0b00111111 - .DB $entity_cat_index, $entity_fox_index, $entity_penguin_index, $entity_fimsh_index, 0b00011111 - .DB $entity_fox_index, $entity_bug_index, $entity_penguin_index, $entity_fimsh_index, 0b00011111 - .DB $entity_fox_index, $entity_mouse_index, $entity_penguin_index, $entity_fimsh_index, 0b00111111 +.INCLUDE "map/dungeons/morningforest.gbasm" diff --git a/map/dungeons/morningforest.gbasm b/map/dungeons/morningforest.gbasm new file mode 100644 index 0000000..4b79861 --- /dev/null +++ b/map/dungeons/morningforest.gbasm @@ -0,0 +1,12 @@ +Dungeon: + .name: .DB =Dungeon_Name_1_Txt + .max_floor: .DB 0x0a, inv(0x0a) + .spawning_patterns: + .DB $entity_cat_index, $entity_cat_index, $entity_cat_index, $entity_fimsh_index, 0b00000010 + .DB $entity_cat_index, $entity_cat_index, $entity_penguin_index, $entity_fimsh_index, 0b00100011 + .DB $entity_cat_index, $entity_cat_index, $entity_fox_index, $entity_fimsh_index, 0b00100111 + .DB $entity_fox_index, $entity_cat_index, $entity_penguin_index, $entity_fimsh_index, 0b00011101 + .DB $entity_cat_index, $entity_cat_index, $entity_mouse_index, $entity_fimsh_index, 0b00111111 + .DB $entity_cat_index, $entity_fox_index, $entity_penguin_index, $entity_fimsh_index, 0b00011111 + .DB $entity_fox_index, $entity_bug_index, $entity_penguin_index, $entity_fimsh_index, 0b00011111 + .DB $entity_fox_index, $entity_mouse_index, $entity_penguin_index, $entity_fimsh_index, 0b00111111 diff --git a/map/generationevents.gbasm b/map/generationevents.gbasm index 430b3fe..8a39b64 100644 --- a/map/generationevents.gbasm +++ b/map/generationevents.gbasm @@ -21,8 +21,8 @@ Generation_Event_Execution: .skip: LD A, L - AND $fc - ADD $04 + AND $f8 + ADD $08 LD L, A CP $00 JR NZ, =.loop @@ -51,6 +51,8 @@ Generation_Event_Jump_Table: LD $mem_requested_mode, A LD A, (HL+) + LD $mem_dialogue_script_bank, A + LD A, (HL+) LD ($mem_dialogue_script_program_counter), A LD A, (HL) LD ($mem_dialogue_script_program_counter+1), A @@ -79,11 +81,16 @@ Init_DemoQuest_Event: INC HL LD (HL), $01 ; jump table dialogue script INC HL - LD (HL), high(=Demo_quest_init) + LD (HL), bank(=Demo_quest_init) + INC HL + LD (HL), high(ptr(=Demo_quest_init)) + INC HL + LD (HL), low(ptr(=Demo_quest_init)) INC HL - LD (HL), low(=Demo_quest_init) INC HL + INC HL + INC HL LD (HL), $10 ; floor INC HL @@ -93,6 +100,10 @@ Init_DemoQuest_Event: INC HL INC HL + INC HL + INC HL + INC HL + INC HL LD (HL), $10 ; floor INC HL @@ -101,13 +112,20 @@ Init_DemoQuest_Event: INC HL INC HL + INC HL + INC HL + INC HL + INC HL LD (HL), $10 ; floor INC HL LD (HL), $01 ; jump table dialogue script INC HL - LD (HL), high(=Demo_quest_floor_reach) + LD (HL), bank(=Demo_quest_floor_reach) + INC HL + LD (HL), high(ptr(=Demo_quest_floor_reach)) INC HL - LD (HL), low(=Demo_quest_floor_reach) + LD (HL), low(ptr(=Demo_quest_floor_reach)) +AAAAAAAAA: RET diff --git a/map/loaddungeon.gbasm b/map/loaddungeon.gbasm new file mode 100644 index 0000000..c2052c2 --- /dev/null +++ b/map/loaddungeon.gbasm @@ -0,0 +1,88 @@ +Load_Dungeon_Txt: ; pointer to Dungeon struct in HL, bank in A + .CHANGE_BANK_TO_A + + LD A, (HL+) + LD B, A + LD A, (HL+) + LD C, A + + PUSH BC + LD H, B + LD L, C + + CALL =strlen + LD B, A + + LD A, $14 + SUB B + SRA A + + LD HL, $9e80 + ADD L + LD L, A + LD A, H + ADC $00 + LD H, A + POP BC + CALL =Print_str + + RET + +Load_Dungeon_Spawn_patterns: ; pointer to Dungeon struct in HL bank in A + .CHANGE_BANK_TO_A + INC HL + INC HL + INC HL + + ; TODO FIX THE THING WHEN THERE'S MORE THAN 256/7 FLOORS + LD A, $mem_floor_count_bin + LD C, A + LD B, $07 + CALL =MUL + LD C, A + LD B, (HL) + CALL =MUL + CALL =RNG_Step + AND $01 + ADD E + LD E, A + LD D, $00 + LD B, D + LD C, E + SLA E + RL D + SLA E + RL D + LD A, E + ADD C + LD E, A + LD A, D + ADC B + LD D, A + + + INC HL + LD A, L + ADD E + LD L, A + LD A, H + ADC D + LD H, A + + LD BC, $mem_loaded_enemies_indices + LD A, (HL+) + LD (BC), A + INC BC + LD A, (HL+) + LD (BC), A + INC BC + LD A, (HL+) + LD (BC), A + INC BC + LD A, (HL+) + LD (BC), A + + LD A, (HL) + LD $mem_entity_spawning_pattern, A + + RET diff --git a/map/maps/test.ldtk b/map/maps/test.ldtk index 6a53cb3..238a266 100644 --- a/map/maps/test.ldtk +++ b/map/maps/test.ldtk @@ -11,7 +11,7 @@ "iid": "a44281a0-3740-11f0-9e9d-278017e89d25", "jsonVersion": "1.5.3", "appBuildId": 485696, - "nextUid": 72, + "nextUid": 100, "identifierStyle": "Capitalize", "toc": [], "worldLayout": "Free", @@ -42,6 +42,41 @@ "flags": [], "defs": { "layers": [ { + "__type": "Tiles", + "identifier": "Tiles", + "type": "Tiles", + "uid": 98, + "doc": null, + "uiColor": null, + "gridSize": 8, + "guideGridWid": 0, + "guideGridHei": 0, + "displayOpacity": 1, + "inactiveOpacity": 1, + "hideInList": false, + "hideFieldsWhenInactive": false, + "canSelectWhenInactive": true, + "renderInWorldView": true, + "pxOffsetX": 0, + "pxOffsetY": 0, + "parallaxFactorX": 0, + "parallaxFactorY": 0, + "parallaxScaling": true, + "requiredTags": [], + "excludedTags": [], + "autoTilesKilledByOtherLayerUid": null, + "uiFilterTags": [], + "useAsyncRender": false, + "intGridValues": [], + "intGridValuesGroups": [], + "autoRuleGroups": [], + "autoSourceLayerDefUid": null, + "tilesetDefUid": 1, + "tilePivotX": 0, + "tilePivotY": 0, + "biomeFieldUid": null + }, + { "__type": "AutoLayer", "identifier": "AutoLayer", "type": "AutoLayer", @@ -79,7 +114,7 @@ "isOptional": false, "rules": [ { - "uid": 47, + "uid": 73, "active": true, "size": 3, "tileRectsIds": [[0]], @@ -106,12 +141,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 8258583, + "perlinSeed": 3803826, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 48, + "uid": 74, "active": true, "size": 3, "tileRectsIds": [[15]], @@ -138,12 +173,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 1095317, + "perlinSeed": 7198347, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 49, + "uid": 75, "active": true, "size": 3, "tileRectsIds": [[10]], @@ -170,12 +205,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 9027935, + "perlinSeed": 5339095, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 50, + "uid": 76, "active": true, "size": 3, "tileRectsIds": [[9]], @@ -202,12 +237,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 206536, + "perlinSeed": 8227451, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 51, + "uid": 77, "active": true, "size": 3, "tileRectsIds": [[5]], @@ -234,15 +269,15 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 1477462, + "perlinSeed": 6349180, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 52, + "uid": 78, "active": true, "size": 3, - "tileRectsIds": [[6]], + "tileRectsIds": [[4]], "alpha": 1, "chance": 1, "breakOnMatch": true, @@ -266,12 +301,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 3875129, + "perlinSeed": 6851122, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 53, + "uid": 79, "active": true, "size": 3, "tileRectsIds": [[2]], @@ -298,12 +333,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 993969, + "perlinSeed": 2018503, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 54, + "uid": 80, "active": true, "size": 3, "tileRectsIds": [[1]], @@ -330,12 +365,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 1815458, + "perlinSeed": 2346343, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 55, + "uid": 81, "active": true, "size": 3, "tileRectsIds": [[3]], @@ -362,12 +397,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 7520826, + "perlinSeed": 45566, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 56, + "uid": 82, "active": true, "size": 3, "tileRectsIds": [[8]], @@ -394,12 +429,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 1298806, + "perlinSeed": 9369893, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 57, + "uid": 83, "active": true, "size": 3, "tileRectsIds": [[4]], @@ -426,12 +461,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 6138938, + "perlinSeed": 3950552, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 58, + "uid": 84, "active": true, "size": 3, "tileRectsIds": [[12]], @@ -458,12 +493,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 8301447, + "perlinSeed": 4706061, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 59, + "uid": 85, "active": true, "size": 3, "tileRectsIds": [[10]], @@ -490,12 +525,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 2630524, + "perlinSeed": 6408909, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 60, + "uid": 86, "active": true, "size": 3, "tileRectsIds": [[9]], @@ -522,12 +557,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 6170170, + "perlinSeed": 7141269, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 61, + "uid": 87, "active": true, "size": 3, "tileRectsIds": [[5]], @@ -554,12 +589,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 1032262, + "perlinSeed": 9407965, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 62, + "uid": 88, "active": true, "size": 3, "tileRectsIds": [[6]], @@ -586,12 +621,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 1857926, + "perlinSeed": 4145457, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 63, + "uid": 89, "active": true, "size": 3, "tileRectsIds": [[11]], @@ -618,12 +653,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 9679621, + "perlinSeed": 1868485, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 64, + "uid": 90, "active": true, "size": 3, "tileRectsIds": [[13]], @@ -650,12 +685,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 9005051, + "perlinSeed": 1947474, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 65, + "uid": 91, "active": true, "size": 3, "tileRectsIds": [[7]], @@ -682,12 +717,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 7455444, + "perlinSeed": 7357459, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 66, + "uid": 92, "active": true, "size": 3, "tileRectsIds": [[14]], @@ -714,12 +749,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 5100188, + "perlinSeed": 5046169, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 67, + "uid": 93, "active": true, "size": 3, "tileRectsIds": [[15]], @@ -746,12 +781,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 508964, + "perlinSeed": 878430, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 68, + "uid": 94, "active": true, "size": 3, "tileRectsIds": [[15]], @@ -778,12 +813,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 7130674, + "perlinSeed": 3740860, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 69, + "uid": 95, "active": true, "size": 3, "tileRectsIds": [[15]], @@ -810,12 +845,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 8340532, + "perlinSeed": 746466, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 70, + "uid": 96, "active": true, "size": 3, "tileRectsIds": [[15]], @@ -842,12 +877,12 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 6176984, + "perlinSeed": 2011540, "perlinScale": 0.2, "perlinOctaves": 2 }, { - "uid": 71, + "uid": 97, "active": true, "size": 1, "tileRectsIds": [[15]], @@ -874,7 +909,7 @@ "outOfBoundsValue": 2, "invalidated": false, "perlinActive": false, - "perlinSeed": 4693847, + "perlinSeed": 6517407, "perlinScale": 0.2, "perlinOctaves": 2 } @@ -891,41 +926,6 @@ "biomeFieldUid": null }, { - "__type": "Tiles", - "identifier": "AutoLayer_baked", - "type": "Tiles", - "uid": 4, - "doc": null, - "uiColor": null, - "gridSize": 16, - "guideGridWid": 0, - "guideGridHei": 0, - "displayOpacity": 1, - "inactiveOpacity": 1, - "hideInList": false, - "hideFieldsWhenInactive": false, - "canSelectWhenInactive": true, - "renderInWorldView": true, - "pxOffsetX": 0, - "pxOffsetY": 0, - "parallaxFactorX": 0, - "parallaxFactorY": 0, - "parallaxScaling": true, - "requiredTags": [], - "excludedTags": [], - "autoTilesKilledByOtherLayerUid": null, - "uiFilterTags": [], - "useAsyncRender": false, - "intGridValues": [], - "intGridValuesGroups": [], - "autoRuleGroups": [], - "autoSourceLayerDefUid": null, - "tilesetDefUid": 1, - "tilePivotX": 0, - "tilePivotY": 0, - "biomeFieldUid": null - }, - { "__type": "IntGrid", "identifier": "Things", "type": "IntGrid", @@ -967,9 +967,9 @@ { "__cWid": 4, "__cHei": 4, - "identifier": "Tree_tileset", + "identifier": "Tree_tileset_16x16", "uid": 1, - "relPath": "../../sprites/bg/tree-tileset.png", + "relPath": "../../sprites/bg/tree-tileset-16x16.png", "embedAtlas": null, "pxWid": 64, "pxHei": 64, @@ -982,6 +982,28 @@ "customData": [], "savedSelections": [], "cachedPixelData": { "opaqueTiles": "1111111111111111", "averageColors": "f897f797f897f797f787f686f787f686f797f797f797f787f786f686f686f575" } + }, + { + "__cWid": 16, + "__cHei": 16, + "identifier": "Tileset2", + "uid": 99, + "relPath": "../../build/tileset.png", + "embedAtlas": null, + "pxWid": 128, + "pxHei": 128, + "tileGridSize": 8, + "spacing": 0, + "padding": 0, + "tags": [], + "tagsSourceEnumUid": null, + "enumTags": [], + "customData": [], + "savedSelections": [], + "cachedPixelData": { + "opaqueTiles": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + "averageColors": "fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfcdbfbdafbdafbdafbdafcdbfcdbfcdbfcdbfbcafac9fbcafac9fdfcfdfcfdfcf897f797f797f575f897f8a8f786f575f897f797f797f576f897f787f787f575fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcf455f897f685f575fdecfac9fbdbfcebfbcaf9b9f9b9fcdbfbcafab9f897f897fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfbcafbdbfbcafbcafbcafbcafbcafbdbfbcafbcafbcafacafbcafbcafbcafbcafbcafbcafbdbfbdbfacafbdbfbcafbcafbcafbcafbcafbcafbcafbdbfbcafbdbfbcafbdbfbdbfbcafdecfcdbfcdbfdecfdecfcebfcecfcdbfcdbfcdbfcdbfdecfcdbfcdbfcdbfcdbfcdbfcdbfcdbfcdbfcdbfcdbfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfbcaf8a7facafcebfac9facafab9fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfc" + } } ], "enums": [], "externalEnums": [], "levelFields": [] }, "levels": [ @@ -1007,190 +1029,58 @@ "fieldInstances": [], "layerInstances": [ { - "__identifier": "AutoLayer", - "__type": "AutoLayer", - "__cWid": 32, - "__cHei": 32, - "__gridSize": 16, + "__identifier": "Tiles", + "__type": "Tiles", + "__cWid": 64, + "__cHei": 64, + "__gridSize": 8, "__opacity": 1, "__pxTotalOffsetX": 0, "__pxTotalOffsetY": 0, - "__tilesetDefUid": 1, - "__tilesetRelPath": "../../sprites/bg/tree-tileset.png", - "iid": "663fc2e0-3740-11f0-9e9d-2794dd41d15e", + "__tilesetDefUid": 99, + "__tilesetRelPath": "../../build/tileset.png", + "iid": "c0a8b560-3740-11f0-90ff-d3ae7f8c9e03", "levelId": 0, - "layerDefUid": 3, + "layerDefUid": 98, "pxOffsetX": 0, "pxOffsetY": 0, "visible": true, "optionalRules": [], "intGridCsv": [], - "autoLayerTiles": [ - { "px": [208,176], "src": [48,48], "f": 0, "t": 15, "d": [71,365], "a": 1 }, - { "px": [192,176], "src": [48,48], "f": 0, "t": 15, "d": [70,364], "a": 1 }, - { "px": [224,176], "src": [48,48], "f": 0, "t": 15, "d": [69,366], "a": 1 }, - { "px": [208,192], "src": [48,48], "f": 0, "t": 15, "d": [69,397], "a": 1 }, - { "px": [192,160], "src": [48,48], "f": 0, "t": 15, "d": [68,332], "a": 1 }, - { "px": [224,160], "src": [48,48], "f": 0, "t": 15, "d": [67,334], "a": 1 }, - { "px": [208,64], "src": [32,48], "f": 0, "t": 14, "d": [66,141], "a": 1 }, - { "px": [384,96], "src": [32,48], "f": 0, "t": 14, "d": [66,216], "a": 1 }, - { "px": [384,112], "src": [32,48], "f": 0, "t": 14, "d": [66,248], "a": 1 }, - { "px": [176,160], "src": [32,48], "f": 0, "t": 14, "d": [66,331], "a": 1 }, - { "px": [352,224], "src": [32,48], "f": 0, "t": 14, "d": [66,470], "a": 1 }, - { "px": [352,464], "src": [48,16], "f": 0, "t": 7, "d": [65,950], "a": 1 }, - { "px": [112,160], "src": [16,48], "f": 0, "t": 13, "d": [64,327], "a": 1 }, - { "px": [240,160], "src": [16,48], "f": 0, "t": 13, "d": [64,335], "a": 1 }, - { "px": [400,96], "src": [48,32], "f": 0, "t": 11, "d": [63,217], "a": 1 }, - { "px": [208,160], "src": [48,32], "f": 0, "t": 11, "d": [63,333], "a": 1 }, - { "px": [352,208], "src": [48,32], "f": 0, "t": 11, "d": [63,438], "a": 1 }, - { "px": [368,208], "src": [48,32], "f": 0, "t": 11, "d": [63,439], "a": 1 }, - { "px": [176,176], "src": [32,16], "f": 0, "t": 6, "d": [62,363], "a": 1 }, - { "px": [192,192], "src": [32,16], "f": 0, "t": 6, "d": [62,396], "a": 1 }, - { "px": [400,112], "src": [16,16], "f": 0, "t": 5, "d": [61,249], "a": 1 }, - { "px": [240,176], "src": [16,16], "f": 0, "t": 5, "d": [61,367], "a": 1 }, - { "px": [224,192], "src": [16,16], "f": 0, "t": 5, "d": [61,398], "a": 1 }, - { "px": [368,224], "src": [16,16], "f": 0, "t": 5, "d": [61,471], "a": 1 }, - { "px": [192,144], "src": [16,32], "f": 0, "t": 9, "d": [60,300], "a": 1 }, - { "px": [240,144], "src": [16,32], "f": 0, "t": 9, "d": [60,303], "a": 1 }, - { "px": [176,144], "src": [32,32], "f": 0, "t": 10, "d": [59,299], "a": 1 }, - { "px": [224,144], "src": [32,32], "f": 0, "t": 10, "d": [59,302], "a": 1 }, - { "px": [32,48], "src": [0,48], "f": 0, "t": 12, "d": [58,98], "a": 1 }, - { "px": [240,48], "src": [0,48], "f": 0, "t": 12, "d": [58,111], "a": 1 }, - { "px": [32,64], "src": [0,48], "f": 0, "t": 12, "d": [58,130], "a": 1 }, - { "px": [96,64], "src": [0,48], "f": 0, "t": 12, "d": [58,134], "a": 1 }, - { "px": [128,64], "src": [0,48], "f": 0, "t": 12, "d": [58,136], "a": 1 }, - { "px": [176,64], "src": [0,48], "f": 0, "t": 12, "d": [58,139], "a": 1 }, - { "px": [208,80], "src": [0,48], "f": 0, "t": 12, "d": [58,173], "a": 1 }, - { "px": [416,80], "src": [0,48], "f": 0, "t": 12, "d": [58,186], "a": 1 }, - { "px": [464,96], "src": [0,48], "f": 0, "t": 12, "d": [58,221], "a": 1 }, - { "px": [304,112], "src": [0,48], "f": 0, "t": 12, "d": [58,243], "a": 1 }, - { "px": [464,112], "src": [0,48], "f": 0, "t": 12, "d": [58,253], "a": 1 }, - { "px": [304,128], "src": [0,48], "f": 0, "t": 12, "d": [58,275], "a": 1 }, - { "px": [464,128], "src": [0,48], "f": 0, "t": 12, "d": [58,285], "a": 1 }, - { "px": [112,144], "src": [0,48], "f": 0, "t": 12, "d": [58,295], "a": 1 }, - { "px": [464,144], "src": [0,48], "f": 0, "t": 12, "d": [58,317], "a": 1 }, - { "px": [320,160], "src": [0,48], "f": 0, "t": 12, "d": [58,340], "a": 1 }, - { "px": [112,176], "src": [0,48], "f": 0, "t": 12, "d": [58,359], "a": 1 }, - { "px": [320,176], "src": [0,48], "f": 0, "t": 12, "d": [58,372], "a": 1 }, - { "px": [448,288], "src": [0,48], "f": 0, "t": 12, "d": [58,604], "a": 1 }, - { "px": [256,304], "src": [0,48], "f": 0, "t": 12, "d": [58,624], "a": 1 }, - { "px": [448,304], "src": [0,48], "f": 0, "t": 12, "d": [58,636], "a": 1 }, - { "px": [256,320], "src": [0,48], "f": 0, "t": 12, "d": [58,656], "a": 1 }, - { "px": [256,336], "src": [0,48], "f": 0, "t": 12, "d": [58,688], "a": 1 }, - { "px": [336,336], "src": [0,48], "f": 0, "t": 12, "d": [58,693], "a": 1 }, - { "px": [368,336], "src": [0,48], "f": 0, "t": 12, "d": [58,695], "a": 1 }, - { "px": [432,336], "src": [0,48], "f": 0, "t": 12, "d": [58,699], "a": 1 }, - { "px": [176,80], "src": [0,16], "f": 0, "t": 4, "d": [57,171], "a": 1 }, - { "px": [384,128], "src": [0,16], "f": 0, "t": 4, "d": [57,280], "a": 1 }, - { "px": [208,208], "src": [0,16], "f": 0, "t": 4, "d": [57,429], "a": 1 }, - { "px": [352,240], "src": [0,16], "f": 0, "t": 4, "d": [57,502], "a": 1 }, - { "px": [384,304], "src": [0,16], "f": 0, "t": 4, "d": [57,632], "a": 1 }, - { "px": [336,352], "src": [0,16], "f": 0, "t": 4, "d": [57,725], "a": 1 }, - { "px": [368,352], "src": [0,16], "f": 0, "t": 4, "d": [57,727], "a": 1 }, - { "px": [176,32], "src": [0,32], "f": 0, "t": 8, "d": [56,75], "a": 1 }, - { "px": [96,48], "src": [0,32], "f": 0, "t": 8, "d": [56,102], "a": 1 }, - { "px": [128,48], "src": [0,32], "f": 0, "t": 8, "d": [56,104], "a": 1 }, - { "px": [368,320], "src": [0,32], "f": 0, "t": 8, "d": [56,663], "a": 1 }, - { "px": [320,448], "src": [0,32], "f": 0, "t": 8, "d": [56,916], "a": 1 }, - { "px": [352,448], "src": [0,32], "f": 0, "t": 8, "d": [56,918], "a": 1 }, - { "px": [384,448], "src": [0,32], "f": 0, "t": 8, "d": [56,920], "a": 1 }, - { "px": [48,32], "src": [48,0], "f": 0, "t": 3, "d": [55,67], "a": 1 }, - { "px": [192,48], "src": [48,0], "f": 0, "t": 3, "d": [55,108], "a": 1 }, - { "px": [224,64], "src": [48,0], "f": 0, "t": 3, "d": [55,142], "a": 1 }, - { "px": [432,64], "src": [48,0], "f": 0, "t": 3, "d": [55,155], "a": 1 }, - { "px": [48,80], "src": [48,0], "f": 0, "t": 3, "d": [55,163], "a": 1 }, - { "px": [112,80], "src": [48,0], "f": 0, "t": 3, "d": [55,167], "a": 1 }, - { "px": [336,80], "src": [48,0], "f": 0, "t": 3, "d": [55,181], "a": 1 }, - { "px": [352,80], "src": [48,0], "f": 0, "t": 3, "d": [55,182], "a": 1 }, - { "px": [368,80], "src": [48,0], "f": 0, "t": 3, "d": [55,183], "a": 1 }, - { "px": [224,96], "src": [48,0], "f": 0, "t": 3, "d": [55,206], "a": 1 }, - { "px": [96,128], "src": [48,0], "f": 0, "t": 3, "d": [55,262], "a": 1 }, - { "px": [432,176], "src": [48,0], "f": 0, "t": 3, "d": [55,379], "a": 1 }, - { "px": [96,192], "src": [48,0], "f": 0, "t": 3, "d": [55,390], "a": 1 }, - { "px": [384,208], "src": [48,0], "f": 0, "t": 3, "d": [55,440], "a": 1 }, - { "px": [416,272], "src": [48,0], "f": 0, "t": 3, "d": [55,570], "a": 1 }, - { "px": [432,272], "src": [48,0], "f": 0, "t": 3, "d": [55,571], "a": 1 }, - { "px": [272,288], "src": [48,0], "f": 0, "t": 3, "d": [55,593], "a": 1 }, - { "px": [288,288], "src": [48,0], "f": 0, "t": 3, "d": [55,594], "a": 1 }, - { "px": [336,464], "src": [48,0], "f": 0, "t": 3, "d": [55,949], "a": 1 }, - { "px": [368,464], "src": [48,0], "f": 0, "t": 3, "d": [55,951], "a": 1 }, - { "px": [64,32], "src": [16,0], "f": 0, "t": 1, "d": [54,68], "a": 1 }, - { "px": [64,80], "src": [16,0], "f": 0, "t": 1, "d": [54,164], "a": 1 }, - { "px": [240,96], "src": [16,0], "f": 0, "t": 1, "d": [54,207], "a": 1 }, - { "px": [304,384], "src": [16,0], "f": 0, "t": 1, "d": [54,787], "a": 1 }, - { "px": [224,32], "src": [32,0], "f": 0, "t": 2, "d": [53,78], "a": 1 }, - { "px": [160,48], "src": [32,0], "f": 0, "t": 2, "d": [53,106], "a": 1 }, - { "px": [80,128], "src": [32,0], "f": 0, "t": 2, "d": [53,261], "a": 1 }, - { "px": [96,160], "src": [32,0], "f": 0, "t": 2, "d": [53,326], "a": 1 }, - { "px": [80,192], "src": [32,0], "f": 0, "t": 2, "d": [53,389], "a": 1 }, - { "px": [400,368], "src": [32,0], "f": 0, "t": 2, "d": [53,761], "a": 1 }, - { "px": [32,80], "src": [32,16], "f": 0, "t": 6, "d": [52,162], "a": 1 }, - { "px": [96,80], "src": [32,16], "f": 0, "t": 6, "d": [52,166], "a": 1 }, - { "px": [448,80], "src": [32,16], "f": 0, "t": 6, "d": [52,188], "a": 1 }, - { "px": [208,96], "src": [32,16], "f": 0, "t": 6, "d": [52,205], "a": 1 }, - { "px": [304,144], "src": [32,16], "f": 0, "t": 6, "d": [52,307], "a": 1 }, - { "px": [320,192], "src": [32,16], "f": 0, "t": 6, "d": [52,404], "a": 1 }, - { "px": [336,208], "src": [32,16], "f": 0, "t": 6, "d": [52,437], "a": 1 }, - { "px": [304,304], "src": [32,16], "f": 0, "t": 6, "d": [52,627], "a": 1 }, - { "px": [320,320], "src": [32,16], "f": 0, "t": 6, "d": [52,660], "a": 1 }, - { "px": [256,352], "src": [32,16], "f": 0, "t": 6, "d": [52,720], "a": 1 }, - { "px": [272,368], "src": [32,16], "f": 0, "t": 6, "d": [52,753], "a": 1 }, - { "px": [288,384], "src": [32,16], "f": 0, "t": 6, "d": [52,786], "a": 1 }, - { "px": [320,464], "src": [32,16], "f": 0, "t": 6, "d": [52,948], "a": 1 }, - { "px": [240,64], "src": [16,16], "f": 0, "t": 5, "d": [51,143], "a": 1 }, - { "px": [128,80], "src": [16,16], "f": 0, "t": 5, "d": [51,168], "a": 1 }, - { "px": [320,96], "src": [16,16], "f": 0, "t": 5, "d": [51,212], "a": 1 }, - { "px": [416,96], "src": [16,16], "f": 0, "t": 5, "d": [51,218], "a": 1 }, - { "px": [464,160], "src": [16,16], "f": 0, "t": 5, "d": [51,349], "a": 1 }, - { "px": [448,176], "src": [16,16], "f": 0, "t": 5, "d": [51,380], "a": 1 }, - { "px": [112,192], "src": [16,16], "f": 0, "t": 5, "d": [51,391], "a": 1 }, - { "px": [416,192], "src": [16,16], "f": 0, "t": 5, "d": [51,410], "a": 1 }, - { "px": [400,208], "src": [16,16], "f": 0, "t": 5, "d": [51,441], "a": 1 }, - { "px": [400,288], "src": [16,16], "f": 0, "t": 5, "d": [51,601], "a": 1 }, - { "px": [448,320], "src": [16,16], "f": 0, "t": 5, "d": [51,668], "a": 1 }, - { "px": [432,352], "src": [16,16], "f": 0, "t": 5, "d": [51,731], "a": 1 }, - { "px": [416,368], "src": [16,16], "f": 0, "t": 5, "d": [51,762], "a": 1 }, - { "px": [384,464], "src": [16,16], "f": 0, "t": 5, "d": [51,952], "a": 1 }, - { "px": [240,32], "src": [16,32], "f": 0, "t": 9, "d": [50,79], "a": 1 }, - { "px": [208,48], "src": [16,32], "f": 0, "t": 9, "d": [50,109], "a": 1 }, - { "px": [448,64], "src": [16,32], "f": 0, "t": 9, "d": [50,156], "a": 1 }, - { "px": [384,80], "src": [16,32], "f": 0, "t": 9, "d": [50,184], "a": 1 }, - { "px": [464,80], "src": [16,32], "f": 0, "t": 9, "d": [50,189], "a": 1 }, - { "px": [112,128], "src": [16,32], "f": 0, "t": 9, "d": [50,263], "a": 1 }, - { "px": [320,144], "src": [16,32], "f": 0, "t": 9, "d": [50,308], "a": 1 }, - { "px": [336,192], "src": [16,32], "f": 0, "t": 9, "d": [50,405], "a": 1 }, - { "px": [448,272], "src": [16,32], "f": 0, "t": 9, "d": [50,572], "a": 1 }, - { "px": [304,288], "src": [16,32], "f": 0, "t": 9, "d": [50,595], "a": 1 }, - { "px": [320,304], "src": [16,32], "f": 0, "t": 9, "d": [50,628], "a": 1 }, - { "px": [336,320], "src": [16,32], "f": 0, "t": 9, "d": [50,661], "a": 1 }, - { "px": [272,352], "src": [16,32], "f": 0, "t": 9, "d": [50,721], "a": 1 }, - { "px": [288,368], "src": [16,32], "f": 0, "t": 9, "d": [50,754], "a": 1 }, - { "px": [32,32], "src": [32,32], "f": 0, "t": 10, "d": [49,66], "a": 1 }, - { "px": [416,64], "src": [32,32], "f": 0, "t": 10, "d": [49,154], "a": 1 }, - { "px": [320,80], "src": [32,32], "f": 0, "t": 10, "d": [49,180], "a": 1 }, - { "px": [304,96], "src": [32,32], "f": 0, "t": 10, "d": [49,211], "a": 1 }, - { "px": [448,160], "src": [32,32], "f": 0, "t": 10, "d": [49,348], "a": 1 }, - { "px": [416,176], "src": [32,32], "f": 0, "t": 10, "d": [49,378], "a": 1 }, - { "px": [400,192], "src": [32,32], "f": 0, "t": 10, "d": [49,409], "a": 1 }, - { "px": [400,272], "src": [32,32], "f": 0, "t": 10, "d": [49,569], "a": 1 }, - { "px": [256,288], "src": [32,32], "f": 0, "t": 10, "d": [49,592], "a": 1 }, - { "px": [384,288], "src": [32,32], "f": 0, "t": 10, "d": [49,600], "a": 1 }, - { "px": [432,320], "src": [32,32], "f": 0, "t": 10, "d": [49,667], "a": 1 }, - { "px": [416,352], "src": [32,32], "f": 0, "t": 10, "d": [49,730], "a": 1 }, - { "px": [176,48], "src": [48,48], "f": 0, "t": 15, "d": [48,107], "a": 1 }, - { "px": [48,144], "src": [0,0], "f": 0, "t": 0, "d": [47,291], "a": 1 }, - { "px": [48,176], "src": [0,0], "f": 0, "t": 0, "d": [47,355], "a": 1 }, - { "px": [336,416], "src": [0,0], "f": 0, "t": 0, "d": [47,853], "a": 1 }, - { "px": [368,416], "src": [0,0], "f": 0, "t": 0, "d": [47,855], "a": 1 } + "autoLayerTiles": [], + "seed": 7283933, + "overrideTilesetUid": 99, + "gridTiles": [ + { "px": [184,120], "src": [32,48], "f": 0, "t": 100, "d": [983], "a": 1 }, + { "px": [192,120], "src": [40,48], "f": 0, "t": 101, "d": [984], "a": 1 }, + { "px": [184,128], "src": [48,48], "f": 0, "t": 102, "d": [1047], "a": 1 }, + { "px": [192,128], "src": [56,48], "f": 0, "t": 103, "d": [1048], "a": 1 }, + { "px": [328,248], "src": [32,48], "f": 0, "t": 100, "d": [2025], "a": 1 }, + { "px": [336,248], "src": [40,48], "f": 0, "t": 101, "d": [2026], "a": 1 }, + { "px": [328,256], "src": [48,48], "f": 0, "t": 102, "d": [2089], "a": 1 }, + { "px": [336,256], "src": [56,48], "f": 0, "t": 103, "d": [2090], "a": 1 }, + { "px": [344,256], "src": [0,120], "f": 0, "t": 240, "d": [2091], "a": 1 }, + { "px": [200,264], "src": [0,120], "f": 0, "t": 240, "d": [2137], "a": 1 }, + { "px": [208,264], "src": [0,120], "f": 0, "t": 240, "d": [2138], "a": 1 }, + { "px": [216,264], "src": [0,120], "f": 0, "t": 240, "d": [2139], "a": 1 }, + { "px": [232,264], "src": [80,64], "f": 0, "t": 138, "d": [2141], "a": 1 }, + { "px": [240,264], "src": [96,72], "f": 0, "t": 156, "d": [2142], "a": 1 }, + { "px": [248,264], "src": [104,72], "f": 0, "t": 157, "d": [2143], "a": 1 }, + { "px": [256,264], "src": [80,64], "f": 0, "t": 138, "d": [2144], "a": 1 }, + { "px": [264,264], "src": [104,72], "f": 0, "t": 157, "d": [2145], "a": 1 }, + { "px": [272,264], "src": [16,72], "f": 0, "t": 146, "d": [2146], "a": 1 }, + { "px": [280,264], "src": [56,72], "f": 0, "t": 151, "d": [2147], "a": 1 }, + { "px": [296,264], "src": [80,80], "f": 0, "t": 170, "d": [2149], "a": 1 }, + { "px": [304,264], "src": [24,64], "f": 0, "t": 131, "d": [2150], "a": 1 }, + { "px": [320,264], "src": [0,120], "f": 0, "t": 240, "d": [2152], "a": 1 }, + { "px": [328,264], "src": [0,120], "f": 0, "t": 240, "d": [2153], "a": 1 }, + { "px": [336,264], "src": [0,120], "f": 0, "t": 240, "d": [2154], "a": 1 } ], - "seed": 3670360, - "overrideTilesetUid": null, - "gridTiles": [], "entityInstances": [] }, { - "__identifier": "AutoLayer_baked", - "__type": "Tiles", + "__identifier": "AutoLayer", + "__type": "AutoLayer", "__cWid": 32, "__cHei": 32, "__gridSize": 16, @@ -1198,17 +1088,174 @@ "__pxTotalOffsetX": 0, "__pxTotalOffsetY": 0, "__tilesetDefUid": 1, - "__tilesetRelPath": "../../sprites/bg/tree-tileset.png", - "iid": "7d6ed1e0-3740-11f0-9e9d-4f7e2d36af1d", + "__tilesetRelPath": "../../sprites/bg/tree-tileset-16x16.png", + "iid": "663fc2e0-3740-11f0-9e9d-2794dd41d15e", "levelId": 0, - "layerDefUid": 4, + "layerDefUid": 3, "pxOffsetX": 0, "pxOffsetY": 0, "visible": true, "optionalRules": [], "intGridCsv": [], - "autoLayerTiles": [], - "seed": 1635543, + "autoLayerTiles": [ + { "px": [208,176], "src": [48,48], "f": 0, "t": 15, "d": [97,365], "a": 1 }, + { "px": [192,176], "src": [48,48], "f": 0, "t": 15, "d": [96,364], "a": 1 }, + { "px": [224,176], "src": [48,48], "f": 0, "t": 15, "d": [95,366], "a": 1 }, + { "px": [208,192], "src": [48,48], "f": 0, "t": 15, "d": [95,397], "a": 1 }, + { "px": [192,160], "src": [48,48], "f": 0, "t": 15, "d": [94,332], "a": 1 }, + { "px": [224,160], "src": [48,48], "f": 0, "t": 15, "d": [93,334], "a": 1 }, + { "px": [208,64], "src": [32,48], "f": 0, "t": 14, "d": [92,141], "a": 1 }, + { "px": [384,96], "src": [32,48], "f": 0, "t": 14, "d": [92,216], "a": 1 }, + { "px": [384,112], "src": [32,48], "f": 0, "t": 14, "d": [92,248], "a": 1 }, + { "px": [176,160], "src": [32,48], "f": 0, "t": 14, "d": [92,331], "a": 1 }, + { "px": [352,224], "src": [32,48], "f": 0, "t": 14, "d": [92,470], "a": 1 }, + { "px": [352,464], "src": [48,16], "f": 0, "t": 7, "d": [91,950], "a": 1 }, + { "px": [112,160], "src": [16,48], "f": 0, "t": 13, "d": [90,327], "a": 1 }, + { "px": [240,160], "src": [16,48], "f": 0, "t": 13, "d": [90,335], "a": 1 }, + { "px": [400,96], "src": [48,32], "f": 0, "t": 11, "d": [89,217], "a": 1 }, + { "px": [208,160], "src": [48,32], "f": 0, "t": 11, "d": [89,333], "a": 1 }, + { "px": [352,208], "src": [48,32], "f": 0, "t": 11, "d": [89,438], "a": 1 }, + { "px": [368,208], "src": [48,32], "f": 0, "t": 11, "d": [89,439], "a": 1 }, + { "px": [176,176], "src": [32,16], "f": 0, "t": 6, "d": [88,363], "a": 1 }, + { "px": [192,192], "src": [32,16], "f": 0, "t": 6, "d": [88,396], "a": 1 }, + { "px": [400,112], "src": [16,16], "f": 0, "t": 5, "d": [87,249], "a": 1 }, + { "px": [240,176], "src": [16,16], "f": 0, "t": 5, "d": [87,367], "a": 1 }, + { "px": [224,192], "src": [16,16], "f": 0, "t": 5, "d": [87,398], "a": 1 }, + { "px": [368,224], "src": [16,16], "f": 0, "t": 5, "d": [87,471], "a": 1 }, + { "px": [192,144], "src": [16,32], "f": 0, "t": 9, "d": [86,300], "a": 1 }, + { "px": [240,144], "src": [16,32], "f": 0, "t": 9, "d": [86,303], "a": 1 }, + { "px": [176,144], "src": [32,32], "f": 0, "t": 10, "d": [85,299], "a": 1 }, + { "px": [224,144], "src": [32,32], "f": 0, "t": 10, "d": [85,302], "a": 1 }, + { "px": [32,48], "src": [0,48], "f": 0, "t": 12, "d": [84,98], "a": 1 }, + { "px": [240,48], "src": [0,48], "f": 0, "t": 12, "d": [84,111], "a": 1 }, + { "px": [32,64], "src": [0,48], "f": 0, "t": 12, "d": [84,130], "a": 1 }, + { "px": [96,64], "src": [0,48], "f": 0, "t": 12, "d": [84,134], "a": 1 }, + { "px": [128,64], "src": [0,48], "f": 0, "t": 12, "d": [84,136], "a": 1 }, + { "px": [176,64], "src": [0,48], "f": 0, "t": 12, "d": [84,139], "a": 1 }, + { "px": [208,80], "src": [0,48], "f": 0, "t": 12, "d": [84,173], "a": 1 }, + { "px": [416,80], "src": [0,48], "f": 0, "t": 12, "d": [84,186], "a": 1 }, + { "px": [464,96], "src": [0,48], "f": 0, "t": 12, "d": [84,221], "a": 1 }, + { "px": [304,112], "src": [0,48], "f": 0, "t": 12, "d": [84,243], "a": 1 }, + { "px": [464,112], "src": [0,48], "f": 0, "t": 12, "d": [84,253], "a": 1 }, + { "px": [304,128], "src": [0,48], "f": 0, "t": 12, "d": [84,275], "a": 1 }, + { "px": [464,128], "src": [0,48], "f": 0, "t": 12, "d": [84,285], "a": 1 }, + { "px": [112,144], "src": [0,48], "f": 0, "t": 12, "d": [84,295], "a": 1 }, + { "px": [464,144], "src": [0,48], "f": 0, "t": 12, "d": [84,317], "a": 1 }, + { "px": [320,160], "src": [0,48], "f": 0, "t": 12, "d": [84,340], "a": 1 }, + { "px": [112,176], "src": [0,48], "f": 0, "t": 12, "d": [84,359], "a": 1 }, + { "px": [320,176], "src": [0,48], "f": 0, "t": 12, "d": [84,372], "a": 1 }, + { "px": [448,288], "src": [0,48], "f": 0, "t": 12, "d": [84,604], "a": 1 }, + { "px": [256,304], "src": [0,48], "f": 0, "t": 12, "d": [84,624], "a": 1 }, + { "px": [448,304], "src": [0,48], "f": 0, "t": 12, "d": [84,636], "a": 1 }, + { "px": [256,320], "src": [0,48], "f": 0, "t": 12, "d": [84,656], "a": 1 }, + { "px": [256,336], "src": [0,48], "f": 0, "t": 12, "d": [84,688], "a": 1 }, + { "px": [336,336], "src": [0,48], "f": 0, "t": 12, "d": [84,693], "a": 1 }, + { "px": [368,336], "src": [0,48], "f": 0, "t": 12, "d": [84,695], "a": 1 }, + { "px": [432,336], "src": [0,48], "f": 0, "t": 12, "d": [84,699], "a": 1 }, + { "px": [176,80], "src": [0,16], "f": 0, "t": 4, "d": [83,171], "a": 1 }, + { "px": [384,128], "src": [0,16], "f": 0, "t": 4, "d": [83,280], "a": 1 }, + { "px": [208,208], "src": [0,16], "f": 0, "t": 4, "d": [83,429], "a": 1 }, + { "px": [352,240], "src": [0,16], "f": 0, "t": 4, "d": [83,502], "a": 1 }, + { "px": [384,304], "src": [0,16], "f": 0, "t": 4, "d": [83,632], "a": 1 }, + { "px": [336,352], "src": [0,16], "f": 0, "t": 4, "d": [83,725], "a": 1 }, + { "px": [368,352], "src": [0,16], "f": 0, "t": 4, "d": [83,727], "a": 1 }, + { "px": [176,32], "src": [0,32], "f": 0, "t": 8, "d": [82,75], "a": 1 }, + { "px": [96,48], "src": [0,32], "f": 0, "t": 8, "d": [82,102], "a": 1 }, + { "px": [128,48], "src": [0,32], "f": 0, "t": 8, "d": [82,104], "a": 1 }, + { "px": [368,320], "src": [0,32], "f": 0, "t": 8, "d": [82,663], "a": 1 }, + { "px": [320,448], "src": [0,32], "f": 0, "t": 8, "d": [82,916], "a": 1 }, + { "px": [352,448], "src": [0,32], "f": 0, "t": 8, "d": [82,918], "a": 1 }, + { "px": [384,448], "src": [0,32], "f": 0, "t": 8, "d": [82,920], "a": 1 }, + { "px": [48,32], "src": [48,0], "f": 0, "t": 3, "d": [81,67], "a": 1 }, + { "px": [192,48], "src": [48,0], "f": 0, "t": 3, "d": [81,108], "a": 1 }, + { "px": [224,64], "src": [48,0], "f": 0, "t": 3, "d": [81,142], "a": 1 }, + { "px": [432,64], "src": [48,0], "f": 0, "t": 3, "d": [81,155], "a": 1 }, + { "px": [48,80], "src": [48,0], "f": 0, "t": 3, "d": [81,163], "a": 1 }, + { "px": [112,80], "src": [48,0], "f": 0, "t": 3, "d": [81,167], "a": 1 }, + { "px": [336,80], "src": [48,0], "f": 0, "t": 3, "d": [81,181], "a": 1 }, + { "px": [352,80], "src": [48,0], "f": 0, "t": 3, "d": [81,182], "a": 1 }, + { "px": [368,80], "src": [48,0], "f": 0, "t": 3, "d": [81,183], "a": 1 }, + { "px": [224,96], "src": [48,0], "f": 0, "t": 3, "d": [81,206], "a": 1 }, + { "px": [96,128], "src": [48,0], "f": 0, "t": 3, "d": [81,262], "a": 1 }, + { "px": [432,176], "src": [48,0], "f": 0, "t": 3, "d": [81,379], "a": 1 }, + { "px": [96,192], "src": [48,0], "f": 0, "t": 3, "d": [81,390], "a": 1 }, + { "px": [384,208], "src": [48,0], "f": 0, "t": 3, "d": [81,440], "a": 1 }, + { "px": [416,272], "src": [48,0], "f": 0, "t": 3, "d": [81,570], "a": 1 }, + { "px": [432,272], "src": [48,0], "f": 0, "t": 3, "d": [81,571], "a": 1 }, + { "px": [272,288], "src": [48,0], "f": 0, "t": 3, "d": [81,593], "a": 1 }, + { "px": [288,288], "src": [48,0], "f": 0, "t": 3, "d": [81,594], "a": 1 }, + { "px": [336,464], "src": [48,0], "f": 0, "t": 3, "d": [81,949], "a": 1 }, + { "px": [368,464], "src": [48,0], "f": 0, "t": 3, "d": [81,951], "a": 1 }, + { "px": [64,32], "src": [16,0], "f": 0, "t": 1, "d": [80,68], "a": 1 }, + { "px": [64,80], "src": [16,0], "f": 0, "t": 1, "d": [80,164], "a": 1 }, + { "px": [240,96], "src": [16,0], "f": 0, "t": 1, "d": [80,207], "a": 1 }, + { "px": [304,384], "src": [16,0], "f": 0, "t": 1, "d": [80,787], "a": 1 }, + { "px": [224,32], "src": [32,0], "f": 0, "t": 2, "d": [79,78], "a": 1 }, + { "px": [160,48], "src": [32,0], "f": 0, "t": 2, "d": [79,106], "a": 1 }, + { "px": [80,128], "src": [32,0], "f": 0, "t": 2, "d": [79,261], "a": 1 }, + { "px": [96,160], "src": [32,0], "f": 0, "t": 2, "d": [79,326], "a": 1 }, + { "px": [80,192], "src": [32,0], "f": 0, "t": 2, "d": [79,389], "a": 1 }, + { "px": [400,368], "src": [32,0], "f": 0, "t": 2, "d": [79,761], "a": 1 }, + { "px": [32,80], "src": [0,16], "f": 0, "t": 4, "d": [78,162], "a": 1 }, + { "px": [96,80], "src": [0,16], "f": 0, "t": 4, "d": [78,166], "a": 1 }, + { "px": [448,80], "src": [0,16], "f": 0, "t": 4, "d": [78,188], "a": 1 }, + { "px": [208,96], "src": [0,16], "f": 0, "t": 4, "d": [78,205], "a": 1 }, + { "px": [304,144], "src": [0,16], "f": 0, "t": 4, "d": [78,307], "a": 1 }, + { "px": [320,192], "src": [0,16], "f": 0, "t": 4, "d": [78,404], "a": 1 }, + { "px": [336,208], "src": [0,16], "f": 0, "t": 4, "d": [78,437], "a": 1 }, + { "px": [304,304], "src": [0,16], "f": 0, "t": 4, "d": [78,627], "a": 1 }, + { "px": [320,320], "src": [0,16], "f": 0, "t": 4, "d": [78,660], "a": 1 }, + { "px": [256,352], "src": [0,16], "f": 0, "t": 4, "d": [78,720], "a": 1 }, + { "px": [272,368], "src": [0,16], "f": 0, "t": 4, "d": [78,753], "a": 1 }, + { "px": [288,384], "src": [0,16], "f": 0, "t": 4, "d": [78,786], "a": 1 }, + { "px": [320,464], "src": [0,16], "f": 0, "t": 4, "d": [78,948], "a": 1 }, + { "px": [240,64], "src": [16,16], "f": 0, "t": 5, "d": [77,143], "a": 1 }, + { "px": [128,80], "src": [16,16], "f": 0, "t": 5, "d": [77,168], "a": 1 }, + { "px": [320,96], "src": [16,16], "f": 0, "t": 5, "d": [77,212], "a": 1 }, + { "px": [416,96], "src": [16,16], "f": 0, "t": 5, "d": [77,218], "a": 1 }, + { "px": [464,160], "src": [16,16], "f": 0, "t": 5, "d": [77,349], "a": 1 }, + { "px": [448,176], "src": [16,16], "f": 0, "t": 5, "d": [77,380], "a": 1 }, + { "px": [112,192], "src": [16,16], "f": 0, "t": 5, "d": [77,391], "a": 1 }, + { "px": [416,192], "src": [16,16], "f": 0, "t": 5, "d": [77,410], "a": 1 }, + { "px": [400,208], "src": [16,16], "f": 0, "t": 5, "d": [77,441], "a": 1 }, + { "px": [400,288], "src": [16,16], "f": 0, "t": 5, "d": [77,601], "a": 1 }, + { "px": [448,320], "src": [16,16], "f": 0, "t": 5, "d": [77,668], "a": 1 }, + { "px": [432,352], "src": [16,16], "f": 0, "t": 5, "d": [77,731], "a": 1 }, + { "px": [416,368], "src": [16,16], "f": 0, "t": 5, "d": [77,762], "a": 1 }, + { "px": [384,464], "src": [16,16], "f": 0, "t": 5, "d": [77,952], "a": 1 }, + { "px": [240,32], "src": [16,32], "f": 0, "t": 9, "d": [76,79], "a": 1 }, + { "px": [208,48], "src": [16,32], "f": 0, "t": 9, "d": [76,109], "a": 1 }, + { "px": [448,64], "src": [16,32], "f": 0, "t": 9, "d": [76,156], "a": 1 }, + { "px": [384,80], "src": [16,32], "f": 0, "t": 9, "d": [76,184], "a": 1 }, + { "px": [464,80], "src": [16,32], "f": 0, "t": 9, "d": [76,189], "a": 1 }, + { "px": [112,128], "src": [16,32], "f": 0, "t": 9, "d": [76,263], "a": 1 }, + { "px": [320,144], "src": [16,32], "f": 0, "t": 9, "d": [76,308], "a": 1 }, + { "px": [336,192], "src": [16,32], "f": 0, "t": 9, "d": [76,405], "a": 1 }, + { "px": [448,272], "src": [16,32], "f": 0, "t": 9, "d": [76,572], "a": 1 }, + { "px": [304,288], "src": [16,32], "f": 0, "t": 9, "d": [76,595], "a": 1 }, + { "px": [320,304], "src": [16,32], "f": 0, "t": 9, "d": [76,628], "a": 1 }, + { "px": [336,320], "src": [16,32], "f": 0, "t": 9, "d": [76,661], "a": 1 }, + { "px": [272,352], "src": [16,32], "f": 0, "t": 9, "d": [76,721], "a": 1 }, + { "px": [288,368], "src": [16,32], "f": 0, "t": 9, "d": [76,754], "a": 1 }, + { "px": [32,32], "src": [32,32], "f": 0, "t": 10, "d": [75,66], "a": 1 }, + { "px": [416,64], "src": [32,32], "f": 0, "t": 10, "d": [75,154], "a": 1 }, + { "px": [320,80], "src": [32,32], "f": 0, "t": 10, "d": [75,180], "a": 1 }, + { "px": [304,96], "src": [32,32], "f": 0, "t": 10, "d": [75,211], "a": 1 }, + { "px": [448,160], "src": [32,32], "f": 0, "t": 10, "d": [75,348], "a": 1 }, + { "px": [416,176], "src": [32,32], "f": 0, "t": 10, "d": [75,378], "a": 1 }, + { "px": [400,192], "src": [32,32], "f": 0, "t": 10, "d": [75,409], "a": 1 }, + { "px": [400,272], "src": [32,32], "f": 0, "t": 10, "d": [75,569], "a": 1 }, + { "px": [256,288], "src": [32,32], "f": 0, "t": 10, "d": [75,592], "a": 1 }, + { "px": [384,288], "src": [32,32], "f": 0, "t": 10, "d": [75,600], "a": 1 }, + { "px": [432,320], "src": [32,32], "f": 0, "t": 10, "d": [75,667], "a": 1 }, + { "px": [416,352], "src": [32,32], "f": 0, "t": 10, "d": [75,730], "a": 1 }, + { "px": [176,48], "src": [48,48], "f": 0, "t": 15, "d": [74,107], "a": 1 }, + { "px": [48,144], "src": [0,0], "f": 0, "t": 0, "d": [73,291], "a": 1 }, + { "px": [48,176], "src": [0,0], "f": 0, "t": 0, "d": [73,355], "a": 1 }, + { "px": [336,416], "src": [0,0], "f": 0, "t": 0, "d": [73,853], "a": 1 }, + { "px": [368,416], "src": [0,0], "f": 0, "t": 0, "d": [73,855], "a": 1 } + ], + "seed": 3670360, "overrideTilesetUid": null, "gridTiles": [], "entityInstances": [] diff --git a/map/maps/test/backups/a44281a0-3740-11f0-9e9d-278017e89d25_2025-06-06_14-16-58_crash/test.ldtk b/map/maps/test/backups/a44281a0-3740-11f0-9e9d-278017e89d25_2025-06-06_14-16-58_crash/test.ldtk new file mode 100644 index 0000000..0eba354 --- /dev/null +++ b/map/maps/test/backups/a44281a0-3740-11f0-9e9d-278017e89d25_2025-06-06_14-16-58_crash/test.ldtk @@ -0,0 +1,485 @@ +{ + "__header__": { + "fileType": "LDtk Project JSON", + "app": "LDtk", + "doc": "https://ldtk.io/json", + "schema": "https://ldtk.io/files/JSON_SCHEMA.json", + "appAuthor": "Sebastien 'deepnight' Benard", + "appVersion": "1.5.3", + "url": "https://ldtk.io" + }, + "iid": "a44281a0-3740-11f0-9e9d-278017e89d25", + "jsonVersion": "1.5.3", + "appBuildId": 485696, + "nextUid": 81, + "identifierStyle": "Capitalize", + "toc": [], + "worldLayout": "Free", + "worldGridWidth": 256, + "worldGridHeight": 256, + "defaultLevelWidth": 256, + "defaultLevelHeight": 256, + "defaultPivotX": 0, + "defaultPivotY": 0, + "defaultGridSize": 16, + "defaultEntityWidth": 16, + "defaultEntityHeight": 16, + "bgColor": "#40465B", + "defaultLevelBgColor": "#696A79", + "minifyJson": false, + "externalLevels": false, + "exportTiled": false, + "simplifiedExport": false, + "imageExportMode": "None", + "exportLevelBg": true, + "pngFilePattern": null, + "backupOnSave": false, + "backupLimit": 10, + "backupRelPath": null, + "levelNamePattern": "Level_%idx", + "tutorialDesc": null, + "customCommands": [], + "flags": [], + "defs": { "layers": [ + { + "__type": "AutoLayer", + "identifier": "AutoLayer", + "type": "AutoLayer", + "uid": 3, + "doc": null, + "uiColor": null, + "gridSize": 8, + "guideGridWid": 0, + "guideGridHei": 0, + "displayOpacity": 1, + "inactiveOpacity": 1, + "hideInList": false, + "hideFieldsWhenInactive": false, + "canSelectWhenInactive": true, + "renderInWorldView": true, + "pxOffsetX": 0, + "pxOffsetY": 0, + "parallaxFactorX": 0, + "parallaxFactorY": 0, + "parallaxScaling": true, + "requiredTags": [], + "excludedTags": [], + "autoTilesKilledByOtherLayerUid": null, + "uiFilterTags": [], + "useAsyncRender": false, + "intGridValues": [], + "intGridValuesGroups": [], + "autoRuleGroups": [ + { + "uid": 76, + "name": "tree", + "color": null, + "icon": null, + "active": true, + "isOptional": false, + "rules": [ + { + "uid": 77, + "active": true, + "size": 3, + "tileRectsIds": [[32]], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [0,-2,0,-2,2,2,0,2,0], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0.5, + "pivotY": 0, + "outOfBoundsValue": 2, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 2754075, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 78, + "active": true, + "size": 3, + "tileRectsIds": [[36]], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [0,-2,0,0,2,-2,0,0,0], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 2, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 9830521, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 79, + "active": false, + "size": 3, + "tileRectsIds": [[44]], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [0,0,0,0,2,-2,0,-2,0], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 2, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 9452911, + "perlinScale": 0.2, + "perlinOctaves": 2 + }, + { + "uid": 80, + "active": true, + "size": 3, + "tileRectsIds": [[40]], + "alpha": 1, + "chance": 1, + "breakOnMatch": true, + "pattern": [0,0,0,-2,2,0,0,-2,0], + "flipX": false, + "flipY": false, + "xModulo": 1, + "yModulo": 1, + "xOffset": 0, + "yOffset": 0, + "tileXOffset": 0, + "tileYOffset": 0, + "tileRandomXMin": 0, + "tileRandomXMax": 0, + "tileRandomYMin": 0, + "tileRandomYMax": 0, + "checker": "None", + "tileMode": "Single", + "pivotX": 0, + "pivotY": 0, + "outOfBoundsValue": 2, + "invalidated": false, + "perlinActive": false, + "perlinSeed": 4245908, + "perlinScale": 0.2, + "perlinOctaves": 2 + } + ], + "usesWizard": false, + "requiredBiomeValues": [], + "biomeRequirementMode": 0 + } + ], + "autoSourceLayerDefUid": 2, + "tilesetDefUid": 72, + "tilePivotX": 0, + "tilePivotY": 0, + "biomeFieldUid": null + }, + { + "__type": "IntGrid", + "identifier": "Things", + "type": "IntGrid", + "uid": 2, + "doc": null, + "uiColor": null, + "gridSize": 8, + "guideGridWid": 0, + "guideGridHei": 0, + "displayOpacity": 1, + "inactiveOpacity": 1, + "hideInList": false, + "hideFieldsWhenInactive": false, + "canSelectWhenInactive": true, + "renderInWorldView": true, + "pxOffsetX": 0, + "pxOffsetY": 0, + "parallaxFactorX": 0, + "parallaxFactorY": 0, + "parallaxScaling": true, + "requiredTags": [], + "excludedTags": [], + "autoTilesKilledByOtherLayerUid": null, + "uiFilterTags": [], + "useAsyncRender": false, + "intGridValues": [ + { "value": 1, "identifier": "empty", "color": "#E0F8D0", "tile": null, "groupUid": 0 }, + { "value": 2, "identifier": "tree", "color": "#346856", "tile": null, "groupUid": 0 } + ], + "intGridValuesGroups": [], + "autoRuleGroups": [], + "autoSourceLayerDefUid": null, + "tilesetDefUid": null, + "tilePivotX": 0, + "tilePivotY": 0, + "biomeFieldUid": null + } + ], "entities": [], "tilesets": [ + { + "__cWid": 2, + "__cHei": 2, + "identifier": "Tree_tileset", + "uid": 1, + "relPath": "../../sprites/bg/tree-tileset.png", + "embedAtlas": null, + "pxWid": 32, + "pxHei": 32, + "tileGridSize": 16, + "spacing": 0, + "padding": 0, + "tags": [], + "tagsSourceEnumUid": null, + "enumTags": [], + "customData": [], + "savedSelections": [], + "cachedPixelData": { "opaqueTiles": "1111", "averageColors": "f897f686f797f686" } + }, + { + "__cWid": 16, + "__cHei": 16, + "identifier": "Tileset", + "uid": 72, + "relPath": "../../build/tileset.png", + "embedAtlas": null, + "pxWid": 128, + "pxHei": 128, + "tileGridSize": 8, + "spacing": 0, + "padding": 0, + "tags": [], + "tagsSourceEnumUid": null, + "enumTags": [], + "customData": [], + "savedSelections": [], + "cachedPixelData": { + "opaqueTiles": "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + "averageColors": "fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfcdbfbdafbdafbdafbdafcdbfcdbfcdbfcdbfbcafac9fbcafac9fdfcfdfcfdfcf897f797f797f575f897f8a8f786f575f897f797f797f576f897f787f787f575fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcf455f897f685f575fdecfac9fbdbfcebfbcaf9b9f9b9fcdbfbcafab9f897f897fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfbcafbdbfbcafbcafbcafbcafbcafbdbfbcafbcafbcafacafbcafbcafbcafbcafbcafbcafbdbfbdbfacafbdbfbcafbcafbcafbcafbcafbcafbcafbdbfbcafbdbfbcafbdbfbdbfbcafdecfcdbfcdbfdecfdecfcebfcecfcdbfcdbfcdbfcdbfdecfcdbfcdbfcdbfcdbfcdbfcdbfcdbfcdbfcdbfcdbfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfbcaf8a7facafcebfac9facafab9fdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfcfdfc" + } + } + ], "enums": [], "externalEnums": [], "levelFields": [] }, + "levels": [ + { + "identifier": "Level_0", + "iid": "a4436c00-3740-11f0-9e9d-69511a8c9b7b", + "uid": 0, + "worldX": 0, + "worldY": 0, + "worldDepth": 0, + "pxWid": 512, + "pxHei": 512, + "__bgColor": "#696A79", + "bgColor": null, + "useAutoIdentifier": true, + "bgRelPath": null, + "bgPos": null, + "bgPivotX": 0.5, + "bgPivotY": 0.5, + "__smartColor": "#ADADB5", + "__bgPos": null, + "externalRelPath": null, + "fieldInstances": [], + "layerInstances": [ + { + "__identifier": "AutoLayer", + "__type": "AutoLayer", + "__cWid": 32, + "__cHei": 32, + "__gridSize": 16, + "__opacity": 1, + "__pxTotalOffsetX": 0, + "__pxTotalOffsetY": 0, + "__tilesetDefUid": 72, + "__tilesetRelPath": "../../build/tileset.png", + "iid": "663fc2e0-3740-11f0-9e9d-2794dd41d15e", + "levelId": 0, + "layerDefUid": 3, + "pxOffsetX": 0, + "pxOffsetY": 0, + "visible": true, + "optionalRules": [], + "intGridCsv": [], + "autoLayerTiles": [ + { "px": [224,32], "src": [64,16], "f": 0, "t": 40, "d": [80,78], "a": 1 }, + { "px": [160,48], "src": [64,16], "f": 0, "t": 40, "d": [80,106], "a": 1 }, + { "px": [32,80], "src": [64,16], "f": 0, "t": 40, "d": [80,162], "a": 1 }, + { "px": [96,80], "src": [64,16], "f": 0, "t": 40, "d": [80,166], "a": 1 }, + { "px": [176,80], "src": [64,16], "f": 0, "t": 40, "d": [80,171], "a": 1 }, + { "px": [448,80], "src": [64,16], "f": 0, "t": 40, "d": [80,188], "a": 1 }, + { "px": [208,96], "src": [64,16], "f": 0, "t": 40, "d": [80,205], "a": 1 }, + { "px": [80,128], "src": [64,16], "f": 0, "t": 40, "d": [80,261], "a": 1 }, + { "px": [384,128], "src": [64,16], "f": 0, "t": 40, "d": [80,280], "a": 1 }, + { "px": [304,144], "src": [64,16], "f": 0, "t": 40, "d": [80,307], "a": 1 }, + { "px": [96,160], "src": [64,16], "f": 0, "t": 40, "d": [80,326], "a": 1 }, + { "px": [176,176], "src": [64,16], "f": 0, "t": 40, "d": [80,363], "a": 1 }, + { "px": [80,192], "src": [64,16], "f": 0, "t": 40, "d": [80,389], "a": 1 }, + { "px": [192,192], "src": [64,16], "f": 0, "t": 40, "d": [80,396], "a": 1 }, + { "px": [320,192], "src": [64,16], "f": 0, "t": 40, "d": [80,404], "a": 1 }, + { "px": [208,208], "src": [64,16], "f": 0, "t": 40, "d": [80,429], "a": 1 }, + { "px": [336,208], "src": [64,16], "f": 0, "t": 40, "d": [80,437], "a": 1 }, + { "px": [352,240], "src": [64,16], "f": 0, "t": 40, "d": [80,502], "a": 1 }, + { "px": [304,304], "src": [64,16], "f": 0, "t": 40, "d": [80,627], "a": 1 }, + { "px": [384,304], "src": [64,16], "f": 0, "t": 40, "d": [80,632], "a": 1 }, + { "px": [320,320], "src": [64,16], "f": 0, "t": 40, "d": [80,660], "a": 1 }, + { "px": [256,352], "src": [64,16], "f": 0, "t": 40, "d": [80,720], "a": 1 }, + { "px": [336,352], "src": [64,16], "f": 0, "t": 40, "d": [80,725], "a": 1 }, + { "px": [368,352], "src": [64,16], "f": 0, "t": 40, "d": [80,727], "a": 1 }, + { "px": [272,368], "src": [64,16], "f": 0, "t": 40, "d": [80,753], "a": 1 }, + { "px": [400,368], "src": [64,16], "f": 0, "t": 40, "d": [80,761], "a": 1 }, + { "px": [288,384], "src": [64,16], "f": 0, "t": 40, "d": [80,786], "a": 1 }, + { "px": [320,464], "src": [64,16], "f": 0, "t": 40, "d": [80,948], "a": 1 }, + { "px": [64,32], "src": [32,16], "f": 0, "t": 36, "d": [78,68], "a": 1 }, + { "px": [176,32], "src": [32,16], "f": 0, "t": 36, "d": [78,75], "a": 1 }, + { "px": [240,32], "src": [32,16], "f": 0, "t": 36, "d": [78,79], "a": 1 }, + { "px": [96,48], "src": [32,16], "f": 0, "t": 36, "d": [78,102], "a": 1 }, + { "px": [128,48], "src": [32,16], "f": 0, "t": 36, "d": [78,104], "a": 1 }, + { "px": [208,48], "src": [32,16], "f": 0, "t": 36, "d": [78,109], "a": 1 }, + { "px": [448,64], "src": [32,16], "f": 0, "t": 36, "d": [78,156], "a": 1 }, + { "px": [64,80], "src": [32,16], "f": 0, "t": 36, "d": [78,164], "a": 1 }, + { "px": [384,80], "src": [32,16], "f": 0, "t": 36, "d": [78,184], "a": 1 }, + { "px": [464,80], "src": [32,16], "f": 0, "t": 36, "d": [78,189], "a": 1 }, + { "px": [240,96], "src": [32,16], "f": 0, "t": 36, "d": [78,207], "a": 1 }, + { "px": [112,128], "src": [32,16], "f": 0, "t": 36, "d": [78,263], "a": 1 }, + { "px": [48,144], "src": [32,16], "f": 0, "t": 36, "d": [78,291], "a": 1 }, + { "px": [192,144], "src": [32,16], "f": 0, "t": 36, "d": [78,300], "a": 1 }, + { "px": [240,144], "src": [32,16], "f": 0, "t": 36, "d": [78,303], "a": 1 }, + { "px": [320,144], "src": [32,16], "f": 0, "t": 36, "d": [78,308], "a": 1 }, + { "px": [48,176], "src": [32,16], "f": 0, "t": 36, "d": [78,355], "a": 1 }, + { "px": [336,192], "src": [32,16], "f": 0, "t": 36, "d": [78,405], "a": 1 }, + { "px": [448,272], "src": [32,16], "f": 0, "t": 36, "d": [78,572], "a": 1 }, + { "px": [304,288], "src": [32,16], "f": 0, "t": 36, "d": [78,595], "a": 1 }, + { "px": [320,304], "src": [32,16], "f": 0, "t": 36, "d": [78,628], "a": 1 }, + { "px": [336,320], "src": [32,16], "f": 0, "t": 36, "d": [78,661], "a": 1 }, + { "px": [368,320], "src": [32,16], "f": 0, "t": 36, "d": [78,663], "a": 1 }, + { "px": [272,352], "src": [32,16], "f": 0, "t": 36, "d": [78,721], "a": 1 }, + { "px": [288,368], "src": [32,16], "f": 0, "t": 36, "d": [78,754], "a": 1 }, + { "px": [304,384], "src": [32,16], "f": 0, "t": 36, "d": [78,787], "a": 1 }, + { "px": [336,416], "src": [32,16], "f": 0, "t": 36, "d": [78,853], "a": 1 }, + { "px": [368,416], "src": [32,16], "f": 0, "t": 36, "d": [78,855], "a": 1 }, + { "px": [320,448], "src": [32,16], "f": 0, "t": 36, "d": [78,916], "a": 1 }, + { "px": [352,448], "src": [32,16], "f": 0, "t": 36, "d": [78,918], "a": 1 }, + { "px": [384,448], "src": [32,16], "f": 0, "t": 36, "d": [78,920], "a": 1 }, + { "px": [32,32], "src": [0,16], "f": 0, "t": 32, "d": [77,66], "a": 1 }, + { "px": [416,64], "src": [0,16], "f": 0, "t": 32, "d": [77,154], "a": 1 }, + { "px": [320,80], "src": [0,16], "f": 0, "t": 32, "d": [77,180], "a": 1 }, + { "px": [304,96], "src": [0,16], "f": 0, "t": 32, "d": [77,211], "a": 1 }, + { "px": [176,144], "src": [0,16], "f": 0, "t": 32, "d": [77,299], "a": 1 }, + { "px": [224,144], "src": [0,16], "f": 0, "t": 32, "d": [77,302], "a": 1 }, + { "px": [448,160], "src": [0,16], "f": 0, "t": 32, "d": [77,348], "a": 1 }, + { "px": [416,176], "src": [0,16], "f": 0, "t": 32, "d": [77,378], "a": 1 }, + { "px": [400,192], "src": [0,16], "f": 0, "t": 32, "d": [77,409], "a": 1 }, + { "px": [400,272], "src": [0,16], "f": 0, "t": 32, "d": [77,569], "a": 1 }, + { "px": [256,288], "src": [0,16], "f": 0, "t": 32, "d": [77,592], "a": 1 }, + { "px": [384,288], "src": [0,16], "f": 0, "t": 32, "d": [77,600], "a": 1 }, + { "px": [432,320], "src": [0,16], "f": 0, "t": 32, "d": [77,667], "a": 1 }, + { "px": [416,352], "src": [0,16], "f": 0, "t": 32, "d": [77,730], "a": 1 } + ], + "seed": 3670360, + "overrideTilesetUid": null, + "gridTiles": [], + "entityInstances": [] + }, + { + "__identifier": "Things", + "__type": "IntGrid", + "__cWid": 32, + "__cHei": 32, + "__gridSize": 16, + "__opacity": 1, + "__pxTotalOffsetX": 0, + "__pxTotalOffsetY": 0, + "__tilesetDefUid": null, + "__tilesetRelPath": null, + "iid": "e8ed8c00-3740-11f0-9e9d-a3fe0fb66f38", + "levelId": 0, + "layerDefUid": 2, + "pxOffsetX": 0, + "pxOffsetY": 0, + "visible": true, + "optionalRules": [], + "intGridCsv": [ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1, + 1,1,1,1,1,2,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2, + 1,2,2,2,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2,1,1,2, + 1,2,2,2,1,1,1,1,1,1,1,1,1,1,2,2,2,1,1,1,1,1,2,2,2,1,2,2,2,1,1,2,1,2,1, + 1,1,1,1,1,2,2,2,2,2,1,2,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1,1, + 1,2,2,1,1,1,2,2,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1, + 1,1,1,2,2,1,1,1,2,1,1,1,1,1,1,1,2,2,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1, + 2,1,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,2,2,1,2,2,1,1,1,2,2,1,1,1,1,1,1, + 1,1,2,1,1,1,1,1,1,1,1,2,2,1,1,1,2,2,2,2,2,1,1,1,1,2,1,1,1,1,1,1,1,2,2, + 1,1,1,1,1,2,1,1,1,2,1,1,1,2,2,2,2,2,1,1,1,1,2,1,1,1,1,1,2,2,2,1,1,1,1, + 1,1,1,1,2,2,2,1,1,1,1,2,2,2,1,1,1,1,1,2,2,1,1,1,2,2,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2, + 2,1,1,1,1,2,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,2,1, + 1,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,2,1,2,1, + 1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,2,1,1,1,2, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,2,1,2,1,1,2,2,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1,2,2,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1 + ], + "autoLayerTiles": [], + "seed": 657921, + "overrideTilesetUid": null, + "gridTiles": [], + "entityInstances": [] + } + ], + "__neighbours": [] + } + ], + "worlds": [], + "dummyWorldIid": "a442a8b0-3740-11f0-9e9d-354f9776f167" +}
\ No newline at end of file diff --git a/map/objects.gbasm b/map/objects.gbasm index a89a88d..df15e09 100644 --- a/map/objects.gbasm +++ b/map/objects.gbasm @@ -324,7 +324,7 @@ Earcopter_Attack_Box_Action: Fimsh_Attack_Box_Action: LD (HL), $00 - .START_SCRIPT =.Script + .START_SCRIPT =Fimsh_Dialogue_Script LD A, $enum_dungeon_dialogue_mode LD $mem_requested_mode, A @@ -338,16 +338,8 @@ Fimsh_Attack_Box_Action: SET 5, A RES 3, A LD $mem_map_loading_flags, A - RET - .Script: - .TEXT =fimsh_eegg_1t =fimsh_eegg_1b - .TEXT =fimsh_eegg_2t =Empty - .TEXT =fimsh_eegg_3t =fimsh_eegg_3b - .TEXT =fimsh_eegg_4t =Empty - .END - Restore_EP_Action: LD A, $mem_bunny_mana ADD $05 diff --git a/modes/dungeongeneration.gbasm b/modes/dungeongeneration.gbasm index c459805..172093f 100644 --- a/modes/dungeongeneration.gbasm +++ b/modes/dungeongeneration.gbasm @@ -32,7 +32,8 @@ New_Dungeon: LD A, $00 LD $mem_display_flag, A - LD HL, =Dungeon + LD A, bank(=Dungeon) + LD HL, ptr(=Dungeon) CALL =Load_Dungeon_Txt LD A, $f4 @@ -51,7 +52,8 @@ New_Dungeon: CALL =Reset_Map - LD HL, =Dungeon + LD A, bank(=Dungeon) + LD HL, ptr(=Dungeon) CALL =Load_Dungeon_Spawn_patterns LD A, $entity_questgoalbunny_index LD $mem_loaded_special_entity_index, A @@ -96,6 +98,8 @@ New_Dungeon: CALL =Generation_Event_Execution + LD HL, $mem_entities_list + CALL =Center_viewport_around_entity CALL =Load_Prepared_Map CALL =VBlank_Wait diff --git a/modes/maploading.gbasm b/modes/maploading.gbasm index d96bca0..72f24ed 100644 --- a/modes/maploading.gbasm +++ b/modes/maploading.gbasm @@ -32,7 +32,8 @@ Map_Loading: LD A, $00 LD $mem_display_flag, A - LD HL, =Dungeon + LD A, bank(=Dungeon) + LD HL, ptr(=Dungeon) CALL =Load_Dungeon_Txt LD A, $f4 @@ -50,12 +51,14 @@ Map_Loading: CALL =Reset_Map + .LOAD_BANK_OF =_map_Test LD HL, $mem_dungeon_map LD BC, $0080 - LD DE, =_map_Test + LD DE, ptr(=_map_Test) CALL =memcpy - LD HL, =Dungeon + LD A, bank(=Dungeon) + LD HL, ptr(=Dungeon) CALL =Load_Dungeon_Spawn_patterns LD A, $entity_questgoalbunny_index LD $mem_loaded_special_entity_index, A @@ -64,7 +67,9 @@ Map_Loading: LD B, $0f LD C, $0f CALL =Initialize_Bunny - CALL =Reset_viewport_thingies + + LD HL, $mem_entities_list + CALL =Center_viewport_around_entity LD A, $mem_map_loading_flags OR $01 diff --git a/playerattacks.gbasm b/playerattacks.gbasm index 4847c4c..41eca24 100644 --- a/playerattacks.gbasm +++ b/playerattacks.gbasm @@ -111,10 +111,12 @@ Attack_List: ; 00 .Empty: ; Attack menu name string - .DB =Empty + .DB bank(=Empty) + .DB ptr(=Empty) ; Attack function - .DB =Empty_Attack + .ASSERT bank(=Empty_Attack) $00 + .DB ptr(=Empty_Attack) ; Energy point cost .DB $00 @@ -124,10 +126,12 @@ Attack_List: ; 01 .Hop: ; Attack menu name string - .DB =Hop_Attack_Menu_Txt + .DB bank(=Hop_Attack_Menu_Txt) + .DB ptr(=Hop_Attack_Menu_Txt) ; Attack function - .DB =Hop_Attack + .ASSERT bank(=Hop_Attack) $00 + .DB ptr(=Hop_Attack) ; Energy point cost .DB $01 @@ -137,10 +141,12 @@ Attack_List: ; 02 .Heal: ; Attack menu name string - .DB =Heal_Attack_Menu_Txt + .DB bank(=Heal_Attack_Menu_Txt) + .DB ptr(=Heal_Attack_Menu_Txt) ;Attack function - .DB =Heal_Attack + .ASSERT bank(=Heal_Attack) $00 + .DB ptr(=Heal_Attack) ; Energy point cost .DB $05 @@ -150,10 +156,12 @@ Attack_List: ; 03 .Freeze: ; Attack menu name string - .DB =Freeze_Attack_Menu_Txt + .DB bank(=Freeze_Attack_Menu_Txt) + .DB ptr(=Freeze_Attack_Menu_Txt) ; Attack function - .DB =Freeze_Attack + .ASSERT bank(=Freeze_Attack) $00 + .DB ptr(=Freeze_Attack) ; Energy point cost .DB $05 @@ -163,10 +171,12 @@ Attack_List: ; 04 .Earcoptr: ; Attack menu name string - .DB =Earcoptr_Attack_Menu_Txt + .DB bank(=Earcoptr_Attack_Menu_Txt) + .DB ptr(=Earcoptr_Attack_Menu_Txt) ; Attack function - .DB =Earcoptr_Attack + .ASSERT bank(=Earcoptr_Attack) $00 + .DB ptr(=Earcoptr_Attack) ; Energy point cost .DB $04 diff --git a/sprites/bg/tree-tileset-16x16.png b/sprites/bg/tree-tileset-16x16.png Binary files differnew file mode 100644 index 0000000..ea55834 --- /dev/null +++ b/sprites/bg/tree-tileset-16x16.png diff --git a/tiles.gbasm b/tiles.gbasm index 2f9eca8..1d74d33 100644 --- a/tiles.gbasm +++ b/tiles.gbasm @@ -1,41 +1,45 @@ Load_Tile: + .LOAD_BANK_OF =Entity_Tile_Image_Data + LD HL, $8020 - LD DE, =Entity_Tile_Image_Data.Bunny + LD DE, ptr(=Entity_Tile_Image_Data.Bunny) LD BC, =Entity_Tile_Image_Data.Bunny.end-=Entity_Tile_Image_Data.Bunny CALL =memcpy LD HL, $8800 - LD DE, =Font_Data + LD DE, ptr(=Font_Data) LD BC, =Font_Data.end-=Font_Data CALL =memcpy LD HL, $9100 - LD DE, =GUI_Border_Data + LD DE, ptr(=GUI_Border_Data) LD BC, =GUI_Border_Data.end-=GUI_Border_Data CALL =memcpy LD HL, $9200 - LD DE, =BG_Tile_Image_Data + LD DE, ptr(=BG_Tile_Image_Data) LD BC, =BG_Tile_Image_Data.end-=BG_Tile_Image_Data CALL =memcpy LD HL, $9600 - LD DE, =OBJ_Tile_Image_Data + LD DE, ptr(=OBJ_Tile_Image_Data) LD BC, =OBJ_Tile_Image_Data.end-=OBJ_Tile_Image_Data CALL =memcpy LD HL, $8f00 - LD DE, =Small_sprites + LD DE, ptr(=Small_sprites) LD BC, =Small_sprites.end-=Small_sprites CALL =memcpy LD HL, $8620 - LD DE, =Animation_Sprites_Data + LD DE, ptr(=Animation_Sprites_Data) LD BC, =Animation_Sprites_Data.end-=Animation_Sprites_Data CALL =memcpy RET Reload_Entities_Tile_Data: + LD A, $entity_sprite_data_bank + .CHANGE_BANK_TO_A LD HL, $mem_loaded_enemies_indices LD E, $03 .loop: @@ -65,7 +69,7 @@ Reload_Entities_Tile_Data: LD L, A LD A, H AND $0f - OR $80 + OR high($VRAM_start) LD H, A LD A, (BC) @@ -74,10 +78,8 @@ Reload_Entities_Tile_Data: LD A, (BC) LD E, A - LD B, B LD BC, $00c0 CALL =memcpy - LD B, B POP DE POP HL diff --git a/utils.gbasm b/utils.gbasm index 5cb39ca..c16160c 100644 --- a/utils.gbasm +++ b/utils.gbasm @@ -292,3 +292,23 @@ VBlank_Wait: .End: POP AF RET + +.MACRODEF CHANGE_BANK_TO_A + LD $reg_rom_bank, A + LD $saved_rom_bank, A +.END + +.MACRODEF LOAD_BANK_OF =addr + .ASSERT bank(.) $00 + LD A, bank(=addr) + .CHANGE_BANK_TO_A +.END + +.MACRODEF BANK_CALL =addr + .ASSERT bank(.) $00 + PUSH AF + LD A, bank(=addr) + .CHANGE_BANK_TO_A + POP AF + CALL ptr(=addr) +.END |