Merge pull request #95 from PikalaxALT/no_struct_textcolor

Eliminate `struct TextColor` definition and use
This commit is contained in:
PikalaxALT
2019-08-28 14:56:08 -04:00
committed by GitHub
39 changed files with 322 additions and 4955 deletions
+2 -3
View File
@@ -1,6 +1,5 @@
.include "../../asm/macros/asm.inc"
.include "../../asm/macros/function.inc"
.include "../../constants/gba_constants.inc"
.include "asm/macros/function.inc"
.include "constants/gba_constants.inc"
.syntax unified
+1 -1
View File
@@ -1,5 +1,5 @@
.include "asm/macros/function.inc"
.include "constants/gba_constants.inc"
.include "asm/macros.inc"
.syntax unified
-155
View File
@@ -1,155 +0,0 @@
.include "asm/macros/asm.inc"
.include "asm/macros/function.inc"
.include "asm/macros/movement.inc"
.include "asm/macros/pokemon_data.inc"
.include "asm/macros/ec.inc"
.include "asm/macros/map.inc"
.include "asm/macros/m4a.inc"
.macro region_map_location x, y, width, height, name
.byte \x
.byte \y
.byte \width
.byte \height
.4byte gMapName_\name
.endm
.macro obj_tiles address, uncompressed_size, tag
.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
.2byte \x
.2byte \y
.2byte ((\priority) << 14) | ((\tile_num_offset) << 4) | SPRITE_SIZE_\size
.2byte 0 @ padding
.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 credits_entry number, text
.4byte \number
.4byte \text
.endm
.macro door_anim_frame unknown, offset
.byte \unknown
.byte 0 @ padding
.2byte \offset
.endm
.macro door_anim_gfx metatile_num, unknown, tile_addr, palette_addr
.2byte \metatile_num
.2byte \unknown
.4byte \tile_addr
.4byte \palette_addr
.endm
.macro trainer_eye_trainer opp_1, opp_2, opp_3, opp_4, opp_5, map_name
.2byte OPPONENT_\opp_1
.2byte OPPONENT_\opp_2
.2byte OPPONENT_\opp_3
.2byte OPPONENT_\opp_4
.2byte OPPONENT_\opp_5
.2byte GROUP_\map_name
.2byte MAP_\map_name
.space 2
.endm
.macro window_template bg, top, left, height, width, palno, baseBlock
.byte \bg, \top, \left, \height, \width, \palno
.2byte \baseBlock
.endm
-17
View File
@@ -1,17 +0,0 @@
.ifndef GUARD_ASM_MACROS_ASM_INC
.set GUARD_ASM_MACROS_ASM_INC, 1
.macro inc x
.set \x, \x + 1
.endm
.macro enum_start x=0
.set __enum__, \x
.endm
.macro enum constant
.equiv \constant, __enum__
inc __enum__
.endm
.endif @ GUARD_ASM_MACROS_ASM_INC
@@ -1,554 +0,0 @@
.macro if_random_less_than percent, address
.byte 0x00
.byte \percent
.4byte \address
.endm
@ unused
.macro if_random_greater_than percent, address
.byte 0x01
.byte \percent
.4byte \address
.endm
@ unused
.macro if_random_equal address
.byte 0x02
.4byte \address
.endm
@ unused
.macro if_random_not_equal address
.byte 0x03
.4byte \address
.endm
.macro score score
.byte 0x04
.byte \score
.endm
.macro if_hp_less_than target, percent, address
.byte 0x05
.byte \target
.byte \percent
.4byte \address
.endm
.macro if_hp_more_than target, percent, address
.byte 0x06
.byte \target
.byte \percent
.4byte \address
.endm
.macro if_hp_equal target, percent, address
.byte 0x07
.byte \target
.byte \percent
.4byte \address
.endm
.macro if_hp_not_equal target, percent, address
.byte 0x08
.byte \target
.byte \percent
.4byte \address
.endm
.macro if_status target, status, address
.byte 0x09
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_not_status target, status, address
.byte 0x0a
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_status2 target, status, address
.byte 0x0b
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_not_status2 target, status, address
.byte 0x0c
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_status3 target, status, address
.byte 0x0d
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_not_status3 target, status, address
.byte 0x0e
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_status4 target, status, address
.byte 0x0f
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_not_status4 target, status, address
.byte 0x10
.byte \target
.4byte \status
.4byte \address
.endm
.macro if_less_than value, address
.byte 0x11
.byte \value
.4byte \address
.endm
.macro if_more_than value, address
.byte 0x12
.byte \value
.4byte \address
.endm
.macro if_equal value, address
.byte 0x13
.byte \value
.4byte \address
.endm
.macro if_not_equal value, address
.byte 0x14
.byte \value
.4byte \address
.endm
.macro if_less_than_32 value, address
.byte 0x15
.4byte \value
.4byte \address
.endm
.macro if_more_than_32 value, address
.byte 0x16
.4byte \value
.4byte \address
.endm
.macro if_equal_32 value, address
.byte 0x17
.4byte \value
.4byte \address
.endm
.macro if_not_equal_32 value, address
.byte 0x18
.4byte \value
.4byte \address
.endm
.macro if_move move, address
.byte 0x19
.2byte \move
.4byte \address
.endm
.macro if_not_move move, address
.byte 0x1a
.2byte \move
.4byte \address
.endm
.macro if_in_bytes list, address
.byte 0x1b
.4byte \list
.4byte \address
.endm
.macro if_not_in_bytes list, address
.byte 0x1c
.4byte \list
.4byte \address
.endm
.macro if_in_words list, address
.byte 0x1d
.4byte \list
.4byte \address
.endm
.macro if_not_in_words list, address
.byte 0x1e
.4byte \list
.4byte \address
.endm
.macro if_user_can_damage address
.byte 0x1f
.4byte \address
.endm
.macro if_user_cant_damage address
.byte 0x20
.4byte \address
.endm
.macro get_turn_count
.byte 0x21
.endm
.macro get_type byte
.byte 0x22
.byte \byte
.endm
@ unused
.macro get_move_power
.byte 0x23
.endm
.macro is_most_powerful_move
.byte 0x24
.endm
.macro get_move target
.byte 0x25
.byte \target
.endm
.macro if_arg_equal type, address
.byte 0x26
.byte \type
.4byte \address
.endm
@ unused
.macro if_arg_not_equal type, address
.byte 0x27
.byte \type
.4byte \address
.endm
.macro if_would_go_first target, address
.byte 0x28
.byte \target
.4byte \address
.endm
.macro if_would_not_go_first target, address
.byte 0x29
.byte \target
.4byte \address
.endm
@ nullsub
.macro ai_2a
.byte 0x2a
.endm
@ nullsub
.macro ai_2b
.byte 0x2b
.endm
.macro count_alive_pokemon target
.byte 0x2c
.byte \target
.endm
@ unused
.macro get_considered_move
.byte 0x2d
.endm
.macro get_effect
.byte 0x2e
.endm
.macro get_ability target
.byte 0x2f
.byte \target
.endm
@ unused
.macro get_highest_possible_damage
.byte 0x30
.endm
.macro if_damage_bonus value, address
.byte 0x31
.byte \value
.4byte \address
.endm
@ nullsub
.macro ai_32
.byte 0x32
.endm
@ nullsub
.macro ai_33
.byte 0x33
.endm
.macro if_status_in_party target, status, address
.byte 0x34
.byte \target
.4byte \status
.4byte \address
.endm
@ bugged
.macro if_status_not_in_party target, status, address
.byte 0x35
.byte \target
.4byte \status
.4byte \address
.endm
.macro get_weather
.byte 0x36
.endm
.macro if_effect byte, address
.byte 0x37
.byte \byte
.4byte \address
.endm
.macro if_not_effect byte, address
.byte 0x38
.byte \byte
.4byte \address
.endm
.macro if_stat_level_less_than target, stat, level, address
.byte 0x39
.byte \target
.byte \stat
.byte \level
.4byte \address
.endm
.macro if_stat_level_more_than target, stat, level, address
.byte 0x3a
.byte \target
.byte \stat
.byte \level
.4byte \address
.endm
.macro if_stat_level_equal target, stat, level, address
.byte 0x3b
.byte \target
.byte \stat
.byte \level
.4byte \address
.endm
.macro if_stat_level_not_equal target, stat, level, address
.byte 0x3c
.byte \target
.byte \stat
.byte \level
.4byte \address
.endm
.macro if_can_faint address
.byte 0x3d
.4byte \address
.endm
.macro if_cant_faint address
.byte 0x3e
.4byte \address
.endm
@ unused
.macro if_has_move, target, move, address
.byte 0x3f
.byte \target
.2byte \move
.4byte \address
.endm
@ unused
.macro if_dont_have_move, target, move, address
.byte 0x40
.byte \target
.2byte \move
.4byte \address
.endm
.macro if_move_effect target, effect, address
.byte 0x41
.byte \target
.byte \effect
.4byte \address
.endm
.macro if_not_move_effect target, effect, address
.byte 0x42
.byte \target
.byte \effect
.4byte \address
.endm
.macro if_last_move_did_damage target, byte, address
.byte 0x43
.byte \target
.byte \byte
.4byte \address
.endm
.macro if_encored target, address
.byte 0x44
.byte \target
.4byte \address
.endm
.macro flee
.byte 0x45
.endm
.macro if_random_100 address
.byte 0x46
.4byte \address
.endm
.macro watch
.byte 0x47
.endm
.macro get_hold_effect target
.byte 0x48
.byte \target
.endm
.macro get_gender target
.byte 0x49
.byte \target
.endm
.macro is_first_turn target
.byte 0x4a
.byte \target
.endm
.macro get_stockpile_count target
.byte 0x4b
.byte \target
.endm
.macro is_double_battle
.byte 0x4c
.endm
.macro get_item target
.byte 0x4d
.byte \target
.endm
.macro get_move_type_from_result
.byte 0x4e
.endm
.macro get_move_power_from_result
.byte 0x4f
.endm
.macro get_move_effect_from_result
.byte 0x50
.endm
.macro get_protect_count target
.byte 0x51
.byte \target
.endm
@ nullsub
.macro ai_52
.byte 0x52
.endm
@ nullsub
.macro ai_53
.byte 0x53
.endm
@ nullsub
.macro ai_54
.byte 0x54
.endm
@ nullsub
.macro ai_55
.byte 0x55
.endm
@ nullsub
.macro ai_56
.byte 0x56
.endm
@ nullsub
.macro ai_57
.byte 0x57
.endm
@ unused
.macro call address
.byte 0x58
.4byte \address
.endm
.macro jump address
.byte 0x59
.4byte \address
.endm
.macro end
.byte 0x5a
.endm
.macro if_level_cond cond, address
.byte 0x5b
.byte \cond
.4byte \address
.endm
.macro if_user_higher_level address
if_level_cond 0, \address
.endm
.macro if_target_higher_level address
if_level_cond 1, \address
.endm
.macro if_equal_levels address
if_level_cond 2, \address
.endm
@ unused
.macro if_taunted address
.byte 0x5c
.4byte \address
.endm
.macro if_not_taunted address
.byte 0x5d
.4byte \address
.endm
@@ -1,266 +0,0 @@
.macro loadsprite id
.byte 0x00
.2byte \id
.endm
.macro unloadsprite id
.byte 0x01
.2byte \id
.endm
.macro sprite template, priority, argv:vararg
.byte 0x02
.4byte \template
.byte \priority
.byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2
.Lsprite_\@_1:
.2byte \argv
.Lsprite_\@_2:
.endm
.macro createtask addr, priority, argv:vararg
.byte 0x03
.4byte \addr
.byte \priority
.byte (.Lcreatetask_\@_2 - .Lcreatetask_\@_1) / 2
.Lcreatetask_\@_1:
.2byte \argv
.Lcreatetask_\@_2:
.endm
.macro pause delay
.byte 0x04
.byte \delay
.endm
.macro wait
.byte 0x05
.endm
.macro hang1
.byte 0x06
.endm
.macro hang2
.byte 0x07
.endm
.macro end
.byte 0x08
.endm
.macro playse id
.byte 0x09
.2byte \id
.endm
.macro monbg which
.byte 0x0A
.byte \which
.endm
.macro clearmonbg which
.byte 0x0B
.byte \which
.endm
.macro setalpha eva, evb
.byte 0x0C
.2byte ((\evb) << 8) | (\eva)
.endm
.macro blendoff
.byte 0x0D
.endm
.macro call addr
.byte 0x0E
.4byte \addr
.endm
.macro ret
.byte 0x0F
.endm
.macro setvar var_num, value
.byte 0x10
.byte \var_num
.2byte \value
.endm
.macro ifelse addr1, addr2
.byte 0x11
.4byte \addr1
.4byte \addr2
.endm
.macro jumpif cond, addr
.byte 0x12
.byte \cond
.4byte \addr
.endm
.macro jump addr
.byte 0x13
.4byte \addr
.endm
.macro fadetobg id
.byte 0x14
.byte \id
.endm
.macro restorebg
.byte 0x15
.endm
.macro waitbgfadeout
.byte 0x16
.endm
.macro waitbgfadein
.byte 0x17
.endm
.macro changebg id
.byte 0x18
.byte \id
.endm
.macro panse_19 id, pan
.byte 0x19
.2byte \id
.byte \pan
.endm
.macro setpan pan
.byte 0x1A
.byte \pan
.endm
.macro panse_1B id, pan_start, pan_end, step, delay
.byte 0x1B
.2byte \id
.byte \pan_start
.byte \pan_end
.byte \step
.byte \delay
.endm
.macro panse_1C id, pan, delay, count
.byte 0x1C
.2byte \id
.byte \pan
.byte \delay
.byte \count
.endm
.macro panse_1D id, pan, count
.byte 0x1D
.2byte \id
.byte \pan
.byte \count
.endm
.macro setbldcnt bldcnt
.byte 0x1E
.2byte \bldcnt
.endm
.macro createtask_1F addr, argv:vararg
.byte 0x1F
.4byte \addr
.byte (.Lcreatetask_1F_\@_2 - .Lcreatetask_1F_\@_1) / 2
.Lcreatetask_1F_\@_1:
.2byte \argv
.Lcreatetask_1F_\@_2:
.endm
.macro waitsound
.byte 0x20
.endm
.macro jumpvareq var_num, value, addr
.byte 0x21
.byte \var_num
.2byte \value
.4byte \addr
.endm
.macro monbg_22 unk
.byte 0x22
.byte \unk
.endm
.macro clearmonbg_23 unk
.byte 0x23
.byte \unk
.endm
.macro jumpunkcond addr
.byte 0x24
.4byte \addr
.endm
.macro fadetobg_25 a, b, c
.byte 0x25
.byte \a
.byte \b
.byte \c
.endm
.macro panse_26 id, pan_start, pan_end, step, delay
.byte 0x26
.2byte \id
.byte \pan_start
.byte \pan_end
.byte \step
.byte \delay
.endm
.macro panse_27 id, pan_start, pan_end, step, delay
.byte 0x27
.2byte \id
.byte \pan_start
.byte \pan_end
.byte \step
.byte \delay
.endm
.macro monbgprio_28 unk
.byte 0x28
.byte \unk
.endm
.macro monbgprio_29
.byte 0x29
.endm
.macro monbgprio_2A unk
.byte 0x2A
.byte \unk
.endm
.macro invisible side
.byte 0x2B
.byte \side
.endm
.macro visible side
.byte 0x2C
.byte \side
.endm
.macro doublebattle_2D unk
.byte 0x2D
.byte \unk
.endm
.macro doublebattle_2E unk
.byte 0x2E
.byte \unk
.endm
.macro stopsound
.byte 0x2F
.endm
File diff suppressed because it is too large Load Diff
@@ -1,506 +0,0 @@
@ Add a positive/negative value to the score of the move being evaluated.
.macro score score
.byte 0x00
.byte \score
.endm
@ turn (AKA "Appeal No.")
.macro get_turn
.byte 0x01
.endm
.macro if_turn_less_than param, addr
.byte 0x02
.byte \param
.4byte \addr
.endm
.macro if_turn_more_than param, addr
.byte 0x03
.byte \param
.4byte \addr
.endm
.macro if_turn_eq param, addr
.byte 0x04
.byte \param
.4byte \addr
.endm
.macro if_turn_not_eq param, addr
.byte 0x05
.byte \param
.4byte \addr
.endm
@ audience excitement
.macro get_excitement
.byte 0x06
.endm
.macro if_excitement_less_than param, addr
.byte 0x07
.byte \param
.4byte \addr
.endm
.macro if_excitement_more_than param, addr
.byte 0x08
.byte \param
.4byte \addr
.endm
.macro if_excitement_eq param, addr
.byte 0x09
.byte \param
.4byte \addr
.endm
.macro if_excitement_not_eq param, addr
.byte 0x0A
.byte \param
.4byte \addr
.endm
@ the order that the user goes in the current turn
.macro get_user_order
.byte 0x0B
.endm
.macro if_user_order_less_than param addr
.byte 0x0C
.byte \param
.4byte \addr
.endm
.macro if_user_order_more_than param addr
.byte 0x0D
.byte \param
.4byte \addr
.endm
.macro if_user_order_eq param addr
.byte 0x0E
.byte \param
.4byte \addr
.endm
.macro if_user_order_not_eq param addr
.byte 0x0F
.byte \param
.4byte \addr
.endm
@ user condition
.macro get_user_condition
.byte 0x10
.endm
.macro if_user_condition_less_than param, addr
.byte 0x11
.byte \param
.4byte \addr
.endm
.macro if_user_condition_more_than param, addr
.byte 0x12
.byte \param
.4byte \addr
.endm
.macro if_user_condition_eq param, addr
.byte 0x13
.byte \param
.4byte \addr
.endm
.macro if_user_condition_not_eq param, addr
.byte 0x14
.byte \param
.4byte \addr
.endm
@ 15
@ 16
@ 17
@ 18
@ 19
@ 1A
@ 1B
@ 1C
@ 1D
@ 1E
@ contest type
.macro get_contest_type
.byte 0x1F
.endm
.macro if_contest_type_eq param, addr
.byte 0x20
.byte \param
.4byte \addr
.endm
.macro if_contest_type_not_eq param, addr
.byte 0x21
.byte \param
.4byte \addr
.endm
@ move excitement (change in excitement due to move)
.macro get_move_excitement
.byte 0x22
.endm
.macro if_move_excitement_less_than param, addr
.byte 0x23
.byte \param
.4byte \addr
.endm
.macro if_move_excitement_more_than param, addr
.byte 0x24
.byte \param
.4byte \addr
.endm
.macro if_move_excitement_eq param, addr
.byte 0x25
.byte \param
.4byte \addr
.endm
.macro if_move_excitement_not_eq param, addr
.byte 0x26
.byte \param
.4byte \addr
.endm
@ move effect
.macro get_effect
.byte 0x27
.endm
.macro if_effect_eq param, addr
.byte 0x28
.byte \param
.4byte \addr
.endm
.macro if_effect_not_eq param, addr
.byte 0x29
.byte \param
.4byte \addr
.endm
@ move effect type
.macro get_effect_type
.byte 0x2A
.endm
.macro if_effect_type_eq param, addr
.byte 0x2B
.byte \param
.4byte \addr
.endm
.macro if_effect_type_not_eq param, addr
.byte 0x2C
.byte \param
.4byte \addr
.endm
@ whether the current move is the most appealing in the user's moveset
.macro check_most_appealing_move
.byte 0x2D
.endm
.macro if_most_appealing_move addr
.byte 0x2E
.4byte \addr
.endm
@ 2F
@ 30
@ 31
@ 32
@ 33
@ 34
@ 35
@ 36
@ 37
@ 38
@ 39
@ 3A
@ number of times current move has been used
.macro get_move_used_count
.byte 0x3B
.endm
.macro if_move_used_count_less_than param, addr
.byte 0x3C
.byte \param
.4byte \addr
.endm
.macro if_move_used_count_more_than param, addr
.byte 0x3D
.byte \param
.4byte \addr
.endm
.macro if_move_used_count_eq param, addr
.byte 0x3E
.byte \param
.4byte \addr
.endm
.macro if_move_used_count_not_eq param, addr
.byte 0x3F
.byte \param
.4byte \addr
.endm
@ whether the current move is a combo starter (with another move in the moveset)
.macro check_combo_starter
.byte 0x40
.endm
.macro if_combo_starter addr
.byte 0x41
.4byte \addr
.endm
.macro if_not_combo_starter addr
.byte 0x42
.4byte \addr
.endm
@ whether the current move is a combo finisher (with another move in the moveset)
.macro check_combo_finisher
.byte 0x43
.endm
.macro if_combo_finisher addr
.byte 0x44
.4byte \addr
.endm
.macro if_not_combo_finisher addr
.byte 0x45
.4byte \addr
.endm
@ whether the current move would finish a combo
.macro check_would_finish_combo
.byte 0x46
.endm
.macro if_would_finish_combo addr
.byte 0x47
.4byte \addr
.endm
.macro if_would_not_finish_combo addr
.byte 0x48
.4byte \addr
.endm
@ condition of mon (indexed by order)
.macro get_condition mon
.byte 0x49
.byte \mon
.endm
.macro if_condition_less_than mon, value, addr
.byte 0x4A
.byte \mon
.byte \value
.4byte \addr
.endm
.macro if_condition_more_than mon, value, addr
.byte 0x4B
.byte \mon
.byte \value
.4byte \addr
.endm
.macro if_condition_eq mon, value, addr
.byte 0x4C
.byte \mon
.byte \value
.4byte \addr
.endm
.macro if_condition_not_eq mon, value, addr
.byte 0x4D
.byte \mon
.byte \value
.4byte \addr
.endm
@ whether the mon used a combo starter move
@ Even though this value is always 1 or 0 (i.e. TRUE/FALSE),
@ there are less-than and greater-than comparison operations for some reason.
.macro get_used_combo_starter mon
.byte 0x4E
.byte \mon
.endm
.macro if_used_combo_starter_less_than mon, value, addr
.byte 0x4F
.byte \mon
.byte \value
.4byte \addr
.endm
.macro if_used_combo_starter_more_than mon, value, addr
.byte 0x50
.byte \mon
.byte \value
.4byte \addr
.endm
.macro if_used_combo_starter_eq mon, value, addr
.byte 0x51
.byte \mon
.byte \value
.4byte \addr
.endm
.macro if_used_combo_starter_not_eq mon, value, addr
.byte 0x52
.byte \mon
.byte \value
.4byte \addr
.endm
@ whether the mon can make an appeal
.macro check_can_participate mon
.byte 0x53
.byte \mon
.endm
.macro if_can_participate mon, addr
.byte 0x54
.byte \mon
.4byte \addr
.endm
.macro if_cannot_participate mon, addr
.byte 0x55
.byte \mon
.4byte \addr
.endm
@ 56
@ 57
.macro contest_58 param addr
.byte 0x58
.byte \param
.4byte \addr
.endm
@ 59
@ 5A
@ 5B
@ 5C
@ 5D
@ 5E
@ 5F
@ 60
@ 61
@ 62
@ 63
@ 64
@ 65
@ 66
@ 67
@ 68
@ 69
@ 6A
@ 6B
@ 6C
@ 6D
@ 6E
@ 6F
@ 70
@ 71
@ 72
@ 73
@ 74
@ 75
@ 76
@ 77
@ 78
@ 79
@ 7A
@ 7B
@ 7C
.macro if_random param addr
.byte 0x7D
.byte \param
.4byte \addr
.endm
@ 7E
.macro jump addr
.byte 0x7F
.4byte \addr
.endm
.macro call addr
.byte 0x80
.4byte \addr
.endm
.macro end
.byte 0x81
.endm
.macro check_user_has_exciting_move
.byte 0x82
.endm
.macro if_user_has_exciting_move addr
.byte 0x83
.4byte \addr
.endm
.macro if_user_doesnt_have_exciting_move addr
.byte 0x84
.4byte \addr
.endm
@ 85
@ 86
.macro if_effect_in_user_moveset param addr
.byte 0x87
.2byte \param
.4byte \addr
.endm
-8
View File
@@ -1,8 +0,0 @@
.macro ec_duplicates count
.2byte 0xff00 + \count
.endm
.macro ec_words_by_letter label
.2byte (gEasyChatWordsByLetter_\label - gEasyChatWordsAlphabetized) / 2
.endm
File diff suppressed because it is too large Load Diff
@@ -1,42 +0,0 @@
.macro loadtiles address
.byte 0
.4byte \address
.endm
.macro loadfadedpal address
.byte 1
.4byte \address
.endm
.macro loadpal address
.byte 2
.4byte \address
.endm
.macro callnative address
.byte 3
.4byte \address
.endm
.macro end
.byte 4
.endm
.macro loadgfx_callnative tiles_address, palette_address, function_address
.byte 5
.4byte \tiles_address
.4byte \palette_address
.4byte \function_address
.endm
.macro loadtiles_callnative tiles_address, function_address
.byte 6
.4byte \tiles_address
.4byte \function_address
.endm
.macro loadfadedpal_callnative palette_address, function_address
.byte 7
.4byte \palette_address
.4byte \function_address
.endm
-13
View File
@@ -1,13 +0,0 @@
.macro song label, music_player, unknown
.4byte \label
.2byte \music_player
.2byte \unknown
.endm
.macro music_player info_struct, track_struct, unknown_1, unknown_2
.4byte \info_struct
.4byte \track_struct
.byte \unknown_1
.space 1
.2byte \unknown_2
.endm
-84
View File
@@ -1,84 +0,0 @@
.macro map map_id
.byte \map_id >> 8 @ map group
.byte \map_id & 0xFF @ map num
.endm
.macro map_script type, address
.byte \type
.4byte \address
.endm
.macro map_script_2 word1, word2, address
.2byte \word1
.2byte \word2
.4byte \address
.endm
.macro object_event byte1, word1, byte2, byte3, byte4, byte5, byte6, byte7, byte8, byte9, byte10, byte11, byte12, byte13, byte14, script, word2, byte15, byte16
.byte \byte1
.2byte \word1
.byte \byte2, \byte3, \byte4, \byte5, \byte6, \byte7, \byte8, \byte9, \byte10, \byte11, \byte12, \byte13, \byte14
.4byte \script
.2byte \word2
.byte \byte15, \byte16
inc _num_npcs
.endm
.macro warp_def x, y, byte, warp, map_id
.2byte \x, \y
.byte \byte, \warp
.byte \map_id & 0xFF @ map num
.byte \map_id >> 8 @ map group
inc _num_warps
.endm
.macro coord_event x, y, byte1, byte2, word1, word2, word3, script
.2byte \x, \y
.byte \byte1, \byte2
.2byte \word1, \word2, \word3
.4byte \script
inc _num_traps
.endm
.macro bg_event x, y, byte, kind, word, arg6, arg7, arg8
.2byte \x, \y
.byte \byte, \kind
.2byte \word
.if \kind < 5
.4byte \arg6
.else
.2byte \arg6
.byte \arg7, \arg8
.endif
inc _num_signs
.endm
.macro map_events npcs, warps, traps, signs
.byte _num_npcs, _num_warps, _num_traps, _num_signs
.4byte \npcs, \warps, \traps, \signs
reset_map_events
.endm
.macro reset_map_events
.set _num_npcs, 0
.set _num_warps, 0
.set _num_traps, 0
.set _num_signs, 0
.endm
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
.macro connection direction, offset, map, filler
.4byte connection_\direction
.4byte \offset
map \map
.space 2
.endm
-120
View File
@@ -1,120 +0,0 @@
.macro create_movement name
enum _\name
.macro \name
.byte _\name
.endm
.endm
enum_start
create_movement step_00
create_movement step_01
create_movement step_02
create_movement step_03
create_movement slow_step_down
create_movement slow_step_up
create_movement slow_step_left
create_movement slow_step_right
create_movement step_down
create_movement step_up
create_movement step_left
create_movement step_right
create_movement fast_step_down
create_movement fast_step_up
create_movement fast_step_left
create_movement fast_step_right
create_movement step_10
create_movement step_11
create_movement step_12
create_movement step_13
create_movement step_14
create_movement step_15
create_movement step_16
create_movement step_17
create_movement step_18
create_movement step_19
create_movement step_1a
create_movement step_1b
create_movement step_1c
create_movement step_1d
create_movement step_1e
create_movement step_1f
create_movement step_20
create_movement step_21
create_movement step_22
create_movement step_23
create_movement step_24
create_movement step_25
create_movement step_26
create_movement step_27
create_movement step_28
create_movement step_29
create_movement step_2a
create_movement step_2b
create_movement step_2c
create_movement step_2d
create_movement step_2e
create_movement step_2f
create_movement step_30
create_movement step_31
create_movement step_32
create_movement step_33
create_movement step_34
create_movement step_35
create_movement step_36
create_movement step_37
create_movement step_38
create_movement step_39
create_movement step_3a
create_movement step_3b
create_movement step_3c
create_movement step_3d
create_movement step_3e
create_movement step_3f
create_movement step_40
create_movement step_41
create_movement step_42
create_movement step_43
create_movement step_44
create_movement step_45
create_movement step_46
create_movement step_47
create_movement step_48
create_movement step_49
create_movement step_4a
create_movement step_4b
create_movement step_4c
create_movement step_4d
create_movement step_4e
create_movement step_4f
create_movement step_50
create_movement step_51
create_movement step_52
create_movement step_53
create_movement step_54
create_movement step_55
create_movement step_56
create_movement step_57
create_movement step_58
create_movement step_59
create_movement step_5a
create_movement step_5b
create_movement step_5c
create_movement step_5d
create_movement step_5e
create_movement step_5f
create_movement step_60
create_movement step_61
create_movement step_62
create_movement step_63
create_movement step_64
create_movement step_65
enum_start 0x91
create_movement step_91
create_movement step_92
enum_start 0x96
create_movement step_96
enum_start 0xfe
create_movement step_end
@@ -1,125 +0,0 @@
.macro voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
.byte 0
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
.endm
.macro voice_directsound_no_resample base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
.byte 8
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
.endm
.macro voice_directsound_alt base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
.byte 16
_voice_directsound \base_midi_key, \pan, \sample_data_pointer, \attack, \decay, \sustain, \release
.endm
.macro _voice_directsound base_midi_key, pan, sample_data_pointer, attack, decay, sustain, release
.byte \base_midi_key
.byte 0
.if \pan != 0
.byte (0x80 | \pan)
.else
.byte 0
.endif
.4byte \sample_data_pointer
.byte \attack
.byte \decay
.byte \sustain
.byte \release
.endm
.macro voice_square_1 sweep, duty_cycle, attack, decay, sustain, release
_voice_square_1 1, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro voice_square_1_alt sweep, duty_cycle, attack, decay, sustain, release
_voice_square_1 9, \sweep, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro _voice_square_1 type, sweep, duty_cycle, attack, decay, sustain, release
.byte \type, 60, 0
.byte \sweep
.byte (\duty_cycle & 0x3)
.byte 0, 0, 0
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_square_2 duty_cycle, attack, decay, sustain, release
_voice_square_2 2, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro voice_square_2_alt duty_cycle, attack, decay, sustain, release
_voice_square_2 10, \duty_cycle, \attack, \decay, \sustain, \release
.endm
.macro _voice_square_2 type, duty_cycle, attack, decay, sustain, release
.byte \type, 60, 0, 0
.byte (\duty_cycle & 0x3)
.byte 0, 0, 0
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_programmable_wave wave_samples_pointer, attack, decay, sustain, release
_voice_programmable_wave 3, \wave_samples_pointer, \attack, \decay, \sustain, \release
.endm
.macro voice_programmable_wave_alt wave_samples_pointer, attack, decay, sustain, release
_voice_programmable_wave 11, \wave_samples_pointer, \attack, \decay, \sustain, \release
.endm
.macro _voice_programmable_wave type, wave_samples_pointer, attack, decay, sustain, release
.byte \type, 60, 0, 0
.4byte \wave_samples_pointer
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_noise period, attack, decay, sustain, release
_voice_noise 4, \period, \attack, \decay, \sustain, \release
.endm
.macro voice_noise_alt period, attack, decay, sustain, release
_voice_noise 12, \period, \attack, \decay, \sustain, \release
.endm
.macro _voice_noise type, period, attack, decay, sustain, release
.byte \type, 60, 0, 0
.byte (\period & 0x1)
.byte 0, 0, 0
.byte (\attack & 0x7)
.byte (\decay & 0x7)
.byte (\sustain & 0xF)
.byte (\release & 0x7)
.endm
.macro voice_keysplit voice_group_pointer, keysplit_table_pointer
.byte 0x40, 0, 0, 0
.4byte \voice_group_pointer
.4byte \keysplit_table_pointer
.endm
.macro voice_keysplit_all voice_group_pointer
.byte 0x80, 0, 0, 0
.4byte \voice_group_pointer
.4byte 0
.endm
.macro cry sample
.byte 0x20, 60, 0, 0
.4byte \sample
.byte 0xff, 0, 0xff, 0
.endm
.macro cry2 sample
.byte 0x30, 60, 0, 0
.4byte \sample
.byte 0xff, 0, 0xff, 0
.endm
@@ -1,57 +0,0 @@
.macro pokedex_entry pokemon_name, height, weight, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset
.2byte \height @ in decimeters
.2byte \weight @ in hectograms
.4byte DexDescription_\pokemon_name\()_1
.4byte DexDescription_\pokemon_name\()_2
.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_\species
.endm
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef GUARD_LIBGCMMULTIBOOT_H
#ifndef GUARD_LIBGCNMULTIBOOT_H
#define GUARD_LIBGCNMULTIBOOT_H
struct GcmbStruct
+2 -2
View File
@@ -18,8 +18,8 @@ struct MenuAction
};
// menu2
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const struct TextColor * color, s8 speed, const u8 * str);
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const u8 * color, s8 speed, const u8 * str);
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing);
void sub_812E6DC(u8 windowId, const u8 * src, u16 x, u16 y);
void StartBlendTask(u8 eva_start, u8 evb_start, u8 eva_end, u8 evb_end, u8 ev_step, u8 priority);
-7
View File
@@ -193,13 +193,6 @@ typedef struct {
extern TextFlags gTextFlags;
struct __attribute__((packed)) TextColor
{
u8 fgColor;
u8 bgColor;
u8 shadowColor;
};
extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];
+3 -3
View File
@@ -14,7 +14,7 @@
extern const u8 gText_DepositItem[];
const u16 gUnknown_8453098[] = INCBIN_U16("data/bag/bag_window_pal.gbapal");
const struct TextColor gUnknown_84530B8[] = {
const u8 gUnknown_84530B8[][3] = {
{0, 1, 2},
{0, 2, 3},
{0, 3, 2},
@@ -229,13 +229,13 @@ void sub_810B858(void)
void sub_810B8F0(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, s8 speed, u8 colorIdx)
{
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, &gUnknown_84530B8[colorIdx], speed, str);
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, gUnknown_84530B8[colorIdx], speed, str);
}
void sub_810B958(const u8 * str)
{
u32 x = 0x48 - GetStringWidth(1, str, 0);
AddTextPrinterParameterized3(2, 1, x / 2, 1, &gUnknown_84530B8[0], 0, str);
AddTextPrinterParameterized3(2, 1, x / 2, 1, gUnknown_84530B8[0], 0, str);
}
void sub_810B994(void)
+7 -7
View File
@@ -58,7 +58,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
}, DUMMY_WIN_TEMPLATE
};
static const struct TextColor sTextColor = {
static const u8 sTextColor[3] = {
0, 2, 3
};
@@ -494,7 +494,7 @@ static void PrintTotalRecord(struct LinkBattleRecords * records)
}
StringExpandPlaceholders(gStringVar4, gString_BattleRecords_TotalRecord);
AddTextPrinterParameterized4(0, 2, 12, 24, 0, 2, &sTextColor, 0, gStringVar4);
AddTextPrinterParameterized4(0, 2, 12, 24, 0, 2, sTextColor, 0, gStringVar4);
}
static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y)
@@ -504,7 +504,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y)
if (record->wins == 0 && record->losses == 0 && record->draws == 0)
{
AddTextPrinterParameterized4(0, 2, 0, y, 0, 2, &sTextColor, 0, gString_BattleRecords_7Dashes);
AddTextPrinterParameterized4(0, 2, 0, y, 0, 2, sTextColor, 0, gString_BattleRecords_7Dashes);
for (i = 0; i < 3; i++)
{
if (i == 0)
@@ -513,7 +513,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y)
x = 0x84;
else
x = 0xB4;
AddTextPrinterParameterized4(0, 2, x, y, 0, 2, &sTextColor, 0, gString_BattleRecords_4Dashes);
AddTextPrinterParameterized4(0, 2, x, y, 0, 2, sTextColor, 0, gString_BattleRecords_4Dashes);
}
}
else
@@ -541,7 +541,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y)
x = 0xB4;
ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4);
}
AddTextPrinterParameterized4(0, 2, x, y, 0, 2, &sTextColor, 0, gStringVar1);
AddTextPrinterParameterized4(0, 2, x, y, 0, 2, sTextColor, 0, gStringVar1);
}
}
}
@@ -554,9 +554,9 @@ static void PrintBattleRecords(void)
FillWindowPixelRect(0, PIXEL_FILL(0), 0, 0, 0xD8, 0x90);
StringExpandPlaceholders(gStringVar4, gString_BattleRecords_PlayersBattleResults);
left = 0xD0 - GetStringWidth(2, gStringVar4, -1);
AddTextPrinterParameterized4(0, 2, left / 2, 4, 0, 2, &sTextColor, 0, gStringVar4);
AddTextPrinterParameterized4(0, 2, left / 2, 4, 0, 2, sTextColor, 0, gStringVar4);
PrintTotalRecord(&gSaveBlock2Ptr->linkBattleRecords);
AddTextPrinterParameterized4(0, 2, 0x54, 0x30, 0, 2, &sTextColor, 0, gString_BattleRecords_ColumnHeaders);
AddTextPrinterParameterized4(0, 2, 0x54, 0x30, 0, 2, sTextColor, 0, gString_BattleRecords_ColumnHeaders);
for (i = 0; i < LINK_B_RECORDS_COUNT; i++)
PrintOpponentBattleRecord(&gSaveBlock2Ptr->linkBattleRecords.entries[i], 0x3D + 14 * i);
CommitWindow(0);
+5 -17
View File
@@ -148,23 +148,11 @@ static const struct WindowTemplate sShopBuyMenuYesNoWindowTemplate =
.baseBlock = 0xC1,
};
static const struct TextColor sShopBuyMenuTextColors[] =
static const u8 sShopBuyMenuTextColors[][3] =
{
{
.fgColor = 0,
.bgColor = 1,
.shadowColor = 2,
},
{
.fgColor = 0,
.bgColor = 2,
.shadowColor = 3,
},
{
.fgColor = 0,
.bgColor = 3,
.shadowColor = 2,
},
{0, 1, 2},
{0, 2, 3},
{0, 3, 2}
};
void BuyMenuInitWindows(bool32 isSellingTM)
@@ -191,7 +179,7 @@ void BuyMenuDrawMoneyBox(void)
void BuyMenuPrint(u8 windowId, u8 font, const u8 *text, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, s8 speed, u8 color)
{
AddTextPrinterParameterized4(windowId, font, x, y, letterSpacing, lineSpacing, &sShopBuyMenuTextColors[color], speed, text);
AddTextPrinterParameterized4(windowId, font, x, y, letterSpacing, lineSpacing, sShopBuyMenuTextColors[color], speed, text);
}
void BuyMenuDisplayMessage(u8 taskId, const u8 *text, TaskFunc callback)
+175 -175
View File
@@ -63,7 +63,7 @@ struct EggHatchData
u8 unused_9;
u8 unused_A;
u16 species;
struct TextColor textColor;
u8 textColor[3];
};
extern const u8 gText_MaleSymbol4[];
@@ -168,215 +168,215 @@ static const u8 sEggHatchTiles[] = INCBIN_U8("graphics/misc/egg_hatch.4bpp");
static const u8 sEggShardTiles[] = INCBIN_U8("graphics/misc/egg_shard.4bpp");
static const struct OamData sOamData_EggHatch =
{
.y = 0,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
.affineParam = 0,
};
{
.y = 0,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
.affineParam = 0,
};
static const union AnimCmd sSpriteAnim_EggHatch0[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_EggHatch1[] =
{
ANIMCMD_FRAME(16, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(16, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_EggHatch2[] =
{
ANIMCMD_FRAME(32, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(32, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_EggHatch3[] =
{
ANIMCMD_FRAME(48, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(48, 5),
ANIMCMD_END
};
static const union AnimCmd *const sSpriteAnimTable_EggHatch[] =
{
sSpriteAnim_EggHatch0,
sSpriteAnim_EggHatch1,
sSpriteAnim_EggHatch2,
sSpriteAnim_EggHatch3,
};
{
sSpriteAnim_EggHatch0,
sSpriteAnim_EggHatch1,
sSpriteAnim_EggHatch2,
sSpriteAnim_EggHatch3,
};
static const struct SpriteSheet sEggHatch_Sheet =
{
.data = sEggHatchTiles,
.size = 2048,
.tag = 12345,
};
{
.data = sEggHatchTiles,
.size = 2048,
.tag = 12345,
};
static const struct SpriteSheet sEggShards_Sheet =
{
.data = sEggShardTiles,
.size = 128,
.tag = 23456,
};
{
.data = sEggShardTiles,
.size = 128,
.tag = 23456,
};
static const struct SpritePalette sEgg_SpritePalette =
{
.data = sEggPalette,
.tag = 54321
};
{
.data = sEggPalette,
.tag = 54321
};
static const struct SpriteTemplate sSpriteTemplate_EggHatch =
{
.tileTag = 12345,
.paletteTag = 54321,
.oam = &sOamData_EggHatch,
.anims = sSpriteAnimTable_EggHatch,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy
};
{
.tileTag = 12345,
.paletteTag = 54321,
.oam = &sOamData_EggHatch,
.anims = sSpriteAnimTable_EggHatch,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy
};
static const struct OamData sOamData_EggShard =
{
.y = 0,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
.affineParam = 0,
};
{
.y = 0,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
.affineParam = 0,
};
static const union AnimCmd sSpriteAnim_EggShard0[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_EggShard1[] =
{
ANIMCMD_FRAME(1, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(1, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_EggShard2[] =
{
ANIMCMD_FRAME(2, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(2, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_EggShard3[] =
{
ANIMCMD_FRAME(3, 5),
ANIMCMD_END
};
{
ANIMCMD_FRAME(3, 5),
ANIMCMD_END
};
static const union AnimCmd *const sSpriteAnimTable_EggShard[] =
{
sSpriteAnim_EggShard0,
sSpriteAnim_EggShard1,
sSpriteAnim_EggShard2,
sSpriteAnim_EggShard3,
};
{
sSpriteAnim_EggShard0,
sSpriteAnim_EggShard1,
sSpriteAnim_EggShard2,
sSpriteAnim_EggShard3,
};
static const struct SpriteTemplate sSpriteTemplate_EggShard =
{
.tileTag = 23456,
.paletteTag = 54321,
.oam = &sOamData_EggShard,
.anims = sSpriteAnimTable_EggShard,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCB_EggShard
};
{
.tileTag = 23456,
.paletteTag = 54321,
.oam = &sOamData_EggShard,
.anims = sSpriteAnimTable_EggShard,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCB_EggShard
};
static const struct BgTemplate sBgTemplates_EggHatch[2] =
{
{
.bg = 0,
.charBaseIndex = 2,
.mapBaseIndex = 24,
.screenSize = 3,
.paletteMode = 0,
.priority = 0,
.baseTile = 0
},
{
.bg = 1,
.charBaseIndex = 0,
.mapBaseIndex = 8,
.screenSize = 1,
.paletteMode = 0,
.priority = 2,
.baseTile = 0
},
};
static const struct WindowTemplate sWinTemplates_EggHatch[2] =
{
{
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 26,
.height = 4,
.paletteNum = 0,
.baseBlock = 64
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sYesNoWinTemplate =
{
{
.bg = 0,
.tilemapLeft = 21,
.tilemapTop = 9,
.width = 6,
.charBaseIndex = 2,
.mapBaseIndex = 24,
.screenSize = 3,
.paletteMode = 0,
.priority = 0,
.baseTile = 0
},
{
.bg = 1,
.charBaseIndex = 0,
.mapBaseIndex = 8,
.screenSize = 1,
.paletteMode = 0,
.priority = 2,
.baseTile = 0
},
};
static const struct WindowTemplate sWinTemplates_EggHatch[2] =
{
{
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 26,
.height = 4,
.paletteNum = 15,
.baseBlock = 424
};
.paletteNum = 0,
.baseBlock = 64
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sYesNoWinTemplate =
{
.bg = 0,
.tilemapLeft = 21,
.tilemapTop = 9,
.width = 6,
.height = 4,
.paletteNum = 15,
.baseBlock = 424
};
static const s16 sEggShardVelocities[][2] =
{
{Q_8_8(-1.5), Q_8_8(-3.75)},
{Q_8_8(-5), Q_8_8(-3)},
{Q_8_8(3.5), Q_8_8(-3)},
{Q_8_8(-4), Q_8_8(-3.75)},
{Q_8_8(2), Q_8_8(-1.5)},
{Q_8_8(-0.5), Q_8_8(-6.75)},
{Q_8_8(5), Q_8_8(-2.25)},
{Q_8_8(-1.5), Q_8_8(-3.75)},
{Q_8_8(4.5), Q_8_8(-1.5)},
{Q_8_8(-1), Q_8_8(-6.75)},
{Q_8_8(4), Q_8_8(-2.25)},
{Q_8_8(-3.5), Q_8_8(-3.75)},
{Q_8_8(1), Q_8_8(-1.5)},
{Q_8_8(-3.515625), Q_8_8(-6.75)},
{Q_8_8(4.5), Q_8_8(-2.25)},
{Q_8_8(-0.5), Q_8_8(-7.5)},
{Q_8_8(1), Q_8_8(-4.5)},
{Q_8_8(-2.5), Q_8_8(-2.25)},
{Q_8_8(2.5), Q_8_8(-7.5)},
};
{
{Q_8_8(-1.5), Q_8_8(-3.75)},
{Q_8_8(-5), Q_8_8(-3)},
{Q_8_8(3.5), Q_8_8(-3)},
{Q_8_8(-4), Q_8_8(-3.75)},
{Q_8_8(2), Q_8_8(-1.5)},
{Q_8_8(-0.5), Q_8_8(-6.75)},
{Q_8_8(5), Q_8_8(-2.25)},
{Q_8_8(-1.5), Q_8_8(-3.75)},
{Q_8_8(4.5), Q_8_8(-1.5)},
{Q_8_8(-1), Q_8_8(-6.75)},
{Q_8_8(4), Q_8_8(-2.25)},
{Q_8_8(-3.5), Q_8_8(-3.75)},
{Q_8_8(1), Q_8_8(-1.5)},
{Q_8_8(-3.515625), Q_8_8(-6.75)},
{Q_8_8(4.5), Q_8_8(-2.25)},
{Q_8_8(-0.5), Q_8_8(-7.5)},
{Q_8_8(1), Q_8_8(-4.5)},
{Q_8_8(-2.5), Q_8_8(-2.25)},
{Q_8_8(2.5), Q_8_8(-7.5)},
};
// code
@@ -2202,8 +2202,8 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8
static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
{
FillWindowPixelBuffer(windowId, 0xFF);
sEggHatchData->textColor.fgColor = 0;
sEggHatchData->textColor.bgColor = 5;
sEggHatchData->textColor.shadowColor = 6;
AddTextPrinterParameterized4(windowId, 3, x, y, 1, 1, &sEggHatchData->textColor, speed, string);
sEggHatchData->textColor[0] = 0;
sEggHatchData->textColor[1] = 5;
sEggHatchData->textColor[2] = 6;
AddTextPrinterParameterized4(windowId, 3, x, y, 1, 1, sEggHatchData->textColor, speed, string);
}
+4 -4
View File
@@ -52,7 +52,7 @@ static const u8 gUnknown_84159B3[] = _("{HIGHLIGHT TRANSPARENT}     
static const u8 gUnknown_84159ED[] = _("{COLOR RED}{HIGHLIGHT TRANSPARENT}ゲームフリーク");
static const u8 gUnknown_84159FB[] = _("{COLOR RED}{HIGHLIGHT TRANSPARENT}");
static const ALIGNED(4) struct TextColor gUnknown_8415A04 = {0, 2, 3};
static const ALIGNED(4) u8 gUnknown_8415A04[3] = {0, 2, 3};
static const struct BgTemplate gUnknown_8415A08[] = {
{
@@ -276,10 +276,10 @@ static void DiplomaPrintText(void)
FillWindowPixelBuffer(0, 0);
DynamicPlaceholderTextUtil_ExpandPlaceholders(arr, gUnknown_841B60E);
width = GetStringWidth(2, arr, -1);
AddTextPrinterParameterized3(0, 2, 0x78 - (width / 2), 4, &gUnknown_8415A04, -1, arr);
AddTextPrinterParameterized3(0, 2, 0x78 - (width / 2), 4, gUnknown_8415A04, -1, arr);
DynamicPlaceholderTextUtil_ExpandPlaceholders(arr, gUnknown_841B619);
width = GetStringWidth(2, arr, -1);
AddTextPrinterParameterized3(0, 0x2, 0x78 - (width / 2), 0x1E, &gUnknown_8415A04, -1, arr);
AddTextPrinterParameterized3(0, 0x2, 0x78, 0x69, &gUnknown_8415A04, 0, gUnknown_841B684);
AddTextPrinterParameterized3(0, 0x2, 0x78 - (width / 2), 0x1E, gUnknown_8415A04, -1, arr);
AddTextPrinterParameterized3(0, 0x2, 0x78, 0x69, gUnknown_8415A04, 0, gUnknown_841B684);
PutWindowTilemap(0);
}
+10 -10
View File
@@ -152,9 +152,9 @@ static const u16 sOakSpritePalette[] = INCBIN_U16("data/fame_checker/pal_845f580
static const u16 gUnknown_845F5A0[] = INCBIN_U16("data/fame_checker/pal_845f5a0.gbapal"); // unused?
static const u16 sSilhouettePalette[] = INCBIN_U16("data/fame_checker/pal_845f5c0.gbapal");
static const struct TextColor sTextColor_White = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY};
static const struct TextColor sTextColor_DkGrey = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, 0x03};
static const struct TextColor sTextColor_Green = {TEXT_COLOR_TRANSPARENT, 0x06, 0x07};
static const u8 sTextColor_White[3] = {0, 1, 2};
static const u8 sTextColor_DkGrey[3] = {0, 2, 3};
static const u8 sTextColor_Green[3] = {0, 6, 7};
static const u16 sTrainerIdxs[] = {
FC_NONTRAINER_START + 0, // OAK
@@ -900,7 +900,7 @@ static void PrintUIHelp(u8 state)
}
width = GetStringWidth(0, src, 0);
FillWindowPixelRect(FCWINDOWID_UIHELP, 0x00, 0, 0, 0xc0, 0x10);
AddTextPrinterParameterized4(FCWINDOWID_UIHELP, 0, 188 - width, 0, 0, 2, &sTextColor_White, -1, src);
AddTextPrinterParameterized4(FCWINDOWID_UIHELP, 0, 188 - width, 0, 0, 2, sTextColor_White, -1, src);
FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_UIHELP);
}
@@ -1213,10 +1213,10 @@ static void UpdateIconDescriptionBox(u8 whichText)
gIconDescriptionBoxIsOpen = 1;
FillWindowPixelRect(FCWINDOWID_ICONDESC, 0x00, 0, 0, 0x58, 0x20);
width = (0x54 - GetStringWidth(0, sFlavorTextOriginLocationTexts[idx], 0)) / 2;
AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 0, 0, 2, &sTextColor_DkGrey, -1, sFlavorTextOriginLocationTexts[idx]);
AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 0, 0, 2, sTextColor_DkGrey, -1, sFlavorTextOriginLocationTexts[idx]);
StringExpandPlaceholders(gStringVar1, sFlavorTextOriginObjectNameTexts[idx]);
width = (0x54 - GetStringWidth(0, gStringVar1, 0)) / 2;
AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 10, 0, 2, &sTextColor_DkGrey, -1, gStringVar1);
AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 10, 0, 2, sTextColor_DkGrey, -1, gStringVar1);
FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_ICONDESC);
}
@@ -1341,14 +1341,14 @@ static void FC_DoMoveCursor(s32 itemIndex, bool8 onInit)
u16 who;
ListMenuGetScrollAndRow(sFameCheckerData->listMenuTaskId, &listY, &cursorY);
who = listY + cursorY;
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 8, 14 * cursorY + 4, 0, 0, &sTextColor_Green, 0, sListMenuItems[itemIndex].label);
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 8, 14 * cursorY + 4, 0, 0, sTextColor_Green, 0, sListMenuItems[itemIndex].label);
if (!onInit)
{
if (listY < sFameCheckerData->listMenuTopIdx2)
sFameCheckerData->listMenuDrawnSelIdx++;
else if (listY > sFameCheckerData->listMenuTopIdx2 && who != sFameCheckerData->numUnlockedPersons - 1)
sFameCheckerData->listMenuDrawnSelIdx--;
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 8, 14 * sFameCheckerData->listMenuDrawnSelIdx + 4, 0, 0, &sTextColor_DkGrey, 0, sListMenuItems[sFameCheckerData->listMenuCurIdx].label);
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 8, 14 * sFameCheckerData->listMenuDrawnSelIdx + 4, 0, 0, sTextColor_DkGrey, 0, sListMenuItems[sFameCheckerData->listMenuCurIdx].label);
}
sFameCheckerData->listMenuCurIdx = itemIndex;
@@ -1546,7 +1546,7 @@ static void PlaceListMenuCursor(bool8 isActive)
{
u16 cursorY = ListMenuGetYCoordForPrintingArrowCursor(sFameCheckerData->listMenuTaskId);
if (isActive == TRUE)
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 0, cursorY, 0, 0, &sTextColor_DkGrey, 0, gFameCheckerText_ListMenuCursor);
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 0, cursorY, 0, 0, sTextColor_DkGrey, 0, gFameCheckerText_ListMenuCursor);
else
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 0, cursorY, 0, 0, &sTextColor_White, 0, gFameCheckerText_ListMenuCursor);
AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 0, cursorY, 0, 0, sTextColor_White, 0, gFameCheckerText_ListMenuCursor);
}
+7 -7
View File
@@ -25,7 +25,7 @@ struct HelpSystemVideoState
/*0x0c*/ u16 savedBg0Hofs;
/*0x0e*/ u16 savedBg0Vofs;
/*0x10*/ u16 savedBldCnt;
/*0x12*/ struct TextColor savedTextColor;
/*0x12*/ u8 savedTextColor[3];
/*0x15*/ u8 state;
};
@@ -171,9 +171,9 @@ void SaveMapTiles(void)
void SaveMapTextColors(void)
{
SaveTextColors(
&sVideoState.savedTextColor.fgColor,
&sVideoState.savedTextColor.bgColor,
&sVideoState.savedTextColor.shadowColor
&sVideoState.savedTextColor[0],
&sVideoState.savedTextColor[1],
&sVideoState.savedTextColor[2]
);
}
@@ -200,9 +200,9 @@ void RestoreMapTiles(void)
void RestoreMapTextColors(void)
{
RestoreTextColors(
&sVideoState.savedTextColor.fgColor,
&sVideoState.savedTextColor.bgColor,
&sVideoState.savedTextColor.shadowColor
&sVideoState.savedTextColor[0],
&sVideoState.savedTextColor[1],
&sVideoState.savedTextColor[2]
);
}
+2 -2
View File
@@ -125,7 +125,7 @@ static const struct MenuAction sItemPcSubmenuOptions[] = {
{gFameCheckerText_Cancel, {.void_u8 = Task_ItemPcCancel}}
};
static const struct TextColor gUnknown_8453F8C[] = {
static const u8 gUnknown_8453F8C[][3] = {
{0, 1, 2},
{0, 2, 3},
{0, 3, 2},
@@ -1111,7 +1111,7 @@ static void unused_ItemPc_AddTextPrinterParameterized(u8 windowId, const u8 * st
static void ItemPc_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx)
{
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, &gUnknown_8453F8C[colorIdx], speed, str);
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, gUnknown_8453F8C[colorIdx], speed, str);
}
static void ItemPc_SetBorderStyleOnWindow(u8 windowId)
+9 -9
View File
@@ -368,21 +368,21 @@ static u8 ListMenuInitInternal(struct ListMenuTemplate *listMenuTemplate, u16 sc
static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y)
{
struct TextColor colors;
u8 colors[3];
if (gListMenuOverride.enabled)
{
colors.fgColor = gListMenuOverride.fillValue;
colors.bgColor = gListMenuOverride.cursorPal;
colors.shadowColor = gListMenuOverride.cursorShadowPal;
AddTextPrinterParameterized4(list->template.windowId, gListMenuOverride.fontId, x, y, gListMenuOverride.lettersSpacing, 0, &colors, TEXT_SPEED_FF, str);
colors[0] = gListMenuOverride.fillValue;
colors[1] = gListMenuOverride.cursorPal;
colors[2] = gListMenuOverride.cursorShadowPal;
AddTextPrinterParameterized4(list->template.windowId, gListMenuOverride.fontId, x, y, gListMenuOverride.lettersSpacing, 0, colors, TEXT_SPEED_FF, str);
gListMenuOverride.enabled = FALSE;
}
else
{
colors.fgColor = list->template.fillValue;
colors.bgColor = list->template.cursorPal;
colors.shadowColor = list->template.cursorShadowPal;
AddTextPrinterParameterized4(list->template.windowId, list->template.fontId, x, y, list->template.lettersSpacing, 0, &colors, TEXT_SPEED_FF, str);
colors[0] = list->template.fillValue;
colors[1] = list->template.cursorPal;
colors[2] = list->template.cursorShadowPal;
AddTextPrinterParameterized4(list->template.windowId, list->template.fontId, x, y, list->template.lettersSpacing, 0, colors, TEXT_SPEED_FF, str);
}
}
+4 -4
View File
@@ -447,14 +447,14 @@ u16 sub_80F8318(u8 mapsec)
{
u16 windowId;
u32 xctr;
struct TextColor color[0];
u8 color[0];
windowId = AddWindow(&sMapNameWindow);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
color->fgColor = 1; // Access violation
color->bgColor = 4; // Access violation
color->shadowColor = 3; // Access violation
color[0] = 1; // Access violation
color[1] = 4; // Access violation
color[2] = 3; // Access violation
GetMapName(gStringVar4, mapsec, 0);
xctr = 104 - GetStringWidth(2, gStringVar4, 0);
AddTextPrinterParameterized4(windowId, 2, xctr / 2, 2, 0, 0, color/* Access violation */, -1, gStringVar4);
+11 -16
View File
@@ -41,12 +41,7 @@ static void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLef
static void WindowFunc_ClearStdWindowAndFrameToTransparent(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum);
static u8 MultichoiceGrid_MoveCursor(s8 deltaX, s8 deltaY);
static const struct TextColor gUnknown_8456618 =
{
.fgColor = 15,
.bgColor = 1,
.shadowColor = 2,
};
static const u8 gUnknown_8456618[3] = {15, 1, 2};
void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileNum, u8 paletteNum)
{
@@ -205,7 +200,7 @@ void TopBarWindowPrintString(const u8 *string, u8 unused, bool8 copyToVram)
PutWindowTilemap(sTopBarWindowId);
FillWindowPixelBuffer(sTopBarWindowId, PIXEL_FILL(15));
width = GetStringWidth(0, string, 0);
AddTextPrinterParameterized3(sTopBarWindowId, 0, -20 - width, 1, &gUnknown_8456618, 0, string);
AddTextPrinterParameterized3(sTopBarWindowId, 0, -20 - width, 1, gUnknown_8456618, 0, string);
if (copyToVram)
CopyWindowToVram(sTopBarWindowId, 3);
}
@@ -213,22 +208,22 @@ void TopBarWindowPrintString(const u8 *string, u8 unused, bool8 copyToVram)
void TopBarWindowPrintTwoStrings(const u8 *string, const u8 *string2, bool8 fgColorChooser, u8 unused, bool8 copyToVram)
{
struct TextColor color;
u8 color[3];
s32 fgColor, width;
if ( sTopBarWindowId != 0xFF )
{
if (fgColorChooser)
{
color.fgColor = 0;
color.bgColor = 1;
color.shadowColor = 2;
color[0] = 0;
color[1] = 1;
color[2] = 2;
}
else
{
color.fgColor = 15;
color.bgColor = 1;
color.shadowColor = 2;
color[0] = 15;
color[1] = 1;
color[2] = 2;
}
PutWindowTilemap(sTopBarWindowId);
@@ -236,9 +231,9 @@ void TopBarWindowPrintTwoStrings(const u8 *string, const u8 *string2, bool8 fgCo
if (string2)
{
width = GetStringWidth(0, string2, 0);
AddTextPrinterParameterized3(sTopBarWindowId, 0, -20 - width, 1, &color, 0, string2);
AddTextPrinterParameterized3(sTopBarWindowId, 0, -20 - width, 1, color, 0, string2);
}
AddTextPrinterParameterized4(sTopBarWindowId, 1, 4, 1, 0, 0, &color, 0, string);
AddTextPrinterParameterized4(sTopBarWindowId, 1, 4, 1, 0, 0, color, 0, string);
if (copyToVram)
CopyWindowToVram(sTopBarWindowId, 3);
}
+8 -8
View File
@@ -424,7 +424,7 @@ static const u8 gUnknown_845FD54[][5] = {
[SPECIES_OLD_UNOWN_QMARK - 1] = {0x20, 0x23, 0x08, 0x20, 0x2d}
};
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const struct TextColor * color, s8 speed, const u8 * str)
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const u8 * color, s8 speed, const u8 * str)
{
struct TextPrinterTemplate printer;
@@ -438,13 +438,13 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const stru
printer.letterSpacing = GetFontAttribute(fontId, 2);
printer.lineSpacing = GetFontAttribute(fontId, 3);
printer.unk = 0;
printer.fgColor = color->bgColor;
printer.bgColor = color->fgColor;
printer.shadowColor = color->shadowColor;
printer.fgColor = color[1];
printer.bgColor = color[0];
printer.shadowColor = color[2];
AddTextPrinter(&printer, speed, NULL);
}
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str)
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str)
{
struct TextPrinterTemplate printer;
@@ -458,9 +458,9 @@ void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterS
printer.letterSpacing = letterSpacing;
printer.lineSpacing = lineSpacing;
printer.unk = 0;
printer.fgColor = color->bgColor;
printer.bgColor = color->fgColor;
printer.shadowColor = color->shadowColor;
printer.fgColor = color[1];
printer.bgColor = color[0];
printer.shadowColor = color[2];
AddTextPrinter(&printer, speed, NULL);
}
+12 -12
View File
@@ -61,7 +61,7 @@ void sub_81461D8(void);
extern const struct OamData gOamData_83AC9F8;
const struct TextColor gUnknown_8467068[] = {
const u8 gUnknown_8467068[][3] = {
{0, 2, 3},
{0, 1, 2}
};
@@ -348,28 +348,28 @@ void sub_8145D18(u8 whichWindow)
case 0:
{
s32 x;
AddTextPrinterParameterized3(windowId, 3, 0, 1, &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal1], 0, gUnknown_203F3C8->unk_018B);
AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal1], 0, gUnknown_203F3C8->unk_018B);
x = 160 - GetStringWidth(3, gUnknown_203F3C8->unk_01B4, GetFontAttribute(3, 2));
if (x < 0)
x = 0;
AddTextPrinterParameterized3(windowId, 3, x, 17, &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal1], 0, gUnknown_203F3C8->unk_01B4);
AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal1], 0, gUnknown_203F3C8->unk_01B4);
if (gUnknown_203F3C8->unk_0000.unk_04 != 0)
{
AddTextPrinterParameterized3(windowId, 2, 166, 17, &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal1], 0, gUnknown_203F3C8->unk_01DD);
AddTextPrinterParameterized3(windowId, 2, 166, 17, gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal1], 0, gUnknown_203F3C8->unk_01DD);
}
break;
}
case 1:
for (; sp0C < 4; sp0C++)
{
AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal2], 0, gUnknown_203F3C8->unk_01E4[sp0C]);
AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal2], 0, gUnknown_203F3C8->unk_01E4[sp0C]);
}
break;
case 2:
AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_8467070[gUnknown_203F3C8->unk_0000.unk_08_0], &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_0288);
AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_8467070[gUnknown_203F3C8->unk_0000.unk_08_0], gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_0288);
if (gUnknown_203F3C8->unk_0000.unk_08_0 != 2)
{
AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_8467070[gUnknown_203F3C8->unk_0000.unk_08_0], &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_02B1);
AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_8467070[gUnknown_203F3C8->unk_0000.unk_08_0], gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_02B1);
}
else
{
@@ -378,11 +378,11 @@ void sub_8145D18(u8 whichWindow)
s32 spacing = GetFontAttribute(3, 2);
for (; sp0C < gUnknown_203F3C8->unk_0175; sp0C++)
{
AddTextPrinterParameterized3(windowId, 3, x, y, &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_02DC[sp0C].unk_01);
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_02DC[sp0C].unk_01);
if (gUnknown_203F3C8->unk_02DC[sp0C].unk_42[0] != EOS)
{
x += GetStringWidth(3, gUnknown_203F3C8->unk_02DC[sp0C].unk_01, spacing);
AddTextPrinterParameterized3(windowId, 2, x, y, &gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_02DC[sp0C].unk_42);
AddTextPrinterParameterized3(windowId, 2, x, y, gUnknown_8467068[gUnknown_203F3C8->unk_0170->textPal3], 0, gUnknown_203F3C8->unk_02DC[sp0C].unk_42);
x += GetStringWidth(3, gUnknown_203F3C8->unk_02DC[sp0C].unk_42, spacing) + gUnknown_203F3C8->unk_02DC[sp0C].unk_00;
}
}
@@ -471,7 +471,7 @@ void sub_8146980(void);
void sub_8146A30(void);
void sub_8146B58(void);
const struct TextColor gUnknown_8468038[] = {
const u8 gUnknown_8468038[][3] = {
{0, 2, 3},
{0, 1, 2}
};
@@ -758,10 +758,10 @@ void sub_8146A30(void)
x = (0xe0 - GetStringWidth(3, gUnknown_203F3CC->unk_01CE, GetFontAttribute(3, 2))) / 2;
if (x < 0)
x = 0;
AddTextPrinterParameterized3(gUnknown_203F3CC->unk_01C8[0], 3, x, 6, &gUnknown_8468038[gUnknown_203F3CC->unk_01BC->textPal1], 0, gUnknown_203F3CC->unk_01CE);
AddTextPrinterParameterized3(gUnknown_203F3CC->unk_01C8[0], 3, x, 6, gUnknown_8468038[gUnknown_203F3CC->unk_01BC->textPal1], 0, gUnknown_203F3CC->unk_01CE);
for (; i < 10; ++i)
{
AddTextPrinterParameterized3(gUnknown_203F3CC->unk_01C8[1], 3, 0, 16 * i + 2, &gUnknown_8468038[gUnknown_203F3CC->unk_01BC->textPal2], 0, gUnknown_203F3CC->unk_01F7[i]);
AddTextPrinterParameterized3(gUnknown_203F3CC->unk_01C8[1], 3, 0, 16 * i + 2, gUnknown_8468038[gUnknown_203F3CC->unk_01BC->textPal2], 0, gUnknown_203F3CC->unk_01F7[i]);
}
CopyWindowToVram(gUnknown_203F3CC->unk_01C8[0], 3);
CopyWindowToVram(gUnknown_203F3CC->unk_01C8[1], 3);
+10 -10
View File
@@ -409,9 +409,9 @@ const u8 *const Unref_08366ED8[] = {
gText_ReturnToTitle
};
ALIGNED(4) const struct TextColor sMG_Ereader_TextColor_1 = { 0, 1, 2 };
ALIGNED(4) const struct TextColor sMG_Ereader_TextColor_1_Copy = { 0, 1, 2 };
ALIGNED(4) const struct TextColor sMG_Ereader_TextColor_2 = { 1, 2, 3 };
ALIGNED(4) const u8 sMG_Ereader_TextColor_1[3] = { 0, 1, 2 };
ALIGNED(4) const u8 sMG_Ereader_TextColor_1_Copy[3] = { 0, 1, 2 };
ALIGNED(4) const u8 sMG_Ereader_TextColor_2[3] = { 1, 2, 3 };
const u8 gUnknown_8466EF3[] = _("テスト");
const u8 gUnknown_8466EF7[] = _("むげんのチケット");
@@ -538,14 +538,14 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 mg_or_ereader, bool32 usePickOkCance
if (!mg_or_ereader)
{
src = usePickOkCancel == TRUE ? gText_PickOKExit : gText_PickOKCancel;
AddTextPrinterParameterized4(0, 2, 2, 2, 0, 0, &sMG_Ereader_TextColor_1, 0, gText_MysteryGift);
AddTextPrinterParameterized4(0, 2, 2, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gText_MysteryGift);
width = 222 - GetStringWidth(0, src, 0);
AddTextPrinterParameterized4(0, 0, width, 2, 0, 0, &sMG_Ereader_TextColor_1, 0, src);
AddTextPrinterParameterized4(0, 0, width, 2, 0, 0, sMG_Ereader_TextColor_1, 0, src);
}
else
{
AddTextPrinterParameterized4(0, 2, 2, 2, 0, 0, &sMG_Ereader_TextColor_1, 0, gJPText_MysteryGift);
AddTextPrinterParameterized4(0, 0, 0x78, 2, 0, 0, &sMG_Ereader_TextColor_1, 0, gJPText_DecideStop);
AddTextPrinterParameterized4(0, 2, 2, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gJPText_MysteryGift);
AddTextPrinterParameterized4(0, 0, 0x78, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gJPText_DecideStop);
}
CopyWindowToVram(0, 2);
PutWindowTilemap(0);
@@ -596,7 +596,7 @@ void AddTextPrinterToWindow1(const u8 *str)
{
StringExpandPlaceholders(gStringVar4, str);
FillWindowPixelBuffer(1, 0x11);
AddTextPrinterParameterized4(1, 2, 0, 2, 0, 2, &sMG_Ereader_TextColor_2, 0, gStringVar4);
AddTextPrinterParameterized4(1, 2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4);
DrawTextBorderOuter(1, 0x001, 0xF);
PutWindowTilemap(1);
CopyWindowToVram(1, 3);
@@ -737,7 +737,7 @@ s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8
*windowId = AddWindow(&sWindowTemplate_PromptYesOrNo_Width20);
}
FillWindowPixelBuffer(*windowId, 0x11);
AddTextPrinterParameterized4(*windowId, 2, 0, 2, 0, 2, &sMG_Ereader_TextColor_2, 0, gStringVar4);
AddTextPrinterParameterized4(*windowId, 2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4);
DrawTextBorderOuter(*windowId, 0x001, 0x0F);
CopyWindowToVram(*windowId, 2);
PutWindowTilemap(*windowId);
@@ -798,7 +798,7 @@ s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cannotToss,
}
*windowId = AddWindow(&sMysteryGiftMenuWindowTemplate);
FillWindowPixelBuffer(*windowId, 0x11);
AddTextPrinterParameterized4(*windowId, 2, 0, 2, 0, 2, &sMG_Ereader_TextColor_2, 0, gStringVar4);
AddTextPrinterParameterized4(*windowId, 2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4);
DrawTextBorderOuter(*windowId, 0x001, 0x0F);
CopyWindowToVram(*windowId, 2);
PutWindowTilemap(*windowId);
+15 -15
View File
@@ -37,7 +37,7 @@ struct OakSpeechResources
u16 unk_0010;
u16 unk_0012;
u16 unk_0014[4];
struct TextColor textColor;
u8 textColor[3];
u8 textSpeed;
u8 filler_0020[0x1800];
u8 bg2TilemapBuffer[0x400];
@@ -273,11 +273,11 @@ static const struct WindowTemplate sNewGameAdventureIntroWindowTemplates[] = {
}, DUMMY_WIN_TEMPLATE
};
ALIGNED(4) const struct TextColor sTextColor_HelpSystem = {
const u8 sTextColor_HelpSystem[4] = {
0x00, 0x01, 0x02
};
ALIGNED(4) const struct TextColor sTextColor_OakSpeech = {
const u8 sTextColor_OakSpeech[4] = {
0x00, 0x02, 0x03
};
@@ -576,7 +576,7 @@ static void CreateHelpDocsPage1(void)
sOakSpeechResources->unk_0014[0] = AddWindow(sHelpDocsWindowTemplatePtrs[sOakSpeechResources->unk_0012]);
PutWindowTilemap(sOakSpeechResources->unk_0014[0]);
FillWindowPixelBuffer(sOakSpeechResources->unk_0014[0], 0x00);
AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[0], 2, 2, 0, 1, 1, &sTextColor_HelpSystem, 0, gNewGame_HelpDocs1);
AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[0], 2, 2, 0, 1, 1, sTextColor_HelpSystem, 0, gNewGame_HelpDocs1);
CopyWindowToVram(sOakSpeechResources->unk_0014[0], 3);
FillBgTilemapBufferRect_Palette0(1, 0x3000, 1, 3, 5, 16);
CopyBgTilemapBufferToVram(1);
@@ -598,7 +598,7 @@ static void Task_OakSpeech4(u8 taskId)
sOakSpeechResources->unk_0014[i] = AddWindow(&sHelpDocsWindowTemplatePtrs[sOakSpeechResources->unk_0012][i]);
PutWindowTilemap(sOakSpeechResources->unk_0014[i]);
FillWindowPixelBuffer(sOakSpeechResources->unk_0014[i], 0x00);
AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[i], 2, 6, 0, 1, 1, &sTextColor_HelpSystem, 0, sHelpDocsPtrs[i + r7 * 3]);
AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[i], 2, 6, 0, 1, 1, sTextColor_HelpSystem, 0, sHelpDocsPtrs[i + r7 * 3]);
CopyWindowToVram(sOakSpeechResources->unk_0014[i], 3);
}
@@ -730,7 +730,7 @@ static void Task_OakSpeech6(u8 taskId)
sOakSpeechResources->unk_0012 = 0;
gMain.state = 0;
data[15] = 16;
AddTextPrinterParameterized4(data[14], 2, 3, 5, 1, 0, &sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[0]);
AddTextPrinterParameterized4(data[14], 2, 3, 5, 1, 0, sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[0]);
data[5] = CreateTextCursorSpriteForOakSpeech(0, 0xe2, 0x91, 0, 0);
gSprites[data[5]].oam.objMode = ST_OAM_OBJ_BLEND;
gSprites[data[5]].oam.priority = 0;
@@ -790,7 +790,7 @@ static void Task_OakSpeech7(u8 taskId)
if (data[15] <= 0)
{
FillWindowPixelBuffer(data[14], 0x00);
AddTextPrinterParameterized4(data[14], 2, 3, 5, 1, 0, &sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[sOakSpeechResources->unk_0012]);
AddTextPrinterParameterized4(data[14], 2, 3, 5, 1, 0, sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[sOakSpeechResources->unk_0012]);
if (sOakSpeechResources->unk_0012 == 0)
{
ClearTopBarWindow();
@@ -1056,14 +1056,14 @@ static void Task_OakSpeech19(u8 taskId)
PutWindowTilemap(gTasks[taskId].data[13]);
DrawStdFrameWithCustomTileAndPalette(gTasks[taskId].data[13], 1, GetStdWindowBaseTileNum(), 14);
FillWindowPixelBuffer(gTasks[taskId].data[13], 0x11);
sOakSpeechResources->textColor.fgColor = 1;
sOakSpeechResources->textColor.bgColor = 2;
sOakSpeechResources->textColor.shadowColor = 3;
AddTextPrinterParameterized3(gTasks[taskId].data[13], 2, 8, 1, &sOakSpeechResources->textColor, 0, gText_Boy);
sOakSpeechResources->textColor.fgColor = 1;
sOakSpeechResources->textColor.bgColor = 2;
sOakSpeechResources->textColor.shadowColor = 3;
AddTextPrinterParameterized3(gTasks[taskId].data[13], 2, 8, 17, &sOakSpeechResources->textColor, 0, gText_Girl);
sOakSpeechResources->textColor[0] = 1;
sOakSpeechResources->textColor[1] = 2;
sOakSpeechResources->textColor[2] = 3;
AddTextPrinterParameterized3(gTasks[taskId].data[13], 2, 8, 1, sOakSpeechResources->textColor, 0, gText_Boy);
sOakSpeechResources->textColor[0] = 1;
sOakSpeechResources->textColor[1] = 2;
sOakSpeechResources->textColor[2] = 3;
AddTextPrinterParameterized3(gTasks[taskId].data[13], 2, 8, 17, sOakSpeechResources->textColor, 0, gText_Girl);
Menu_InitCursor(gTasks[taskId].data[13], 2, 0, 1, GetFontAttribute(2, 1) + 2, 2, 0);
CopyWindowToVram(gTasks[taskId].data[13], 3);
gTasks[taskId].func = Task_OakSpeech20;
+5 -5
View File
@@ -410,7 +410,7 @@ const struct WindowTemplate gUnknown_845661C[3] = {
{ 0, 0, 14, 30, 6, 15, 0x14c }
};
const struct TextColor gUnknown_8456634 = {15, 1, 12};
const u8 gUnknown_8456634[3] = {15, 1, 12};
const u16 gUnknown_8456638[] = INCBIN_U16("data/graphics/unknown_8456638.bin");
@@ -923,7 +923,7 @@ void sub_8111070(u8 a0)
StringAppend(gStringVar4, gStringVar1);
}
AddTextPrinterParameterized4(gUnknown_203ADFE[0], 2, 2, 2, 1, 2, &gUnknown_8456634, 0, gStringVar4);
AddTextPrinterParameterized4(gUnknown_203ADFE[0], 2, 2, 2, 1, 2, gUnknown_8456634, 0, gStringVar4);
PutWindowTilemap(gUnknown_203ADFE[0]);
PutWindowTilemap(gUnknown_203ADFE[1]);
CopyWindowToVram(gUnknown_203ADFE[0], 2);
@@ -1418,7 +1418,7 @@ void sub_8111D10(void)
PutWindowTilemap(gUnknown_203ADFE[2]);
sub_8111D90(gUnknown_203ADFE[2]);
AddTextPrinterParameterized4(gUnknown_203ADFE[2], 2, 2, gUnknown_8456698[count], 1, 0, &gUnknown_8456634, 0, gStringVar4);
AddTextPrinterParameterized4(gUnknown_203ADFE[2], 2, 2, gUnknown_8456698[count], 1, 0, gUnknown_8456634, 0, gStringVar4);
ScheduleBgCopyTilemapToVram(0);
}
@@ -2463,13 +2463,13 @@ void sub_8112FD0(void)
sub_8112F18(gUnknown_203B020);
}
const struct TextColor gUnknown_8456930 = {
const u8 gUnknown_8456930[3] = {
0, 10, 2
};
void sub_8112FE4(const u8 * a0)
{
AddTextPrinterParameterized4(gUnknown_203B020, 0x02, 2, 5, 1, 1, &gUnknown_8456930, -1, a0);
AddTextPrinterParameterized4(gUnknown_203B020, 0x02, 2, 5, 1, 1, gUnknown_8456930, -1, a0);
}
void sub_8113018(const u8 * text, u8 mode)
+5 -5
View File
@@ -2074,7 +2074,7 @@ static bool32 sub_8141180(u8 a0)
static bool8 sub_8141198(u8 * state, struct SlotMachineSetupTaskData * ptr)
{
u16 pal;
struct TextColor textColor;
u8 textColor[3];
u32 x;
switch (*state)
@@ -2125,10 +2125,10 @@ static bool8 sub_8141198(u8 * state, struct SlotMachineSetupTaskData * ptr)
PutWindowTilemap(1);
x = 0xEC - GetStringWidth(0, gString_SlotMachineControls, 0);
textColor.fgColor = 15;
textColor.bgColor = 1;
textColor.shadowColor = 2;
AddTextPrinterParameterized3(1, 0, x, 0, &textColor, 0, gString_SlotMachineControls);
textColor[0] = 15;
textColor[1] = 1;
textColor[2] = 2;
AddTextPrinterParameterized3(1, 0, x, 0, textColor, 0, gString_SlotMachineControls);
CopyBgTilemapBufferToVram(0);
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | 0x20 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON);
+3 -3
View File
@@ -185,7 +185,7 @@ static const u8 sText_SingleSpace[] = _(" ");
static ALIGNED(4) const u16 sPal3Override[] = {RGB(8, 8, 8), RGB(30, 16, 6)};
static const struct TextColor sTextColors[] = {
static const u8 sTextColors[][3] = {
{0, 1, 2},
{0, 2, 3},
{0, 3, 6},
@@ -1317,7 +1317,7 @@ static void InitWindowTemplatesAndPals(void)
static void AddTextPrinterParameterized_ColorByIndex(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx)
{
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, &sTextColors[colorIdx], speed, str);
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, sTextColors[colorIdx], speed, str);
}
static void TMCase_SetWindowBorder1(u8 windowId)
@@ -1339,7 +1339,7 @@ static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 windowId, const u8
static void PrintStringTMCaseOnWindow3(void)
{
u32 distance = 72 - GetStringWidth(1, gText_TMCase, 0);
AddTextPrinterParameterized3(3, 1, distance / 2, 1, &sTextColors[0], 0, gText_TMCase);
AddTextPrinterParameterized3(3, 1, distance / 2, 1, sTextColors[0], 0, gText_TMCase);
}
static void DrawMoveInfoUIMarkers(void)
+4 -4
View File
@@ -423,7 +423,7 @@ const struct WindowTemplate gUnknown_847A218[] = {
const u32 gUnknown_847A228 = 0x70; // unused
const struct TextColor gUnknown_847A22C = {0, 2, 3};
const u8 gUnknown_847A22C[3] = {0, 2, 3};
void (*const gUnknown_847A230[])(void) = {
sub_815DD44,
@@ -1433,14 +1433,14 @@ void PrintTrainerTowerRecords(void)
sub_815DC8C();
FillWindowPixelRect(0, 0, 0, 0, 0xd8, 0x90);
sub_815EC0C();
AddTextPrinterParameterized3(0, 2, 0x4a, 0, &gUnknown_847A22C, 0, gUnknown_83FE982);
AddTextPrinterParameterized3(0, 2, 0x4a, 0, gUnknown_847A22C, 0, gUnknown_83FE982);
for (i = 0; i < 4; i++)
{
PRINT_TOWER_TIME(sub_815EDDC(&gSaveBlock1Ptr->unkArray[i].unk4));
StringExpandPlaceholders(gStringVar4, gUnknown_83FE998);
AddTextPrinterParameterized3(windowId, 2, 0x18, 0x24 + 0x14 * i, &gUnknown_847A22C, 0, gUnknown_83FE9C4[i]);
AddTextPrinterParameterized3(windowId, 2, 0x60, 0x24 + 0x14 * i, &gUnknown_847A22C, 0, gStringVar4);
AddTextPrinterParameterized3(windowId, 2, 0x18, 0x24 + 0x14 * i, gUnknown_847A22C, 0, gUnknown_83FE9C4[i]);
AddTextPrinterParameterized3(windowId, 2, 0x60, 0x24 + 0x14 * i, gUnknown_847A22C, 0, gStringVar4);
}
PutWindowTilemap(windowId);
+17 -17
View File
@@ -329,37 +329,37 @@ void sub_814F46C(u8 taskId)
void sub_814F65C(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 palIdx)
{
struct TextColor textColor;
u8 textColor[3];
switch (palIdx)
{
case 0:
textColor.fgColor = 0;
textColor.bgColor = 2;
textColor.shadowColor = 3;
textColor[0] = 0;
textColor[1] = 2;
textColor[2] = 3;
break;
case 1:
textColor.fgColor = 0;
textColor.bgColor = 1;
textColor.shadowColor = 3;
textColor[0] = 0;
textColor[1] = 1;
textColor[2] = 3;
break;
case 2:
textColor.fgColor = 0;
textColor.bgColor = 4;
textColor.shadowColor = 5;
textColor[0] = 0;
textColor[1] = 4;
textColor[2] = 5;
break;
case 3:
textColor.fgColor = 0;
textColor.bgColor = 7;
textColor.shadowColor = 6;
textColor[0] = 0;
textColor[1] = 7;
textColor[2] = 6;
break;
case 4:
textColor.fgColor = 0;
textColor.bgColor = 1;
textColor.shadowColor = 2;
textColor[0] = 0;
textColor[1] = 1;
textColor[2] = 2;
break;
// default: UB
}
AddTextPrinterParameterized4(windowId, fontId,x, y, fontId == 0 ? 0 : 1, 0, &textColor, -1, str);
AddTextPrinterParameterized4(windowId, fontId,x, y, fontId == 0 ? 0 : 1, 0, textColor, -1, str);
}
u32 sub_814F714(struct UnkStruct_x20 * unk20, u32 * arg1)