diff options
-rw-r--r-- | asm/macros.inc | 129 | ||||
-rw-r--r-- | asm/macros/asm.inc | 4 | ||||
-rw-r--r-- | asm/macros/field_effect_script.inc | 16 | ||||
-rw-r--r-- | asm/macros/function.inc | 10 | ||||
-rw-r--r-- | asm/macros/m4a.inc | 10 | ||||
-rw-r--r-- | asm/macros/map.inc | 125 | ||||
-rw-r--r-- | asm/macros/pokemon_data.inc | 56 | ||||
-rw-r--r-- | asm/macros/window.inc | 35 | ||||
-rw-r--r-- | data/battle_anim_scripts.s | 62 | ||||
-rw-r--r-- | data/map_events.s | 1 | ||||
-rw-r--r-- | data/maps.s | 1 | ||||
-rwxr-xr-x | graphics/party_menu/slot_main.bin | 1 | ||||
-rwxr-xr-x | graphics/party_menu/slot_main_no_hp.bin | 1 | ||||
-rwxr-xr-x | graphics/party_menu/slot_wide.bin | 1 | ||||
-rwxr-xr-x | graphics/party_menu/slot_wide_empty.bin | bin | 0 -> 54 bytes | |||
-rwxr-xr-x | graphics/party_menu/slot_wide_no_hp.bin | 1 | ||||
-rw-r--r-- | include/constants/global.h | 9 | ||||
-rw-r--r-- | include/gba/m4a_internal.h | 2 | ||||
-rw-r--r-- | include/global.fieldmap.h | 12 | ||||
-rw-r--r-- | src/data/party_menu.h | 36 | ||||
-rw-r--r-- | src/evolution_graphics.c | 10 | ||||
-rwxr-xr-x | src/item_use.c | 8 | ||||
-rw-r--r-- | src/m4a.c | 2 | ||||
-rw-r--r-- | src/money.c | 2 | ||||
-rwxr-xr-x | src/party_menu.c | 24 | ||||
-rw-r--r-- | tools/mapjson/mapjson.cpp | 2 |
26 files changed, 179 insertions, 381 deletions
diff --git a/asm/macros.inc b/asm/macros.inc index 77f44a847..95bb4e31b 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -1,8 +1,6 @@ .include "asm/macros/asm.inc" .include "asm/macros/function.inc" .include "asm/macros/movement.inc" - .include "asm/macros/window.inc" - .include "asm/macros/pokemon_data.inc" .include "asm/macros/map.inc" .include "asm/macros/field_effect_script.inc" .include "asm/macros/trainer_hill.inc" @@ -16,130 +14,3 @@ .include "asm/macros/battle_frontier/battle_pyramid.inc" .include "asm/macros/battle_frontier/battle_tower.inc" .include "asm/macros/battle_frontier/frontier_util.inc" - - .macro region_map_entry x, y, width, height, name - .byte \x - .byte \y - .byte \width - .byte \height - .4byte gMapName_\name - .endm - - .macro obj_tiles address, uncompressed_size, tag = 0 - .4byte \address - .2byte \uncompressed_size - .2byte \tag - .endm - - .macro null_obj_tiles - obj_tiles 0, 0, 0 - .endm - - .macro obj_pal address, tag - .4byte \address - .2byte \tag - .2byte 0@ padding - .endm - - .macro null_obj_pal - obj_pal 0, 0 - .endm - - .macro paired_pals tag, address - .2byte \tag - .2byte 0 @ padding - .4byte \address - .endm - -@ For object animation frames. - .macro obj_frame_tiles address, uncompressed_size - .4byte \address - .2byte \uncompressed_size - .2byte 0 @ padding - .endm - - .macro spr_template tile_tag, pal_tag, oam, anims, images, affine_anims, callback - .2byte \tile_tag - .2byte \pal_tag - .4byte \oam - .4byte \anims - .4byte \images - .4byte \affine_anims - .4byte \callback - .endm - -@ Berry trees have a table defining the palette slot used for each of their 5 -@ stages. However, the first 2 stages always use the same slots regardless of -@ the type of tree and the slots of the last 3 stages always equal each other. - .macro berry_tree_palette_slot_table slot - .byte 3, 4, \slot, \slot, \slot - .endm - - .macro subsprite x, y, priority, tile_num_offset, size - .byte \x - .byte \y - .2byte ((\priority) << 14) | ((\tile_num_offset) << 4) | SPRITE_SIZE_\size - .endm - - .macro obj_image_anim_frame pic_id, duration, flags = 0 - .2byte \pic_id - .byte (\flags) | (\duration) - .byte 0 @ padding - .endm - - .macro obj_image_anim_loop count - .2byte 0xfffd - .byte \count - .byte 0 @ padding - .endm - - .macro obj_image_anim_jump target_index - .2byte 0xfffe - .byte \target_index - .byte 0 @ padding - .endm - - .macro obj_image_anim_end - .2byte 0xffff - .2byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_frame delta_x_scale, delta_y_scale, delta_angle, duration - .2byte \delta_x_scale - .2byte \delta_y_scale - .byte \delta_angle - .byte \duration - .2byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_loop count - .2byte 0x7ffd - .2byte \count - .4byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_jump target_index - .2byte 0x7ffe - .2byte \target_index - .4byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_end unknown=0 - .2byte 0x7fff - .2byte \unknown - .fill 4 @ padding - .endm - - .macro door_anim_frame unknown, offset - .byte \unknown - .byte 0 @ padding - .2byte \offset - .endm - - .macro door_anim_gfx metatile_num, unknown, unknown2, tile_addr, palette_addr - .2byte \metatile_num - .byte \unknown - .byte \unknown2 - .4byte \tile_addr - .4byte \palette_addr - .endm diff --git a/asm/macros/asm.inc b/asm/macros/asm.inc index 4ac003fab..3f70145d3 100644 --- a/asm/macros/asm.inc +++ b/asm/macros/asm.inc @@ -1,4 +1,4 @@ - .macro inc x + .macro inc x:req .set \x, \x + 1 .endm @@ -6,7 +6,7 @@ .set __enum__, \x .endm - .macro enum constant + .macro enum constant:req .equiv \constant, __enum__ inc __enum__ .endm diff --git a/asm/macros/field_effect_script.inc b/asm/macros/field_effect_script.inc index 597b89acb..38f7e3175 100644 --- a/asm/macros/field_effect_script.inc +++ b/asm/macros/field_effect_script.inc @@ -1,19 +1,21 @@ - .macro field_eff_loadtiles address +@ The first .byte argument of each macro below is an index into gFieldEffectScriptFuncs + + .macro field_eff_loadtiles address:req .byte 0 .4byte \address .endm - .macro field_eff_loadfadedpal address + .macro field_eff_loadfadedpal address:req .byte 1 .4byte \address .endm - .macro field_eff_loadpal address + .macro field_eff_loadpal address:req .byte 2 .4byte \address .endm - .macro field_eff_callnative address + .macro field_eff_callnative address:req .byte 3 .4byte \address .endm @@ -22,20 +24,20 @@ .byte 4 .endm - .macro field_eff_loadgfx_callnative tiles_address, palette_address, function_address + .macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req .byte 5 .4byte \tiles_address .4byte \palette_address .4byte \function_address .endm - .macro field_eff_loadtiles_callnative tiles_address, function_address + .macro field_eff_loadtiles_callnative tiles_address:req, function_address:req .byte 6 .4byte \tiles_address .4byte \function_address .endm - .macro field_eff_loadfadedpal_callnative palette_address, function_address + .macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req .byte 7 .4byte \palette_address .4byte \function_address diff --git a/asm/macros/function.inc b/asm/macros/function.inc index b109595df..0f4e6720c 100644 --- a/asm/macros/function.inc +++ b/asm/macros/function.inc @@ -1,15 +1,15 @@ - .macro arm_func_start name + .macro arm_func_start name:req .align 2, 0 .global \name .arm .type \name, %function .endm - .macro arm_func_end name + .macro arm_func_end name:req .size \name, .-\name .endm - .macro thumb_func_start name + .macro thumb_func_start name:req .align 2, 0 .global \name .thumb @@ -17,13 +17,13 @@ .type \name, %function .endm - .macro non_word_aligned_thumb_func_start name + .macro non_word_aligned_thumb_func_start name:req .global \name .thumb .thumb_func .type \name, %function .endm - .macro thumb_func_end name + .macro thumb_func_end name:req .size \name, .-\name .endm diff --git a/asm/macros/m4a.inc b/asm/macros/m4a.inc index 6c5abc09b..b22da3d63 100644 --- a/asm/macros/m4a.inc +++ b/asm/macros/m4a.inc @@ -1,13 +1,13 @@ - .macro song label, music_player, unknown + .macro song label:req, music_player:req, unknown:req .4byte \label .2byte \music_player .2byte \unknown .endm - .macro music_player info_struct, track_struct, unknown_1, unknown_2 + .macro music_player info_struct:req, track_struct:req, num_tracks:req, unknown:req .4byte \info_struct .4byte \track_struct - .byte \unknown_1 - .space 1 - .2byte \unknown_2 + .byte \num_tracks + .space 1 @ Padding + .2byte \unknown .endm diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 74ed06917..662257e41 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -1,83 +1,110 @@ - .macro map map_id +@ Most of the macros in this file are for arranging map event data, and are output by mapjson using data from each map's JSON file. + + @ Takes a MAP constant and outputs the map group and map number as separate bytes + .macro map map_id:req .byte \map_id >> 8 @ map group .byte \map_id & 0xFF @ map num .endm - .macro map_script type, address + @ Defines a map script. 'type' is any MAP_SCRIPT_* constant (see include/constants/map_scripts.h) + .macro map_script type:req, script:req .byte \type - .4byte \address + .4byte \script .endm - .macro map_script_2 word1, word2, address - .2byte \word1 - .2byte \word2 - .4byte \address + @ Defines an entry in a map script table (for either ON_WARP_INTO_MAP_TABLE or ON_FRAME_TABLE) + .macro map_script_2 var:req, compare:req, script:req + .2byte \var + .2byte \compare + .4byte \script .endm - .macro object_event index:req, gfx:req, replacement:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req - .byte \index, \gfx, \replacement, 0 - .2byte \x - .2byte \y - .byte \elevation, \movement_type, ((\y_radius << 4) | \x_radius), 0 - .2byte \trainer_type, \sight_radius_tree_etc + @ Defines an object event template for map data. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h + .macro object_event index:req, gfx:req, inConnection:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req + .byte \index + .byte \gfx + .byte \inConnection + .space 1 @ Padding + .2byte \x, \y + .byte \elevation + .byte \movement_type + .byte ((\y_radius << 4) | \x_radius) + .space 1 @ Padding + .2byte \trainer_type + .2byte \sight_radius_tree_etc .4byte \script .2byte \event_flag - .2byte 0 + .space 2 @ Padding inc _num_npcs .endm - .macro warp_def x, y, byte, warp, map_id + @ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h + .macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req .2byte \x, \y - .byte \byte, \warp + .byte \elevation + .byte \warpId .byte \map_id & 0xFF @ map num .byte \map_id >> 8 @ map group inc _num_warps .endm - .macro coord_event x, y, elevation, trigger, index, script + @ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h + .macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req .2byte \x, \y - .byte \elevation, 0 - .2byte \trigger, \index, 0 + .byte \elevation + .space 1 @ Padding + .2byte \trigger + .2byte \index + .space 2 @ Padding .4byte \script inc _num_traps .endm - .macro coord_weather_event x, y, elevation, weather - .2byte \x, \y - .byte \elevation, 0 - .2byte \weather - .2byte 0, 0 - .4byte 0 - inc _num_traps + @ Defines a weather coord event for map data. Any coord event is treated as a weather coord event if its script is NULL + .macro coord_weather_event x:req, y:req, elevation:req, weather:req + coord_event \x, \y, \elevation, \weather, 0, NULL .endm - .macro bg_event x, y, elevation, kind, arg6, arg7 + @ Defines a generic background event for map data. Mirrors the struct layout of BgEvent in include/global.fieldmap.h + @ 'kind' is any BG_EVENT_* constant (see include/constants/event_bg.h). + @ 'arg6' and 'arg7' are used differently depending on the bg event type. See macros below + .macro bg_event x:req, y:req, elevation:req, kind:req, arg6:req, arg7 .2byte \x, \y - .byte \elevation, \kind - .2byte 0 + .byte \elevation + .byte \kind + .space 2 @ Padding .if \kind != BG_EVENT_HIDDEN_ITEM - .4byte \arg6 + .4byte \arg6 .else - .2byte \arg6 - .2byte \arg7 + .2byte \arg6 + .2byte \arg7 .endif inc _num_signs .endm - .macro bg_hidden_item_event x, y, height, item, flag - bg_event \x, \y, \height, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START) + @ Defines a background sign event for map data. 'facing_dir' is any of the BG_EVENT_PLAYER_FACING_* constants (see include/constants/event_bg.h) + .macro bg_sign_event x:req, y:req, elevation:req, facing_dir:req, script:req + bg_event \x, \y, \elevation, \facing_dir, \script + .endm + + @ Defines a background hidden item event for map data + .macro bg_hidden_item_event x:req, y:req, elevation:req, item:req, flag:req + bg_event \x, \y, \elevation, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START) .endm - .macro bg_secret_base_event x, y, height, secret_base_id - bg_event \x, \y, \height, BG_EVENT_SECRET_BASE, \secret_base_id + @ Defines a background secret base event for map data + .macro bg_secret_base_event x:req, y:req, elevation:req, secret_base_id:req + bg_event \x, \y, \elevation, BG_EVENT_SECRET_BASE, \secret_base_id .endm - .macro map_events npcs, warps, traps, signs + @ Defines the table of event data for a map. Mirrors the struct layout of MapEvents in include/global.fieldmap.h + .macro map_events npcs:req, warps:req, traps:req, signs:req .byte _num_npcs, _num_warps, _num_traps, _num_signs .4byte \npcs, \warps, \traps, \signs reset_map_events .endm + @ Resets the event counters used to track how many events a map has. Run when the events table is created by map_events .macro reset_map_events .set _num_npcs, 0 .set _num_warps, 0 @@ -85,23 +112,29 @@ .set _num_signs, 0 .endm + @ Initialize the event counters for the first map reset_map_events - .equiv connection_down, 1 - .equiv connection_up, 2 - .equiv connection_left, 3 - .equiv connection_right, 4 - .equiv connection_dive, 5 - .equiv connection_emerge, 6 + @ Directions for connecting maps + @ The map.json files will only have e.g. "down" as direction data, and this will be appended to "connection_" by the connection macro + .equiv connection_down, CONNECTION_SOUTH + .equiv connection_up, CONNECTION_NORTH + .equiv connection_left, CONNECTION_WEST + .equiv connection_right, CONNECTION_EAST + .equiv connection_dive, CONNECTION_DIVE + .equiv connection_emerge, CONNECTION_EMERGE - .macro connection direction, offset, map - .4byte connection_\direction + @ Defines a map connection. Mirrors the struct layout of MapConnection in include/global.fieldmap.h + .macro connection direction:req, offset:req, map:req + .byte connection_\direction + .space 3 @ Padding .4byte \offset map \map - .space 2 + .space 2 @ Padding .endm + @ Defines the flags for a map header. Mirrors the layout of the bitfield in struct MapHeader in include/global.fieldmap.h .macro map_header_flags allow_cycling:req, allow_escaping:req, allow_running:req, show_map_name:req .byte ((\show_map_name & 1) << 3) | ((\allow_running & 1) << 2) | ((\allow_escaping & 1) << 1) | \allow_cycling .endm diff --git a/asm/macros/pokemon_data.inc b/asm/macros/pokemon_data.inc deleted file mode 100644 index ce8ef98ac..000000000 --- a/asm/macros/pokemon_data.inc +++ /dev/null @@ -1,56 +0,0 @@ - .macro pokedex_entry height, width, text_pointer, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset - .2byte \height @ in decimeters - .2byte \width @ in hectograms - .4byte \text_pointer - .2byte 0 @ unused - .2byte \pokemon_scale - .2byte \pokemon_offset - .2byte \trainer_scale - .2byte \trainer_offset - .2byte 0 @ padding - .endm - - .macro base_stats hp, attack, defense, speed, sp_attack, sp_defense - .byte \hp - .byte \attack - .byte \defense - .byte \speed - .byte \sp_attack - .byte \sp_defense - .endm - - .macro ev_yield hp, attack, defense, speed, sp_attack, sp_defense - .2byte (\sp_defense << 10) | (\sp_attack << 8) | (\speed << 6) | (\defense << 4) | (\attack << 2) | \hp - .endm - - .macro level_up_move level, move - .2byte (\level << 9) | \move - .endm - - .macro evo_entry method, parameter, target_species - .2byte \method - .2byte \parameter - .2byte \target_species - .2byte 0 @ padding - .endm - - .macro empty_evo_entries count - .fill 8 * \count, 1, 0 - .endm - - .macro egg_moves_begin species - .2byte 20000 + \species - .endm - -@ If the min level equals the max level, only one level argument is needed. - .macro wild_mon species, min_level, max_level - .byte \min_level - - .ifb \max_level - .byte \min_level - .else - .byte \max_level - .endif - - .2byte \species - .endm diff --git a/asm/macros/window.inc b/asm/macros/window.inc deleted file mode 100644 index a91782bbf..000000000 --- a/asm/macros/window.inc +++ /dev/null @@ -1,35 +0,0 @@ - .macro window_template bg_id, x, y, width, height, palette, vram_tile_offset - .byte \bg_id - .byte \x - .byte \y - .byte \width - .byte \height - .byte \palette - .2byte \vram_tile_offset - .endm - - .macro null_window_template - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 - .endm - - .macro glyph_width_func font_id, func - .4byte \font_id - .4byte \func - .endm - - .macro keypad_icon tile_offset, width, height - .2byte \tile_offset - .byte \width - .byte \height - .endm - - .macro font_info func, max_glyph_width, glyph_height, glyph_spacing, line_spacing, text_color, shadow_color, bg_color - .4byte \func - .byte \max_glyph_width - .byte \glyph_height - .byte \glyph_spacing - .byte \line_spacing - .byte \text_color << 4 @ low nybble seems unused - .byte (\shadow_color << 4) | \bg_color - .2byte 0 @ padding - .endm diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 7e970ed17..1cfc5230c 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -763,7 +763,7 @@ Move_TAKE_DOWN: setalpha 12, 8 createvisualtask AnimTask_WindUpLunge, 5, ANIM_ATTACKER, -24, 8, 23, 10, 40, 10 delay 35 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, RGB_BLACK, 0 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, -10, 0, ANIM_TARGET, 0 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET delay 1 @@ -783,7 +783,7 @@ Move_TAKE_DOWN: Move_DOUBLE_EDGE: loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 4, 2, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 4, 2, RGB_WHITE, 10, RGB_BLACK, 0 waitforvisualfinish delay 10 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER @@ -951,7 +951,7 @@ Move_MEGA_PUNCH: createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -995,7 +995,7 @@ Move_MEGA_KICK: createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -1247,7 +1247,7 @@ Move_REVERSAL: loadspritegfx ANIM_TAG_HANDS_AND_FEET loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB_WHITE, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB_WHITE, 8, RGB_BLACK, 0 waitforvisualfinish delay 30 createvisualtask AnimTask_BlendColorCycle, 2, 31, 3, 2, 0, 10, RGB_WHITE @@ -1264,7 +1264,7 @@ Move_REVERSAL: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 8 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 8, RGB_BLACK, 0 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 10, 1, 0 createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 8, 1, 0 @@ -1446,13 +1446,13 @@ FuryCutterRight: createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 1 goto FuryCutterContinue FuryCutterMedium: - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(9, 8, 10), 4, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(9, 8, 10), 4, RGB_BLACK, 0 goto FuryCutterContinue2 FuryCutterStrong: - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, RGB_BLACK, 0 goto FuryCutterContinue2 FuryCutterStrongest: - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, RGB_BLACK, 0 goto FuryCutterContinue2 Move_SELF_DESTRUCT: @@ -1623,7 +1623,7 @@ RisingWaterHitEffect: Move_EXPLOSION: loadspritegfx ANIM_TAG_EXPLOSION - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 9, RGB(26, 8, 8), 8, 0, 8 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 9, RGB(26, 8, 8), 8, RGB_BLACK, 8 createvisualtask AnimTask_ShakeMon2, 5, 4, 8, 0, 40, 1 createvisualtask AnimTask_ShakeMon2, 5, 5, 8, 0, 40, 1 createvisualtask AnimTask_ShakeMon2, 5, 6, 8, 0, 40, 1 @@ -1870,7 +1870,7 @@ Move_GUILLOTINE: delay 46 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 8, 1 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -2601,9 +2601,9 @@ Move_EARTHQUAKE: createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 10, 50 playsewithpan SE_M_EARTHQUAKE, 0 delay 10 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 16 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 end Move_FISSURE: @@ -2614,11 +2614,11 @@ Move_FISSURE: delay 8 call FissureDirtPlumeFar delay 15 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 15 call FissureDirtPlumeClose delay 15 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 15 call FissureDirtPlumeFar delay 50 @@ -2846,7 +2846,7 @@ SkullBashAttack: playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER waitforvisualfinish playse SE_BANG - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 40, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 10, 0, 40, 1 createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, ANIM_TARGET, 0 @@ -3025,7 +3025,7 @@ Move_SUPER_FANG: createsprite gSuperFangSpriteTemplate, ANIM_TARGET, 2 playsewithpan SE_M_BITE, SOUND_PAN_TARGET delay 8 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB(31, 2, 2), 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB(31, 2, 2), 14, RGB_WHITE, 14 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 7, 12, 1 waitforvisualfinish blendoff @@ -3332,9 +3332,9 @@ MagnitudeIntense: createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 loopsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET, 8, 10 delay 10 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 16 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 goto MagnitudeEnd Move_RAPID_SPIN: @@ -3955,7 +3955,7 @@ Move_MIST_BALL: waitforvisualfinish playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 10, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 1, 1, RGB(23, 16, 31), 16, 0x7FFF, 16 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 1, 1, RGB(23, 16, 31), 16, RGB_WHITE, 16 delay 0 playsewithpan SE_M_HAZE, 0 createvisualtask AnimTask_LoadMistTiles, 5 @@ -4223,7 +4223,7 @@ Move_ODOR_SLEUTH: waitforvisualfinish clearmonbg ANIM_TARGET delay 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_WHITEALPHA, 16, -1, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_WHITEALPHA, 16, RGB_WHITEALPHA, 0 playsewithpan SE_M_LEER, SOUND_PAN_ATTACKER end @@ -4351,7 +4351,7 @@ Move_AERIAL_ACE: playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER delay 5 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 10, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, RGB_BLACK, 0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -4361,7 +4361,7 @@ Move_AERIAL_ACE: Move_IRON_DEFENSE: loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER, 28, 2 createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 2, RGB_WHITEALPHA, 14, -1, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 2, RGB_WHITEALPHA, 14, RGB_WHITEALPHA, 0 waitforvisualfinish end @@ -5665,7 +5665,7 @@ Move_SIGNAL_BEAM: call SignalBeamOrbs call SignalBeamOrbs createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 25, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, 8, 5, RGB_RED, 8, 961, 8 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, 8, 5, RGB_RED, 8, RGB(1, 30, 0), 8 call SignalBeamOrbs call SignalBeamOrbs call SignalBeamOrbs @@ -6060,7 +6060,7 @@ Move_BONE_CLUB: delay 12 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_BLACK, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_BLACK, 10, RGB_BLACK, 0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6124,7 +6124,7 @@ MegahornContinue: createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -16, 4, 1, 4 waitforvisualfinish createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, -4, 1, 12, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_WHITE, 10, RGB_BLACK, 0 delay 10 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 11 delay 3 @@ -6266,7 +6266,7 @@ Move_CRABHAMMER: createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, ANIM_TARGET, 0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET delay 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(13, 21, 31), 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(13, 21, 31), 10, RGB_BLACK, 0 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -24, 0, 0, 4 waitforvisualfinish delay 8 @@ -6469,7 +6469,7 @@ Move_CROSS_CHOP: createsprite gCrossChopHandSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1 delay 40 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 10, 0, 10 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 10, RGB_BLACK, 10 createsprite gCrossImpactSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 20 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 7, 0, 9, 1 waitforvisualfinish @@ -8491,7 +8491,7 @@ Move_BLAZE_KICK: createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 14, 1 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 call FireSpreadEffect waitforvisualfinish clearmonbg ANIM_TARGET @@ -9558,7 +9558,7 @@ Move_KNOCK_OFF: playsewithpan SE_M_VITAL_THROW, SOUND_PAN_TARGET createsprite gKnockOffStrikeSpriteTemplate, ANIM_TARGET, 2, -16, -16 delay 8 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, RGB_BLACK, 0 createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -12, 10, 0, 3 @@ -9836,7 +9836,7 @@ Move_WEATHER_BALL: waitforvisualfinish delay 15 playsewithpan SE_M_DETECT, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, RGB_BLACK, 0 waitforvisualfinish createvisualtask AnimTask_GetWeather, 2 delay 1 diff --git a/data/map_events.s b/data/map_events.s index dcbb9cfb1..cfa5799d3 100644 --- a/data/map_events.s +++ b/data/map_events.s @@ -1,3 +1,4 @@ +#include "constants/global.h" #include "constants/event_bg.h" #include "constants/event_object_movement.h" #include "constants/event_objects.h" diff --git a/data/maps.s b/data/maps.s index beb28ddec..9d9ac2101 100644 --- a/data/maps.s +++ b/data/maps.s @@ -1,3 +1,4 @@ +#include "constants/global.h" #include "constants/layouts.h" #include "constants/map_types.h" #include "constants/maps.h" diff --git a/graphics/party_menu/slot_main.bin b/graphics/party_menu/slot_main.bin new file mode 100755 index 000000000..2f3e729f6 --- /dev/null +++ b/graphics/party_menu/slot_main.bin @@ -0,0 +1 @@ + !!!!!!!!" !!!!!!!!" !!!!!!!!"(;<::::::=.////////0
\ No newline at end of file diff --git a/graphics/party_menu/slot_main_no_hp.bin b/graphics/party_menu/slot_main_no_hp.bin new file mode 100755 index 000000000..653ad1a64 --- /dev/null +++ b/graphics/party_menu/slot_main_no_hp.bin @@ -0,0 +1 @@ + !!!!!!!!" !!!!!!!!" !!!!!!!!"())))))))*.////////0
\ No newline at end of file diff --git a/graphics/party_menu/slot_wide.bin b/graphics/party_menu/slot_wide.bin new file mode 100755 index 000000000..c88b73bf7 --- /dev/null +++ b/graphics/party_menu/slot_wide.bin @@ -0,0 +1 @@ ++,,,,,,,,,,,,,,,,-1!!!!!!!!453333336788888888888888889
\ No newline at end of file diff --git a/graphics/party_menu/slot_wide_empty.bin b/graphics/party_menu/slot_wide_empty.bin Binary files differnew file mode 100755 index 000000000..3592178b3 --- /dev/null +++ b/graphics/party_menu/slot_wide_empty.bin diff --git a/graphics/party_menu/slot_wide_no_hp.bin b/graphics/party_menu/slot_wide_no_hp.bin new file mode 100755 index 000000000..8f662da0a --- /dev/null +++ b/graphics/party_menu/slot_wide_no_hp.bin @@ -0,0 +1 @@ ++,,,,,,,,,,,,,,,,-1!!!!!!!!!!!!!!!!2788888888888888889
\ No newline at end of file diff --git a/include/constants/global.h b/include/constants/global.h index 48b03b5cc..096094220 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -138,4 +138,13 @@ #define DIR_NORTHWEST 7 #define DIR_NORTHEAST 8 +#define CONNECTION_INVALID -1 +#define CONNECTION_NONE 0 +#define CONNECTION_SOUTH 1 +#define CONNECTION_NORTH 2 +#define CONNECTION_WEST 3 +#define CONNECTION_EAST 4 +#define CONNECTION_DIVE 5 +#define CONNECTION_EMERGE 6 + #endif // GUARD_CONSTANTS_GLOBAL_H diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index eeb79391b..a057c2da6 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -349,7 +349,7 @@ struct MusicPlayer { struct MusicPlayerInfo *info; struct MusicPlayerTrack *track; - u8 unk_8; + u8 numTracks; u16 unk_A; }; diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 21c354658..974fa3382 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -33,18 +33,6 @@ enum { // for constructing large tiles, such as the Battle Pike's curtain tile. #define METATILE_ROW_WIDTH 8 -enum -{ - CONNECTION_INVALID = -1, - CONNECTION_NONE, - CONNECTION_SOUTH, - CONNECTION_NORTH, - CONNECTION_WEST, - CONNECTION_EAST, - CONNECTION_DIVE, - CONNECTION_EMERGE -}; - typedef void (*TilesetCB)(void); struct Tileset diff --git a/src/data/party_menu.h b/src/data/party_menu.h index f8093a9b6..7735dae58 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -571,34 +571,14 @@ static const struct WindowTemplate sUnusedWindowTemplate2 = .baseBlock = 0x39D, }; -// Tile nums -static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; - -static const u8 sMainSlotTileNums_Egg[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; - -static const u8 sOtherSlotsTileNums[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; - -static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; - -static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; +// Plain tilemaps for party menu slots. +// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility. +// There is no empty version of the main slot because it shouldn't ever be empty. +static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin"); +static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin"); +static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin"); +static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin"); +static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin"); // Palette offsets static const u8 sGenderPalOffsets[] = {11, 12}; diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index 50098743d..5d17cca84 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -501,12 +501,12 @@ static void SpriteCB_EvolutionMonSprite(struct Sprite* sprite) u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId) { u16 i; - u16 stack[16]; + u16 monPalette[16]; u8 taskId; s32 toDiv; - for (i = 0; i < ARRAY_COUNT(stack); i++) - stack[i] = 0x7FFF; + for (i = 0; i < ARRAY_COUNT(monPalette); i++) + monPalette[i] = RGB_WHITE; taskId = CreateTask(Task_CycleEvolutionMonSprite_Init, 0); gTasks[taskId].tPreEvoSpriteId = preEvoSpriteId; @@ -522,13 +522,13 @@ u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId) gSprites[preEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[preEvoSpriteId].oam.matrixNum = MATRIX_PRE_EVO; gSprites[preEvoSpriteId].invisible = FALSE; - CpuSet(stack, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16); + CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16); gSprites[postEvoSpriteId].callback = SpriteCB_EvolutionMonSprite; gSprites[postEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[postEvoSpriteId].oam.matrixNum = MATRIX_POST_EVO; gSprites[postEvoSpriteId].invisible = FALSE; - CpuSet(stack, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16); + CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16); gTasks[taskId].tEvoStopped = FALSE; return taskId; diff --git a/src/item_use.c b/src/item_use.c index c9a7fe1c7..c03ede61b 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -403,25 +403,25 @@ static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, i switch (connection->direction) { // same weird temp variable behavior seen in IsHiddenItemPresentAtCoords - case 2: + case CONNECTION_NORTH: localOffset = connection->offset + MAP_OFFSET; localX = x - localOffset; localLength = mapHeader->mapLayout->height - MAP_OFFSET; localY = localLength + y; // additions are reversed for some reason break; - case 1: + case CONNECTION_SOUTH: localOffset = connection->offset + MAP_OFFSET; localX = x - localOffset; localLength = gMapHeader.mapLayout->height + MAP_OFFSET; localY = y - localLength; break; - case 3: + case CONNECTION_WEST: localLength = mapHeader->mapLayout->width - MAP_OFFSET; localX = localLength + x; // additions are reversed for some reason localOffset = connection->offset + MAP_OFFSET; localY = y - localOffset; break; - case 4: + case CONNECTION_EAST: localLength = gMapHeader.mapLayout->width + MAP_OFFSET; localX = x - localLength; localOffset = connection->offset + MAP_OFFSET; @@ -83,7 +83,7 @@ void m4aSoundInit(void) for (i = 0; i < NUM_MUSIC_PLAYERS; i++) { struct MusicPlayerInfo *mplayInfo = gMPlayTable[i].info; - MPlayOpen(mplayInfo, gMPlayTable[i].track, gMPlayTable[i].unk_8); + MPlayOpen(mplayInfo, gMPlayTable[i].track, gMPlayTable[i].numTracks); mplayInfo->unk_B = gMPlayTable[i].unk_A; mplayInfo->memAccArea = gMPlayMemAccArea; } diff --git a/src/money.c b/src/money.c index 592ce9f75..5723974a8 100644 --- a/src/money.c +++ b/src/money.c @@ -132,7 +132,7 @@ void SubtractMoneyFromVar0x8005(void) void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed) { - PrintMoneyAmount(windowId, 0x26, 1, amount, speed); + PrintMoneyAmount(windowId, 38, 1, amount, speed); } void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) diff --git a/src/party_menu.c b/src/party_menu.c index 36e83a168..e15d001c6 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -97,7 +97,7 @@ enum struct PartyMenuBoxInfoRects { - void (*blitFunc)(u8, u8, u8, u8, u8, u8); + void (*blitFunc)(u8, u8, u8, u8, u8, bool8); u8 dimensions[24]; u8 descTextLeft; u8 descTextTop; @@ -377,8 +377,8 @@ static void Task_ChooseMonForMoveRelearner(u8); static void CB2_ChooseMonForMoveRelearner(void); static void Task_BattlePyramidChooseMonHeldItems(u8); static void ShiftMoveSlot(struct Pokemon*, u8, u8); -static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, u8); -static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, u8); +static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, bool8); +static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, bool8); static void CursorCb_Summary(u8); static void CursorCb_Switch(u8); static void CursorCb_Cancel1(u8); @@ -2086,35 +2086,35 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y, } } -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 10; height = 7; } - if (isEgg == FALSE) - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height); + if (hideHP == FALSE) + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainNoHP, 10, x, y, width, height); } -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 18; height = 3; } - if (isEgg == FALSE) - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height); + if (hideHP == FALSE) + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideNoHP, 18, x, y, width, height); } static void DrawEmptySlot(u8 windowId) { - BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3); } #define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index d767b469e..3eab98f2b 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -230,7 +230,7 @@ string generate_map_events_text(Json map_data) { text << bgs_label << ":\n"; for (auto &bg_event : map_data["bg_events"].array_items()) { if (bg_event["type"] == "sign") { - text << "\tbg_event " + text << "\tbg_sign_event " << bg_event["x"].int_value() << ", " << bg_event["y"].int_value() << ", " << bg_event["elevation"].int_value() << ", " |