Merge branch 'followers' into lighting

This commit is contained in:
Ariel A 2023-05-15 18:43:14 -04:00
commit 996f43120d
153 changed files with 5260 additions and 4981 deletions

View File

@ -134,7 +134,8 @@ JSONPROC := tools/jsonproc/jsonproc$(EXE)
PERL := perl
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
# Inclusive list. If you don't want a tool to be built, don't add it here.
TOOLDIRS := tools/aif2pcm tools/bin2c tools/gbafix tools/gbagfx tools/jsonproc tools/mapjson tools/mid2agb tools/preproc tools/ramscrgen tools/rsfont tools/scaninc
TOOLBASE = $(TOOLDIRS:tools/%=%)
TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))

View File

@ -1576,15 +1576,15 @@
.4byte \value
.endm
@ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party.
.macro setmoneventlegal slot:req
@ Sets the modernFatefulEncounter bit for the Pokemon in the specified slot of the player's party.
.macro setmodernfatefulencounter slot:req
.byte 0xcd
.2byte \slot
.endm
@ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
@ Checks if the modernFatefulEncounter bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
@ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE.
.macro checkmoneventlegal slot:req
.macro checkmodernfatefulencounter slot:req
.byte 0xce
.2byte \slot
.endm
@ -1939,10 +1939,10 @@
closebraillemessage
.endm
@ Creates an "event legal" Pokémon for an encounter
@ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter
.macro seteventmon species:req, level:req, item=ITEM_NONE
setvar VAR_0x8004, \species
setvar VAR_0x8005, \level
setvar VAR_0x8006, \item
special CreateEventLegalEnemyMon
special CreateEnemyEventMon
.endm

View File

@ -19,11 +19,11 @@
.4byte \script
.endm
@ 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
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
.macro object_event index:req, gfx: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
.byte OBJ_KIND_NORMAL
.space 1 @ Padding
.2byte \x, \y
.byte \elevation
@ -38,6 +38,22 @@
inc _num_npcs
.endm
@ Defines an object event template for map data, to be used by a clone object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
@ NOTE: The handling for this type of event does not exist in Emerald by default; it is exclusive to FRLG.
.macro clone_event index:req, gfx:req, x:req, y:req, target_local_id:req, target_map_id:req
.byte \index
.byte \gfx
.byte OBJ_KIND_CLONE
.space 1 @ Padding
.2byte \x, \y
.byte \target_local_id
.space 3 @ Padding
.2byte \target_map_id & 0xFF @ map num
.2byte \target_map_id >> 8 @ map group
.space 8 @ Padding
inc _num_npcs
.endm
@ 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
@ -49,12 +65,12 @@
.endm
@ 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
.macro coord_event x:req, y:req, elevation:req, var:req, varValue:req, script:req
.2byte \x, \y
.byte \elevation
.space 1 @ Padding
.2byte \trigger
.2byte \index
.2byte \var
.2byte \varValue
.space 2 @ Padding
.4byte \script
inc _num_traps

View File

@ -795,7 +795,7 @@ MUS_LITTLEROOT = 95 01
MUS_MT_CHIMNEY = 96 01
MUS_ENCOUNTER_FEMALE = 97 01
MUS_LILYCOVE = 98 01
MUS_ROUTE111 = 99 01
MUS_DESERT = 99 01
MUS_HELP = 9A 01
MUS_UNDERWATER = 9B 01
MUS_VICTORY_TRAINER = 9C 01

View File

@ -1,5 +1,2 @@
gUnusedWindowVar1
gUnusedWindowVar2
gTransparentTileNumber
gUnusedWindowVar3
gWindowBgTilemapBuffers

View File

@ -1099,15 +1099,18 @@ AI_CV_AttackDown3:
score -2
AI_CV_AttackDown4:
get_target_type1
if_in_bytes AI_CV_AttackDown_UnknownTypeList, AI_CV_AttackDown_End
if_in_bytes AI_CV_AttackDown_PhysicalTypeList, AI_CV_AttackDown_End
get_target_type2
if_in_bytes AI_CV_AttackDown_UnknownTypeList, AI_CV_AttackDown_End
if_in_bytes AI_CV_AttackDown_PhysicalTypeList, AI_CV_AttackDown_End
if_random_less_than 50, AI_CV_AttackDown_End
score -2
AI_CV_AttackDown_End:
end
AI_CV_AttackDown_UnknownTypeList:
@ If the target is not of any type in this list then using the move may be discouraged.
@ It seems likely this was meant to be "discourage reducing the target's attack if they're
@ not a physical type", but they've left out Flying, Poison, and Ghost.
AI_CV_AttackDown_PhysicalTypeList:
.byte TYPE_NORMAL
.byte TYPE_FIGHTING
.byte TYPE_GROUND

View File

@ -65,7 +65,7 @@ BattleScript_SuccessBallThrow::
jumpifhalfword CMP_EQUAL, gLastUsedItem, ITEM_SAFARI_BALL, BattleScript_PrintCaughtMonInfo
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHT
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
@ -87,7 +87,7 @@ BattleScript_SuccessBallThrowEnd::
finishturn
BattleScript_WallyBallThrow::
printstring STRINGID_GOTCHAPKMNCAUGHT2
printstring STRINGID_GOTCHAPKMNCAUGHTWALLY
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn

View File

@ -7,7 +7,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide::
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
checkitem ITEM_SCANNER
goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT
release
end

View File

@ -38,7 +38,7 @@
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner",
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER"
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

View File

@ -48,21 +48,24 @@ BirthIsland_Exterior_EventScript_Triangle::
special DoDeoxysRockInteraction
waitstate
switch VAR_RESULT
case 0, BirthIsland_Exterior_EventScript_NotSolved1
case 1, BirthIsland_Exterior_EventScript_NotSolved2
case 2, BirthIsland_Exterior_EventScript_Deoxys
case 3, BirthIsland_Exterior_EventScript_NotSolved3
case DEOXYS_ROCK_FAILED, BirthIsland_Exterior_EventScript_Failed
case DEOXYS_ROCK_PROGRESSED, BirthIsland_Exterior_EventScript_Progressed
case DEOXYS_ROCK_SOLVED, BirthIsland_Exterior_EventScript_Deoxys
case DEOXYS_ROCK_COMPLETE, BirthIsland_Exterior_EventScript_Complete
end
BirthIsland_Exterior_EventScript_NotSolved1::
@ The actual rock triangle movement is handled by DoDeoxysRockInteraction.
@ Unless the player has solved the puzzle and needs to encounter Deoxys,
@ there's nothing else the script needs to do.
BirthIsland_Exterior_EventScript_Failed::
release
end
BirthIsland_Exterior_EventScript_NotSolved2::
BirthIsland_Exterior_EventScript_Progressed::
release
end
BirthIsland_Exterior_EventScript_NotSolved3::
BirthIsland_Exterior_EventScript_Complete::
release
end

View File

@ -31,26 +31,26 @@ MossdeepCity_Gym_EventScript_CheckSwitch4::
@ All the below set metatile scripts are leftover from RS and are functionally unused
MossdeepCity_Gym_EventScript_SetSwitch1Metatiles::
setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Right, FALSE
setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_CheckSwitch2
end
MossdeepCity_Gym_EventScript_SetSwitch2Metatiles::
setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Right, FALSE
setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_CheckSwitch3
end
MossdeepCity_Gym_EventScript_SetSwitch3Metatiles::
setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE
setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Left, FALSE
setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_CheckSwitch4
end
MossdeepCity_Gym_EventScript_SetSwitch4Metatiles::
setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE
setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Up, FALSE
setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Down, TRUE
end
MossdeepCity_Gym_EventScript_TateAndLiza::
@ -121,8 +121,8 @@ MossdeepCity_Gym_EventScript_Switch1::
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Right, FALSE
setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -136,8 +136,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch1::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE
setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, TRUE
setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Left, FALSE
setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -147,8 +147,8 @@ MossdeepCity_Gym_EventScript_Switch2::
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Right, FALSE
setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -156,8 +156,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch2::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, FALSE
setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, TRUE
setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Down, FALSE
setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -167,8 +167,8 @@ MossdeepCity_Gym_EventScript_Switch3::
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE
setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Left, FALSE
setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -176,8 +176,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch3::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, TRUE
setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Right, FALSE
setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -187,8 +187,8 @@ MossdeepCity_Gym_EventScript_Switch4::
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE
setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE
setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Up, FALSE
setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@ -196,8 +196,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch4::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, TRUE
setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Right, FALSE
setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end

View File

@ -38,7 +38,7 @@ PetalburgCity_OnFrame:
PetalburgCity_EventScript_WallyTutorial::
lockall
special SavePlayerParty
special PutZigzagoonInPlayerParty
special LoadWallyZigzagoon
applymovement LOCALID_WALLY, PetalburgCity_Movement_WallyTutorialWally
applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_WallyTutorialPlayer
waitmovement 0

View File

@ -168,7 +168,7 @@
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "PetalburgWoods_EventScript_ItemParalyzeHeal",
"flag": "FLAG_ITEM_PETALBURD_WOODS_PARALYZE_HEAL"
"flag": "FLAG_ITEM_PETALBURG_WOODS_PARALYZE_HEAL"
},
{
"graphics_id": "OBJ_EVENT_GFX_GIRL_2",

View File

@ -288,7 +288,7 @@
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "Route110_EventScript_ItemRareCandy",
"flag": "FLAG_ITEM_ROUTE_109_RARE_CANDY"
"flag": "FLAG_ITEM_ROUTE_110_RARE_CANDY"
},
{
"graphics_id": "OBJ_EVENT_GFX_CYCLING_TRIATHLETE_M",

View File

@ -260,7 +260,7 @@ Route111_EventScript_SunTrigger::
Route111_EventScript_SandstormTrigger::
setweather WEATHER_SANDSTORM
fadenewbgm MUS_ROUTE111
fadenewbgm MUS_DESERT
doweather
end

View File

@ -503,7 +503,7 @@
"y": 30,
"elevation": 3,
"item": "ITEM_REVIVE",
"flag": "FLAG_HIDDEN_ITEM_ROUTE_113_REVIVE"
"flag": "FLAG_HIDDEN_ITEM_ROUTE_114_REVIVE"
}
]
}

View File

@ -1,233 +1,233 @@
.align 2
gScriptCmdTable::
.4byte ScrCmd_nop @ 0x00
.4byte ScrCmd_nop1 @ 0x01
.4byte ScrCmd_end @ 0x02
.4byte ScrCmd_return @ 0x03
.4byte ScrCmd_call @ 0x04
.4byte ScrCmd_goto @ 0x05
.4byte ScrCmd_goto_if @ 0x06
.4byte ScrCmd_call_if @ 0x07
.4byte ScrCmd_gotostd @ 0x08
.4byte ScrCmd_callstd @ 0x09
.4byte ScrCmd_gotostd_if @ 0x0a
.4byte ScrCmd_callstd_if @ 0x0b
.4byte ScrCmd_returnram @ 0x0c
.4byte ScrCmd_endram @ 0x0d
.4byte ScrCmd_setmysteryeventstatus @ 0x0e
.4byte ScrCmd_loadword @ 0x0f
.4byte ScrCmd_loadbyte @ 0x10
.4byte ScrCmd_setptr @ 0x11
.4byte ScrCmd_loadbytefromptr @ 0x12
.4byte ScrCmd_setptrbyte @ 0x13
.4byte ScrCmd_copylocal @ 0x14
.4byte ScrCmd_copybyte @ 0x15
.4byte ScrCmd_setvar @ 0x16
.4byte ScrCmd_addvar @ 0x17
.4byte ScrCmd_subvar @ 0x18
.4byte ScrCmd_copyvar @ 0x19
.4byte ScrCmd_setorcopyvar @ 0x1a
.4byte ScrCmd_compare_local_to_local @ 0x1b
.4byte ScrCmd_compare_local_to_value @ 0x1c
.4byte ScrCmd_compare_local_to_ptr @ 0x1d
.4byte ScrCmd_compare_ptr_to_local @ 0x1e
.4byte ScrCmd_compare_ptr_to_value @ 0x1f
.4byte ScrCmd_compare_ptr_to_ptr @ 0x20
.4byte ScrCmd_compare_var_to_value @ 0x21
.4byte ScrCmd_compare_var_to_var @ 0x22
.4byte ScrCmd_callnative @ 0x23
.4byte ScrCmd_gotonative @ 0x24
.4byte ScrCmd_special @ 0x25
.4byte ScrCmd_specialvar @ 0x26
.4byte ScrCmd_waitstate @ 0x27
.4byte ScrCmd_delay @ 0x28
.4byte ScrCmd_setflag @ 0x29
.4byte ScrCmd_clearflag @ 0x2a
.4byte ScrCmd_checkflag @ 0x2b
.4byte ScrCmd_initclock @ 0x2c
.4byte ScrCmd_dotimebasedevents @ 0x2d
.4byte ScrCmd_gettime @ 0x2e
.4byte ScrCmd_playse @ 0x2f
.4byte ScrCmd_waitse @ 0x30
.4byte ScrCmd_playfanfare @ 0x31
.4byte ScrCmd_waitfanfare @ 0x32
.4byte ScrCmd_playbgm @ 0x33
.4byte ScrCmd_savebgm @ 0x34
.4byte ScrCmd_fadedefaultbgm @ 0x35
.4byte ScrCmd_fadenewbgm @ 0x36
.4byte ScrCmd_fadeoutbgm @ 0x37
.4byte ScrCmd_fadeinbgm @ 0x38
.4byte ScrCmd_warp @ 0x39
.4byte ScrCmd_warpsilent @ 0x3a
.4byte ScrCmd_warpdoor @ 0x3b
.4byte ScrCmd_warphole @ 0x3c
.4byte ScrCmd_warpteleport @ 0x3d
.4byte ScrCmd_setwarp @ 0x3e
.4byte ScrCmd_setdynamicwarp @ 0x3f
.4byte ScrCmd_setdivewarp @ 0x40
.4byte ScrCmd_setholewarp @ 0x41
.4byte ScrCmd_getplayerxy @ 0x42
.4byte ScrCmd_getpartysize @ 0x43
.4byte ScrCmd_additem @ 0x44
.4byte ScrCmd_removeitem @ 0x45
.4byte ScrCmd_checkitemspace @ 0x46
.4byte ScrCmd_checkitem @ 0x47
.4byte ScrCmd_checkitemtype @ 0x48
.4byte ScrCmd_addpcitem @ 0x49
.4byte ScrCmd_checkpcitem @ 0x4a
.4byte ScrCmd_adddecoration @ 0x4b
.4byte ScrCmd_removedecoration @ 0x4c
.4byte ScrCmd_checkdecor @ 0x4d
.4byte ScrCmd_checkdecorspace @ 0x4e
.4byte ScrCmd_applymovement @ 0x4f
.4byte ScrCmd_applymovementat @ 0x50
.4byte ScrCmd_waitmovement @ 0x51
.4byte ScrCmd_waitmovementat @ 0x52
.4byte ScrCmd_removeobject @ 0x53
.4byte ScrCmd_removeobjectat @ 0x54
.4byte ScrCmd_addobject @ 0x55
.4byte ScrCmd_addobjectat @ 0x56
.4byte ScrCmd_setobjectxy @ 0x57
.4byte ScrCmd_showobjectat @ 0x58
.4byte ScrCmd_hideobjectat @ 0x59
.4byte ScrCmd_faceplayer @ 0x5a
.4byte ScrCmd_turnobject @ 0x5b
.4byte ScrCmd_trainerbattle @ 0x5c
.4byte ScrCmd_dotrainerbattle @ 0x5d
.4byte ScrCmd_gotopostbattlescript @ 0x5e
.4byte ScrCmd_gotobeatenscript @ 0x5f
.4byte ScrCmd_checktrainerflag @ 0x60
.4byte ScrCmd_settrainerflag @ 0x61
.4byte ScrCmd_cleartrainerflag @ 0x62
.4byte ScrCmd_setobjectxyperm @ 0x63
.4byte ScrCmd_copyobjectxytoperm @ 0x64
.4byte ScrCmd_setobjectmovementtype @ 0x65
.4byte ScrCmd_waitmessage @ 0x66
.4byte ScrCmd_message @ 0x67
.4byte ScrCmd_closemessage @ 0x68
.4byte ScrCmd_lockall @ 0x69
.4byte ScrCmd_lock @ 0x6a
.4byte ScrCmd_releaseall @ 0x6b
.4byte ScrCmd_release @ 0x6c
.4byte ScrCmd_waitbuttonpress @ 0x6d
.4byte ScrCmd_yesnobox @ 0x6e
.4byte ScrCmd_multichoice @ 0x6f
.4byte ScrCmd_multichoicedefault @ 0x70
.4byte ScrCmd_multichoicegrid @ 0x71
.4byte ScrCmd_drawbox @ 0x72
.4byte ScrCmd_erasebox @ 0x73
.4byte ScrCmd_drawboxtext @ 0x74
.4byte ScrCmd_showmonpic @ 0x75
.4byte ScrCmd_hidemonpic @ 0x76
.4byte ScrCmd_showcontestpainting @ 0x77
.4byte ScrCmd_braillemessage @ 0x78
.4byte ScrCmd_givemon @ 0x79
.4byte ScrCmd_giveegg @ 0x7a
.4byte ScrCmd_setmonmove @ 0x7b
.4byte ScrCmd_checkpartymove @ 0x7c
.4byte ScrCmd_bufferspeciesname @ 0x7d
.4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
.4byte ScrCmd_bufferpartymonnick @ 0x7f
.4byte ScrCmd_bufferitemname @ 0x80
.4byte ScrCmd_bufferdecorationname @ 0x81
.4byte ScrCmd_buffermovename @ 0x82
.4byte ScrCmd_buffernumberstring @ 0x83
.4byte ScrCmd_bufferstdstring @ 0x84
.4byte ScrCmd_bufferstring @ 0x85
.4byte ScrCmd_pokemart @ 0x86
.4byte ScrCmd_pokemartdecoration @ 0x87
.4byte ScrCmd_pokemartdecoration2 @ 0x88
.4byte ScrCmd_playslotmachine @ 0x89
.4byte ScrCmd_setberrytree @ 0x8a
.4byte ScrCmd_choosecontestmon @ 0x8b
.4byte ScrCmd_startcontest @ 0x8c
.4byte ScrCmd_showcontestresults @ 0x8d
.4byte ScrCmd_contestlinktransfer @ 0x8e
.4byte ScrCmd_random @ 0x8f
.4byte ScrCmd_addmoney @ 0x90
.4byte ScrCmd_removemoney @ 0x91
.4byte ScrCmd_checkmoney @ 0x92
.4byte ScrCmd_showmoneybox @ 0x93
.4byte ScrCmd_hidemoneybox @ 0x94
.4byte ScrCmd_updatemoneybox @ 0x95
.4byte ScrCmd_getpokenewsactive @ 0x96
.4byte ScrCmd_fadescreen @ 0x97
.4byte ScrCmd_fadescreenspeed @ 0x98
.4byte ScrCmd_setflashlevel @ 0x99
.4byte ScrCmd_animateflash @ 0x9a
.4byte ScrCmd_messageautoscroll @ 0x9b
.4byte ScrCmd_dofieldeffect @ 0x9c
.4byte ScrCmd_setfieldeffectargument @ 0x9d
.4byte ScrCmd_waitfieldeffect @ 0x9e
.4byte ScrCmd_setrespawn @ 0x9f
.4byte ScrCmd_checkplayergender @ 0xa0
.4byte ScrCmd_playmoncry @ 0xa1
.4byte ScrCmd_setmetatile @ 0xa2
.4byte ScrCmd_resetweather @ 0xa3
.4byte ScrCmd_setweather @ 0xa4
.4byte ScrCmd_doweather @ 0xa5
.4byte ScrCmd_setstepcallback @ 0xa6
.4byte ScrCmd_setmaplayoutindex @ 0xa7
.4byte ScrCmd_setobjectsubpriority @ 0xa8
.4byte ScrCmd_resetobjectsubpriority @ 0xa9
.4byte ScrCmd_createvobject @ 0xaa
.4byte ScrCmd_turnvobject @ 0xab
.4byte ScrCmd_opendoor @ 0xac
.4byte ScrCmd_closedoor @ 0xad
.4byte ScrCmd_waitdooranim @ 0xae
.4byte ScrCmd_setdooropen @ 0xaf
.4byte ScrCmd_setdoorclosed @ 0xb0
.4byte ScrCmd_addelevmenuitem @ 0xb1
.4byte ScrCmd_showelevmenu @ 0xb2
.4byte ScrCmd_checkcoins @ 0xb3
.4byte ScrCmd_addcoins @ 0xb4
.4byte ScrCmd_removecoins @ 0xb5
.4byte ScrCmd_setwildbattle @ 0xb6
.4byte ScrCmd_dowildbattle @ 0xb7
.4byte ScrCmd_setvaddress @ 0xb8
.4byte ScrCmd_vgoto @ 0xb9
.4byte ScrCmd_vcall @ 0xba
.4byte ScrCmd_vgoto_if @ 0xbb
.4byte ScrCmd_vcall_if @ 0xbc
.4byte ScrCmd_vmessage @ 0xbd
.4byte ScrCmd_vbuffermessage @ 0xbe
.4byte ScrCmd_vbufferstring @ 0xbf
.4byte ScrCmd_showcoinsbox @ 0xc0
.4byte ScrCmd_hidecoinsbox @ 0xc1
.4byte ScrCmd_updatecoinsbox @ 0xc2
.4byte ScrCmd_incrementgamestat @ 0xc3
.4byte ScrCmd_setescapewarp @ 0xc4
.4byte ScrCmd_waitmoncry @ 0xc5
.4byte ScrCmd_bufferboxname @ 0xc6
.4byte ScrCmd_nop1 @ 0xc7
.4byte ScrCmd_nop1 @ 0xc8
.4byte ScrCmd_nop1 @ 0xc9
.4byte ScrCmd_nop1 @ 0xca
.4byte ScrCmd_nop1 @ 0xcb
.4byte ScrCmd_nop1 @ 0xcc
.4byte ScrCmd_setmoneventlegal @ 0xcd
.4byte ScrCmd_checkmoneventlegal @ 0xce
.4byte ScrCmd_trywondercardscript @ 0xcf
.4byte ScrCmd_nop1 @ 0xd0
.4byte ScrCmd_warpspinenter @ 0xd1
.4byte ScrCmd_setmonmetlocation @ 0xd2
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
.4byte ScrCmd_initrotatingtilepuzzle @ 0xd5
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
.4byte ScrCmd_warpmossdeepgym @ 0xd7
.4byte ScrCmd_selectapproachingtrainer @ 0xd8
.4byte ScrCmd_lockfortrainer @ 0xd9
.4byte ScrCmd_closebraillemessage @ 0xda
.4byte ScrCmd_messageinstant @ 0xdb
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc
.4byte ScrCmd_buffertrainerclassname @ 0xdd
.4byte ScrCmd_buffertrainername @ 0xde
.4byte ScrCmd_pokenavcall @ 0xdf
.4byte ScrCmd_warpwhitefade @ 0xe0
.4byte ScrCmd_buffercontestname @ 0xe1
.4byte ScrCmd_bufferitemnameplural @ 0xe2
.4byte ScrCmd_callfunc @ 0xe3
.4byte ScrCmd_nop @ 0x00
.4byte ScrCmd_nop1 @ 0x01
.4byte ScrCmd_end @ 0x02
.4byte ScrCmd_return @ 0x03
.4byte ScrCmd_call @ 0x04
.4byte ScrCmd_goto @ 0x05
.4byte ScrCmd_goto_if @ 0x06
.4byte ScrCmd_call_if @ 0x07
.4byte ScrCmd_gotostd @ 0x08
.4byte ScrCmd_callstd @ 0x09
.4byte ScrCmd_gotostd_if @ 0x0a
.4byte ScrCmd_callstd_if @ 0x0b
.4byte ScrCmd_returnram @ 0x0c
.4byte ScrCmd_endram @ 0x0d
.4byte ScrCmd_setmysteryeventstatus @ 0x0e
.4byte ScrCmd_loadword @ 0x0f
.4byte ScrCmd_loadbyte @ 0x10
.4byte ScrCmd_setptr @ 0x11
.4byte ScrCmd_loadbytefromptr @ 0x12
.4byte ScrCmd_setptrbyte @ 0x13
.4byte ScrCmd_copylocal @ 0x14
.4byte ScrCmd_copybyte @ 0x15
.4byte ScrCmd_setvar @ 0x16
.4byte ScrCmd_addvar @ 0x17
.4byte ScrCmd_subvar @ 0x18
.4byte ScrCmd_copyvar @ 0x19
.4byte ScrCmd_setorcopyvar @ 0x1a
.4byte ScrCmd_compare_local_to_local @ 0x1b
.4byte ScrCmd_compare_local_to_value @ 0x1c
.4byte ScrCmd_compare_local_to_ptr @ 0x1d
.4byte ScrCmd_compare_ptr_to_local @ 0x1e
.4byte ScrCmd_compare_ptr_to_value @ 0x1f
.4byte ScrCmd_compare_ptr_to_ptr @ 0x20
.4byte ScrCmd_compare_var_to_value @ 0x21
.4byte ScrCmd_compare_var_to_var @ 0x22
.4byte ScrCmd_callnative @ 0x23
.4byte ScrCmd_gotonative @ 0x24
.4byte ScrCmd_special @ 0x25
.4byte ScrCmd_specialvar @ 0x26
.4byte ScrCmd_waitstate @ 0x27
.4byte ScrCmd_delay @ 0x28
.4byte ScrCmd_setflag @ 0x29
.4byte ScrCmd_clearflag @ 0x2a
.4byte ScrCmd_checkflag @ 0x2b
.4byte ScrCmd_initclock @ 0x2c
.4byte ScrCmd_dotimebasedevents @ 0x2d
.4byte ScrCmd_gettime @ 0x2e
.4byte ScrCmd_playse @ 0x2f
.4byte ScrCmd_waitse @ 0x30
.4byte ScrCmd_playfanfare @ 0x31
.4byte ScrCmd_waitfanfare @ 0x32
.4byte ScrCmd_playbgm @ 0x33
.4byte ScrCmd_savebgm @ 0x34
.4byte ScrCmd_fadedefaultbgm @ 0x35
.4byte ScrCmd_fadenewbgm @ 0x36
.4byte ScrCmd_fadeoutbgm @ 0x37
.4byte ScrCmd_fadeinbgm @ 0x38
.4byte ScrCmd_warp @ 0x39
.4byte ScrCmd_warpsilent @ 0x3a
.4byte ScrCmd_warpdoor @ 0x3b
.4byte ScrCmd_warphole @ 0x3c
.4byte ScrCmd_warpteleport @ 0x3d
.4byte ScrCmd_setwarp @ 0x3e
.4byte ScrCmd_setdynamicwarp @ 0x3f
.4byte ScrCmd_setdivewarp @ 0x40
.4byte ScrCmd_setholewarp @ 0x41
.4byte ScrCmd_getplayerxy @ 0x42
.4byte ScrCmd_getpartysize @ 0x43
.4byte ScrCmd_additem @ 0x44
.4byte ScrCmd_removeitem @ 0x45
.4byte ScrCmd_checkitemspace @ 0x46
.4byte ScrCmd_checkitem @ 0x47
.4byte ScrCmd_checkitemtype @ 0x48
.4byte ScrCmd_addpcitem @ 0x49
.4byte ScrCmd_checkpcitem @ 0x4a
.4byte ScrCmd_adddecoration @ 0x4b
.4byte ScrCmd_removedecoration @ 0x4c
.4byte ScrCmd_checkdecor @ 0x4d
.4byte ScrCmd_checkdecorspace @ 0x4e
.4byte ScrCmd_applymovement @ 0x4f
.4byte ScrCmd_applymovementat @ 0x50
.4byte ScrCmd_waitmovement @ 0x51
.4byte ScrCmd_waitmovementat @ 0x52
.4byte ScrCmd_removeobject @ 0x53
.4byte ScrCmd_removeobjectat @ 0x54
.4byte ScrCmd_addobject @ 0x55
.4byte ScrCmd_addobjectat @ 0x56
.4byte ScrCmd_setobjectxy @ 0x57
.4byte ScrCmd_showobjectat @ 0x58
.4byte ScrCmd_hideobjectat @ 0x59
.4byte ScrCmd_faceplayer @ 0x5a
.4byte ScrCmd_turnobject @ 0x5b
.4byte ScrCmd_trainerbattle @ 0x5c
.4byte ScrCmd_dotrainerbattle @ 0x5d
.4byte ScrCmd_gotopostbattlescript @ 0x5e
.4byte ScrCmd_gotobeatenscript @ 0x5f
.4byte ScrCmd_checktrainerflag @ 0x60
.4byte ScrCmd_settrainerflag @ 0x61
.4byte ScrCmd_cleartrainerflag @ 0x62
.4byte ScrCmd_setobjectxyperm @ 0x63
.4byte ScrCmd_copyobjectxytoperm @ 0x64
.4byte ScrCmd_setobjectmovementtype @ 0x65
.4byte ScrCmd_waitmessage @ 0x66
.4byte ScrCmd_message @ 0x67
.4byte ScrCmd_closemessage @ 0x68
.4byte ScrCmd_lockall @ 0x69
.4byte ScrCmd_lock @ 0x6a
.4byte ScrCmd_releaseall @ 0x6b
.4byte ScrCmd_release @ 0x6c
.4byte ScrCmd_waitbuttonpress @ 0x6d
.4byte ScrCmd_yesnobox @ 0x6e
.4byte ScrCmd_multichoice @ 0x6f
.4byte ScrCmd_multichoicedefault @ 0x70
.4byte ScrCmd_multichoicegrid @ 0x71
.4byte ScrCmd_drawbox @ 0x72
.4byte ScrCmd_erasebox @ 0x73
.4byte ScrCmd_drawboxtext @ 0x74
.4byte ScrCmd_showmonpic @ 0x75
.4byte ScrCmd_hidemonpic @ 0x76
.4byte ScrCmd_showcontestpainting @ 0x77
.4byte ScrCmd_braillemessage @ 0x78
.4byte ScrCmd_givemon @ 0x79
.4byte ScrCmd_giveegg @ 0x7a
.4byte ScrCmd_setmonmove @ 0x7b
.4byte ScrCmd_checkpartymove @ 0x7c
.4byte ScrCmd_bufferspeciesname @ 0x7d
.4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
.4byte ScrCmd_bufferpartymonnick @ 0x7f
.4byte ScrCmd_bufferitemname @ 0x80
.4byte ScrCmd_bufferdecorationname @ 0x81
.4byte ScrCmd_buffermovename @ 0x82
.4byte ScrCmd_buffernumberstring @ 0x83
.4byte ScrCmd_bufferstdstring @ 0x84
.4byte ScrCmd_bufferstring @ 0x85
.4byte ScrCmd_pokemart @ 0x86
.4byte ScrCmd_pokemartdecoration @ 0x87
.4byte ScrCmd_pokemartdecoration2 @ 0x88
.4byte ScrCmd_playslotmachine @ 0x89
.4byte ScrCmd_setberrytree @ 0x8a
.4byte ScrCmd_choosecontestmon @ 0x8b
.4byte ScrCmd_startcontest @ 0x8c
.4byte ScrCmd_showcontestresults @ 0x8d
.4byte ScrCmd_contestlinktransfer @ 0x8e
.4byte ScrCmd_random @ 0x8f
.4byte ScrCmd_addmoney @ 0x90
.4byte ScrCmd_removemoney @ 0x91
.4byte ScrCmd_checkmoney @ 0x92
.4byte ScrCmd_showmoneybox @ 0x93
.4byte ScrCmd_hidemoneybox @ 0x94
.4byte ScrCmd_updatemoneybox @ 0x95
.4byte ScrCmd_getpokenewsactive @ 0x96
.4byte ScrCmd_fadescreen @ 0x97
.4byte ScrCmd_fadescreenspeed @ 0x98
.4byte ScrCmd_setflashlevel @ 0x99
.4byte ScrCmd_animateflash @ 0x9a
.4byte ScrCmd_messageautoscroll @ 0x9b
.4byte ScrCmd_dofieldeffect @ 0x9c
.4byte ScrCmd_setfieldeffectargument @ 0x9d
.4byte ScrCmd_waitfieldeffect @ 0x9e
.4byte ScrCmd_setrespawn @ 0x9f
.4byte ScrCmd_checkplayergender @ 0xa0
.4byte ScrCmd_playmoncry @ 0xa1
.4byte ScrCmd_setmetatile @ 0xa2
.4byte ScrCmd_resetweather @ 0xa3
.4byte ScrCmd_setweather @ 0xa4
.4byte ScrCmd_doweather @ 0xa5
.4byte ScrCmd_setstepcallback @ 0xa6
.4byte ScrCmd_setmaplayoutindex @ 0xa7
.4byte ScrCmd_setobjectsubpriority @ 0xa8
.4byte ScrCmd_resetobjectsubpriority @ 0xa9
.4byte ScrCmd_createvobject @ 0xaa
.4byte ScrCmd_turnvobject @ 0xab
.4byte ScrCmd_opendoor @ 0xac
.4byte ScrCmd_closedoor @ 0xad
.4byte ScrCmd_waitdooranim @ 0xae
.4byte ScrCmd_setdooropen @ 0xaf
.4byte ScrCmd_setdoorclosed @ 0xb0
.4byte ScrCmd_addelevmenuitem @ 0xb1
.4byte ScrCmd_showelevmenu @ 0xb2
.4byte ScrCmd_checkcoins @ 0xb3
.4byte ScrCmd_addcoins @ 0xb4
.4byte ScrCmd_removecoins @ 0xb5
.4byte ScrCmd_setwildbattle @ 0xb6
.4byte ScrCmd_dowildbattle @ 0xb7
.4byte ScrCmd_setvaddress @ 0xb8
.4byte ScrCmd_vgoto @ 0xb9
.4byte ScrCmd_vcall @ 0xba
.4byte ScrCmd_vgoto_if @ 0xbb
.4byte ScrCmd_vcall_if @ 0xbc
.4byte ScrCmd_vmessage @ 0xbd
.4byte ScrCmd_vbuffermessage @ 0xbe
.4byte ScrCmd_vbufferstring @ 0xbf
.4byte ScrCmd_showcoinsbox @ 0xc0
.4byte ScrCmd_hidecoinsbox @ 0xc1
.4byte ScrCmd_updatecoinsbox @ 0xc2
.4byte ScrCmd_incrementgamestat @ 0xc3
.4byte ScrCmd_setescapewarp @ 0xc4
.4byte ScrCmd_waitmoncry @ 0xc5
.4byte ScrCmd_bufferboxname @ 0xc6
.4byte ScrCmd_nop1 @ 0xc7
.4byte ScrCmd_nop1 @ 0xc8
.4byte ScrCmd_nop1 @ 0xc9
.4byte ScrCmd_nop1 @ 0xca
.4byte ScrCmd_nop1 @ 0xcb
.4byte ScrCmd_nop1 @ 0xcc
.4byte ScrCmd_setmonmodernfatefulencounter @ 0xcd
.4byte ScrCmd_checkmonmodernfatefulencounter @ 0xce
.4byte ScrCmd_trywondercardscript @ 0xcf
.4byte ScrCmd_nop1 @ 0xd0
.4byte ScrCmd_warpspinenter @ 0xd1
.4byte ScrCmd_setmonmetlocation @ 0xd2
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
.4byte ScrCmd_initrotatingtilepuzzle @ 0xd5
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
.4byte ScrCmd_warpmossdeepgym @ 0xd7
.4byte ScrCmd_selectapproachingtrainer @ 0xd8
.4byte ScrCmd_lockfortrainer @ 0xd9
.4byte ScrCmd_closebraillemessage @ 0xda
.4byte ScrCmd_messageinstant @ 0xdb
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc
.4byte ScrCmd_buffertrainerclassname @ 0xdd
.4byte ScrCmd_buffertrainername @ 0xde
.4byte ScrCmd_pokenavcall @ 0xdf
.4byte ScrCmd_warpwhitefade @ 0xe0
.4byte ScrCmd_buffercontestname @ 0xe1
.4byte ScrCmd_bufferitemnameplural @ 0xe2
.4byte ScrCmd_callfunc @ 0xe3
gScriptCmdTableEnd::
.4byte ScrCmd_nop

View File

@ -29,7 +29,7 @@ SurfPichu_FullParty:
SurfPichu_GiveEgg:
giveegg SPECIES_PICHU
setmoneventlegal VAR_GIFT_PICHU_SLOT
setmodernfatefulencounter VAR_GIFT_PICHU_SLOT
setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER
vgoto_if_eq VAR_GIFT_PICHU_SLOT, 1, SurfPichu_Slot1
vgoto_if_eq VAR_GIFT_PICHU_SLOT, 2, SurfPichu_Slot2

View File

@ -64,9 +64,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics::
MauvilleCity_PokemonCenter_1F_EventScript_Hipster::
lock
faceplayer
setflag FLAG_SYS_HIPSTER_MEET
setflag FLAG_UNLOCKED_TRENDY_SAYINGS
msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT
special GetHipsterSpokenFlag
special HasHipsterTaughtWord
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord
msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT
release
@ -80,8 +80,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord::
end
MauvilleCity_PokemonCenter_1F_EventScript_TeachWord::
msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT
special SetHipsterSpokenFlag
msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord, MSGBOX_DEFAULT
special SetHipsterTaughtWord
release
end
@ -969,7 +969,7 @@ MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach:
.string "what's hip and happening.\p"
.string "I've got nothing new to teach you!$"
MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase:
MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfWord:
.string "Hey, have you heard about\n"
.string "{STR_VAR_1}”?\p"
.string "What's it mean? Well…\n"

View File

@ -111,8 +111,8 @@ gSpecials::
def_special Script_GetCurrentMauvilleMan
def_special HasBardSongBeenChanged
def_special SaveBardSongLyrics
def_special GetHipsterSpokenFlag
def_special SetHipsterSpokenFlag
def_special HasHipsterTaughtWord
def_special SetHipsterTaughtWord
def_special HipsterTryTeachWord
def_special PlayBardSong
def_special SetMauvilleOldManObjEventGfx
@ -311,7 +311,7 @@ gSpecials::
def_special TryUpdateRusturfTunnelState
def_special IsGrassTypeInParty
def_special DoContestHallWarp
def_special PutZigzagoonInPlayerParty
def_special LoadWallyZigzagoon
def_special IsStarterInParty
def_special CopyCurSecretBaseOwnerName_StrVar1
def_special ScriptCheckFreePokemonStorageSpace
@ -490,7 +490,7 @@ gSpecials::
def_special ScrollableMultichoice_ClosePersistentMenu
def_special DoDeoxysRockInteraction
def_special SetDeoxysRockPalette
def_special CreateEventLegalEnemyMon
def_special CreateEnemyEventMon
def_special StartMirageTowerDisintegration
def_special StartMirageTowerShake
def_special StartMirageTowerFossilFallAndSink

View File

@ -36,7 +36,7 @@ static u32 GetGlyphWidth_Narrow(u16, bool32);
static u32 GetGlyphWidth_SmallNarrow(u16, bool32);
static EWRAM_DATA struct TextPrinter sTempTextPrinter = {0};
static EWRAM_DATA struct TextPrinter sTextPrinters[NUM_TEXT_PRINTERS] = {0};
static EWRAM_DATA struct TextPrinter sTextPrinters[WINDOWS_MAX] = {0};
static u16 sFontHalfRowLookupTable[0x51];
static u16 sLastTextBgColor;
@ -244,7 +244,7 @@ static void SetFontsPointer(const struct FontInfo *fonts)
void DeactivateAllTextPrinters(void)
{
int printer;
for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer)
for (printer = 0; printer < WINDOWS_MAX; ++printer)
sTextPrinters[printer].active = FALSE;
}
@ -322,7 +322,7 @@ void RunTextPrinters(void)
if (!gDisableTextPrinters)
{
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
for (i = 0; i < WINDOWS_MAX; ++i)
{
if (sTextPrinters[i].active)
{

View File

@ -3,8 +3,6 @@
#include "characters.h"
#define NUM_TEXT_PRINTERS 32
// Given as a text speed when all the text should be
// loaded at once but not copied to vram yet.
#define TEXT_SKIP_DRAW 0xFF

View File

@ -4,16 +4,11 @@
#include "bg.h"
#include "blit.h"
u32 gUnusedWindowVar1;
u32 gUnusedWindowVar2;
// This global is set to 0 and never changed.
u8 gTransparentTileNumber;
u32 gUnusedWindowVar3;
void *gWindowBgTilemapBuffers[NUM_BACKGROUNDS];
extern u32 gWindowTileAutoAllocEnabled;
#define WINDOWS_MAX 32
EWRAM_DATA struct Window gWindows[WINDOWS_MAX] = {0};
EWRAM_DATA static struct Window* sWindowPtr = NULL;
EWRAM_DATA static u16 sWindowSize = 0;

View File

@ -1,6 +1,8 @@
#ifndef GUARD_WINDOW_H
#define GUARD_WINDOW_H
#define WINDOWS_MAX 32
#define PIXEL_FILL(num) ((num) | ((num) << 4))
enum {
@ -74,8 +76,5 @@ void CopyWindowToVram8Bit(u8 windowId, u8 mode);
extern struct Window gWindows[];
extern void *gWindowBgTilemapBuffers[];
extern u32 gUnusedWindowVar1;
extern u32 gUnusedWindowVar2;
extern u32 gUnusedWindowVar3;
#endif // GUARD_WINDOW_H

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 195 B

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
156 205 98
156 205 98
156 205 98
131 205 131
156 205 0
24 0 106
156 8 98
0 213 131
24 197 0
164 8 106
156 8 98
164 8 106
156 205 131
24 213 98
156 8 106
164 205 98

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
0 0 0
0 0 255
0 255 255
148 255 255
148 205 255
148 156 255
0 0 0
0 0 0
0 0 0
255 0 8
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
255 255 255

BIN
graphics/cable_car/pylon_top.bin Executable file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 177 B

View File

@ -1,19 +0,0 @@
JASC-PAL
0100
16
156 197 98
41 131 222
0 82 172
197 255 106
172 230 49
246 246 213
255 49 49
255 148 148
131 164 213
238 238 90
65 65 65
115 115 115
172 172 172
230 230 255
0 0 0
255 255 255

View File

@ -593,7 +593,7 @@ struct MonSpritesGfx
u8 *byte[MAX_BATTLERS_COUNT];
} sprites;
struct SpriteTemplate templates[MAX_BATTLERS_COUNT];
struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][4];
struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][MAX_MON_PIC_FRAMES];
u8 unusedArr[0x80];
u8 *barFontGfx;
void *unusedPtr;

View File

@ -148,7 +148,7 @@ void AnimThrowProjectile(struct Sprite *sprite);
void GetBgDataForTransform(struct BattleAnimBgData *dest, u8 battlerId);
u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, bool32 ignoreDeoxysForm);
void ResetSpriteRotScale_PreserveAffine(struct Sprite *sprite);
void TradeMenuBouncePartySprites(struct Sprite *sprite);
void Trade_MoveSelectedMonToTarget(struct Sprite *sprite);
void DestroyAnimVisualTaskAndDisableBlend(u8 taskId);
void DestroySpriteAndFreeResources_(struct Sprite *sprite);
void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId);

View File

@ -1,7 +1,7 @@
#ifndef GUARD_CONSTANTS_BATTLE_PYRAMID_H
#define GUARD_CONSTANTS_BATTLE_PYRAMID_H
#define TOTAL_ROUNDS 20
#define TOTAL_PYRAMID_ROUNDS 20
#define PICKUP_ITEMS_PER_ROUND 10
#define HINT_EXIT_DIRECTION 0

View File

@ -264,8 +264,8 @@
#define STRINGID_ITAPPEAREDCAUGHT 264
#define STRINGID_AARGHALMOSTHADIT 265
#define STRINGID_SHOOTSOCLOSE 266
#define STRINGID_GOTCHAPKMNCAUGHT 267
#define STRINGID_GOTCHAPKMNCAUGHT2 268
#define STRINGID_GOTCHAPKMNCAUGHTPLAYER 267
#define STRINGID_GOTCHAPKMNCAUGHTWALLY 268
#define STRINGID_GIVENICKNAMECAPTURED 269
#define STRINGID_PKMNSENTTOPC 270
#define STRINGID_PKMNDATAADDEDTODEX 271

View File

@ -1095,7 +1095,7 @@
#define EC_WORD_OLD ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 30)
#define EC_WORD_YOUNG ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 31)
#define EC_WORD_UGLY ((EC_GROUP_TRENDY_SAYING << EC_MASK_BITS) | 32)
#define NUM_ADDITIONAL_PHRASES 33
#define NUM_TRENDY_SAYINGS 33
// Special Berry Masters Wife phrases
#define NOT_SPECIAL_PHRASE 0

View File

@ -295,6 +295,9 @@
#define FIRST_DECORATION_SPRITE_GFX OBJ_EVENT_GFX_PICHU_DOLL
#define OBJ_KIND_NORMAL 0
#define OBJ_KIND_CLONE 255 // Exclusive to FRLG
// Special object event local ids
#define OBJ_EVENT_ID_PLAYER 0xFF
#define OBJ_EVENT_ID_CAMERA 0x7F

View File

@ -80,4 +80,10 @@
#define FANCOUNTER_FINISHED_CONTEST 2
#define FANCOUNTER_USED_BATTLE_TOWER 3
// Return values for DoDeoxysRockInteraction
#define DEOXYS_ROCK_FAILED 0
#define DEOXYS_ROCK_PROGRESSED 1
#define DEOXYS_ROCK_SOLVED 2
#define DEOXYS_ROCK_COMPLETE 3
#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H

View File

@ -580,7 +580,7 @@
#define FLAG_HIDDEN_ITEM_ROUTE_121_HP_UP (FLAG_HIDDEN_ITEMS_START + 0x27)
#define FLAG_HIDDEN_ITEM_ROUTE_121_NUGGET (FLAG_HIDDEN_ITEMS_START + 0x28)
#define FLAG_HIDDEN_ITEM_ROUTE_123_REVIVE (FLAG_HIDDEN_ITEMS_START + 0x29)
#define FLAG_HIDDEN_ITEM_ROUTE_113_REVIVE (FLAG_HIDDEN_ITEMS_START + 0x2A)
#define FLAG_HIDDEN_ITEM_ROUTE_114_REVIVE (FLAG_HIDDEN_ITEMS_START + 0x2A)
#define FLAG_HIDDEN_ITEM_LILYCOVE_CITY_PP_UP (FLAG_HIDDEN_ITEMS_START + 0x2B)
#define FLAG_HIDDEN_ITEM_ROUTE_104_SUPER_POTION (FLAG_HIDDEN_ITEMS_START + 0x2C)
#define FLAG_HIDDEN_ITEM_ROUTE_116_SUPER_POTION (FLAG_HIDDEN_ITEMS_START + 0x2D)
@ -1051,7 +1051,7 @@
#define FLAG_ITEM_ROUTE_105_IRON 0x3EB
#define FLAG_ITEM_ROUTE_106_PROTEIN 0x3EC
#define FLAG_ITEM_ROUTE_109_PP_UP 0x3ED
#define FLAG_ITEM_ROUTE_109_RARE_CANDY 0x3EE
#define FLAG_ITEM_ROUTE_110_RARE_CANDY 0x3EE
#define FLAG_ITEM_ROUTE_110_DIRE_HIT 0x3EF
#define FLAG_ITEM_ROUTE_111_TM37 0x3F0
#define FLAG_ITEM_ROUTE_111_STARDUST 0x3F1
@ -1123,7 +1123,7 @@
#define FLAG_ITEM_NEW_MAUVILLE_ULTRA_BALL 0x433
#define FLAG_ITEM_NEW_MAUVILLE_ESCAPE_ROPE 0x434
#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_6_LUXURY_BALL 0x435
#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER 0x436
#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER 0x436
#define FLAG_ITEM_SCORCHED_SLAB_TM11 0x437
#define FLAG_ITEM_METEOR_FALLS_B1F_2R_TM02 0x438
#define FLAG_ITEM_SHOAL_CAVE_ENTRANCE_BIG_PEARL 0x439
@ -1162,7 +1162,7 @@
#define FLAG_ITEM_ROUTE_103_GUARD_SPEC 0x45A
#define FLAG_ITEM_ROUTE_104_X_ACCURACY 0x45B
#define FLAG_ITEM_MAUVILLE_CITY_X_SPEED 0x45C
#define FLAG_ITEM_PETALBURD_WOODS_PARALYZE_HEAL 0x45D
#define FLAG_ITEM_PETALBURG_WOODS_PARALYZE_HEAL 0x45D
#define FLAG_ITEM_ROUTE_115_GREAT_BALL 0x45E
#define FLAG_ITEM_SAFARI_ZONE_NORTH_CALCIUM 0x45F
#define FLAG_ITEM_MT_PYRE_3F_SUPER_REPEL 0x460
@ -1348,7 +1348,7 @@
#define FLAG_UNUSED_0x863 (SYSTEM_FLAGS + 0x3) // Unused Flag
#define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 0x4)
#define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 0x5)
#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 0x6)
#define FLAG_UNLOCKED_TRENDY_SAYINGS (SYSTEM_FLAGS + 0x6)
// Badges
#define FLAG_BADGE01_GET (SYSTEM_FLAGS + 0x7)

View File

@ -46,7 +46,6 @@
#define OBJECT_EVENTS_COUNT 16
#define MAIL_COUNT (10 + PARTY_SIZE)
#define SECRET_BASES_COUNT 20
#define TV_SHOWS_COUNT 25
#define POKE_NEWS_COUNT 16
#define PC_ITEMS_COUNT 50
#define BAG_ITEMS_COUNT 30

File diff suppressed because it is too large Load Diff

View File

@ -190,6 +190,9 @@
#define FRIENDSHIP_200_TO_254 5
#define FRIENDSHIP_MAX 6
// Friendship value that the majority of species use. This was changed in Generation 8 to 50.
#define STANDARD_FRIENDSHIP 70
#define MAX_FRIENDSHIP 255
#define MAX_SHEEN 255
#define MAX_CONDITION 255
@ -260,6 +263,14 @@
#define MON_PIC_HEIGHT 64
#define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2)
// Most pokemon have 2 frames (a default and an alternate for their animation).
// There are 4 exceptions:
// - Castform has 4 frames, 1 for each form
// - Deoxys has 2 frames, 1 for each form
// - Spinda has 1 frame, presumably to avoid the work of animating its spots
// - Unown has 1 frame, presumably to avoid the work of animating all 28 of its forms
#define MAX_MON_PIC_FRAMES 4
#define BATTLE_ALIVE_EXCEPT_ACTIVE 0
#define BATTLE_ALIVE_ATK_SIDE 1
#define BATTLE_ALIVE_DEF_SIDE 2

View File

@ -278,47 +278,47 @@
#define SE_SUDOWOODO_SHAKE 269 // SE_USSOKI
// Music
#define MUS_LITTLEROOT_TEST 350 // MUS_TETSUJI
#define MUS_GSC_ROUTE38 351 // MUS_FIELD13
#define MUS_LITTLEROOT_TEST 350 // MUS_TETSUJI // Unused, likely a test track.
#define MUS_GSC_ROUTE38 351 // MUS_FIELD13 // Unused, likely a test track.
#define MUS_CAUGHT 352 // MUS_KACHI22
#define MUS_VICTORY_WILD 353 // MUS_KACHI2
#define MUS_VICTORY_GYM_LEADER 354 // MUS_KACHI3
#define MUS_VICTORY_GYM_LEADER 354 // MUS_KACHI3 // Also used in Frontier Brain victories.
#define MUS_VICTORY_LEAGUE 355 // MUS_KACHI5
#define MUS_C_COMM_CENTER 356 // MUS_PCC
#define MUS_GSC_PEWTER 357 // MUS_NIBI
#define MUS_C_VS_LEGEND_BEAST 358 // MUS_SUIKUN
#define MUS_ROUTE101 359 // MUS_DOORO1
#define MUS_ROUTE110 360 // MUS_DOORO_X1
#define MUS_ROUTE120 361 // MUS_DOORO_X3
#define MUS_PETALBURG 362 // MUS_MACHI_S2
#define MUS_OLDALE 363 // MUS_MACHI_S4
#define MUS_C_COMM_CENTER 356 // MUS_PCC // Unused, likely a test track.
#define MUS_GSC_PEWTER 357 // MUS_NIBI // Used in unused Contest Halls.
#define MUS_C_VS_LEGEND_BEAST 358 // MUS_SUIKUN // Unused, likely a test track.
#define MUS_ROUTE101 359 // MUS_DOORO1 // Also used in Routes 102 and 103.
#define MUS_ROUTE110 360 // MUS_DOORO_X1 // Also used in Routes 112, 114, 117, 111's non-desert section and 118's west half.
#define MUS_ROUTE120 361 // MUS_DOORO_X3 // Also used in Routes 121, 124, 125, 126, 127 and 128.
#define MUS_PETALBURG 362 // MUS_MACHI_S2 // Also used in Mr. Briney's House and Pretty Petal Flower Shop.
#define MUS_OLDALE 363 // MUS_MACHI_S4 // Also used in Lavaridge Town.
#define MUS_GYM 364 // MUS_GIM
#define MUS_SURF 365 // MUS_NAMINORI
#define MUS_PETALBURG_WOODS 366 // MUS_DAN01
#define MUS_PETALBURG_WOODS 366 // MUS_DAN01 // Also used in Artisan Cave, Fiery Path, Granite Cave, Jagged Pass, Marine Cave, Rusturf Tunnel, Scorched Slab and Terra Cave.
#define MUS_LEVEL_UP 367 // MUS_FANFA1
#define MUS_HEAL 368 // MUS_ME_ASA
#define MUS_OBTAIN_BADGE 369 // MUS_ME_BACHI
#define MUS_OBTAIN_ITEM 370 // MUS_FANFA4
#define MUS_EVOLVED 371 // MUS_FANFA5
#define MUS_EVOLVED 371 // MUS_FANFA5 // Also used in egg hatching, trades and upon catching.
#define MUS_OBTAIN_TMHM 372 // MUS_ME_WAZA
#define MUS_LILYCOVE_MUSEUM 373 // MUS_BIJYUTU
#define MUS_ROUTE122 374 // MUS_DOORO_X4
#define MUS_LILYCOVE_MUSEUM 373 // MUS_BIJYUTU // Also used in the Battle Frontier's Ranking Hall.
#define MUS_ROUTE122 374 // MUS_DOORO_X4 // Also used in Route 123 and Birch's intro speech.
#define MUS_OCEANIC_MUSEUM 375 // MUS_FUNE_KAN
#define MUS_EVOLUTION_INTRO 376 // MUS_ME_SHINKA
#define MUS_EVOLUTION 377 // MUS_SHINKA
#define MUS_EVOLUTION_INTRO 376 // MUS_ME_SHINKA // Also used in egg hatching.
#define MUS_EVOLUTION 377 // MUS_SHINKA // Also used in egg hatching and trades.
#define MUS_MOVE_DELETED 378 // MUS_ME_WASURE
#define MUS_ENCOUNTER_GIRL 379 // MUS_SYOUJOEYE
#define MUS_ENCOUNTER_MALE 380 // MUS_BOYEYE
#define MUS_ABANDONED_SHIP 381 // MUS_DAN02
#define MUS_FORTREE 382 // MUS_MACHI_S3
#define MUS_ABANDONED_SHIP 381 // MUS_DAN02 // Also used in Faraway and Southern Islands.
#define MUS_FORTREE 382 // MUS_MACHI_S3 // Also used in Secret Bases and the Safari Zone's entrance.
#define MUS_BIRCH_LAB 383 // MUS_ODAMAKI
#define MUS_B_TOWER_RS 384 // MUS_B_TOWER
#define MUS_B_TOWER_RS 384 // MUS_B_TOWER // Used in Battle Tents, Trainer Hill and Battle Frontier's lounges and Exchange Service Corner.
#define MUS_ENCOUNTER_SWIMMER 385 // MUS_SWIMEYE
#define MUS_CAVE_OF_ORIGIN 386 // MUS_DAN03
#define MUS_CAVE_OF_ORIGIN 386 // MUS_DAN03 // Also used in Meteor Falls.
#define MUS_OBTAIN_BERRY 387 // MUS_ME_KINOMI
#define MUS_AWAKEN_LEGEND 388 // MUS_ME_TAMA
#define MUS_SLOTS_JACKPOT 389 // MUS_ME_B_BIG
#define MUS_SLOTS_WIN 390 // MUS_ME_B_SMALL
#define MUS_SLOTS_JACKPOT 389 // MUS_ME_B_BIG // Also used in the Roulette.
#define MUS_SLOTS_WIN 390 // MUS_ME_B_SMALL // Also used in the Roulette.
#define MUS_TOO_BAD 391 // MUS_ME_ZANNEN
#define MUS_ROULETTE 392 // MUS_BD_TIME
#define MUS_LINK_CONTEST_P1 393 // MUS_TEST1
@ -327,17 +327,17 @@
#define MUS_LINK_CONTEST_P4 396 // MUS_TEST4
#define MUS_ENCOUNTER_RICH 397 // MUS_TEST
#define MUS_VERDANTURF 398 // MUS_GOMACHI0
#define MUS_RUSTBORO 399 // MUS_GOTOWN
#define MUS_POKE_CENTER 400 // MUS_POKECEN
#define MUS_ROUTE104 401 // MUS_NEXTROAD
#define MUS_ROUTE119 402 // MUS_GRANROAD
#define MUS_RUSTBORO 399 // MUS_GOTOWN // Also used in Mauville City, Mossdeep City, Daycare, Weather Institute and several Route houses.
#define MUS_POKE_CENTER 400 // MUS_POKECEN // Also used in the Pokémon League's lobby.
#define MUS_ROUTE104 401 // MUS_NEXTROAD // Also used in Routes 105, 106, 107, 108, 109, 115 and 116.
#define MUS_ROUTE119 402 // MUS_GRANROAD // Also used in Routes 129, 130, 131, 132, 133, 134 and 118's east half.
#define MUS_CYCLING 403 // MUS_CYCLING
#define MUS_POKE_MART 404 // MUS_FRIENDLY
#define MUS_POKE_MART 404 // MUS_FRIENDLY // Also used in Lilycove's Department Store.
#define MUS_LITTLEROOT 405 // MUS_MISHIRO
#define MUS_MT_CHIMNEY 406 // MUS_TOZAN
#define MUS_MT_CHIMNEY 406 // MUS_TOZAN // Also used in Desert Underpass, Mirage Tower, Seafloor Cavern and Sky Pillar.
#define MUS_ENCOUNTER_FEMALE 407 // MUS_GIRLEYE
#define MUS_LILYCOVE 408 // MUS_MINAMO
#define MUS_ROUTE111 409 // MUS_ASHROAD
#define MUS_LILYCOVE 408 // MUS_MINAMO // Also used in Pacifidlog Town and the Diving Treasure Hunter's house.
#define MUS_DESERT 409 // MUS_ASHROAD
#define MUS_HELP 410 // MUS_EVENT0
#define MUS_UNDERWATER 411 // MUS_DEEPDEEP
#define MUS_VICTORY_TRAINER 412 // MUS_KACHI1
@ -350,29 +350,29 @@
#define MUS_ENCOUNTER_AQUA 419 // MUS_AQA_0
#define MUS_FOLLOW_ME 420 // MUS_TSURETEK
#define MUS_ENCOUNTER_BRENDAN 421 // MUS_BOY_SUP
#define MUS_EVER_GRANDE 422 // MUS_RAINBOW
#define MUS_EVER_GRANDE 422 // MUS_RAINBOW // Also used in link rooms.
#define MUS_ENCOUNTER_SUSPICIOUS 423 // MUS_AYASII
#define MUS_VICTORY_AQUA_MAGMA 424 // MUS_KACHI4
#define MUS_CABLE_CAR 425 // MUS_ROPEWAY
#define MUS_GAME_CORNER 426 // MUS_CASINO
#define MUS_DEWFORD 427 // MUS_HIGHTOWN
#define MUS_DEWFORD 427 // MUS_HIGHTOWN // Also used in Route 109's Seashore house.
#define MUS_SAFARI_ZONE 428 // MUS_SAFARI
#define MUS_VICTORY_ROAD 429 // MUS_C_ROAD
#define MUS_VICTORY_ROAD 429 // MUS_C_ROAD // Also used in Pokémon League's E4/Champion rooms and halls.
#define MUS_AQUA_MAGMA_HIDEOUT 430 // MUS_AJITO
#define MUS_SAILING 431 // MUS_M_BOAT
#define MUS_MT_PYRE 432 // MUS_M_DUNGON
#define MUS_SLATEPORT 433 // MUS_FINECITY
#define MUS_MT_PYRE 432 // MUS_M_DUNGON // Also used in New Mauville and Shoal Cave.
#define MUS_SLATEPORT 433 // MUS_FINECITY // Also used in Cycling Road's entrances.
#define MUS_MT_PYRE_EXTERIOR 434 // MUS_MACHUPI
#define MUS_SCHOOL 435 // MUS_P_SCHOOL
#define MUS_HALL_OF_FAME 436 // MUS_DENDOU
#define MUS_FALLARBOR 437 // MUS_TONEKUSA
#define MUS_SEALED_CHAMBER 438 // MUS_MABOROSI
#define MUS_FALLARBOR 437 // MUS_TONEKUSA // Also used in Route 114's houses.
#define MUS_SEALED_CHAMBER 438 // MUS_MABOROSI // Also used in Ancient Tomb, Desert Ruins and Island Cave.
#define MUS_CONTEST_WINNER 439 // MUS_CON_FAN
#define MUS_CONTEST 440 // MUS_CONTEST0
#define MUS_ENCOUNTER_MAGMA 441 // MUS_MGM0
#define MUS_INTRO_BATTLE 442 // MUS_T_BATTLE
#define MUS_ABNORMAL_WEATHER 443 // MUS_OOAME (Replaces MUS_WEATHER_KYOGRE from R/S)
#define MUS_WEATHER_GROUDON 444 // MUS_HIDERI (Unused, from R/S)
#define MUS_ABNORMAL_WEATHER 443 // MUS_OOAME // Replaces MUS_WEATHER_KYOGRE from R/S.
#define MUS_WEATHER_GROUDON 444 // MUS_HIDERI // Unused, from R/S.
#define MUS_SOOTOPOLIS 445 // MUS_RUNECITY
#define MUS_CONTEST_RESULTS 446 // MUS_CON_K
#define MUS_HALL_OF_FAME_ROOM 447 // MUS_EIKOU_R
@ -381,7 +381,7 @@
#define MUS_ENCOUNTER_ELITE_FOUR 450 // MUS_SITENNOU
#define MUS_ENCOUNTER_HIKER 451 // MUS_YAMA_EYE
#define MUS_CONTEST_LOBBY 452 // MUS_CONLOBBY
#define MUS_ENCOUNTER_INTERVIEWER 453 // MUS_INTER_V
#define MUS_ENCOUNTER_INTERVIEWER 453 // MUS_INTER_V // Also used during Petalburg City report at the beginning of the game.
#define MUS_ENCOUNTER_CHAMPION 454 // MUS_DAIGO
#define MUS_CREDITS 455 // MUS_THANKFOR
#define MUS_END 456 // MUS_END
@ -398,7 +398,7 @@
#define MUS_B_DOME 467 // MUS_B_DOME
#define MUS_B_PIKE 468 // MUS_B_TUBE
#define MUS_B_FACTORY 469 // MUS_B_FACTORY
#define MUS_VS_RAYQUAZA 470 // MUS_VS_REKKU (Identical to MUS_VS_KYOGRE_GROUDON)
#define MUS_VS_RAYQUAZA 470 // MUS_VS_REKKU // Identical to MUS_VS_KYOGRE_GROUDON.
#define MUS_VS_FRONTIER_BRAIN 471 // MUS_VS_FRONT
#define MUS_VS_MEW 472 // MUS_VS_MEW
#define MUS_B_DOME_LOBBY 473 // MUS_B_DOME1
@ -451,9 +451,9 @@
#define MUS_RG_SILPH 519 // MUS_RG_SHIRUHU
#define MUS_RG_FUCHSIA 520 // MUS_RG_HANADA
#define MUS_RG_CELADON 521 // MUS_RG_TAMAMUSI
#define MUS_RG_VICTORY_TRAINER 522 // MUS_RG_WIN_TRE (Identical to MUS_VICTORY_TRAINER)
#define MUS_RG_VICTORY_WILD 523 // MUS_RG_WIN_YASEI (Identical to MUS_VICTORY_WILD)
#define MUS_RG_VICTORY_GYM_LEADER 524 // MUS_RG_WIN_GYM (Identical to MUS_VICTORY_GYM_LEADER)
#define MUS_RG_VICTORY_TRAINER 522 // MUS_RG_WIN_TRE // Identical to MUS_VICTORY_TRAINER.
#define MUS_RG_VICTORY_WILD 523 // MUS_RG_WIN_YASEI // Identical to MUS_VICTORY_WILD.
#define MUS_RG_VICTORY_GYM_LEADER 524 // MUS_RG_WIN_GYM // Identical to MUS_VICTORY_GYM_LEADER.
#define MUS_RG_VERMILLION 525 // MUS_RG_KUCHIBA
#define MUS_RG_PEWTER 526 // MUS_RG_NIBI
#define MUS_RG_ENCOUNTER_RIVAL 527 // MUS_RG_RIVAL1
@ -472,11 +472,11 @@
#define MUS_RG_NET_CENTER 540 // MUS_RG_NETWORK
#define MUS_RG_MYSTERY_GIFT 541 // MUS_RG_OKURIMONO
#define MUS_RG_BERRY_PICK 542 // MUS_RG_KINOMIKUI
#define MUS_RG_SEVII_CAVE 543 // MUS_RG_NANADUNGEON (Identical to MUS_RG_MT_MOON)
#define MUS_RG_TEACHY_TV_SHOW 544 // MUS_RG_OSHIE_TV (Identical to MUS_RG_FOLLOW_ME)
#define MUS_RG_SEVII_CAVE 543 // MUS_RG_NANADUNGEON // Identical to MUS_RG_MT_MOON.
#define MUS_RG_TEACHY_TV_SHOW 544 // MUS_RG_OSHIE_TV // Identical to MUS_RG_FOLLOW_ME.
#define MUS_RG_SEVII_ROUTE 545 // MUS_RG_NANASHIMA
#define MUS_RG_SEVII_DUNGEON 546 // MUS_RG_NANAISEKI (Identical to MUS_RG_VIRIDIAN_FOREST)
#define MUS_RG_SEVII_123 547 // MUS_RG_NANA123 (Identical to MUS_RG_PEWTER)
#define MUS_RG_SEVII_DUNGEON 546 // MUS_RG_NANAISEKI // Identical to MUS_RG_VIRIDIAN_FOREST.
#define MUS_RG_SEVII_123 547 // MUS_RG_NANA123 // Identical to MUS_RG_PEWTER
#define MUS_RG_SEVII_45 548 // MUS_RG_NANA45
#define MUS_RG_SEVII_67 549 // MUS_RG_NANA67
#define MUS_RG_POKE_FLUTE 550 // MUS_RG_POKEFUE

View File

@ -4,29 +4,19 @@
#define TRADE_PLAYER 0
#define TRADE_PARTNER 1
#define LINK_TRADE_TIMEOUT 300
// In-game Trade IDs
#define INGAME_TRADE_SEEDOT 0
#define INGAME_TRADE_PLUSLE 1
#define INGAME_TRADE_HORSEA 2
#define INGAME_TRADE_MEOWTH 3
// Flag IDs for sending link data
#define INITIATE_TRADE 1
#define CANCEL_TRADE 2
#define WANTS_TO_TRADE 1
#define WANTS_TO_CANCEL 2
#define READY_FINISH_TRADE 1
#define FINISH_TRADE 2
// Return values for CanTradeSelectedMon and CanSpinTradeMon
#define CAN_TRADE_MON 0
#define CANT_TRADE_LAST_MON 1
#define CANT_TRADE_NATIONAL 2
#define CANT_TRADE_EGG_YET 3
#define CANT_TRADE_INVALID_MON 4
#define CANT_TRADE_EGG_YET2 5
#define CAN_TRADE_MON 0
#define CANT_TRADE_LAST_MON 1
#define CANT_TRADE_NATIONAL 2
#define CANT_TRADE_EGG_YET 3
#define CANT_TRADE_INVALID_MON 4
#define CANT_TRADE_PARTNER_EGG_YET 5
// Return values for CheckValidityOfTradeMons
#define PLAYER_MON_INVALID 0
@ -38,63 +28,6 @@
#define TRADE_PLAYER_NOT_READY 1
#define TRADE_PARTNER_NOT_READY 2
// Indexes for sTradeActionTexts
#define TRADE_TEXT_CANCEL 0
#define TRADE_TEXT_CHOOSE_MON 1
#define TRADE_TEXT_SUMMARY 2
#define TRADE_TEXT_TRADE 3
#define TRADE_TEXT_CANCEL_TRADE 4
#define TRADE_TEXT_JP_QUIT 5
// Checked to confirm DrawTradeMenuParty has reached final state
#define DRAW_PARTY_FINISH 5
// Message indexes for sTradeMessages
#define TRADE_MSG_STANDBY 0
#define TRADE_MSG_CANCELED 1
#define TRADE_MSG_ONLY_MON1 2
#define TRADE_MSG_ONLY_MON2 3
#define TRADE_MSG_WAITING_FOR_FRIEND 4
#define TRADE_MSG_FRIEND_WANTS_TO_TRADE 5
#define TRADE_MSG_MON_CANT_BE_TRADED 6
#define TRADE_MSG_EGG_CANT_BE_TRADED 7
#define TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED 8
// IDs for QueueAction
#define QUEUE_SEND_DATA 0
#define QUEUE_STANDBY 1
#define QUEUE_ONLY_MON1 2
#define QUEUE_ONLY_MON2 3
#define QUEUE_UNUSED1 4
#define QUEUE_UNUSED2 5
#define QUEUE_MON_CANT_BE_TRADED 6
#define QUEUE_EGG_CANT_BE_TRADED 7
#define QUEUE_FRIENDS_MON_CANT_BE_TRADED 8
#define QUEUE_DELAY_MSG 3
#define QUEUE_DELAY_DATA 5
// IDs for CallTradeMenuFunc
#define TRADEMENUFUNC_MAIN_MENU 0
#define TRADEMENUFUNC_SELECTED_MON 1
#define TRADEMENUFUNC_SHOW_MON_SUMMARY 2
#define TRADEMENUFUNC_CONFIRM_OR_CANCEL_TRADE 3
#define TRADEMENUFUNC_CANCEL_TRADE_PROMPT 4
#define TRADEMENUFUNC_UNUSED_5 5
#define TRADEMENUFUNC_BOTH_MONS_SELECTED 6
#define TRADEMENUFUNC_CONFIRM_TRADE_PROMPT 7
#define TRADEMENUFUNC_REDRAW_MAIN_MENU 8
#define TRADEMENUFUNC_LINK_TRADE_FADE_OUT 9
#define TRADEMENUFUNC_LINK_TRADE_WAIT_FADE 10
#define TRADEMENUFUNC_CANCEL_TRADE_1 11
#define TRADEMENUFUNC_CANCEL_TRADE_2 12
#define TRADEMENUFUNC_START_LINK_TRADE 13
#define TRADEMENUFUNC_DELAY_TRADE_CONFIRM 14
#define TRADEMENUFUNC_UNUSED_15 15
#define TRADEMENUFUNC_LINK_TRADE_WAIT_QUEUE 16
#define TRADEMENUFUNC_PARTNER_MON_INVALID 17
#define TRADEMENUFUNC_STANDBY 100
// Message indexes for sUnionRoomTradeMessages
#define UR_TRADE_MSG_NONE 0
#define UR_TRADE_MSG_NOT_MON_PARTNER_WANTS 1

View File

@ -74,6 +74,7 @@
// for TV shows from TVGROUP_NORMAL. The remainder are for TV
// shows from TVGROUP_RECORD_MIX.
#define NUM_NORMAL_TVSHOW_SLOTS 5
#define TV_SHOWS_COUNT (NUM_NORMAL_TVSHOW_SLOTS + 20)
#define PLAYERS_HOUSE_TV_NONE 0
#define PLAYERS_HOUSE_TV_LATI 1

View File

@ -18,6 +18,13 @@
#define MAX_TRAINER_ITEMS 4
#define TRAINER_PIC_WIDTH 64
#define TRAINER_PIC_HEIGHT 64
#define TRAINER_PIC_SIZE (TRAINER_PIC_WIDTH * TRAINER_PIC_HEIGHT / 2)
// Red and Leaf's back pics have 5 frames, but this is presumably irrelevant in the places this is used.
#define MAX_TRAINER_PIC_FRAMES 4
enum {
BATTLER_AFFINE_NORMAL,
BATTLER_AFFINE_EMERGE,

View File

@ -128,11 +128,11 @@ void InitializeEasyChatWordArray(u16 *words, u16 length);
u8 *ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 columns, u16 rows);
bool8 IsBardWordInvalid(u16 word);
u16 GetRandomEasyChatWordFromGroup(u16 group);
u16 GetNewHipsterPhraseToTeach(void);
u16 UnlockRandomTrendySaying(void);
u16 EasyChat_GetNumWordsInGroup(u8);
u16 GetRandomEasyChatWordFromUnlockedGroup(u16);
void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType);
void InitQuestionnaireWords(void);
void UnlockAdditionalPhrase(u8 additionalPhraseId);
void UnlockTrendySaying(u8 wordIndex);
#endif // GUARD_EASYCHAT_H

View File

@ -32,7 +32,7 @@ bool8 TryDoDiveWarp(struct MapPosition *position, u16 b);
int SetCableClubWarp(void);
u8 TrySetDiveWarp(void);
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction);
u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
void ClearPoisonStepCounter(void);
#endif // GUARD_FIELDCONTROLAVATAR_H

View File

@ -48,8 +48,8 @@ void LoadSecondaryTilesetPalette(struct MapLayout const *mapLayout, bool8 skipFa
void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
void CopyPrimaryTilesetToVram(const struct MapLayout *);
void CopySecondaryTilesetToVram(const struct MapLayout *);
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection);
struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
const struct MapHeader *const GetMapHeaderFromConnection(const struct MapConnection *connection);
const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable);
// field_region_map.c

View File

@ -53,10 +53,10 @@ struct MapLayout
{
/*0x00*/ s32 width;
/*0x04*/ s32 height;
/*0x08*/ u16 *border;
/*0x0C*/ u16 *map;
/*0x10*/ struct Tileset *primaryTileset;
/*0x14*/ struct Tileset *secondaryTileset;
/*0x08*/ const u16 *border;
/*0x0C*/ const u16 *map;
/*0x10*/ const struct Tileset *primaryTileset;
/*0x14*/ const struct Tileset *secondaryTileset;
};
struct BackupMapLayout
@ -70,7 +70,7 @@ struct ObjectEventTemplate
{
/*0x00*/ u8 localId;
/*0x01*/ u8 graphicsId;
/*0x02*/ u8 inConnection; // Leftover from FRLG
/*0x02*/ u8 kind; // Always OBJ_KIND_NORMAL in Emerald.
/*0x03*/ //u8 padding1;
/*0x04*/ s16 x;
/*0x06*/ s16 y;
@ -101,7 +101,7 @@ struct CoordEvent
u8 elevation;
u16 trigger;
u16 index;
u8 *script;
const u8 *script;
};
struct BgEvent
@ -110,7 +110,7 @@ struct BgEvent
u8 elevation;
u8 kind; // The "kind" field determines how to access bgUnion union below.
union {
u8 *script;
const u8 *script;
struct {
u16 item;
u16 hiddenItemId;
@ -125,10 +125,10 @@ struct MapEvents
u8 warpCount;
u8 coordEventCount;
u8 bgEventCount;
struct ObjectEventTemplate *objectEvents;
struct WarpEvent *warps;
struct CoordEvent *coordEvents;
struct BgEvent *bgEvents;
const struct ObjectEventTemplate *objectEvents;
const struct WarpEvent *warps;
const struct CoordEvent *coordEvents;
const struct BgEvent *bgEvents;
};
struct MapConnection
@ -142,7 +142,7 @@ struct MapConnection
struct MapConnections
{
s32 count;
struct MapConnection *connections;
const struct MapConnection *connections;
};
struct MapHeader

View File

@ -27,8 +27,8 @@
/// IDE support
#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__)
// We define these when using certain IDEs to fool preproc
#define _(x) (x)
#define __(x) (x)
#define _(x) {x}
#define __(x) {x}
#define INCBIN(...) {0}
#define INCBIN_U8 INCBIN
#define INCBIN_U16 INCBIN
@ -133,7 +133,7 @@
// values that don't appear in the Pokedex. NATIONAL_DEX_COUNT does not include these values.
#define NUM_DEX_FLAG_BYTES ROUND_BITS_TO_BYTES(NUM_SPECIES)
#define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT)
#define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES)
#define NUM_TRENDY_SAYING_BYTES ROUND_BITS_TO_BYTES(NUM_TRENDY_SAYINGS)
// This produces an error at compile-time if expr is zero.
// It looks like file.c:line: size of array `id' is negative
@ -676,7 +676,7 @@ struct MauvilleManGiddy
struct MauvilleManHipster
{
u8 id;
bool8 alreadySpoken;
bool8 taughtWord;
u8 language;
};
@ -1034,7 +1034,7 @@ struct SaveBlock1
/*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
/*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
/*0x2E20*/ u8 unlockedTrendySayings[NUM_TRENDY_SAYING_BYTES]; // Bitfield for unlockable Easy Chat words in EC_GROUP_TRENDY_SAYING
/*0x2E25*/ //u8 padding5[3];
/*0x2E28*/ OldMan oldMan;
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];

View File

@ -4992,10 +4992,10 @@ extern const u32 gUsePokeblockCondition_Gfx[];
extern const u16 gUnionRoomChat_Background_Pal[];
extern const u32 gUnionRoomChat_Background_Gfx[];
extern const u32 gUnionRoomChat_Background_Tilemap[];
extern const u16 gUnionRoomChat_Window_Pal1[];
extern const u16 gUnionRoomChat_Window_Pal2[];
extern const u32 gUnionRoomChat_Border_Gfx[];
extern const u32 gUnionRoomChat_Border_Tilemap[];
extern const u16 gUnionRoomChat_InputText_Pal[];
extern const u16 gUnionRoomChat_Keyboard_Pal[];
extern const u32 gUnionRoomChat_Keyboard_Gfx[];
extern const u32 gUnionRoomChat_Keyboard_Tilemap[];
extern const u32 gUnionRoomChat_RButtonLabels[];
// Use Pokeblock

View File

@ -83,7 +83,7 @@ struct RfuGameCompatibilityData
u16 hasNews:1;
u16 hasCard:1;
u16 unknown:1; // Never read
u16 isChampion:1;
u16 canLinkNationally:1;
u16 hasNationalDex:1;
u16 gameClear:1;
u16 version:4;

View File

@ -15,6 +15,15 @@ enum {
MAILBOXWIN_COUNT
};
// Window IDs for the move relearner
enum {
RELEARNERWIN_DESC_BATTLE,
RELEARNERWIN_DESC_CONTEST,
RELEARNERWIN_MOVE_LIST,
RELEARNERWIN_MSG,
RELEARNERWIN_YESNO,
};
enum {
TAG_CONDITION_MON = 100,
TAG_CONDITION_BALL,
@ -117,11 +126,11 @@ void DestroyConditionSparkleSprites(struct Sprite **sprites);
void FreeConditionSparkles(struct Sprite **sprites);
// Move relearner
void MoveRelearnerPrintText(u8 *str);
void MoveRelearnerPrintMessage(u8 *str);
bool16 MoveRelearnerRunTextPrinters(void);
void MoveRelearnerCreateYesNoMenu(void);
u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices);
void InitMoveRelearnerWindows(bool8 useContextWindow);
void InitMoveRelearnerWindows(bool8 useContestWindow);
// Level up window
void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bgClr, u8 fgClr, u8 shadowClr);

View File

@ -5,11 +5,11 @@ extern bool8 gGiftIsFromEReader;
u16 GetMysteryGiftBaseBlock(void);
void CB2_MysteryGiftEReader(void);
void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel);
void PrintMysteryGiftOrEReaderHeader(bool8 isJapanese, bool32 usePickOkCancel);
void MG_DrawCheckerboardPattern(u32 bg);
void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void);
bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str);
void AddTextPrinterToWindow1(const u8 *src);
void MG_AddMessageTextPrinter(const u8 *src);
void CB2_InitEReader(void);
void CB2_InitMysteryGift(void);
void MG_DrawTextBorder(u8 windowId);

View File

@ -70,7 +70,7 @@ enum {
MON_DATA_SPATK,
MON_DATA_SPDEF,
MON_DATA_MAIL,
MON_DATA_SPECIES2,
MON_DATA_SPECIES_OR_EGG,
MON_DATA_IVS,
MON_DATA_CHAMPION_RIBBON,
MON_DATA_WINNING_RIBBON,
@ -85,7 +85,7 @@ enum {
MON_DATA_EARTH_RIBBON,
MON_DATA_WORLD_RIBBON,
MON_DATA_UNUSED_RIBBONS,
MON_DATA_EVENT_LEGAL,
MON_DATA_MODERN_FATEFUL_ENCOUNTER,
MON_DATA_KNOWN_MOVES,
MON_DATA_RIBBON_COUNT,
MON_DATA_RIBBONS,
@ -148,25 +148,32 @@ struct PokemonSubstruct3
/* 0x07 */ u32 isEgg:1;
/* 0x07 */ u32 abilityNum:1;
/* 0x08 */ u32 coolRibbon:3;
/* 0x08 */ u32 beautyRibbon:3;
/* 0x08 */ u32 cuteRibbon:3;
/* 0x09 */ u32 smartRibbon:3;
/* 0x09 */ u32 toughRibbon:3;
/* 0x09 */ u32 championRibbon:1;
/* 0x0A */ u32 winningRibbon:1;
/* 0x0A */ u32 victoryRibbon:1;
/* 0x0A */ u32 artistRibbon:1;
/* 0x0A */ u32 effortRibbon:1;
/* 0x0A */ u32 marineRibbon:1; // never distributed
/* 0x0A */ u32 landRibbon:1; // never distributed
/* 0x0A */ u32 skyRibbon:1; // never distributed
/* 0x0A */ u32 countryRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners
/* 0x0B */ u32 nationalRibbon:1;
/* 0x0B */ u32 earthRibbon:1;
/* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners
/* 0x0B */ u32 unusedRibbons:4; // discarded in Gen 4
/* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in Gen 4+; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness.
/* 0x08 */ u32 coolRibbon:3; // Stores the highest contest rank achieved in the Cool category.
/* 0x08 */ u32 beautyRibbon:3; // Stores the highest contest rank achieved in the Beauty category.
/* 0x08 */ u32 cuteRibbon:3; // Stores the highest contest rank achieved in the Cute category.
/* 0x09 */ u32 smartRibbon:3; // Stores the highest contest rank achieved in the Smart category.
/* 0x09 */ u32 toughRibbon:3; // Stores the highest contest rank achieved in the Tough category.
/* 0x09 */ u32 championRibbon:1; // Given when defeating the Champion. Because both RSE and FRLG use it, later generations don't specify from which region it comes from.
/* 0x0A */ u32 winningRibbon:1; // Given at the Battle Tower's Level 50 challenge by winning a set of seven battles that extends the current streak to 56 or more.
/* 0x0A */ u32 victoryRibbon:1; // Given at the Battle Tower's Level 100 challenge by winning a set of seven battles that extends the current streak to 56 or more.
/* 0x0A */ u32 artistRibbon:1; // Given at the Contest Hall by winning a Master Rank contest with at least 800 points, and agreeing to have the Pokémon's portrait placed in the museum after being offered.
/* 0x0A */ u32 effortRibbon:1; // Given at Slateport's market to Pokémon with maximum EVs.
/* 0x0A */ u32 marineRibbon:1; // Never distributed.
/* 0x0A */ u32 landRibbon:1; // Never distributed.
/* 0x0A */ u32 skyRibbon:1; // Never distributed.
/* 0x0A */ u32 countryRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners.
/* 0x0B */ u32 nationalRibbon:1; // Given to purified Shadow Pokémon in Colosseum/XD.
/* 0x0B */ u32 earthRibbon:1; // Given to teams that have beaten Mt. Battle's 100-battle challenge in Colosseum/XD.
/* 0x0B */ u32 worldRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners.
/* 0x0B */ u32 unusedRibbons:4; // Discarded in Gen 4.
// The functionality of this bit changed in FRLG:
// In RS, this bit does nothing, is never set, & is accidentally unset when hatching Eggs.
// In FRLG & Emerald, this controls Mew & Deoxys obedience and whether they can be traded.
// If set, a Pokémon is a fateful encounter in FRLG's summary screen if hatched & for all Pokémon in Gen 4+ summary screens.
// Set for in-game event island legendaries, events distributed after a certain date, & Pokémon from XD: Gale of Darkness.
// Not to be confused with METLOC_FATEFUL_ENCOUNTER.
/* 0x0B */ u32 modernFatefulEncounter:1;
};
// Number of bytes in the largest Pokémon substruct.
@ -402,12 +409,11 @@ void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPok
void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId);
void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest);
void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId);
bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId);
void SetDeoxysStats(void);
u16 GetUnionRoomTrainerPic(void);
u16 GetUnionRoomTrainerClass(void);
void CreateEventLegalEnemyMon(void);
void CreateEnemyEventMon(void);
void CalculateMonStats(struct Pokemon *mon);
void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest);
u8 GetLevelFromMonExp(struct Pokemon *mon);

View File

@ -21,7 +21,8 @@ enum {
MAPSECTYPE_ROUTE,
MAPSECTYPE_CITY_CANFLY,
MAPSECTYPE_CITY_CANTFLY,
MAPSECTYPE_BATTLE_FRONTIER
MAPSECTYPE_BATTLE_FRONTIER,
NUM_MAPSEC_TYPES
};
struct RegionMap {

View File

@ -12,8 +12,8 @@ extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate;
s32 GetGameProgressForLinkTrade(void);
void CB2_StartCreateTradeMenu(void);
void CB2_LinkTrade(void);
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal);
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal);
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter);
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter);
int CanSpinTradeMon(struct Pokemon *, u16);
void InitTradeSequenceBgGpuRegs(void);
void LinkTradeDrawWindow(void);

View File

@ -1,7 +1,8 @@
MAKEFLAGS += --no-print-directory
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
# Inclusive list. If you don't want a tool to be built, don't add it here.
TOOLDIRS := tools/aif2pcm tools/bin2c tools/gbafix tools/gbagfx tools/jsonproc tools/mapjson tools/mid2agb tools/preproc tools/ramscrgen tools/rsfont tools/scaninc
.PHONY: all $(TOOLDIRS)

View File

@ -1329,8 +1329,8 @@ static void Cmd_count_usable_party_mons(void)
{
if (i != battlerOnField1 && i != battlerOnField2
&& GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
{
AI_THINKING_STRUCT->funcResult++;
}

View File

@ -86,9 +86,9 @@ static bool8 ShouldSwitchIfWonderGuard(void)
{
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[gActiveBattler])
continue;
@ -184,9 +184,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[battlerIn1])
continue;
@ -382,9 +382,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[battlerIn1])
continue;
@ -488,9 +488,9 @@ static bool8 ShouldSwitch(void)
{
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[battlerIn1])
continue;
@ -823,8 +823,8 @@ static bool8 ShouldUseItem(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
{
validMons++;
}

View File

@ -3023,7 +3023,7 @@ void AnimTask_LoadMusicNotesPals(u8 taskId)
for (i = 1; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
paletteNums[i] = AllocSpritePalette(ANIM_SPRITES_START - i);
gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000);
gMonSpritesGfxPtr->buffer = AllocZeroed(MON_PIC_SIZE * MAX_MON_PIC_FRAMES);
LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->buffer);
for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
LoadPalette(&gMonSpritesGfxPtr->buffer[i * 32], (u16)(OBJ_PLTT_ID(paletteNums[i])), PLTT_SIZE_4BPP);

View File

@ -1047,7 +1047,7 @@ void UpdateAnimBg3ScreenSize(bool8 largeScreenSize)
}
}
void TradeMenuBouncePartySprites(struct Sprite *sprite)
void Trade_MoveSelectedMonToTarget(struct Sprite *sprite)
{
sprite->data[1] = sprite->x;
sprite->data[3] = sprite->y;
@ -2101,7 +2101,7 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16
u16 palette = AllocSpritePalette(sSpriteTemplates_MoveEffectMons[id].paletteTag);
if (gMonSpritesGfxPtr != NULL && gMonSpritesGfxPtr->buffer == NULL)
gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000);
gMonSpritesGfxPtr->buffer = AllocZeroed(MON_PIC_SIZE * MAX_MON_PIC_FRAMES);
if (!isBackpic)
{
LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), OBJ_PLTT_ID(palette), PLTT_SIZE_4BPP);

View File

@ -899,7 +899,7 @@ void AnimTask_GetBattleTerrain(u8 taskId)
void AnimTask_AllocBackupPalBuffer(u8 taskId)
{
gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000);
gMonSpritesGfxPtr->buffer = AllocZeroed(MON_PIC_SIZE * MAX_MON_PIC_FRAMES);
DestroyAnimVisualTask(taskId);
}

View File

@ -592,8 +592,8 @@ static void SetBattlePartyIds(void)
if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG))
{
gBattlerPartyIndexes[i] = j;
@ -603,8 +603,8 @@ static void SetBattlePartyIds(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG))
{
gBattlerPartyIndexes[i] = j;
@ -618,7 +618,7 @@ static void SetBattlePartyIds(void)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != SPECIES_NONE // Probably a typo by Game Freak. The rest use SPECIES2.
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG)
&& gBattlerPartyIndexes[i - 2] != j)
{
@ -629,8 +629,8 @@ static void SetBattlePartyIds(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG)
&& gBattlerPartyIndexes[i - 2] != j)
{

View File

@ -73,9 +73,33 @@ struct TourneyTreeLineSection
#define tMode data[2]
#define tPrevTaskId data[3]
#define EFFECTIVENESS_MODE_GOOD 0
#define EFFECTIVENESS_MODE_BAD 1
#define EFFECTIVENESS_MODE_AI_VS_AI 2
enum {
EFFECTIVENESS_MODE_GOOD,
EFFECTIVENESS_MODE_BAD,
EFFECTIVENESS_MODE_AI_VS_AI,
};
// Window IDs for the tourney tree
enum {
TOURNEYWIN_NAMES_LEFT,
TOURNEYWIN_NAMES_RIGHT,
TOURNEYWIN_TITLE,
};
// Window IDs for the trainer (WIN_TRAINER_*) and match (WIN_MATCH_*) info cards.
// All 9 have a duplicate window at WIN + NUM_INFO_CARD_WINDOWS used by the alternate info card
enum {
WIN_TRAINER_NAME,
WIN_TRAINER_MON1_NAME,
WIN_TRAINER_MON2_NAME, // Used implicitly
WIN_TRAINER_MON3_NAME, // Used implicitly
WIN_TRAINER_FLAVOR_TEXT = WIN_TRAINER_MON1_NAME + FRONTIER_PARTY_SIZE, // Trainer's potential, battle style, and stat texts
WIN_MATCH_NUMBER,
WIN_MATCH_TRAINER_NAME_LEFT,
WIN_MATCH_TRAINER_NAME_RIGHT,
WIN_MATCH_WIN_TEXT,
NUM_INFO_CARD_WINDOWS
};
static u8 GetDomeTrainerMonIvs(u16);
static void SwapDomeTrainers(int, int, u16 *);
@ -670,7 +694,7 @@ static const struct BgTemplate sInfoCardBgTemplates[4] =
static const struct WindowTemplate sTourneyTreeWindowTemplates[] =
{
{
[TOURNEYWIN_NAMES_LEFT] = {
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 3,
@ -679,7 +703,7 @@ static const struct WindowTemplate sTourneyTreeWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 16,
},
{
[TOURNEYWIN_NAMES_RIGHT] = {
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 3,
@ -688,7 +712,7 @@ static const struct WindowTemplate sTourneyTreeWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 144,
},
{
[TOURNEYWIN_TITLE] = {
.bg = 0,
.tilemapLeft = 8,
.tilemapTop = 1,
@ -702,7 +726,7 @@ static const struct WindowTemplate sTourneyTreeWindowTemplates[] =
static const struct WindowTemplate sInfoCardWindowTemplates[] =
{
{
[WIN_TRAINER_NAME] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 2,
@ -711,7 +735,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 1,
},
{
[WIN_TRAINER_MON1_NAME] = {
.bg = 0,
.tilemapLeft = 16,
.tilemapTop = 5,
@ -720,7 +744,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 53,
},
{
[WIN_TRAINER_MON2_NAME] = {
.bg = 0,
.tilemapLeft = 19,
.tilemapTop = 7,
@ -729,7 +753,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 69,
},
{
[WIN_TRAINER_MON3_NAME] = {
.bg = 0,
.tilemapLeft = 16,
.tilemapTop = 10,
@ -738,7 +762,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 96,
},
{
[WIN_TRAINER_FLAVOR_TEXT] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 12,
@ -747,7 +771,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 112,
},
{
[WIN_MATCH_NUMBER] = {
.bg = 0,
.tilemapLeft = 5,
.tilemapTop = 2,
@ -756,7 +780,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 294,
},
{
[WIN_MATCH_TRAINER_NAME_LEFT] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 5,
@ -765,7 +789,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 340,
},
{
[WIN_MATCH_TRAINER_NAME_RIGHT] = {
.bg = 0,
.tilemapLeft = 20,
.tilemapTop = 5,
@ -774,7 +798,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 356,
},
{
[WIN_MATCH_WIN_TEXT] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 16,
@ -783,7 +807,9 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 372,
},
{
// Duplicate windows used by the alternate info card
// Same as above but on bg 1 instead of bg 0
[WIN_TRAINER_NAME + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 2,
.tilemapTop = 2,
@ -792,7 +818,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 1,
},
{
[WIN_TRAINER_MON1_NAME + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 16,
.tilemapTop = 5,
@ -801,7 +827,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 53,
},
{
[WIN_TRAINER_MON2_NAME + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 19,
.tilemapTop = 7,
@ -810,7 +836,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 69,
},
{
[WIN_TRAINER_MON3_NAME + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 16,
.tilemapTop = 10,
@ -819,7 +845,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 96,
},
{
[WIN_TRAINER_FLAVOR_TEXT + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 2,
.tilemapTop = 12,
@ -828,7 +854,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 112,
},
{
[WIN_MATCH_NUMBER + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 5,
.tilemapTop = 2,
@ -837,7 +863,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 294,
},
{
[WIN_MATCH_TRAINER_NAME_LEFT + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 2,
.tilemapTop = 5,
@ -846,7 +872,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 340,
},
{
[WIN_MATCH_TRAINER_NAME_RIGHT + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 20,
.tilemapTop = 5,
@ -855,7 +881,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 356,
},
{
[WIN_MATCH_WIN_TEXT + NUM_INFO_CARD_WINDOWS] = {
.bg = 1,
.tilemapLeft = 2,
.tilemapTop = 16,
@ -1397,26 +1423,27 @@ static const u8 sCompetitorRangeByMatch[DOME_TOURNAMENT_MATCHES_COUNT][3] =
{ NUM_POSSIBLE_MATCH_TRAINERS(DOME_FINAL) * 0, NUM_POSSIBLE_MATCH_TRAINERS(DOME_FINAL), DOME_FINAL},
};
// 1st value is the windowId (0 for left column, 1 for right column)
// 2nd value is the y coord
#define NAME_ROW_HEIGHT 16
// 1st value is the windowId, 2nd value is the y coord
static const u8 sTrainerNamePositions[DOME_TOURNAMENT_TRAINERS_COUNT][2] =
{
{ 0, 0},
{ 1, 112},
{ 1, 0},
{ 0, 112},
{ 0, 48},
{ 1, 64},
{ 1, 48},
{ 0, 64},
{ 0, 16},
{ 1, 96},
{ 1, 16},
{ 0, 96},
{ 0, 32},
{ 1, 80},
{ 1, 32},
{ 0, 80},
{ TOURNEYWIN_NAMES_LEFT, 0 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 7 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 0 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 7 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 3 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 4 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 3 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 4 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 1 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 6 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 1 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 6 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 2 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 5 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_RIGHT, 2 * NAME_ROW_HEIGHT},
{ TOURNEYWIN_NAMES_LEFT, 5 * NAME_ROW_HEIGHT},
};
// Coords for the pokeballs on the tourney tree that act as buttons to view trainer/match info
@ -2427,7 +2454,7 @@ static void InitDomeTrainers(void)
break;
}
if (sTrainerNamePositions[i][0] != 0)
if (sTrainerNamePositions[i][0] != TOURNEYWIN_NAMES_LEFT)
{
j = 0;
DOME_TRAINERS[j].trainerId = TRAINER_FRONTIER_BRAIN;
@ -3437,11 +3464,11 @@ static void Task_HandleInfoCardInput(u8 taskId)
case MATCHCARD_INPUT_UP ... MATCHCARD_INPUT_RIGHT:
gTasks[taskId].data[5] = i;
if (gTasks[taskId].tUsingAlternateSlot)
windowId = 9;
windowId = NUM_INFO_CARD_WINDOWS;
else
windowId = 0;
for (i = windowId; i < windowId + 9; i++)
for (i = windowId; i < windowId + NUM_INFO_CARD_WINDOWS; i++)
{
CopyWindowToVram(i, COPYWIN_GFX);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
@ -4263,14 +4290,14 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
int trainerId = 0;
u8 nature = 0;
int arrId = 0;
int windowId = 0;
int windowId = WIN_TRAINER_NAME;
int x = 0, y = 0;
u8 palSlot = 0;
s16 *allocatedArray = AllocZeroed(sizeof(s16) * ALLOC_ARRAY_SIZE);
trainerId = DOME_TRAINERS[trainerTourneyId].trainerId;
if (flags & CARD_ALTERNATE_SLOT)
arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = 9, palSlot = 2;
arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = WIN_TRAINER_NAME + NUM_INFO_CARD_WINDOWS, palSlot = 2;
if (flags & MOVE_CARD_RIGHT)
x = DISPLAY_WIDTH + 16;
if (flags & MOVE_CARD_DOWN)
@ -4388,19 +4415,19 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
else
textPrinter.currentChar = gSpeciesNames[gFacilityTrainerMons[DOME_MONS[trainerTourneyId][i]].species];
textPrinter.windowId = 1 + i + windowId;
textPrinter.windowId = WIN_TRAINER_MON1_NAME + i + windowId;
if (i == 1)
textPrinter.currentX = 7;
else
textPrinter.currentX = 0;
PutWindowTilemap(1 + i + windowId);
CopyWindowToVram(1 + i + windowId, COPYWIN_FULL);
PutWindowTilemap(WIN_TRAINER_MON1_NAME + i + windowId);
CopyWindowToVram(WIN_TRAINER_MON1_NAME + i + windowId, COPYWIN_FULL);
AddTextPrinter(&textPrinter, 0, NULL);
}
PutWindowTilemap(windowId + 4);
CopyWindowToVram(windowId + 4, COPYWIN_FULL);
PutWindowTilemap(windowId + WIN_TRAINER_FLAVOR_TEXT);
CopyWindowToVram(windowId + WIN_TRAINER_FLAVOR_TEXT, COPYWIN_FULL);
// Print text about trainers potential in the tourney
if (trainerId == TRAINER_FRONTIER_BRAIN)
@ -4409,7 +4436,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
textPrinter.currentChar = sBattleDomePotentialTexts[trainerTourneyId];
textPrinter.fontId = FONT_NORMAL;
textPrinter.windowId = windowId + 4;
textPrinter.windowId = windowId + WIN_TRAINER_FLAVOR_TEXT;
textPrinter.currentX = 0;
textPrinter.y = 4;
textPrinter.currentY = 4;
@ -4731,7 +4758,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
u8 palSlot = 0;
if (flags & CARD_ALTERNATE_SLOT)
arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = 9, palSlot = 2;
arrId = 2 * (FRONTIER_PARTY_SIZE + 1), windowId = NUM_INFO_CARD_WINDOWS, palSlot = 2;
if (flags & MOVE_CARD_RIGHT)
x = DISPLAY_WIDTH + 16;
if (flags & MOVE_CARD_DOWN)
@ -4873,10 +4900,10 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
textPrinter.shadowColor = TEXT_DYNAMIC_COLOR_4;
StringExpandPlaceholders(gStringVar4, sBattleDomeWinTexts[winStringId]);
textPrinter.currentChar = gStringVar4;
textPrinter.windowId = windowId + 8;
textPrinter.windowId = windowId + WIN_MATCH_WIN_TEXT;
textPrinter.fontId = FONT_NORMAL;
PutWindowTilemap(windowId + 8);
CopyWindowToVram(windowId + 8, COPYWIN_FULL);
PutWindowTilemap(windowId + WIN_MATCH_WIN_TEXT);
CopyWindowToVram(windowId + WIN_MATCH_WIN_TEXT, COPYWIN_FULL);
textPrinter.currentX = 0;
textPrinter.currentY = textPrinter.y = 0;
AddTextPrinter(&textPrinter, 0, NULL);
@ -4892,11 +4919,11 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
textPrinter.fontId = FONT_SHORT;
textPrinter.letterSpacing = 2;
textPrinter.currentChar = gStringVar1;
textPrinter.windowId = windowId + 6;
textPrinter.windowId = windowId + WIN_MATCH_TRAINER_NAME_LEFT;
textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x40, textPrinter.letterSpacing);
textPrinter.currentY = textPrinter.y = 2;
PutWindowTilemap(windowId + 6);
CopyWindowToVram(windowId + 6, COPYWIN_FULL);
PutWindowTilemap(windowId + WIN_MATCH_TRAINER_NAME_LEFT);
CopyWindowToVram(windowId + WIN_MATCH_TRAINER_NAME_LEFT, COPYWIN_FULL);
AddTextPrinter(&textPrinter, 0, NULL);
// Print right trainer's name.
@ -4908,21 +4935,21 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo)
CopyDomeTrainerName(gStringVar1, trainerIds[1]);
textPrinter.currentChar = gStringVar1;
textPrinter.windowId = windowId + 7;
textPrinter.windowId = windowId + WIN_MATCH_TRAINER_NAME_RIGHT;
textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x40, textPrinter.letterSpacing);
textPrinter.currentY = textPrinter.y = 2;
PutWindowTilemap(windowId + 7);
CopyWindowToVram(windowId + 7, COPYWIN_FULL);
PutWindowTilemap(windowId + WIN_MATCH_TRAINER_NAME_RIGHT);
CopyWindowToVram(windowId + WIN_MATCH_TRAINER_NAME_RIGHT, COPYWIN_FULL);
AddTextPrinter(&textPrinter, 0, NULL);
// Print match number.
textPrinter.letterSpacing = 0;
textPrinter.currentChar = sBattleDomeMatchNumberTexts[matchNo];
textPrinter.windowId = windowId + 5;
textPrinter.windowId = windowId + WIN_MATCH_NUMBER;
textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0xA0, textPrinter.letterSpacing);
textPrinter.currentY = textPrinter.y = 2;
PutWindowTilemap(windowId + 5);
CopyWindowToVram(windowId + 5, COPYWIN_FULL);
PutWindowTilemap(windowId + WIN_MATCH_NUMBER);
CopyWindowToVram(windowId + WIN_MATCH_NUMBER, COPYWIN_FULL);
AddTextPrinter(&textPrinter, 0, NULL);
}
@ -5356,7 +5383,7 @@ static void Task_ShowTourneyTree(u8 taskId)
case 4:
textPrinter.fontId = FONT_SHORT;
textPrinter.currentChar = gText_BattleTourney;
textPrinter.windowId = 2;
textPrinter.windowId = TOURNEYWIN_TITLE;
textPrinter.x = 0;
textPrinter.y = 0;
textPrinter.letterSpacing = 2;
@ -5442,7 +5469,7 @@ static void Task_ShowTourneyTree(u8 taskId)
}
}
if (sTrainerNamePositions[i][0] == 0)
if (sTrainerNamePositions[i][0] == TOURNEYWIN_NAMES_LEFT)
textPrinter.currentX = GetStringWidthDifference(textPrinter.fontId, gDisplayedStringBattle, 0x3D, textPrinter.letterSpacing);
else
textPrinter.currentX = 3;
@ -5454,12 +5481,12 @@ static void Task_ShowTourneyTree(u8 taskId)
gTasks[taskId].tState++;
break;
case 5:
PutWindowTilemap(0);
PutWindowTilemap(1);
PutWindowTilemap(2);
CopyWindowToVram(0, COPYWIN_FULL);
CopyWindowToVram(1, COPYWIN_FULL);
CopyWindowToVram(2, COPYWIN_FULL);
PutWindowTilemap(TOURNEYWIN_NAMES_LEFT);
PutWindowTilemap(TOURNEYWIN_NAMES_RIGHT);
PutWindowTilemap(TOURNEYWIN_TITLE);
CopyWindowToVram(TOURNEYWIN_NAMES_LEFT, COPYWIN_FULL);
CopyWindowToVram(TOURNEYWIN_NAMES_RIGHT, COPYWIN_FULL);
CopyWindowToVram(TOURNEYWIN_TITLE, COPYWIN_FULL);
SetHBlankCallback(HblankCb_TourneyTree);
SetVBlankCallback(VblankCb_TourneyTree);
if (r4 == 2)
@ -5556,7 +5583,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId)
if (DOME_TRAINERS[i].eliminatedAt == gSaveBlock2Ptr->frontier.curChallengeBattleNum - 1
&& DOME_TRAINERS[i].isEliminated)
{
if (sTrainerNamePositions[i][0] == 0)
if (sTrainerNamePositions[i][0] == TOURNEYWIN_NAMES_LEFT)
textPrinter.currentX = GetStringWidthDifference(textPrinter.fontId, gDisplayedStringBattle, 0x3D, textPrinter.letterSpacing);
else
textPrinter.currentX = 3;

View File

@ -301,11 +301,28 @@ const struct OamData gOamData_BattleSpritePlayerSide =
.affineParam = 0,
};
// Unknown and unused data. Feel free to remove.
static const u16 sUnused1[] = {0, 5, 0xfffe, 0};
static const u16 *const sUnused1Ptr = sUnused1;
static const u16 sUnused2[] = {0xfff0, 0, 0x0400, 0, 0, 0, 0x3c00, 0, 0x7ffe, 1, 0, 0};
static const u16 *const sUnused2Ptr = sUnused2;
static const union AnimCmd sAnim_Unused[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_JUMP(0),
};
static const union AnimCmd *const sAnims_Unused[] =
{
sAnim_Unused,
};
static const union AffineAnimCmd sAffineAnim_Unused[] =
{
AFFINEANIMCMD_FRAME(-0x10, 0x0, 0, 4),
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 0x3C),
AFFINEANIMCMD_JUMP(1),
};
static const union AffineAnimCmd *const sAffineAnims_Unused[] =
{
sAffineAnim_Unused,
};
static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32};
@ -695,33 +712,33 @@ static void CB2_InitBattleInternal(void)
gBattleCommunication[MULTIUSE_STATE] = 0;
}
#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \
for ((i) = 0; (i) < PARTY_SIZE; (i)++) \
{ \
u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES2); \
u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \
u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \
\
if (species == SPECIES_NONE) \
continue; \
\
/* Is healthy mon? */ \
if (species != SPECIES_EGG && hp != 0 && status == 0) \
(flags) |= 1 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is Egg or statused? */ \
if (hp != 0 && (species == SPECIES_EGG || status != 0)) \
(flags) |= 2 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is fainted? */ \
if (species != SPECIES_EGG && hp == 0) \
(flags) |= 3 << (i) * 2; \
#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \
for ((i) = 0; (i) < PARTY_SIZE; (i)++) \
{ \
u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES_OR_EGG); \
u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \
u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \
\
if (species == SPECIES_NONE) \
continue; \
\
/* Is healthy mon? */ \
if (species != SPECIES_EGG && hp != 0 && status == 0) \
(flags) |= 1 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is Egg or statused? */ \
if (hp != 0 && (species == SPECIES_EGG || status != 0)) \
(flags) |= 2 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is fainted? */ \
if (species != SPECIES_EGG && hp == 0) \
(flags) |= 3 << (i) * 2; \
}
// For Vs Screen at link battle start
@ -3508,8 +3525,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@ -3526,8 +3543,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@ -3552,8 +3569,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;

View File

@ -469,8 +469,8 @@ static const u8 sText_PkmnBrokeFree[] = _("Oh, no!\nThe POKéMON broke free!");
static const u8 sText_ItAppearedCaught[] = _("Aww!\nIt appeared to be caught!");
static const u8 sText_AarghAlmostHadIt[] = _("Aargh!\nAlmost had it!");
static const u8 sText_ShootSoClose[] = _("Shoot!\nIt was so close, too!");
static const u8 sText_GotchaPkmnCaught[] = _("Gotcha!\n{B_OPPONENT_MON1_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}\p");
static const u8 sText_GotchaPkmnCaught2[] = _("Gotcha!\n{B_OPPONENT_MON1_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}{PAUSE 127}");
static const u8 sText_GotchaPkmnCaughtPlayer[] = _("Gotcha!\n{B_OPPONENT_MON1_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}\p");
static const u8 sText_GotchaPkmnCaughtWally[] = _("Gotcha!\n{B_OPPONENT_MON1_NAME} was caught!{WAIT_SE}{PLAY_BGM MUS_CAUGHT}{PAUSE 127}");
static const u8 sText_GiveNicknameCaptured[] = _("Give a nickname to the\ncaptured {B_OPPONENT_MON1_NAME}?");
static const u8 sText_PkmnSentToPC[] = _("{B_OPPONENT_MON1_NAME} was sent to\n{B_PC_CREATOR_NAME} PC.");
static const u8 sText_Someones[] = _("someone's");
@ -771,8 +771,8 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT - BATTLESTRINGS_TABLE_S
[STRINGID_ITAPPEAREDCAUGHT - BATTLESTRINGS_TABLE_START] = sText_ItAppearedCaught,
[STRINGID_AARGHALMOSTHADIT - BATTLESTRINGS_TABLE_START] = sText_AarghAlmostHadIt,
[STRINGID_SHOOTSOCLOSE - BATTLESTRINGS_TABLE_START] = sText_ShootSoClose,
[STRINGID_GOTCHAPKMNCAUGHT - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught,
[STRINGID_GOTCHAPKMNCAUGHT2 - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught2,
[STRINGID_GOTCHAPKMNCAUGHTPLAYER - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaughtPlayer,
[STRINGID_GOTCHAPKMNCAUGHTWALLY - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaughtWally,
[STRINGID_GIVENICKNAMECAPTURED - BATTLESTRINGS_TABLE_START] = sText_GiveNicknameCaptured,
[STRINGID_PKMNSENTTOPC - BATTLESTRINGS_TABLE_START] = sText_PkmnSentToPC,
[STRINGID_PKMNDATAADDEDTODEX - BATTLESTRINGS_TABLE_START] = sText_PkmnDataAddedToDex,
@ -1481,288 +1481,236 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 1,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_DYNAMIC_COLOR_6,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.bgColor = 15,
.shadowColor = 6,
},
[B_WIN_ACTION_PROMPT] = {
.fillValue = PIXEL_FILL(0xF),
.fontId = FONT_NORMAL,
.x = 1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_DYNAMIC_COLOR_6,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.bgColor = 15,
.shadowColor = 6,
},
[B_WIN_ACTION_MENU] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_1] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_2] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_3] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_4] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_PP] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_3,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_2,
.fgColor = 12,
.bgColor = 14,
.shadowColor = 11,
},
[B_WIN_DUMMY] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_PP_REMAINING] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 2,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_3,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_2,
.fgColor = 12,
.bgColor = 14,
.shadowColor = 11,
},
[B_WIN_MOVE_TYPE] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_SWITCH_PROMPT] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_YESNO] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_LEVEL_UP_BOX] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_LEVEL_UP_BANNER] = {
.fillValue = PIXEL_FILL(0),
.fontId = FONT_NORMAL,
.x = 32,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_COLOR_TRANSPARENT,
.shadowColor = TEXT_COLOR_DARK_GRAY,
.fgColor = 1,
.shadowColor = 2,
},
[B_WIN_VS_PLAYER] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_VS_OPPONENT] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_VS_MULTI_PLAYER_1] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_VS_MULTI_PLAYER_2] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_VS_MULTI_PLAYER_3] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_VS_MULTI_PLAYER_4] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_VS_OUTCOME_DRAW] = {
.fillValue = PIXEL_FILL(0),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_COLOR_TRANSPARENT,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.shadowColor = 6,
},
[B_WIN_VS_OUTCOME_LEFT] = {
.fillValue = PIXEL_FILL(0),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_COLOR_TRANSPARENT,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.shadowColor = 6,
},
[B_WIN_VS_OUTCOME_RIGHT] = {
.fillValue = PIXEL_FILL(0x0),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_COLOR_TRANSPARENT,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.shadowColor = 6,
},
};
@ -1773,276 +1721,229 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 1,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_DYNAMIC_COLOR_6,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.bgColor = 15,
.shadowColor = 6,
},
[B_WIN_ACTION_PROMPT] = {
.fillValue = PIXEL_FILL(0xF),
.fontId = FONT_NORMAL,
.x = 1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_DYNAMIC_COLOR_6,
.shadowColor = TEXT_COLOR_GREEN,
.fgColor = 1,
.bgColor = 15,
.shadowColor = 6,
},
[B_WIN_ACTION_MENU] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_1] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_2] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_3] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_MOVE_NAME_4] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_PP] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_3,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_2,
.fgColor = 12,
.bgColor = 14,
.shadowColor = 11,
},
[B_WIN_DUMMY] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_PP_REMAINING] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 2,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_3,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_2,
.fgColor = 12,
.bgColor = 14,
.shadowColor = 11,
},
[B_WIN_MOVE_TYPE] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_SWITCH_PROMPT] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NARROW,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_YESNO] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_LEVEL_UP_BOX] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[B_WIN_LEVEL_UP_BANNER] = {
.fillValue = PIXEL_FILL(0),
.fontId = FONT_NORMAL,
.x = 32,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_COLOR_TRANSPARENT,
.shadowColor = TEXT_COLOR_DARK_GRAY,
.fgColor = 1,
.shadowColor = 2,
},
[ARENA_WIN_PLAYER_NAME] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_COLOR_WHITE,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 1,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_VS] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_OPPONENT_NAME] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_MIND] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_SKILL] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_BODY] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_JUDGMENT_TITLE] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 0,
.fgColor = TEXT_DYNAMIC_COLOR_4,
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
.fgColor = 13,
.bgColor = 14,
.shadowColor = 15,
},
[ARENA_WIN_JUDGMENT_TEXT] = {
.fillValue = PIXEL_FILL(0x1),
.fontId = FONT_NORMAL,
.x = 0,
.y = 1,
.letterSpacing = 0,
.lineSpacing = 0,
.speed = 1,
.fgColor = TEXT_COLOR_DARK_GRAY,
.bgColor = TEXT_COLOR_WHITE,
.shadowColor = TEXT_COLOR_LIGHT_GRAY,
.fgColor = 2,
.bgColor = 1,
.shadowColor = 3,
},
};

View File

@ -284,7 +284,7 @@ static const u8 sFloorTemplateOffsets[FRONTIER_STAGES_PER_CHALLENGE] =
0, 4, 9, 14, 19, 24, 29
};
static const u16 sPickupItemsLvl50[TOTAL_ROUNDS][PICKUP_ITEMS_PER_ROUND] =
static const u16 sPickupItemsLvl50[TOTAL_PYRAMID_ROUNDS][PICKUP_ITEMS_PER_ROUND] =
{
{ITEM_HYPER_POTION, ITEM_FLUFFY_TAIL, ITEM_CHERI_BERRY, ITEM_ETHER, ITEM_LUM_BERRY, ITEM_REVIVE, ITEM_BRIGHT_POWDER, ITEM_SHELL_BELL, ITEM_MAX_REVIVE, ITEM_SACRED_ASH},
{ITEM_HYPER_POTION, ITEM_DIRE_HIT, ITEM_PECHA_BERRY, ITEM_ETHER, ITEM_LEPPA_BERRY, ITEM_REVIVE, ITEM_LEFTOVERS, ITEM_CHOICE_BAND, ITEM_FULL_RESTORE, ITEM_MAX_ELIXIR},
@ -308,7 +308,7 @@ static const u16 sPickupItemsLvl50[TOTAL_ROUNDS][PICKUP_ITEMS_PER_ROUND] =
{ITEM_HYPER_POTION, ITEM_X_DEFEND, ITEM_LUM_BERRY, ITEM_ETHER, ITEM_LEPPA_BERRY, ITEM_REVIVE, ITEM_QUICK_CLAW, ITEM_KINGS_ROCK, ITEM_FULL_RESTORE, ITEM_MAX_ELIXIR},
};
static const u16 sPickupItemsLvlOpen[TOTAL_ROUNDS][PICKUP_ITEMS_PER_ROUND] =
static const u16 sPickupItemsLvlOpen[TOTAL_PYRAMID_ROUNDS][PICKUP_ITEMS_PER_ROUND] =
{
{ITEM_HYPER_POTION, ITEM_FLUFFY_TAIL, ITEM_CHERI_BERRY, ITEM_ETHER, ITEM_LUM_BERRY, ITEM_REVIVE, ITEM_BRIGHT_POWDER, ITEM_SHELL_BELL, ITEM_MAX_REVIVE, ITEM_SACRED_ASH},
{ITEM_HYPER_POTION, ITEM_DIRE_HIT, ITEM_PECHA_BERRY, ITEM_ETHER, ITEM_LEPPA_BERRY, ITEM_REVIVE, ITEM_LEFTOVERS, ITEM_CHOICE_BAND, ITEM_FULL_RESTORE, ITEM_MAX_ELIXIR},
@ -977,10 +977,10 @@ static void SetPickupItem(void)
u8 id;
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u32 floor = gSaveBlock2Ptr->frontier.curChallengeBattleNum;
u32 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_ROUNDS;
u32 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_PYRAMID_ROUNDS;
if (round >= TOTAL_ROUNDS)
round = TOTAL_ROUNDS - 1;
if (round >= TOTAL_PYRAMID_ROUNDS)
round = TOTAL_PYRAMID_ROUNDS - 1;
id = GetPyramidFloorTemplateId();
itemIndex = (gSpecialVar_LastTalked - sPyramidFloorTemplates[id].numTrainers) - 1;
@ -1345,10 +1345,10 @@ void GenerateBattlePyramidWildMon(void)
const struct PyramidWildMon *wildMons;
u32 id;
u32 lvl = gSaveBlock2Ptr->frontier.lvlMode;
u16 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_ROUNDS;
u16 round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] / FRONTIER_STAGES_PER_CHALLENGE) % TOTAL_PYRAMID_ROUNDS;
if (round >= TOTAL_ROUNDS)
round = TOTAL_ROUNDS - 1;
if (round >= TOTAL_PYRAMID_ROUNDS)
round = TOTAL_PYRAMID_ROUNDS - 1;
if (lvl != FRONTIER_LVL_50)
wildMons = sOpenLevelWildMonPointers[round];
@ -1961,8 +1961,8 @@ u16 GetBattlePyramidPickupItemId(void)
u32 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
int round = (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvlMode] / FRONTIER_STAGES_PER_CHALLENGE);
if (round >= TOTAL_ROUNDS)
round = TOTAL_ROUNDS - 1;
if (round >= TOTAL_PYRAMID_ROUNDS)
round = TOTAL_PYRAMID_ROUNDS - 1;
rand = Random() % 100;

View File

@ -5738,8 +5738,8 @@ static void Cmd_drawpartystatussummary(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatuses[i].hp = 0xFFFF;
hpStatuses[i].status = 0;
@ -8387,7 +8387,7 @@ static void Cmd_healpartystatus(void)
for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG);
u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM);
if (species != SPECIES_NONE && species != SPECIES_EGG)
@ -8933,8 +8933,8 @@ static void Cmd_trydobeatup(void)
for (;gBattleCommunication[0] < PARTY_SIZE; gBattleCommunication[0]++)
{
if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS))
break;
}
@ -9452,9 +9452,9 @@ static void Cmd_assistattackselect(void)
{
if (monId == gBattlerPartyIndexes[gBattlerAttacker])
continue;
if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
for (moveId = 0; moveId < MAX_MON_MOVES; moveId++)
@ -9620,7 +9620,7 @@ static void Cmd_pickup(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
@ -9643,7 +9643,7 @@ static void Cmd_pickup(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))

View File

@ -724,7 +724,7 @@ static u16 GetSumOfPlayerPartyLevel(u8 numMons)
for (i = 0; i < PARTY_SIZE; i++)
{
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0)
{

View File

@ -3271,7 +3271,7 @@ s32 GetHighestLevelInPlayerParty(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG)
{
s32 level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL, NULL);
if (level > highestLevel)

View File

@ -2278,8 +2278,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE);
@ -2318,8 +2318,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE);
@ -2336,8 +2336,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId; i < playerId + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId + 3);
@ -2365,8 +2365,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& i != partyIdBattlerOn1 && i != partyIdBattlerOn2
&& i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId])
break;
@ -3885,14 +3885,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
return targetBattler;
}
static bool32 IsMonEventLegal(u8 battlerId)
static bool32 IsBattlerModernFatefulEncounter(u8 battlerId)
{
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
return TRUE;
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS
&& GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW)
return TRUE;
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL);
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
}
u8 IsMonDisobedient(void)
@ -3906,7 +3906,7 @@ u8 IsMonDisobedient(void)
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
return 0;
if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys
if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys
{
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2)
return 0;

View File

@ -106,6 +106,13 @@ enum {
// Last berry that an NPC can put in
#define NUM_NPC_BERRIES ITEM_TO_BERRY(ITEM_ASPEAR_BERRY)
enum {
// Windows 0-3 are used implicitly in several loops over BLENDER_MAX_PLAYERS
// i.e. window 0 is for player 1, window 1 for player 2, etc.
WIN_MSG = BLENDER_MAX_PLAYERS,
WIN_RESULTS,
};
struct BlenderBerry
{
u16 itemId;
@ -200,7 +207,7 @@ static void SpriteCB_ScoreSymbolBest(struct Sprite *);
static void InitLocalPlayers(u8);
static void CB2_LoadBerryBlender(void);
static void UpdateBlenderCenter(void);
static bool32 Blender_PrintText(s16 *, const u8 *, s32 );
static bool32 PrintMessage(s16 *, const u8 *, s32 );
static void StartBlender(void);
static void CB2_StartBlenderLink(void);
static void CB2_StartBlenderLocal(void);
@ -332,7 +339,7 @@ static const struct BgTemplate sBgTemplates[3] =
static const struct WindowTemplate sWindowTemplates[] =
{
{
{ // Player 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 6,
@ -341,7 +348,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 14,
.baseBlock = 0x28,
},
{
{ // Player 2
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 6,
@ -350,7 +357,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 14,
.baseBlock = 0x36,
},
{
{ // Player 3
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 12,
@ -359,7 +366,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 14,
.baseBlock = 0x44,
},
{
{ // Player 4
.bg = 0,
.tilemapLeft = 22,
.tilemapTop = 12,
@ -368,7 +375,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 14,
.baseBlock = 0x52,
},
{
[WIN_MSG] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
@ -377,7 +384,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 14,
.baseBlock = 0x60,
},
{
[WIN_RESULTS] = {
.bg = 0,
.tilemapLeft = 5,
.tilemapTop = 3,
@ -1107,7 +1114,7 @@ static void CB2_LoadBerryBlender(void)
sBerryBlender->mainState++;
break;
case 4:
if (Blender_PrintText(&sBerryBlender->textState, sText_BerryBlenderStart, GetPlayerTextSpeedDelay()))
if (PrintMessage(&sBerryBlender->textState, sText_BerryBlenderStart, GetPlayerTextSpeedDelay()))
sBerryBlender->mainState++;
break;
case 5:
@ -1337,7 +1344,7 @@ static void CB2_StartBlenderLink(void)
}
break;
case 5:
Blender_PrintText(&sBerryBlender->textState, sText_CommunicationStandby, 0);
PrintMessage(&sBerryBlender->textState, sText_CommunicationStandby, 0);
sBerryBlender->mainState = 8;
sBerryBlender->framesToWait = 0;
break;
@ -1363,7 +1370,7 @@ static void CB2_StartBlenderLink(void)
if (++sBerryBlender->framesToWait > 20)
{
// Wait for partners' berries
ClearDialogWindowAndFrameToTransparent(4, TRUE);
ClearDialogWindowAndFrameToTransparent(WIN_MSG, TRUE);
if (GetBlockReceivedStatus() == GetLinkPlayerCountAsBitFlags())
{
for (i = 0; i < GetLinkPlayerCount(); i++)
@ -2276,9 +2283,9 @@ static u32 CalculatePokeblockColor(struct BlenderBerry* berries, s16 *_flavors,
j++;
}
// If all flavors are 0, or at least 3 were negative/0
// If all 5 flavors are 0, or if 4-5 flavors were negative,
// or if players used the same berry, color is black
if (j == 5 || negativeFlavors > 3)
if (j == FLAVOR_COUNT || negativeFlavors > 3)
return PBLOCK_CLR_BLACK;
for (i = 0; i < numPlayers; i++)
@ -2664,7 +2671,7 @@ static void CB2_EndBlenderGame(void)
}
break;
case 7:
if (Blender_PrintText(&sBerryBlender->textState, sText_WouldLikeToBlendAnotherBerry, GetPlayerTextSpeedDelay()))
if (PrintMessage(&sBerryBlender->textState, sText_WouldLikeToBlendAnotherBerry, GetPlayerTextSpeedDelay()))
sBerryBlender->gameEndState++;
break;
case 9:
@ -2748,7 +2755,7 @@ static void CB2_EndBlenderGame(void)
sBerryBlender->gameEndState++;
break;
case 13:
if (Blender_PrintText(&sBerryBlender->textState, sText_CommunicationStandby, GetPlayerTextSpeedDelay()))
if (PrintMessage(&sBerryBlender->textState, sText_CommunicationStandby, GetPlayerTextSpeedDelay()))
{
SetMainCallback2(CB2_CheckPlayAgainLink);
sBerryBlender->gameEndState = 0;
@ -2858,7 +2865,7 @@ static void CB2_CheckPlayAgainLink(void)
StringAppend(gStringVar4, sText_HasNoBerriesToPut);
break;
case 3:
if (Blender_PrintText(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay()))
if (PrintMessage(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay()))
{
sBerryBlender->framesToWait = 0;
sBerryBlender->gameEndState++;
@ -2869,7 +2876,7 @@ static void CB2_CheckPlayAgainLink(void)
sBerryBlender->gameEndState = 5;
break;
case 5:
Blender_PrintText(&sBerryBlender->textState, gText_SavingDontTurnOff2, 0);
PrintMessage(&sBerryBlender->textState, gText_SavingDontTurnOff2, 0);
SetLinkStandbyCallback();
sBerryBlender->gameEndState++;
break;
@ -2965,7 +2972,7 @@ static void CB2_CheckPlayAgainLocal(void)
StringCopy(gStringVar4, sText_RunOutOfBerriesForBlending);
break;
case 3:
if (Blender_PrintText(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay()))
if (PrintMessage(&sBerryBlender->textState, gStringVar4, GetPlayerTextSpeedDelay()))
sBerryBlender->gameEndState = 9;
break;
case 9:
@ -3495,7 +3502,7 @@ static bool8 PrintBlendingResults(void)
u8 *txtPtr;
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8);
Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SKIP_DRAW, 0);
Blender_AddTextPrinter(WIN_RESULTS, sText_BlendingResults, xPos, 1, TEXT_SKIP_DRAW, 0);
if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS)
yPos = 17;
@ -3510,15 +3517,15 @@ static bool8 PrintBlendingResults(void)
StringAppend(sBerryBlender->stringVar, sText_Dot);
StringAppend(sBerryBlender->stringVar, gText_Space);
StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 8, yPos, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 8, yPos, TEXT_SKIP_DRAW, 3);
StringCopy(sBerryBlender->stringVar, sBerryBlender->blendedBerries[place].name);
ConvertInternationalString(sBerryBlender->stringVar, gLinkPlayers[place].language);
StringAppend(sBerryBlender->stringVar, sText_SpaceBerry);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0x54, yPos, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 0x54, yPos, TEXT_SKIP_DRAW, 3);
}
Blender_AddTextPrinter(5, sText_MaximumSpeed, 0, 0x51, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sText_MaximumSpeed, 0, 0x51, TEXT_SKIP_DRAW, 3);
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->maxRPM / 100, STR_CONV_MODE_RIGHT_ALIGN, 3);
StringAppend(sBerryBlender->stringVar, sText_Dot);
@ -3527,8 +3534,8 @@ static bool8 PrintBlendingResults(void)
StringAppend(sBerryBlender->stringVar, sText_RPM);
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, xPos, 0x51, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sText_Time, 0, 0x61, TEXT_SKIP_DRAW, 3);
seconds = (sBerryBlender->gameFrameTime / 60) % 60;
minutes = (sBerryBlender->gameFrameTime / (60 * 60));
@ -3540,12 +3547,12 @@ static bool8 PrintBlendingResults(void)
StringAppend(sBerryBlender->stringVar, sText_Sec);
xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, xPos, 0x61, TEXT_SKIP_DRAW, 3);
sBerryBlender->framesToWait = 0;
sBerryBlender->mainState++;
CopyWindowToVram(5, COPYWIN_GFX);
CopyWindowToVram(WIN_RESULTS, COPYWIN_GFX);
}
break;
case 4:
@ -3553,7 +3560,7 @@ static bool8 PrintBlendingResults(void)
sBerryBlender->mainState++;
break;
case 5:
ClearStdWindowAndFrameToTransparent(5, TRUE);
ClearStdWindowAndFrameToTransparent(WIN_RESULTS, TRUE);
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
{
@ -3581,7 +3588,7 @@ static bool8 PrintBlendingResults(void)
sBerryBlender->mainState++;
break;
case 6:
if (Blender_PrintText(&sBerryBlender->textState, sBerryBlender->stringVar, GetPlayerTextSpeedDelay()))
if (PrintMessage(&sBerryBlender->textState, sBerryBlender->stringVar, GetPlayerTextSpeedDelay()))
{
TryUpdateBerryBlenderRecord();
return TRUE;
@ -3692,9 +3699,9 @@ static bool8 PrintBlendingRanking(void)
}
break;
case 3:
DrawStdFrameWithCustomTileAndPalette(5, FALSE, 1, 0xD);
DrawStdFrameWithCustomTileAndPalette(WIN_RESULTS, FALSE, 1, 0xD);
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168);
Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0);
Blender_AddTextPrinter(WIN_RESULTS, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0);
sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0);
StartSpriteAnim(&gSprites[sBerryBlender->scoreIconIds[SCORE_BEST]], SCOREANIM_BEST_STATIC);
@ -3718,20 +3725,20 @@ static bool8 PrintBlendingRanking(void)
StringAppend(sBerryBlender->stringVar, sText_Dot);
StringAppend(sBerryBlender->stringVar, gText_Space);
StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0, yPos, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 0, yPos, TEXT_SKIP_DRAW, 3);
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_BEST], STR_CONV_MODE_RIGHT_ALIGN, 3);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78, yPos, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 78, yPos, TEXT_SKIP_DRAW, 3);
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_GOOD], STR_CONV_MODE_RIGHT_ALIGN, 3);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SKIP_DRAW, 3);
ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_MISS], STR_CONV_MODE_RIGHT_ALIGN, 3);
Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SKIP_DRAW, 3);
Blender_AddTextPrinter(WIN_RESULTS, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SKIP_DRAW, 3);
}
PutWindowTilemap(5);
CopyWindowToVram(5, COPYWIN_FULL);
PutWindowTilemap(WIN_RESULTS);
CopyWindowToVram(WIN_RESULTS, COPYWIN_FULL);
sBerryBlender->framesToWait = 0;
sBerryBlender->mainState++;
@ -3875,26 +3882,24 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3
}
if (caseId != 3)
{
FillWindowPixelBuffer(windowId, PIXEL_FILL(txtColor[0]));
}
AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, 1, txtColor, speed, string);
}
static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed)
static bool32 PrintMessage(s16 *textState, const u8 *string, s32 textSpeed)
{
switch (*textState)
{
case 0:
DrawDialogFrameWithCustomTileAndPalette(4, FALSE, 0x14, 0xF);
Blender_AddTextPrinter(4, string, 0, 1, textSpeed, 0);
PutWindowTilemap(4);
CopyWindowToVram(4, COPYWIN_FULL);
DrawDialogFrameWithCustomTileAndPalette(WIN_MSG, FALSE, 0x14, 0xF);
Blender_AddTextPrinter(WIN_MSG, string, 0, 1, textSpeed, 0);
PutWindowTilemap(WIN_MSG);
CopyWindowToVram(WIN_MSG, COPYWIN_FULL);
(*textState)++;
break;
case 1:
if (!IsTextPrinterActive(4))
if (!IsTextPrinterActive(WIN_MSG))
{
*textState = 0;
return TRUE;

View File

@ -14,6 +14,13 @@
#include "m4a.h"
#include "constants/rgb.h"
enum {
WIN_TITLE, // "Berry Program Update" header on the first screen
WIN_MSG_BODY,
WIN_GAME_NAMES, // The labels under the GBA graphics on the link screen
WIN_TURN_OFF_TITLE, // "Ruby/Sapphire" at the top of the "turn off the power" screen
};
struct {
u8 state;
u8 curScene;
@ -71,7 +78,7 @@ static const struct BgTemplate sBerryFixBgTemplates[] = {
};
static const struct WindowTemplate sBerryFixWindowTemplates[] = {
{
[WIN_TITLE] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 4,
@ -80,7 +87,7 @@ static const struct WindowTemplate sBerryFixWindowTemplates[] = {
.paletteNum = 15,
.baseBlock = 1
},
{
[WIN_MSG_BODY] = {
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 11,
@ -89,7 +96,7 @@ static const struct WindowTemplate sBerryFixWindowTemplates[] = {
.paletteNum = 15,
.baseBlock = 53
},
{
[WIN_GAME_NAMES] = {
.bg = 0,
.tilemapLeft = 0,
.tilemapTop = 8,
@ -98,7 +105,7 @@ static const struct WindowTemplate sBerryFixWindowTemplates[] = {
.paletteNum = 15,
.baseBlock = 277
},
{
[WIN_TURN_OFF_TITLE] = {
.bg = 0,
.tilemapLeft = 8,
.tilemapTop = 0,
@ -217,11 +224,11 @@ static void BerryFix_Main(void)
sBerryFix->state = MAINSTATE_BEGIN;
break;
case MAINSTATE_BEGIN:
if (TryScene(SCENE_BEGIN) && (JOY_NEW(A_BUTTON)))
if (TryScene(SCENE_BEGIN) && JOY_NEW(A_BUTTON))
sBerryFix->state = MAINSTATE_CONNECT;
break;
case MAINSTATE_CONNECT:
if (TryScene(SCENE_ENSURE_CONNECT) && (JOY_NEW(A_BUTTON)))
if (TryScene(SCENE_ENSURE_CONNECT) && JOY_NEW(A_BUTTON))
sBerryFix->state = MAINSTATE_INIT_MULTIBOOT;
break;
case MAINSTATE_INIT_MULTIBOOT:
@ -299,29 +306,29 @@ static void BerryFix_GpuSet(void)
DmaCopy32(3, sBerryFixPalColors, BG_PLTT + 0x1E0, sizeof(sBerryFixPalColors));
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
FillWindowPixelBuffer(3, PIXEL_FILL(0));
FillWindowPixelBuffer(0, PIXEL_FILL(10));
FillWindowPixelBuffer(WIN_GAME_NAMES, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_TURN_OFF_TITLE, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(10));
width = GetStringWidth(FONT_SMALL, sText_Emerald, 0);
left = (120 - width) / 2;
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_Emerald);
AddTextPrinterParameterized3(WIN_GAME_NAMES, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_Emerald);
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
left = (120 - width) / 2 + 120;
AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire);
AddTextPrinterParameterized3(WIN_GAME_NAMES, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire);
width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0);
left = (112 - width) / 2;
AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire);
AddTextPrinterParameterized3(WIN_TURN_OFF_TITLE, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire);
width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0);
left = (208 - width) / 2;
AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SKIP_DRAW, sText_BerryProgramUpdate);
AddTextPrinterParameterized3(WIN_TITLE, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SKIP_DRAW, sText_BerryProgramUpdate);
CopyWindowToVram(2, COPYWIN_GFX);
CopyWindowToVram(3, COPYWIN_GFX);
CopyWindowToVram(0, COPYWIN_GFX);
CopyWindowToVram(WIN_GAME_NAMES, COPYWIN_GFX);
CopyWindowToVram(WIN_TURN_OFF_TITLE, COPYWIN_GFX);
CopyWindowToVram(WIN_TITLE, COPYWIN_GFX);
}
static int BerryFix_TrySetScene(int scene)
@ -345,23 +352,23 @@ static int BerryFix_TrySetScene(int scene)
static void BerryFix_SetScene(int scene)
{
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
FillWindowPixelBuffer(1, PIXEL_FILL(10));
AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, TEXT_SKIP_DRAW, sBerryProgramTexts[scene]);
PutWindowTilemap(1);
CopyWindowToVram(1, COPYWIN_GFX);
FillWindowPixelBuffer(WIN_MSG_BODY, PIXEL_FILL(10));
AddTextPrinterParameterized3(WIN_MSG_BODY, FONT_NORMAL, 0, 0, sBerryProgramTextColors, TEXT_SKIP_DRAW, sBerryProgramTexts[scene]);
PutWindowTilemap(WIN_MSG_BODY);
CopyWindowToVram(WIN_MSG_BODY, COPYWIN_GFX);
switch (scene)
{
case SCENE_ENSURE_CONNECT:
case SCENE_TRANSMITTING:
case SCENE_FOLLOW_INSTRUCT:
case SCENE_TRANSMIT_FAILED:
PutWindowTilemap(2);
PutWindowTilemap(WIN_GAME_NAMES);
break;
case SCENE_TURN_OFF_POWER:
PutWindowTilemap(3);
PutWindowTilemap(WIN_TURN_OFF_TITLE);
break;
case SCENE_BEGIN:
PutWindowTilemap(0);
PutWindowTilemap(WIN_TITLE);
break;
}
CopyBgTilemapBufferToVram(0);

View File

@ -102,7 +102,7 @@ static const u8 sTextColors[2][3] =
static const struct WindowTemplate sWindowTemplates[] =
{
{ // WIN_BERRY_NAME
[WIN_BERRY_NAME] = {
.bg = 1,
.tilemapLeft = 11,
.tilemapTop = 4,
@ -111,7 +111,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 69,
},
{ // WIN_SIZE_FIRM
[WIN_SIZE_FIRM] = {
.bg = 1,
.tilemapLeft = 11,
.tilemapTop = 7,
@ -120,7 +120,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 85,
},
{ // WIN_DESC
[WIN_DESC] = {
.bg = 1,
.tilemapLeft = 4,
.tilemapTop = 14,
@ -129,7 +129,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 157,
},
{ // WIN_BERRY_TAG
[WIN_BERRY_TAG] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 0,
@ -599,7 +599,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
switch (data[0])
{
case 0x30:
FillWindowPixelBuffer(0, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0));
break;
case 0x40:
PrintBerryNumberAndName();
@ -609,7 +609,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
CreateBerrySprite();
break;
case 0x60:
FillWindowPixelBuffer(1, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0));
break;
case 0x70:
PrintBerrySize();
@ -621,7 +621,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
SetFlavorCirclesVisiblity();
break;
case 0xA0:
FillWindowPixelBuffer(2, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0));
break;
case 0xB0:
PrintBerryDescription1();
@ -636,7 +636,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
switch (data[0])
{
case 0x30:
FillWindowPixelBuffer(2, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_DESC, PIXEL_FILL(0));
break;
case 0x40:
PrintBerryDescription2();
@ -648,7 +648,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
SetFlavorCirclesVisiblity();
break;
case 0x70:
FillWindowPixelBuffer(1, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_SIZE_FIRM, PIXEL_FILL(0));
break;
case 0x80:
PrintBerryFirmness();
@ -661,7 +661,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
CreateBerrySprite();
break;
case 0xB0:
FillWindowPixelBuffer(0, PIXEL_FILL(0));
FillWindowPixelBuffer(WIN_BERRY_NAME, PIXEL_FILL(0));
break;
case 0xC0:
PrintBerryNumberAndName();

View File

@ -863,23 +863,23 @@ static u8 Bike_DPadToDirection(u16 heldKeys)
static u8 GetBikeCollision(u8 direction)
{
u8 metatitleBehavior;
u8 metatileBehavior;
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
s16 x = playerObjEvent->currentCoords.x;
s16 y = playerObjEvent->currentCoords.y;
MoveCoords(direction, &x, &y);
metatitleBehavior = MapGridGetMetatileBehaviorAt(x, y);
return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatitleBehavior);
metatileBehavior = MapGridGetMetatileBehaviorAt(x, y);
return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatileBehavior);
}
static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatitleBehavior)
static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior)
{
u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatitleBehavior);
u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatileBehavior);
if (collision > COLLISION_OBJECT_EVENT)
return collision;
if (collision == COLLISION_NONE && IsRunningDisallowedByMetatile(metatitleBehavior))
if (collision == COLLISION_NONE && IsRunningDisallowedByMetatile(metatileBehavior))
collision = COLLISION_IMPASSABLE;
if (collision)

View File

@ -94,11 +94,11 @@ bool8 CheckRelicanthWailord(void)
{
// Emerald change: why did they flip it?
// First comes Wailord
if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2, 0) == SPECIES_WAILORD)
if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG, 0) == SPECIES_WAILORD)
{
CalculatePlayerPartyCount();
// Last comes Relicanth
if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES2, 0) == SPECIES_RELICANTH)
if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES_OR_EGG, 0) == SPECIES_RELICANTH)
return TRUE;
}
return FALSE;

View File

@ -27,9 +27,11 @@
#define STATE_END 0xFF
#define TAG_CABLE_CAR 1
#define TAG_DOOR 2
#define TAG_CABLE 3
enum {
TAG_CABLE_CAR = 1,
TAG_DOOR,
TAG_CABLE,
};
struct CableCar
{
@ -62,8 +64,8 @@ struct CableCar
u16 *groundTilemap;
u16 *treesTilemap;
u16 *bgMountainsTilemap;
const u16 *pylonHookTilemapEntries;
u8 *pylonStemTilemap;
const u16 *pylonTopTilemap;
u16 *pylonPoleTilemap;
};
static EWRAM_DATA struct CableCar *sCableCar = NULL;
@ -129,24 +131,11 @@ static const struct BgTemplate sBgTemplates[4] = {
},
};
static const u8 sGround_Tilemap[] = INCBIN_U8("graphics/cable_car/ground.bin.lz");
static const u8 sTrees_Tilemap[] = INCBIN_U8("graphics/cable_car/trees.bin.lz");
static const u8 sBgMountains_Tilemap[] = INCBIN_U8("graphics/cable_car/bg_mountains.bin.lz");
static const u16 sPylonHook_TilemapEntries[] = {
0x3000,
0x3001,
0x3002,
0x3003,
0x3004,
0x3005,
0x3006,
0x3007,
0x3008,
0x3009,
};
static const u8 sPylonStems_Tilemap[] = INCBIN_U8("graphics/cable_car/pylons.bin.lz");
static const u16 sGround_Tilemap[] = INCBIN_U16("graphics/cable_car/ground.bin.lz");
static const u16 sTrees_Tilemap[] = INCBIN_U16("graphics/cable_car/trees.bin.lz");
static const u16 sBgMountains_Tilemap[] = INCBIN_U16("graphics/cable_car/bg_mountains.bin.lz");
static const u16 sPylonTop_Tilemap[] = INCBIN_U16("graphics/cable_car/pylon_top.bin");
static const u16 sPylonPole_Tilemap[] = INCBIN_U16("graphics/cable_car/pylon_pole.bin.lz");
static const struct CompressedSpriteSheet sSpriteSheets[] = {
{ gCableCar_Gfx, 0x800, TAG_CABLE_CAR },
@ -299,8 +288,8 @@ static void CB2_LoadCableCar(void)
sCableCar->groundTilemap = malloc_and_decompress(sGround_Tilemap, &sizeOut);
sCableCar->treesTilemap = malloc_and_decompress(sTrees_Tilemap, &sizeOut);
sCableCar->bgMountainsTilemap = malloc_and_decompress(sBgMountains_Tilemap, &sizeOut);
sCableCar->pylonStemTilemap = malloc_and_decompress(sPylonStems_Tilemap, &sizeOut);
sCableCar->pylonHookTilemapEntries = sPylonHook_TilemapEntries;
sCableCar->pylonPoleTilemap = malloc_and_decompress(sPylonPole_Tilemap, &sizeOut);
sCableCar->pylonTopTilemap = sPylonTop_Tilemap;
DecompressAndCopyTileDataToVram(0, gCableCarBg_Gfx, 0, 0, 0);
gMain.state++;
break;
@ -335,8 +324,8 @@ static void CB2_LoadCableCar(void)
case 6:
CopyToBgTilemapBufferRect_ChangePalette(1, sCableCar->treesTilemap, 0, 17, 32, 15, 17);
CopyToBgTilemapBufferRect_ChangePalette(2, sCableCar->bgMountainsTilemap, 0, 0, 30, 20, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonHookTilemapEntries, 0, 0, 5, 2, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonStemTilemap, 0, 2, 2, 20, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonTopTilemap, 0, 0, 5, 2, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonPoleTilemap, 0, 2, 2, 20, 17);
gMain.state++;
break;
case 7:
@ -404,8 +393,8 @@ static void CB2_EndCableCar(void)
UnsetBgTilemapBuffer(2);
UnsetBgTilemapBuffer(3);
ResetBgsAndClearDma3BusyFlags(0);
sCableCar->pylonHookTilemapEntries = NULL;
FREE_AND_SET_NULL(sCableCar->pylonStemTilemap);
sCableCar->pylonTopTilemap = NULL;
FREE_AND_SET_NULL(sCableCar->pylonPoleTilemap);
FREE_AND_SET_NULL(sCableCar->bgMountainsTilemap);
FREE_AND_SET_NULL(sCableCar->treesTilemap);
FREE_AND_SET_NULL(sCableCar->groundTilemap);
@ -514,8 +503,8 @@ static void Task_AnimateBgGoingUp(u8 taskId)
FillBgTilemapBufferRect(3, 0, 2, 0, 1, 2, 17);
break;
case 16:
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonHookTilemapEntries, 0, 0, 5, 2, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonStemTilemap, 0, 2, 2, 30, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonTopTilemap, 0, 0, 5, 2, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonPoleTilemap, 0, 2, 2, 30, 17);
sCableCar->bg3VerticalOffset = 64;
break;
}
@ -542,7 +531,7 @@ static void Task_AnimateBgGoingDown(u8 taskId)
switch (sCableCar->bg3HorizontalOffset)
{
case 176:
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonStemTilemap, 0, 2, 2, 30, 17);
CopyToBgTilemapBufferRect_ChangePalette(3, sCableCar->pylonPoleTilemap, 0, 2, 2, 30, 17);
break;
case 16:
FillBgTilemapBufferRect(3, 0, 2, 0, 3, 2, 17);
@ -550,14 +539,14 @@ static void Task_AnimateBgGoingDown(u8 taskId)
sCableCar->bg3VerticalOffset = 192;
break;
case 32:
FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[2], 2, 0, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[3], 3, 0, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[7], 2, 1, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[8], 3, 1, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[2], 2, 0, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[3], 3, 0, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[7], 2, 1, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[8], 3, 1, 1, 1, 17);
break;
case 40:
FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[4], 4, 0, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonHookTilemapEntries[9], 4, 1, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[4], 4, 0, 1, 1, 17);
FillBgTilemapBufferRect(3, sCableCar->pylonTopTilemap[9], 4, 1, 1, 1, 17);
break;
}
}

View File

@ -5459,7 +5459,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b)
u8 speed;
printerTemplate.currentChar = currChar;
printerTemplate.windowId = 4;
printerTemplate.windowId = WIN_GENERAL_TEXT;
printerTemplate.fontId = FONT_NORMAL;
printerTemplate.x = 0;
printerTemplate.y = 1;
@ -5485,7 +5485,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b)
AddTextPrinter(&printerTemplate, speed, 0);
}
PutWindowTilemap(4);
PutWindowTilemap(WIN_GENERAL_TEXT);
Contest_SetBgCopyFlags(0);
}
@ -5503,7 +5503,7 @@ static void ContestBG_FillBoxWithTile(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 wi
static bool32 Contest_RunTextPrinters(void)
{
RunTextPrinters();
return IsTextPrinterActive(4);
return IsTextPrinterActive(WIN_GENERAL_TEXT);
}
static void Contest_SetBgCopyFlags(u32 flagIndex)

View File

@ -319,9 +319,10 @@ static const struct BgTemplate sBgTemplates[] =
}
};
static const struct WindowTemplate sWindowTemplates[] =
// Window IDs are implicitly shared with contestant IDs in LoadContestMonName
static const struct WindowTemplate sWindowTemplates[CONTESTANT_COUNT + 1] =
{
{
{ // Contestant 1
.bg = 1,
.tilemapLeft = 7,
.tilemapTop = 4,
@ -330,7 +331,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 770
},
{
{ // Contestant 2
.bg = 1,
.tilemapLeft = 7,
.tilemapTop = 7,
@ -339,7 +340,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 794
},
{
{ // Contestant 3
.bg = 1,
.tilemapLeft = 7,
.tilemapTop = 10,
@ -348,7 +349,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 818
},
{
{ // Contestant 4
.bg = 1,
.tilemapLeft = 7,
.tilemapTop = 13,
@ -357,7 +358,7 @@ static const struct WindowTemplate sWindowTemplates[] =
.paletteNum = 15,
.baseBlock = 842
},
DUMMY_WIN_TEMPLATE,
DUMMY_WIN_TEMPLATE
};
static const struct OamData sOamData_WirelessIndicatorWindow =

View File

@ -48,68 +48,68 @@ const struct SpriteFrameImage gBattlerPicTable_OpponentRight[] =
const struct SpriteFrameImage gTrainerBackPicTable_Brendan[] =
{
gTrainerBackPic_Brendan, 0x0800,
gTrainerBackPic_Brendan + 0x0800, 0x0800,
gTrainerBackPic_Brendan + 0x1000, 0x0800,
gTrainerBackPic_Brendan + 0x1800, 0x0800,
gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_Brendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_May[] =
{
gTrainerBackPic_May, 0x0800,
gTrainerBackPic_May + 0x0800, 0x0800,
gTrainerBackPic_May + 0x1000, 0x0800,
gTrainerBackPic_May + 0x1800, 0x0800,
gTrainerBackPic_May + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_May + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_May + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_May + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_Red[] =
{
gTrainerBackPic_Red, 0x0800,
gTrainerBackPic_Red + 0x0800, 0x0800,
gTrainerBackPic_Red + 0x1000, 0x0800,
gTrainerBackPic_Red + 0x1800, 0x0800,
gTrainerBackPic_Red + 0x2000, 0x0800,
gTrainerBackPic_Red + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_Red + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_Red + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_Red + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
gTrainerBackPic_Red + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_Leaf[] =
{
gTrainerBackPic_Leaf, 0x0800,
gTrainerBackPic_Leaf + 0x0800, 0x0800,
gTrainerBackPic_Leaf + 0x1000, 0x0800,
gTrainerBackPic_Leaf + 0x1800, 0x0800,
gTrainerBackPic_Leaf + 0x2000, 0x0800,
gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
gTrainerBackPic_Leaf + TRAINER_PIC_SIZE * 4, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireBrendan[] =
{
gTrainerBackPic_RubySapphireBrendan, 0x0800,
gTrainerBackPic_RubySapphireBrendan + 0x0800, 0x0800,
gTrainerBackPic_RubySapphireBrendan + 0x1000, 0x0800,
gTrainerBackPic_RubySapphireBrendan + 0x1800, 0x0800,
gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_RubySapphireBrendan + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_RubySapphireMay[] =
{
gTrainerBackPic_RubySapphireMay, 0x0800,
gTrainerBackPic_RubySapphireMay + 0x0800, 0x0800,
gTrainerBackPic_RubySapphireMay + 0x1000, 0x0800,
gTrainerBackPic_RubySapphireMay + 0x1800, 0x0800,
gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_RubySapphireMay + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_Wally[] =
{
gTrainerBackPic_Wally, 0x0800,
gTrainerBackPic_Wally + 0x0800, 0x0800,
gTrainerBackPic_Wally + 0x1000, 0x0800,
gTrainerBackPic_Wally + 0x1800, 0x0800,
gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_Wally + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
};
const struct SpriteFrameImage gTrainerBackPicTable_Steven[] =
{
gTrainerBackPic_Steven, 0x0800,
gTrainerBackPic_Steven + 0x0800, 0x0800,
gTrainerBackPic_Steven + 0x1000, 0x0800,
gTrainerBackPic_Steven + 0x1800, 0x0800,
gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 0, TRAINER_PIC_SIZE,
gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 1, TRAINER_PIC_SIZE,
gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 2, TRAINER_PIC_SIZE,
gTrainerBackPic_Steven + TRAINER_PIC_SIZE * 3, TRAINER_PIC_SIZE,
};
static const union AnimCmd sAnim_GeneralFrame0[] =
@ -290,7 +290,7 @@ static const union AnimCmd sAnim_MonPic_3[] =
ANIMCMD_END,
};
const union AnimCmd *const gAnims_MonPic[] =
const union AnimCmd *const gAnims_MonPic[MAX_MON_PIC_FRAMES] =
{
sAnim_MonPic_0,
sAnim_MonPic_1,

View File

@ -1038,7 +1038,7 @@ static const struct PyramidWildMon sOpenLevelWildMons_Round20[] =
}
};
static const struct PyramidWildMon *const sOpenLevelWildMonPointers[TOTAL_ROUNDS] =
static const struct PyramidWildMon *const sOpenLevelWildMonPointers[TOTAL_PYRAMID_ROUNDS] =
{
sOpenLevelWildMons_Round1,
sOpenLevelWildMons_Round2,

View File

@ -2,102 +2,104 @@
#include "global.h"
#include "contest.h"
#define CONTEST_OPPONENT_JIMMY 0
#define CONTEST_OPPONENT_EDITH 1
#define CONTEST_OPPONENT_EVAN 2
#define CONTEST_OPPONENT_KELSEY 3
#define CONTEST_OPPONENT_MADISON 4
#define CONTEST_OPPONENT_RAYMOND 5
#define CONTEST_OPPONENT_GRANT 6
#define CONTEST_OPPONENT_PAIGE 7
#define CONTEST_OPPONENT_ALEC 8
#define CONTEST_OPPONENT_SYDNEY 9
#define CONTEST_OPPONENT_MORRIS 10
#define CONTEST_OPPONENT_MARIAH 11
#define CONTEST_OPPONENT_RUSSELL 12
#define CONTEST_OPPONENT_MELANIE 13
#define CONTEST_OPPONENT_CHANCE 14
#define CONTEST_OPPONENT_AGATHA 15
#define CONTEST_OPPONENT_BEAU 16
#define CONTEST_OPPONENT_KAY 17
#define CONTEST_OPPONENT_CALE 18
#define CONTEST_OPPONENT_CAITLIN 19
#define CONTEST_OPPONENT_COLBY 20
#define CONTEST_OPPONENT_KYLIE 21
#define CONTEST_OPPONENT_LIAM 22
#define CONTEST_OPPONENT_MILO 23
#define CONTEST_OPPONENT_KARINA 24
#define CONTEST_OPPONENT_BOBBY 25
#define CONTEST_OPPONENT_CLAIRE 26
#define CONTEST_OPPONENT_WILLIE 27
#define CONTEST_OPPONENT_CASSIDY 28
#define CONTEST_OPPONENT_MORGAN 29
#define CONTEST_OPPONENT_SUMMER 30
#define CONTEST_OPPONENT_MILES 31
#define CONTEST_OPPONENT_AUDREY 32
#define CONTEST_OPPONENT_AVERY 33
#define CONTEST_OPPONENT_ARIANA 34
#define CONTEST_OPPONENT_ASHTON 35
#define CONTEST_OPPONENT_SANDRA 36
#define CONTEST_OPPONENT_CARSON 37
#define CONTEST_OPPONENT_KATRINA 38
#define CONTEST_OPPONENT_LUKE 39
#define CONTEST_OPPONENT_RAUL 40
#define CONTEST_OPPONENT_JADA 41
#define CONTEST_OPPONENT_ZEEK 42
#define CONTEST_OPPONENT_DIEGO 43
#define CONTEST_OPPONENT_ALIYAH 44
#define CONTEST_OPPONENT_NATALIA 45
#define CONTEST_OPPONENT_DEVIN 46
#define CONTEST_OPPONENT_TYLOR 47
#define CONTEST_OPPONENT_RONNIE 48
#define CONTEST_OPPONENT_CLAUDIA 49
#define CONTEST_OPPONENT_ELIAS 50
#define CONTEST_OPPONENT_JADE 51
#define CONTEST_OPPONENT_FRANCIS 52
#define CONTEST_OPPONENT_ALISHA 53
#define CONTEST_OPPONENT_SAUL 54
#define CONTEST_OPPONENT_FELICIA 55
#define CONTEST_OPPONENT_EMILIO 56
#define CONTEST_OPPONENT_KARLA 57
#define CONTEST_OPPONENT_DARRYL 58
#define CONTEST_OPPONENT_SELENA 59
#define CONTEST_OPPONENT_NOEL 60
#define CONTEST_OPPONENT_LACEY 61
#define CONTEST_OPPONENT_CORBIN 62
#define CONTEST_OPPONENT_GRACIE 63
#define CONTEST_OPPONENT_COLTIN 64
#define CONTEST_OPPONENT_ELLIE 65
#define CONTEST_OPPONENT_MARCUS 66
#define CONTEST_OPPONENT_KIARA 67
#define CONTEST_OPPONENT_BRYCE 68
#define CONTEST_OPPONENT_JAMIE 69
#define CONTEST_OPPONENT_JORGE 70
#define CONTEST_OPPONENT_DEVON 71
#define CONTEST_OPPONENT_JUSTINA 72
#define CONTEST_OPPONENT_RALPH 73
#define CONTEST_OPPONENT_ROSA 74
#define CONTEST_OPPONENT_KEATON 75
#define CONTEST_OPPONENT_MAYRA 76
#define CONTEST_OPPONENT_LAMAR 77
#define CONTEST_OPPONENT_AUBREY 78
#define CONTEST_OPPONENT_NIGEL 79
#define CONTEST_OPPONENT_CAMILLE 80
#define CONTEST_OPPONENT_DEON 81
#define CONTEST_OPPONENT_JANELLE 82
#define CONTEST_OPPONENT_HEATH 83
#define CONTEST_OPPONENT_SASHA 84
#define CONTEST_OPPONENT_FRANKIE 85
#define CONTEST_OPPONENT_HELEN 86
#define CONTEST_OPPONENT_CAMILE 87
#define CONTEST_OPPONENT_MARTIN 88
#define CONTEST_OPPONENT_SERGIO 89
#define CONTEST_OPPONENT_KAILEY 90
#define CONTEST_OPPONENT_PERLA 91
#define CONTEST_OPPONENT_CLARA 92
#define CONTEST_OPPONENT_JAKOB 93
#define CONTEST_OPPONENT_TREY 94
#define CONTEST_OPPONENT_LANE 95
enum {
CONTEST_OPPONENT_JIMMY,
CONTEST_OPPONENT_EDITH,
CONTEST_OPPONENT_EVAN,
CONTEST_OPPONENT_KELSEY,
CONTEST_OPPONENT_MADISON,
CONTEST_OPPONENT_RAYMOND,
CONTEST_OPPONENT_GRANT,
CONTEST_OPPONENT_PAIGE,
CONTEST_OPPONENT_ALEC,
CONTEST_OPPONENT_SYDNEY,
CONTEST_OPPONENT_MORRIS,
CONTEST_OPPONENT_MARIAH,
CONTEST_OPPONENT_RUSSELL,
CONTEST_OPPONENT_MELANIE,
CONTEST_OPPONENT_CHANCE,
CONTEST_OPPONENT_AGATHA,
CONTEST_OPPONENT_BEAU,
CONTEST_OPPONENT_KAY,
CONTEST_OPPONENT_CALE,
CONTEST_OPPONENT_CAITLIN,
CONTEST_OPPONENT_COLBY,
CONTEST_OPPONENT_KYLIE,
CONTEST_OPPONENT_LIAM,
CONTEST_OPPONENT_MILO,
CONTEST_OPPONENT_KARINA,
CONTEST_OPPONENT_BOBBY,
CONTEST_OPPONENT_CLAIRE,
CONTEST_OPPONENT_WILLIE,
CONTEST_OPPONENT_CASSIDY,
CONTEST_OPPONENT_MORGAN,
CONTEST_OPPONENT_SUMMER,
CONTEST_OPPONENT_MILES,
CONTEST_OPPONENT_AUDREY,
CONTEST_OPPONENT_AVERY,
CONTEST_OPPONENT_ARIANA,
CONTEST_OPPONENT_ASHTON,
CONTEST_OPPONENT_SANDRA,
CONTEST_OPPONENT_CARSON,
CONTEST_OPPONENT_KATRINA,
CONTEST_OPPONENT_LUKE,
CONTEST_OPPONENT_RAUL,
CONTEST_OPPONENT_JADA,
CONTEST_OPPONENT_ZEEK,
CONTEST_OPPONENT_DIEGO,
CONTEST_OPPONENT_ALIYAH,
CONTEST_OPPONENT_NATALIA,
CONTEST_OPPONENT_DEVIN,
CONTEST_OPPONENT_TYLOR,
CONTEST_OPPONENT_RONNIE,
CONTEST_OPPONENT_CLAUDIA,
CONTEST_OPPONENT_ELIAS,
CONTEST_OPPONENT_JADE,
CONTEST_OPPONENT_FRANCIS,
CONTEST_OPPONENT_ALISHA,
CONTEST_OPPONENT_SAUL,
CONTEST_OPPONENT_FELICIA,
CONTEST_OPPONENT_EMILIO,
CONTEST_OPPONENT_KARLA,
CONTEST_OPPONENT_DARRYL,
CONTEST_OPPONENT_SELENA,
CONTEST_OPPONENT_NOEL,
CONTEST_OPPONENT_LACEY,
CONTEST_OPPONENT_CORBIN,
CONTEST_OPPONENT_GRACIE,
CONTEST_OPPONENT_COLTIN,
CONTEST_OPPONENT_ELLIE,
CONTEST_OPPONENT_MARCUS,
CONTEST_OPPONENT_KIARA,
CONTEST_OPPONENT_BRYCE,
CONTEST_OPPONENT_JAMIE,
CONTEST_OPPONENT_JORGE,
CONTEST_OPPONENT_DEVON,
CONTEST_OPPONENT_JUSTINA,
CONTEST_OPPONENT_RALPH,
CONTEST_OPPONENT_ROSA,
CONTEST_OPPONENT_KEATON,
CONTEST_OPPONENT_MAYRA,
CONTEST_OPPONENT_LAMAR,
CONTEST_OPPONENT_AUBREY,
CONTEST_OPPONENT_NIGEL,
CONTEST_OPPONENT_CAMILLE,
CONTEST_OPPONENT_DEON,
CONTEST_OPPONENT_JANELLE,
CONTEST_OPPONENT_HEATH,
CONTEST_OPPONENT_SASHA,
CONTEST_OPPONENT_FRANKIE,
CONTEST_OPPONENT_HELEN,
CONTEST_OPPONENT_CAMILE,
CONTEST_OPPONENT_MARTIN,
CONTEST_OPPONENT_SERGIO,
CONTEST_OPPONENT_KAILEY,
CONTEST_OPPONENT_PERLA,
CONTEST_OPPONENT_CLARA,
CONTEST_OPPONENT_JAKOB,
CONTEST_OPPONENT_TREY,
CONTEST_OPPONENT_LANE
};
// All contest opponents have a common set of AI flags (which contains all of the actually
// useful AI scripts, as well as some dummys) and a random combination of 2-3 dummy flags.

View File

@ -122,7 +122,7 @@ static const u8 sFontColorTable[][3] =
static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
{
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 3,
@ -131,7 +131,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
.paletteNum = 3,
.baseBlock = 0x63,
},
{
{ // Party mon 2
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 1,
@ -140,7 +140,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
.paletteNum = 4,
.baseBlock = 0xA9,
},
{
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 4,
@ -149,7 +149,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
.paletteNum = 5,
.baseBlock = 0xDF,
},
{
{ // Party mon 4
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 7,
@ -158,7 +158,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
.paletteNum = 6,
.baseBlock = 0x115,
},
{
{ // Party mon 5
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 10,
@ -167,7 +167,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
.paletteNum = 7,
.baseBlock = 0x14B,
},
{
{ // Party mon 6
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 13,
@ -176,7 +176,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
.paletteNum = 8,
.baseBlock = 0x181,
},
{
[WIN_MSG] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
@ -190,7 +190,7 @@ static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
{
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
@ -199,7 +199,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
.paletteNum = 3,
.baseBlock = 0x63,
},
{
{ // Party mon 2
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 8,
@ -208,7 +208,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
.paletteNum = 4,
.baseBlock = 0xA9,
},
{
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 1,
@ -217,7 +217,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
.paletteNum = 5,
.baseBlock = 0xEF,
},
{
{ // Party mon 4
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 5,
@ -226,7 +226,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
.paletteNum = 6,
.baseBlock = 0x125,
},
{
{ // Party mon 5
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 9,
@ -235,7 +235,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
.paletteNum = 7,
.baseBlock = 0x15B,
},
{
{ // Party mon 6
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 13,
@ -244,7 +244,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
.paletteNum = 8,
.baseBlock = 0x191,
},
{
[WIN_MSG] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
@ -258,7 +258,7 @@ static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
{
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
@ -267,7 +267,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
.paletteNum = 3,
.baseBlock = 0x63,
},
{
{ // Party mon 2
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 8,
@ -276,7 +276,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
.paletteNum = 4,
.baseBlock = 0xA9,
},
{
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 2,
@ -285,7 +285,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
.paletteNum = 5,
.baseBlock = 0xEF,
},
{
{ // Party mon 4
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 5,
@ -294,7 +294,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
.paletteNum = 6,
.baseBlock = 0x125,
},
{
{ // Party mon 5
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 9,
@ -303,7 +303,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
.paletteNum = 7,
.baseBlock = 0x15B,
},
{
{ // Party mon 6
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 12,
@ -312,7 +312,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
.paletteNum = 8,
.baseBlock = 0x191,
},
{
[WIN_MSG] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
@ -326,7 +326,7 @@ static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
{
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 2,
@ -335,7 +335,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
.paletteNum = 3,
.baseBlock = 0x63,
},
{
{ // Party mon 2
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 3,
@ -344,7 +344,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
.paletteNum = 5,
.baseBlock = 0xA9,
},
{
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 6,
@ -353,7 +353,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
.paletteNum = 6,
.baseBlock = 0xDF,
},
{
{ // Party mon 4
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 11,
@ -362,7 +362,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
.paletteNum = 4,
.baseBlock = 0x115,
},
{
{ // Party mon 5
.bg = 2,
.tilemapLeft = 12,
.tilemapTop = 12,
@ -371,7 +371,7 @@ static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
.paletteNum = 7,
.baseBlock = 0x16B,
},
{
{ // Party mon 6
.bg = 2,
.tilemapLeft = 12,
.tilemapTop = 15,

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ static const u8 sText_OnlyPkmnForBattle[] = _("That's your only\nPOKéMON for ba
static const u8 sText_WaitingForYourFriend[] = _("{COLOR DARK_GRAY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GRAY}Waiting for your friend\nto finish…");
static const u8 sText_YourFriendWantsToTrade[] = _("Your friend wants\nto trade POKéMON.");
static const struct OamData sTradeOamData_32x16 =
static const struct OamData sOamData_MenuText =
{
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
@ -167,17 +167,17 @@ static const struct SpriteTemplate sSpriteTemplate_MenuText =
{
.tileTag = GFXTAG_MENU_TEXT,
.paletteTag = PALTAG_MENU_TEXT,
.oam = &sTradeOamData_32x16,
.oam = &sOamData_MenuText,
.anims = sAnims_MenuText,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy,
};
static const u16 sTradeScreenTextPalette[] = INCBIN_U16("graphics/trade/text.gbapal");
static const struct SpritePalette sSpritePalette_TradeScreenText =
static const u16 sMenuText_Pal[] = INCBIN_U16("graphics/trade/text.gbapal");
static const struct SpritePalette sSpritePalette_MenuText =
{
.data = sTradeScreenTextPalette,
.data = sMenuText_Pal,
.tag = PALTAG_MENU_TEXT
};
@ -193,7 +193,7 @@ static const struct SpritePalette sSpritePalette_TradeScreenText =
// 1st array is the current positions
// 2nd array is directions of input
// 3rd array is the next positions to go to (unoccupied spaces are skipped over)
static const u8 sTradeNextSelectedMonTable[(PARTY_SIZE * 2) + 1][4][PARTY_SIZE] =
static const u8 sCursorMoveDestinations[(PARTY_SIZE * 2) + 1][4][PARTY_SIZE] =
{
{
{4, 2, 12, 12, 0, 0}, // UP
@ -275,86 +275,67 @@ static const u8 sTradeNextSelectedMonTable[(PARTY_SIZE * 2) + 1][4][PARTY_SIZE]
}
};
#define COL0_X 1
#define COL1_X 8
#define COL2_X 16
#define COL3_X 23
#define ROW0_Y 5
#define ROW1_Y 10
#define ROW2_Y 15
#define ROW3_Y 18
static const u8 sTradeMonSpriteCoords[(PARTY_SIZE * 2) + 1][2] =
{
// Your party
{1, 5 },
{8, 5 },
{1, 10},
{8, 10},
{1, 15},
{8, 15},
// Friend's party
{16, 5 },
{23, 5 },
{16, 10},
{23, 10},
{16, 15},
{23, 15},
{23, 18} // CANCEL
// Player's party
{COL0_X, ROW0_Y},
{COL1_X, ROW0_Y},
{COL0_X, ROW1_Y},
{COL1_X, ROW1_Y},
{COL0_X, ROW2_Y},
{COL1_X, ROW2_Y},
// Partners's party
{COL2_X, ROW0_Y},
{COL3_X, ROW0_Y},
{COL2_X, ROW1_Y},
{COL3_X, ROW1_Y},
{COL2_X, ROW2_Y},
{COL3_X, ROW2_Y},
// Cancel
{COL3_X, ROW3_Y}
};
static const u8 sTradeMonLevelCoords[][2][2] =
{
// Your party
{
{5, 4},
{12, 4},
},
{
{5, 9},
{12, 9},
},
{
{5, 14},
static const u8 sTradeMonLevelCoords[PARTY_SIZE * 2][2] = {
[TRADE_PLAYER] =
{ 5, 4},
{12, 4},
{ 5, 9},
{12, 9},
{ 5, 14},
{12, 14},
},
// Friend's party
{
{20, 4},
{27, 4},
},
{
{20, 9},
{27, 9},
},
{
[TRADE_PARTNER * PARTY_SIZE] =
{20, 4},
{27, 4},
{20, 9},
{27, 9},
{20, 14},
{27, 14},
},
};
static const u8 sTradeMonBoxCoords[][2][2] =
{
// Your party
{
{1, 3},
{8, 3},
},
{
{1, 8},
{8, 8},
},
{
{1, 13},
{8, 13},
},
// Friend's party
{
{16, 3},
{23, 3},
},
{
{16, 8},
{23, 8},
},
{
static const u8 sTradeMonBoxCoords[PARTY_SIZE * 2][2] = {
[TRADE_PLAYER] =
{ 1, 3},
{ 8, 3},
{ 1, 8},
{ 8, 8},
{ 1, 13},
{ 8, 13},
[TRADE_PARTNER * PARTY_SIZE] =
{16, 3},
{23, 3},
{16, 8},
{23, 8},
{16, 13},
{23, 13},
},
};
static const u8 sUnusedCoords[][2] =
@ -379,14 +360,14 @@ static const u8 sUnusedCoords[][2] =
{23, 12}
};
static const u8 *const sTradeActionTexts[] =
static const u8 *const sActionTexts[] =
{
[TRADE_TEXT_CANCEL] = sText_Cancel,
[TRADE_TEXT_CHOOSE_MON] = sText_ChooseAPkmn,
[TRADE_TEXT_SUMMARY] = sText_Summary,
[TRADE_TEXT_TRADE] = sText_Trade,
[TRADE_TEXT_CANCEL_TRADE] = sText_CancelTrade,
[TRADE_TEXT_JP_QUIT] = sJPText_PressBButtonToQuit
[TEXT_CANCEL] = sText_Cancel,
[TEXT_CHOOSE_MON] = sText_ChooseAPkmn,
[TEXT_SUMMARY] = sText_Summary,
[TEXT_TRADE] = sText_Trade,
[TEXT_CANCEL_TRADE] = sText_CancelTrade,
[TEXT_JP_QUIT] = sJPText_PressBButtonToQuit
};
static const struct MenuAction sSelectTradeMonActions[] =
@ -395,17 +376,17 @@ static const struct MenuAction sSelectTradeMonActions[] =
{sText_Trade2, Task_DrawSelectionTrade}
};
static const u8 *const sTradeMessages[] =
static const u8 *const sMessages[] =
{
[TRADE_MSG_STANDBY] = sText_CommunicationStandby,
[TRADE_MSG_CANCELED] = sText_TheTradeHasBeenCanceled,
[TRADE_MSG_ONLY_MON1] = sText_OnlyPkmnForBattle,
[TRADE_MSG_ONLY_MON2] = gText_OnlyPkmnForBattle, //identical text to above
[TRADE_MSG_WAITING_FOR_FRIEND] = sText_WaitingForYourFriend,
[TRADE_MSG_FRIEND_WANTS_TO_TRADE] = sText_YourFriendWantsToTrade,
[TRADE_MSG_MON_CANT_BE_TRADED] = gText_PkmnCantBeTradedNow,
[TRADE_MSG_EGG_CANT_BE_TRADED] = gText_EggCantBeTradedNow,
[TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED] = gText_OtherTrainersPkmnCantBeTraded
[MSG_STANDBY] = sText_CommunicationStandby,
[MSG_CANCELED] = sText_TheTradeHasBeenCanceled,
[MSG_ONLY_MON1] = sText_OnlyPkmnForBattle,
[MSG_ONLY_MON2] = gText_OnlyPkmnForBattle, //identical text to above
[MSG_WAITING_FOR_FRIEND] = sText_WaitingForYourFriend,
[MSG_FRIEND_WANTS_TO_TRADE] = sText_YourFriendWantsToTrade,
[MSG_MON_CANT_BE_TRADED] = gText_PkmnCantBeTradedNow,
[MSG_EGG_CANT_BE_TRADED] = gText_EggCantBeTradedNow,
[MSG_FRIENDS_MON_CANT_BE_TRADED] = gText_OtherTrainersPkmnCantBeTraded
};
static const u8 sTradeTextColors[] =
@ -415,7 +396,7 @@ static const u8 sTradeTextColors[] =
TEXT_COLOR_DARK_GRAY //shadow color
};
static const struct BgTemplate sTradeMenuBgTemplates[] =
static const struct BgTemplate sBgTemplates[] =
{
{
.bg = 0,
@ -455,7 +436,7 @@ static const struct BgTemplate sTradeMenuBgTemplates[] =
},
};
static const struct WindowTemplate sTradeMenuWindowTemplates[] =
static const struct WindowTemplate sWindowTemplates[] =
{
{
.bg = 0,
@ -633,8 +614,8 @@ static const struct WindowTemplate sTradeYesNoWindowTemplate =
.baseBlock = 582
};
static const u8 sJPText_Shedinja[] = _("ヌケニン");
static const u8 sTradeMenuPartyMonBoxDimensions[3][2] =
static const u8 sText_ShedinjaJP[] = _("ヌケニン");
static const u8 sSelectedMonLevelGenderCoords[3][2] =
{
[TRADE_PLAYER] = {4, 3},
[TRADE_PARTNER] = {19, 3}
@ -643,8 +624,8 @@ static const u8 sTradeMenuPartyMonBoxDimensions[3][2] =
static const u16 sPokeball_Pal[] = INCBIN_U16("graphics/trade/pokeball.gbapal");
static const u8 sPokeball_Gfx[] = INCBIN_U8("graphics/trade/pokeball.4bpp");
static const u8 sPokeballSymbol_Gfx[] = INCBIN_U8("graphics/trade/pokeball_symbol.8bpp"); // unused
static const u16 sCrossingHighlightCable_Tilemap[] = INCBIN_U16("graphics/trade/crossing_highlight_cable.bin");
static const u16 sTradeTilemap_PokeBallSymbol[] = INCBIN_U16("graphics/trade/pokeball_symbol_map.bin"); // unused?
static const u16 sCableCloseup_Map[] = INCBIN_U16("graphics/trade/crossing_highlight_cable.bin");
static const u16 sPokeballSymbol_Map[] = INCBIN_U16("graphics/trade/pokeball_symbol_map.bin"); // unused?
static const u16 sUnusedPal1[] = INCBIN_U16("graphics/trade/unused1.gbapal");
static const u16 sGba_Pal[] = INCBIN_U16("graphics/trade/gba.gbapal");
static const u16 sUnusedPal2[] = INCBIN_U16("graphics/trade/unused2.gbapal");
@ -657,11 +638,11 @@ static const u8 sGbaScreen_Gfx[] = INCBIN_U8("graphics/trade/gba_screen.4bpp");
const u16 gTradePlatform_Tilemap[] = INCBIN_U16("graphics/trade/platform.bin");
static const u8 sGbaAffine_Gfx[] = INCBIN_U8("graphics/trade/gba_affine.8bpp"); // Only the gfx for when the GBA is zooming in/out
static const u8 sEmptyGfx[64] = {};
static const u8 sGbaCable_AffineTilemap[] = INCBIN_U8("graphics/trade/gba_affine_map_cable.bin");
static const u8 sGbaWireless_AffineTilemap[] = INCBIN_U8("graphics/trade/gba_affine_map_wireless.bin");
static const u16 sGbaWireless_Tilemap[] = INCBIN_U16("graphics/trade/gba_map_wireless.bin");
static const u16 sGbaCable_Tilemap[] = INCBIN_U16("graphics/trade/gba_map_cable.bin");
static const u32 sCrossingHighlightWireless_Tilemap[] = INCBIN_U32("graphics/trade/crossing_highlight_wireless.bin.lz");
static const u8 sGbaAffineMapCable[] = INCBIN_U8("graphics/trade/gba_affine_map_cable.bin");
static const u8 sGbaAffineMapWireless[] = INCBIN_U8("graphics/trade/gba_affine_map_wireless.bin");
static const u16 sGbaMapWireless[] = INCBIN_U16("graphics/trade/gba_map_wireless.bin");
static const u16 sGbaMapCable[] = INCBIN_U16("graphics/trade/gba_map_cable.bin");
static const u32 sWirelessCloseup_Map[] = INCBIN_U32("graphics/trade/crossing_highlight_wireless.bin.lz");
static const u16 sWirelessSignalSend_Pal[] = INCBIN_U16("graphics/trade/wireless_signal_send.gbapal");
static const u16 sWirelessSignalRecv_Pal[] = INCBIN_U16("graphics/trade/wireless_signal_receive.gbapal");
static const u16 sWirelessSignalNone_Pal[] = INCBIN_U16("graphics/trade/wireless_signal_none.gbapal");
@ -749,7 +730,7 @@ static const union AffineAnimCmd *const sAffineAnims_Pokeball[] =
static const struct SpriteSheet sPokeBallSpriteSheet =
{
.data = sPokeball_Gfx,
.size = 0x600,
.size = sizeof(sPokeball_Gfx),
.tag = GFXTAG_POKEBALL
};
@ -805,7 +786,7 @@ static const union AffineAnimCmd *const sAffineAnims_LinkMonGlow[] =
static const struct SpriteSheet sSpriteSheet_LinkMonGlow =
{
.data = sLinkMonGlow_Gfx,
.size = 0x200,
.size = sizeof(sLinkMonGlow_Gfx),
.tag = GFXTAG_LINK_MON_GLOW
};
@ -962,7 +943,7 @@ static const union AnimCmd *const sAnims_GbaScreen_Short[] =
static const struct SpriteSheet sSpriteSheet_GbaScreen =
{
.data = sGbaScreen_Gfx,
.size = 0x1000,
.size = sizeof(sGbaScreen_Gfx),
.tag = GFXTAG_GBA_SCREEN
};
@ -1185,7 +1166,7 @@ static const s8 sTradeBallVerticalVelocityTable[] =
0, 0, 0, 1, 0, 1, 1, 2, 3
};
static const u8 sWirelessSignalTiming[][2] =
static const u8 sWirelessSignalAnimParams[][2] =
{
{ 0, 1},
{ 1, 1},

View File

@ -13,18 +13,48 @@ const struct MonCoords gTrainerBackPicCoords[] =
// this table goes functionally unused, since none of these pics are compressed
// and the place they would get extracted to gets overwritten later anyway
// the casts are so they'll play nice with the strict struct definition
#define TRAINER_BACK_SPRITE(trainerPic, sprite, size) [TRAINER_BACK_PIC_##trainerPic] = {(const u32 *)sprite, size, TRAINER_BACK_PIC_##trainerPic}
const struct CompressedSpriteSheet gTrainerBackPicTable[] =
{
TRAINER_BACK_SPRITE(BRENDAN, gTrainerBackPic_Brendan, 0x2000),
TRAINER_BACK_SPRITE(MAY, gTrainerBackPic_May, 0x2000),
TRAINER_BACK_SPRITE(RED, gTrainerBackPic_Red, 0x2800),
TRAINER_BACK_SPRITE(LEAF, gTrainerBackPic_Leaf, 0x2800),
TRAINER_BACK_SPRITE(RUBY_SAPPHIRE_BRENDAN, gTrainerBackPic_RubySapphireBrendan, 0x2000),
TRAINER_BACK_SPRITE(RUBY_SAPPHIRE_MAY, gTrainerBackPic_RubySapphireMay, 0x2000),
TRAINER_BACK_SPRITE(WALLY, gTrainerBackPic_Wally, 0x2000),
TRAINER_BACK_SPRITE(STEVEN, gTrainerBackPic_Steven, 0x2000),
[TRAINER_BACK_PIC_BRENDAN] = {
.data = (const u32 *)gTrainerBackPic_Brendan,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Brendan),
.tag = TRAINER_BACK_PIC_BRENDAN,
},
[TRAINER_BACK_PIC_MAY] = {
.data = (const u32 *)gTrainerBackPic_May,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_May),
.tag = TRAINER_BACK_PIC_MAY,
},
[TRAINER_BACK_PIC_RED] = {
.data = (const u32 *)gTrainerBackPic_Red,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Red),
.tag = TRAINER_BACK_PIC_RED,
},
[TRAINER_BACK_PIC_LEAF] = {
.data = (const u32 *)gTrainerBackPic_Leaf,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Leaf),
.tag = TRAINER_BACK_PIC_LEAF,
},
[TRAINER_BACK_PIC_RUBY_SAPPHIRE_BRENDAN] = {
.data = (const u32 *)gTrainerBackPic_RubySapphireBrendan,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_RubySapphireBrendan),
.tag = TRAINER_BACK_PIC_RUBY_SAPPHIRE_BRENDAN,
},
[TRAINER_BACK_PIC_RUBY_SAPPHIRE_MAY] = {
.data = (const u32 *)gTrainerBackPic_RubySapphireMay,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_RubySapphireMay),
.tag = TRAINER_BACK_PIC_RUBY_SAPPHIRE_MAY,
},
[TRAINER_BACK_PIC_WALLY] = {
.data = (const u32 *)gTrainerBackPic_Wally,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Wally),
.tag = TRAINER_BACK_PIC_WALLY,
},
[TRAINER_BACK_PIC_STEVEN] = {
.data = (const u32 *)gTrainerBackPic_Steven,
.size = TRAINER_PIC_SIZE * ARRAY_COUNT(gTrainerBackPicTable_Steven),
.tag = TRAINER_BACK_PIC_STEVEN,
},
};
#define TRAINER_BACK_PAL(trainerPic, pal) [TRAINER_BACK_PIC_##trainerPic] = {pal, TRAINER_BACK_PIC_##trainerPic}

View File

@ -99,99 +99,99 @@ const struct MonCoords gTrainerFrontPicCoords[] =
const struct CompressedSpriteSheet gTrainerFrontPicTable[] =
{
TRAINER_SPRITE(HIKER, gTrainerFrontPic_Hiker, 0x800),
TRAINER_SPRITE(AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, 0x800),
TRAINER_SPRITE(POKEMON_BREEDER_F, gTrainerFrontPic_PokemonBreederF, 0x800),
TRAINER_SPRITE(COOLTRAINER_M, gTrainerFrontPic_CoolTrainerM, 0x800),
TRAINER_SPRITE(BIRD_KEEPER, gTrainerFrontPic_BirdKeeper, 0x800),
TRAINER_SPRITE(COLLECTOR, gTrainerFrontPic_Collector, 0x800),
TRAINER_SPRITE(AQUA_GRUNT_F, gTrainerFrontPic_AquaGruntF, 0x800),
TRAINER_SPRITE(SWIMMER_M, gTrainerFrontPic_SwimmerM, 0x800),
TRAINER_SPRITE(MAGMA_GRUNT_M, gTrainerFrontPic_MagmaGruntM, 0x800),
TRAINER_SPRITE(EXPERT_M, gTrainerFrontPic_ExpertM, 0x800),
TRAINER_SPRITE(AQUA_ADMIN_M, gTrainerFrontPic_AquaAdminM, 0x800),
TRAINER_SPRITE(BLACK_BELT, gTrainerFrontPic_BlackBelt, 0x800),
TRAINER_SPRITE(AQUA_ADMIN_F, gTrainerFrontPic_AquaAdminF, 0x800),
TRAINER_SPRITE(AQUA_LEADER_ARCHIE, gTrainerFrontPic_AquaLeaderArchie, 0x800),
TRAINER_SPRITE(HEX_MANIAC, gTrainerFrontPic_HexManiac, 0x800),
TRAINER_SPRITE(AROMA_LADY, gTrainerFrontPic_AromaLady, 0x800),
TRAINER_SPRITE(RUIN_MANIAC, gTrainerFrontPic_RuinManiac, 0x800),
TRAINER_SPRITE(INTERVIEWER, gTrainerFrontPic_Interviewer, 0x800),
TRAINER_SPRITE(TUBER_F, gTrainerFrontPic_TuberF, 0x800),
TRAINER_SPRITE(TUBER_M, gTrainerFrontPic_TuberM, 0x800),
TRAINER_SPRITE(COOLTRAINER_F, gTrainerFrontPic_CoolTrainerF, 0x800),
TRAINER_SPRITE(LADY, gTrainerFrontPic_Lady, 0x800),
TRAINER_SPRITE(BEAUTY, gTrainerFrontPic_Beauty, 0x800),
TRAINER_SPRITE(RICH_BOY, gTrainerFrontPic_RichBoy, 0x800),
TRAINER_SPRITE(EXPERT_F, gTrainerFrontPic_ExpertF, 0x800),
TRAINER_SPRITE(POKEMANIAC, gTrainerFrontPic_Pokemaniac, 0x800),
TRAINER_SPRITE(MAGMA_GRUNT_F, gTrainerFrontPic_MagmaGruntF, 0x800),
TRAINER_SPRITE(GUITARIST, gTrainerFrontPic_Guitarist, 0x800),
TRAINER_SPRITE(KINDLER, gTrainerFrontPic_Kindler, 0x800),
TRAINER_SPRITE(CAMPER, gTrainerFrontPic_Camper, 0x800),
TRAINER_SPRITE(PICNICKER, gTrainerFrontPic_Picnicker, 0x800),
TRAINER_SPRITE(BUG_MANIAC, gTrainerFrontPic_BugManiac, 0x800),
TRAINER_SPRITE(POKEMON_BREEDER_M, gTrainerFrontPic_PokemonBreederM, 0x800),
TRAINER_SPRITE(PSYCHIC_M, gTrainerFrontPic_PsychicM, 0x800),
TRAINER_SPRITE(PSYCHIC_F, gTrainerFrontPic_PsychicF, 0x800),
TRAINER_SPRITE(GENTLEMAN, gTrainerFrontPic_Gentleman, 0x800),
TRAINER_SPRITE(ELITE_FOUR_SIDNEY, gTrainerFrontPic_EliteFourSidney, 0x800),
TRAINER_SPRITE(ELITE_FOUR_PHOEBE, gTrainerFrontPic_EliteFourPhoebe, 0x800),
TRAINER_SPRITE(ELITE_FOUR_GLACIA, gTrainerFrontPic_EliteFourGlacia, 0x800),
TRAINER_SPRITE(ELITE_FOUR_DRAKE, gTrainerFrontPic_EliteFourDrake, 0x800),
TRAINER_SPRITE(LEADER_ROXANNE, gTrainerFrontPic_LeaderRoxanne, 0x800),
TRAINER_SPRITE(LEADER_BRAWLY, gTrainerFrontPic_LeaderBrawly, 0x800),
TRAINER_SPRITE(LEADER_WATTSON, gTrainerFrontPic_LeaderWattson, 0x800),
TRAINER_SPRITE(LEADER_FLANNERY, gTrainerFrontPic_LeaderFlannery, 0x800),
TRAINER_SPRITE(LEADER_NORMAN, gTrainerFrontPic_LeaderNorman, 0x800),
TRAINER_SPRITE(LEADER_WINONA, gTrainerFrontPic_LeaderWinona, 0x800),
TRAINER_SPRITE(LEADER_TATE_AND_LIZA, gTrainerFrontPic_LeaderTateAndLiza, 0x800),
TRAINER_SPRITE(LEADER_JUAN, gTrainerFrontPic_LeaderJuan, 0x800),
TRAINER_SPRITE(SCHOOL_KID_M, gTrainerFrontPic_SchoolKidM, 0x800),
TRAINER_SPRITE(SCHOOL_KID_F, gTrainerFrontPic_SchoolKidF, 0x800),
TRAINER_SPRITE(SR_AND_JR, gTrainerFrontPic_SrAndJr, 0x1000),
TRAINER_SPRITE(POKEFAN_M, gTrainerFrontPic_PokefanM, 0x1000),
TRAINER_SPRITE(POKEFAN_F, gTrainerFrontPic_PokefanF, 0x800),
TRAINER_SPRITE(YOUNGSTER, gTrainerFrontPic_Youngster, 0x800),
TRAINER_SPRITE(CHAMPION_WALLACE, gTrainerFrontPic_ChampionWallace, 0x1000),
TRAINER_SPRITE(FISHERMAN, gTrainerFrontPic_Fisherman, 0x800),
TRAINER_SPRITE(CYCLING_TRIATHLETE_M, gTrainerFrontPic_CyclingTriathleteM, 0x1000),
TRAINER_SPRITE(CYCLING_TRIATHLETE_F, gTrainerFrontPic_CyclingTriathleteF, 0x800),
TRAINER_SPRITE(RUNNING_TRIATHLETE_M, gTrainerFrontPic_RunningTriathleteM, 0x800),
TRAINER_SPRITE(RUNNING_TRIATHLETE_F, gTrainerFrontPic_RunningTriathleteF, 0x800),
TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, gTrainerFrontPic_SwimmingTriathleteM, 0x800),
TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, gTrainerFrontPic_SwimmingTriathleteF, 0x800),
TRAINER_SPRITE(DRAGON_TAMER, gTrainerFrontPic_DragonTamer, 0x800),
TRAINER_SPRITE(NINJA_BOY, gTrainerFrontPic_NinjaBoy, 0x800),
TRAINER_SPRITE(BATTLE_GIRL, gTrainerFrontPic_BattleGirl, 0x1000),
TRAINER_SPRITE(PARASOL_LADY, gTrainerFrontPic_ParasolLady, 0x800),
TRAINER_SPRITE(SWIMMER_F, gTrainerFrontPic_SwimmerF, 0x800),
TRAINER_SPRITE(TWINS, gTrainerFrontPic_Twins, 0x800),
TRAINER_SPRITE(SAILOR, gTrainerFrontPic_Sailor, 0x800),
TRAINER_SPRITE(MAGMA_ADMIN, gTrainerFrontPic_MagmaAdmin, 0x800),
TRAINER_SPRITE(WALLY, gTrainerFrontPic_Wally, 0x800),
TRAINER_SPRITE(BRENDAN, gTrainerFrontPic_Brendan, 0x800),
TRAINER_SPRITE(MAY, gTrainerFrontPic_May, 0x800),
TRAINER_SPRITE(BUG_CATCHER, gTrainerFrontPic_BugCatcher, 0x800),
TRAINER_SPRITE(POKEMON_RANGER_M, gTrainerFrontPic_PokemonRangerM, 0x800),
TRAINER_SPRITE(POKEMON_RANGER_F, gTrainerFrontPic_PokemonRangerF, 0x800),
TRAINER_SPRITE(MAGMA_LEADER_MAXIE, gTrainerFrontPic_MagmaLeaderMaxie, 0x800),
TRAINER_SPRITE(LASS, gTrainerFrontPic_Lass, 0x800),
TRAINER_SPRITE(YOUNG_COUPLE, gTrainerFrontPic_YoungCouple, 0x800),
TRAINER_SPRITE(OLD_COUPLE, gTrainerFrontPic_OldCouple, 0x800),
TRAINER_SPRITE(SIS_AND_BRO, gTrainerFrontPic_SisAndBro, 0x800),
TRAINER_SPRITE(STEVEN, gTrainerFrontPic_Steven, 0x800),
TRAINER_SPRITE(SALON_MAIDEN_ANABEL, gTrainerFrontPic_SalonMaidenAnabel, 0x800),
TRAINER_SPRITE(DOME_ACE_TUCKER, gTrainerFrontPic_DomeAceTucker, 0x800),
TRAINER_SPRITE(PALACE_MAVEN_SPENSER, gTrainerFrontPic_PalaceMavenSpenser, 0x800),
TRAINER_SPRITE(ARENA_TYCOON_GRETA, gTrainerFrontPic_ArenaTycoonGreta, 0x1000),
TRAINER_SPRITE(FACTORY_HEAD_NOLAND, gTrainerFrontPic_FactoryHeadNoland, 0x800),
TRAINER_SPRITE(PIKE_QUEEN_LUCY, gTrainerFrontPic_PikeQueenLucy, 0x800),
TRAINER_SPRITE(PYRAMID_KING_BRANDON, gTrainerFrontPic_PyramidKingBrandon, 0x800),
TRAINER_SPRITE(RED, gTrainerFrontPic_Red, 0x800),
TRAINER_SPRITE(LEAF, gTrainerFrontPic_Leaf, 0x800),
TRAINER_SPRITE(RS_BRENDAN, gTrainerFrontPic_RubySapphireBrendan, 0x800),
TRAINER_SPRITE(RS_MAY, gTrainerFrontPic_RubySapphireMay, 0x800),
TRAINER_SPRITE(HIKER, gTrainerFrontPic_Hiker, TRAINER_PIC_SIZE),
TRAINER_SPRITE(AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(POKEMON_BREEDER_F, gTrainerFrontPic_PokemonBreederF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(COOLTRAINER_M, gTrainerFrontPic_CoolTrainerM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BIRD_KEEPER, gTrainerFrontPic_BirdKeeper, TRAINER_PIC_SIZE),
TRAINER_SPRITE(COLLECTOR, gTrainerFrontPic_Collector, TRAINER_PIC_SIZE),
TRAINER_SPRITE(AQUA_GRUNT_F, gTrainerFrontPic_AquaGruntF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SWIMMER_M, gTrainerFrontPic_SwimmerM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(MAGMA_GRUNT_M, gTrainerFrontPic_MagmaGruntM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(EXPERT_M, gTrainerFrontPic_ExpertM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(AQUA_ADMIN_M, gTrainerFrontPic_AquaAdminM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BLACK_BELT, gTrainerFrontPic_BlackBelt, TRAINER_PIC_SIZE),
TRAINER_SPRITE(AQUA_ADMIN_F, gTrainerFrontPic_AquaAdminF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(AQUA_LEADER_ARCHIE, gTrainerFrontPic_AquaLeaderArchie, TRAINER_PIC_SIZE),
TRAINER_SPRITE(HEX_MANIAC, gTrainerFrontPic_HexManiac, TRAINER_PIC_SIZE),
TRAINER_SPRITE(AROMA_LADY, gTrainerFrontPic_AromaLady, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RUIN_MANIAC, gTrainerFrontPic_RuinManiac, TRAINER_PIC_SIZE),
TRAINER_SPRITE(INTERVIEWER, gTrainerFrontPic_Interviewer, TRAINER_PIC_SIZE),
TRAINER_SPRITE(TUBER_F, gTrainerFrontPic_TuberF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(TUBER_M, gTrainerFrontPic_TuberM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(COOLTRAINER_F, gTrainerFrontPic_CoolTrainerF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LADY, gTrainerFrontPic_Lady, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BEAUTY, gTrainerFrontPic_Beauty, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RICH_BOY, gTrainerFrontPic_RichBoy, TRAINER_PIC_SIZE),
TRAINER_SPRITE(EXPERT_F, gTrainerFrontPic_ExpertF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(POKEMANIAC, gTrainerFrontPic_Pokemaniac, TRAINER_PIC_SIZE),
TRAINER_SPRITE(MAGMA_GRUNT_F, gTrainerFrontPic_MagmaGruntF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(GUITARIST, gTrainerFrontPic_Guitarist, TRAINER_PIC_SIZE),
TRAINER_SPRITE(KINDLER, gTrainerFrontPic_Kindler, TRAINER_PIC_SIZE),
TRAINER_SPRITE(CAMPER, gTrainerFrontPic_Camper, TRAINER_PIC_SIZE),
TRAINER_SPRITE(PICNICKER, gTrainerFrontPic_Picnicker, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BUG_MANIAC, gTrainerFrontPic_BugManiac, TRAINER_PIC_SIZE),
TRAINER_SPRITE(POKEMON_BREEDER_M, gTrainerFrontPic_PokemonBreederM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(PSYCHIC_M, gTrainerFrontPic_PsychicM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(PSYCHIC_F, gTrainerFrontPic_PsychicF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(GENTLEMAN, gTrainerFrontPic_Gentleman, TRAINER_PIC_SIZE),
TRAINER_SPRITE(ELITE_FOUR_SIDNEY, gTrainerFrontPic_EliteFourSidney, TRAINER_PIC_SIZE),
TRAINER_SPRITE(ELITE_FOUR_PHOEBE, gTrainerFrontPic_EliteFourPhoebe, TRAINER_PIC_SIZE),
TRAINER_SPRITE(ELITE_FOUR_GLACIA, gTrainerFrontPic_EliteFourGlacia, TRAINER_PIC_SIZE),
TRAINER_SPRITE(ELITE_FOUR_DRAKE, gTrainerFrontPic_EliteFourDrake, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_ROXANNE, gTrainerFrontPic_LeaderRoxanne, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_BRAWLY, gTrainerFrontPic_LeaderBrawly, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_WATTSON, gTrainerFrontPic_LeaderWattson, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_FLANNERY, gTrainerFrontPic_LeaderFlannery, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_NORMAN, gTrainerFrontPic_LeaderNorman, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_WINONA, gTrainerFrontPic_LeaderWinona, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_TATE_AND_LIZA, gTrainerFrontPic_LeaderTateAndLiza, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEADER_JUAN, gTrainerFrontPic_LeaderJuan, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SCHOOL_KID_M, gTrainerFrontPic_SchoolKidM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SCHOOL_KID_F, gTrainerFrontPic_SchoolKidF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SR_AND_JR, gTrainerFrontPic_SrAndJr, TRAINER_PIC_SIZE * 2),
TRAINER_SPRITE(POKEFAN_M, gTrainerFrontPic_PokefanM, TRAINER_PIC_SIZE * 2),
TRAINER_SPRITE(POKEFAN_F, gTrainerFrontPic_PokefanF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(YOUNGSTER, gTrainerFrontPic_Youngster, TRAINER_PIC_SIZE),
TRAINER_SPRITE(CHAMPION_WALLACE, gTrainerFrontPic_ChampionWallace, TRAINER_PIC_SIZE * 2),
TRAINER_SPRITE(FISHERMAN, gTrainerFrontPic_Fisherman, TRAINER_PIC_SIZE),
TRAINER_SPRITE(CYCLING_TRIATHLETE_M, gTrainerFrontPic_CyclingTriathleteM, TRAINER_PIC_SIZE * 2),
TRAINER_SPRITE(CYCLING_TRIATHLETE_F, gTrainerFrontPic_CyclingTriathleteF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RUNNING_TRIATHLETE_M, gTrainerFrontPic_RunningTriathleteM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RUNNING_TRIATHLETE_F, gTrainerFrontPic_RunningTriathleteF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SWIMMING_TRIATHLETE_M, gTrainerFrontPic_SwimmingTriathleteM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SWIMMING_TRIATHLETE_F, gTrainerFrontPic_SwimmingTriathleteF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(DRAGON_TAMER, gTrainerFrontPic_DragonTamer, TRAINER_PIC_SIZE),
TRAINER_SPRITE(NINJA_BOY, gTrainerFrontPic_NinjaBoy, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BATTLE_GIRL, gTrainerFrontPic_BattleGirl, TRAINER_PIC_SIZE * 2),
TRAINER_SPRITE(PARASOL_LADY, gTrainerFrontPic_ParasolLady, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SWIMMER_F, gTrainerFrontPic_SwimmerF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(TWINS, gTrainerFrontPic_Twins, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SAILOR, gTrainerFrontPic_Sailor, TRAINER_PIC_SIZE),
TRAINER_SPRITE(MAGMA_ADMIN, gTrainerFrontPic_MagmaAdmin, TRAINER_PIC_SIZE),
TRAINER_SPRITE(WALLY, gTrainerFrontPic_Wally, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BRENDAN, gTrainerFrontPic_Brendan, TRAINER_PIC_SIZE),
TRAINER_SPRITE(MAY, gTrainerFrontPic_May, TRAINER_PIC_SIZE),
TRAINER_SPRITE(BUG_CATCHER, gTrainerFrontPic_BugCatcher, TRAINER_PIC_SIZE),
TRAINER_SPRITE(POKEMON_RANGER_M, gTrainerFrontPic_PokemonRangerM, TRAINER_PIC_SIZE),
TRAINER_SPRITE(POKEMON_RANGER_F, gTrainerFrontPic_PokemonRangerF, TRAINER_PIC_SIZE),
TRAINER_SPRITE(MAGMA_LEADER_MAXIE, gTrainerFrontPic_MagmaLeaderMaxie, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LASS, gTrainerFrontPic_Lass, TRAINER_PIC_SIZE),
TRAINER_SPRITE(YOUNG_COUPLE, gTrainerFrontPic_YoungCouple, TRAINER_PIC_SIZE),
TRAINER_SPRITE(OLD_COUPLE, gTrainerFrontPic_OldCouple, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SIS_AND_BRO, gTrainerFrontPic_SisAndBro, TRAINER_PIC_SIZE),
TRAINER_SPRITE(STEVEN, gTrainerFrontPic_Steven, TRAINER_PIC_SIZE),
TRAINER_SPRITE(SALON_MAIDEN_ANABEL, gTrainerFrontPic_SalonMaidenAnabel, TRAINER_PIC_SIZE),
TRAINER_SPRITE(DOME_ACE_TUCKER, gTrainerFrontPic_DomeAceTucker, TRAINER_PIC_SIZE),
TRAINER_SPRITE(PALACE_MAVEN_SPENSER, gTrainerFrontPic_PalaceMavenSpenser, TRAINER_PIC_SIZE),
TRAINER_SPRITE(ARENA_TYCOON_GRETA, gTrainerFrontPic_ArenaTycoonGreta, TRAINER_PIC_SIZE * 2),
TRAINER_SPRITE(FACTORY_HEAD_NOLAND, gTrainerFrontPic_FactoryHeadNoland, TRAINER_PIC_SIZE),
TRAINER_SPRITE(PIKE_QUEEN_LUCY, gTrainerFrontPic_PikeQueenLucy, TRAINER_PIC_SIZE),
TRAINER_SPRITE(PYRAMID_KING_BRANDON, gTrainerFrontPic_PyramidKingBrandon, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RED, gTrainerFrontPic_Red, TRAINER_PIC_SIZE),
TRAINER_SPRITE(LEAF, gTrainerFrontPic_Leaf, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RS_BRENDAN, gTrainerFrontPic_RubySapphireBrendan, TRAINER_PIC_SIZE),
TRAINER_SPRITE(RS_MAY, gTrainerFrontPic_RubySapphireMay, TRAINER_PIC_SIZE),
};
#define TRAINER_PAL(trainerPic, pal) [TRAINER_PIC_##trainerPic] = {pal, TRAINER_PIC_##trainerPic}

View File

@ -2906,7 +2906,7 @@ void IsDodrioInParty(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_DODRIO)
{
gSpecialVar_Result = TRUE;
return;

View File

@ -226,18 +226,23 @@ static void DoQuizQuestionEasyChatScreen(void);
static void DoQuizSetAnswerEasyChatScreen(void);
static void DoQuizSetQuestionEasyChatScreen(void);
#define PALTAG_TRIANGLE_CURSOR 0
#define PALTAG_RECTANGLE_CURSOR 1
#define PALTAG_MISC_UI 2
#define PALTAG_RS_INTERVIEW_FRAME 3
enum {
PALTAG_TRIANGLE_CURSOR,
PALTAG_RECTANGLE_CURSOR,
PALTAG_MISC_UI,
PALTAG_RS_INTERVIEW_FRAME,
};
enum {
GFXTAG_TRIANGLE_CURSOR,
GFXTAG_RECTANGLE_CURSOR,
GFXTAG_SCROLL_INDICATOR,
GFXTAG_START_SELECT_BUTTONS,
GFXTAG_MODE_WINDOW,
GFXTAG_RS_INTERVIEW_FRAME,
GFXTAG_BUTTON_WINDOW,
};
#define GFXTAG_TRIANGLE_CURSOR 0
#define GFXTAG_RECTANGLE_CURSOR 1
#define GFXTAG_SCROLL_INDICATOR 2
#define GFXTAG_START_SELECT_BUTTONS 3
#define GFXTAG_MODE_WINDOW 4
#define GFXTAG_RS_INTERVIEW_FRAME 5
#define GFXTAG_BUTTON_WINDOW 6
// State values for sEasyChatScreen->inputState
// Control which input handler to use in HandleEasyChatInput
@ -376,6 +381,13 @@ enum {
WINANIM_KEYBOARD_SWITCH_IN,
};
// Window IDs
enum {
WIN_TITLE,
WIN_MSG,
WIN_INPUT_SELECT, // Word groups, word list, and keyboard
};
// Values for text frame tilemap
#define FRAME_OFFSET_ORANGE 0x1000 // Orange frame, for phrase text
#define FRAME_OFFSET_GREEN 0x4000 // Green frame, for keyboard/word select
@ -814,7 +826,7 @@ static const struct BgTemplate sEasyChatBgTemplates[] = {
};
static const struct WindowTemplate sEasyChatWindowTemplates[] = {
{
[WIN_TITLE] = {
.bg = 1,
.tilemapLeft = 6,
.tilemapTop = 0,
@ -823,7 +835,7 @@ static const struct WindowTemplate sEasyChatWindowTemplates[] = {
.paletteNum = 10,
.baseBlock = 0x10,
},
{
[WIN_MSG] = {
.bg = 0,
.tilemapLeft = 3,
.tilemapTop = 15,
@ -832,7 +844,7 @@ static const struct WindowTemplate sEasyChatWindowTemplates[] = {
.paletteNum = 15,
.baseBlock = 0xA,
},
{
[WIN_INPUT_SELECT] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 0,
@ -3934,10 +3946,10 @@ static void PrintTitle(void)
return;
xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY);
PutWindowTilemap(0);
CopyWindowToVram(0, COPYWIN_FULL);
FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(0));
PrintEasyChatTextWithColors(WIN_TITLE, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY);
PutWindowTilemap(WIN_TITLE);
CopyWindowToVram(WIN_TITLE, COPYWIN_FULL);
}
static void PrintEasyChatText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16))
@ -3957,10 +3969,10 @@ static void PrintEasyChatTextWithColors(u8 windowId, u8 fontId, const u8 *str, u
static void PrintInitialInstructions(void)
{
FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 17);
LoadUserWindowBorderGfx(1, 1, BG_PLTT_ID(14));
DrawTextBorderOuter(1, 1, 14);
LoadUserWindowBorderGfx(WIN_MSG, 1, BG_PLTT_ID(14));
DrawTextBorderOuter(WIN_MSG, 1, 14);
PrintEasyChatStdMessage(MSG_INSTRUCTIONS);
PutWindowTilemap(1);
PutWindowTilemap(WIN_MSG);
CopyBgTilemapBufferToVram(0);
}
@ -4004,14 +4016,14 @@ static void PrintEasyChatStdMessage(u8 msgId)
break;
}
FillWindowPixelBuffer(1, PIXEL_FILL(1));
FillWindowPixelBuffer(WIN_MSG, PIXEL_FILL(1));
if (text1)
PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SKIP_DRAW, 0);
PrintEasyChatText(WIN_MSG, FONT_NORMAL, text1, 0, 1, TEXT_SKIP_DRAW, 0);
if (text2)
PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SKIP_DRAW, 0);
PrintEasyChatText(WIN_MSG, FONT_NORMAL, text2, 0, 17, TEXT_SKIP_DRAW, 0);
CopyWindowToVram(1, COPYWIN_FULL);
CopyWindowToVram(WIN_MSG, COPYWIN_FULL);
}
static void CreateEasyChatYesNoMenu(u8 initialCursorPos)
@ -4198,14 +4210,14 @@ static void AdjustBgTilemapForFooter(void)
static void DrawLowerWindow(void)
{
PutWindowTilemap(2);
CopyBgTilemapBufferToVram(2);
PutWindowTilemap(WIN_INPUT_SELECT);
CopyBgTilemapBufferToVram(WIN_INPUT_SELECT);
}
static void InitLowerWindowText(u32 whichText)
{
ResetLowerWindowScroll();
FillWindowPixelBuffer(2, PIXEL_FILL(1));
FillWindowPixelBuffer(WIN_INPUT_SELECT, PIXEL_FILL(1));
switch (whichText)
{
case TEXT_GROUPS:
@ -4219,7 +4231,7 @@ static void InitLowerWindowText(u32 whichText)
break;
}
CopyWindowToVram(2, COPYWIN_GFX);
CopyWindowToVram(WIN_INPUT_SELECT, COPYWIN_GFX);
}
static void PrintKeyboardText(void)
@ -4248,7 +4260,7 @@ static void PrintKeyboardGroupNames(void)
return;
}
PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL);
PrintEasyChatText(WIN_INPUT_SELECT, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL);
}
y += 16;
@ -4260,7 +4272,7 @@ static void PrintKeyboardAlphabet(void)
u32 i;
for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++)
PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SKIP_DRAW, NULL);
PrintEasyChatText(WIN_INPUT_SELECT, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SKIP_DRAW, NULL);
}
static void PrintInitialWordSelectText(void)
@ -4331,16 +4343,16 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows)
{
CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0);
if (!DummyWordCheck(easyChatWord))
PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, NULL);
PrintEasyChatText(WIN_INPUT_SELECT, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, NULL);
else // Never reached
PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY);
PrintEasyChatTextWithColors(WIN_INPUT_SELECT, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY);
}
}
y += 16;
}
CopyWindowToVram(2, COPYWIN_GFX);
CopyWindowToVram(WIN_INPUT_SELECT, COPYWIN_GFX);
}
static void EraseWordSelectRows(u8 scrollOffset, u8 numRows)
@ -4364,15 +4376,15 @@ static void EraseWordSelectRows(u8 scrollOffset, u8 numRows)
var1 = 0;
}
FillWindowPixelRect(2, PIXEL_FILL(1), 0, y, 224, var2);
FillWindowPixelRect(WIN_INPUT_SELECT, PIXEL_FILL(1), 0, y, 224, var2);
if (var1)
FillWindowPixelRect(2, PIXEL_FILL(1), 0, 0, 224, var1);
FillWindowPixelRect(WIN_INPUT_SELECT, PIXEL_FILL(1), 0, 0, 224, var1);
}
static void ClearWordSelectWindow(void)
{
FillWindowPixelBuffer(2, PIXEL_FILL(1));
CopyWindowToVram(2, COPYWIN_GFX);
FillWindowPixelBuffer(WIN_INPUT_SELECT, PIXEL_FILL(1));
CopyWindowToVram(WIN_INPUT_SELECT, COPYWIN_GFX);
}
static void InitLowerWindowAnim(int winAnimType)
@ -5097,7 +5109,7 @@ static bool8 IsEasyChatGroupUnlocked(u8 groupId)
switch (groupId)
{
case EC_GROUP_TRENDY_SAYING:
return FlagGet(FLAG_SYS_HIPSTER_MEET);
return FlagGet(FLAG_UNLOCKED_TRENDY_SAYINGS);
case EC_GROUP_EVENTS:
case EC_GROUP_MOVE_1:
case EC_GROUP_MOVE_2:
@ -5413,80 +5425,99 @@ void BufferDeepLinkPhrase(void)
CopyEasyChatWord(gStringVar2, easyChatWord);
}
static bool8 IsAdditionalPhraseUnlocked(u8 additionalPhraseId)
/*
### Trendy Sayings
Not to be confused with Dewford Town's "trendy phrase".
This is a group of easy chat words (EC_GROUP_TRENDY_SAYING) that are normally inaccessible.
They can be unlocked either through Mystery Event (where they're referred to as "rare" words)
or from the "Hipster" variety of the Mauville Old Man. The Hipster can unlock one word each
time he is received via record mixing (and once if he is the player's default Old Man).
Which words have been unlocked is saved in the unlockedTrendySayings bitfield in SaveBlock1
Unlocked trendy saying words are only accessible if the flag FLAG_UNLOCKED_TRENDY_SAYINGS is set.
It's set any time the player talks to the Hipster, but is not apparently set by Mystery Event,
meaning trendy saying words unlocked via Mystery Event may not be available until the player has
talked to the Hipster.
*/
static bool8 IsTrendySayingUnlocked(u8 wordIndex)
{
int byteOffset = additionalPhraseId / 8;
int shift = additionalPhraseId % 8;
return (gSaveBlock1Ptr->additionalPhrases[byteOffset] >> shift) & 1;
int byteOffset = wordIndex / 8;
int shift = wordIndex % 8;
return (gSaveBlock1Ptr->unlockedTrendySayings[byteOffset] >> shift) & 1;
}
void UnlockAdditionalPhrase(u8 additionalPhraseId)
void UnlockTrendySaying(u8 wordIndex)
{
if (additionalPhraseId < NUM_ADDITIONAL_PHRASES)
if (wordIndex < NUM_TRENDY_SAYINGS)
{
int byteOffset = additionalPhraseId / 8;
int shift = additionalPhraseId % 8;
gSaveBlock1Ptr->additionalPhrases[byteOffset] |= 1 << shift;
int byteOffset = wordIndex / 8;
int shift = wordIndex % 8;
gSaveBlock1Ptr->unlockedTrendySayings[byteOffset] |= 1 << shift;
}
}
static u8 GetNumAdditionalPhrasesUnlocked(void)
static u8 GetNumTrendySayingsUnlocked(void)
{
u8 i;
u8 numAdditionalPhrasesUnlocked;
u8 numUnlocked;
for (i = 0, numAdditionalPhrasesUnlocked = 0; i < NUM_ADDITIONAL_PHRASES; i++)
for (i = 0, numUnlocked = 0; i < NUM_TRENDY_SAYINGS; i++)
{
if (IsAdditionalPhraseUnlocked(i))
numAdditionalPhrasesUnlocked++;
if (IsTrendySayingUnlocked(i))
numUnlocked++;
}
return numAdditionalPhrasesUnlocked;
return numUnlocked;
}
u16 GetNewHipsterPhraseToTeach(void)
u16 UnlockRandomTrendySaying(void)
{
u16 i;
u16 additionalPhraseId;
u8 numAdditionalPhrasesUnlocked = GetNumAdditionalPhrasesUnlocked();
if (numAdditionalPhrasesUnlocked == NUM_ADDITIONAL_PHRASES)
u16 numToSkip;
u8 numUnlocked = GetNumTrendySayingsUnlocked();
if (numUnlocked == NUM_TRENDY_SAYINGS)
return EC_EMPTY_WORD;
additionalPhraseId = Random() % (NUM_ADDITIONAL_PHRASES - numAdditionalPhrasesUnlocked);
for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++)
numToSkip = Random() % (NUM_TRENDY_SAYINGS - numUnlocked);
for (i = 0; i < NUM_TRENDY_SAYINGS; i++)
{
if (!IsAdditionalPhraseUnlocked(i))
if (!IsTrendySayingUnlocked(i))
{
if (additionalPhraseId)
if (numToSkip)
{
additionalPhraseId--;
// Skip the first n locked words, as determined by the Random call above.
numToSkip--;
}
else
{
UnlockAdditionalPhrase(i);
UnlockTrendySaying(i);
return EC_WORD(EC_GROUP_TRENDY_SAYING, i);
}
}
}
// Would only be reached if there are no new words to teach, which is handled at the start.
return EC_EMPTY_WORD;
}
// Unused
u16 GetRandomTaughtHipsterPhrase(void)
static u16 GetRandomUnlockedTrendySaying(void)
{
u16 i;
u16 additionalPhraseId = GetNumAdditionalPhrasesUnlocked();
if (additionalPhraseId == 0)
u16 n = GetNumTrendySayingsUnlocked();
if (n == 0)
return EC_EMPTY_WORD;
additionalPhraseId = Random() % additionalPhraseId;
for (i = 0; i < NUM_ADDITIONAL_PHRASES; i++)
n = Random() % n;
for (i = 0; i < NUM_TRENDY_SAYINGS; i++)
{
if (IsAdditionalPhraseUnlocked(i))
if (IsTrendySayingUnlocked(i))
{
if (additionalPhraseId)
additionalPhraseId--;
if (n)
n--;
else
return EC_WORD(EC_GROUP_TRENDY_SAYING, i);
}
@ -5557,10 +5588,10 @@ void InitEasyChatPhrases(void)
// Mauville old man data is corrupted, which is initialized directly after
// this function is called when starting a new game.
for (i = 0; i < 64; i++)
gSaveBlock1Ptr->additionalPhrases[i] = 0;
gSaveBlock1Ptr->unlockedTrendySayings[i] = 0;
#else
for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->additionalPhrases); i++)
gSaveBlock1Ptr->additionalPhrases[i] = 0;
for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->unlockedTrendySayings); i++)
gSaveBlock1Ptr->unlockedTrendySayings[i] = 0;
#endif
}
@ -5599,7 +5630,7 @@ static void SetUnlockedEasyChatGroups(void)
sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_MOVE_2;
}
if (FlagGet(FLAG_SYS_HIPSTER_MEET))
if (FlagGet(FLAG_UNLOCKED_TRENDY_SAYINGS))
sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_TRENDY_SAYING;
if (IsNationalPokedexEnabled())
@ -5788,7 +5819,7 @@ static bool8 IsEasyChatIndexAndGroupUnlocked(u16 wordIndex, u8 groupId)
case EC_GROUP_MOVE_2:
return TRUE;
case EC_GROUP_TRENDY_SAYING:
return IsAdditionalPhraseUnlocked(wordIndex);
return IsTrendySayingUnlocked(wordIndex);
default:
return gEasyChatGroups[groupId].wordData.words[wordIndex].enabled;
}

View File

@ -313,7 +313,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
{
u16 species;
u32 personality, pokerus;
u8 i, friendship, language, gameMet, markings, isEventLegal;
u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter;
u16 moves[MAX_MON_MOVES];
u32 ivs[NUM_STATS];
@ -332,7 +332,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
gameMet = GetMonData(egg, MON_DATA_MET_GAME);
markings = GetMonData(egg, MON_DATA_MARKINGS);
pokerus = GetMonData(egg, MON_DATA_POKERUS);
isEventLegal = GetMonData(egg, MON_DATA_EVENT_LEGAL);
isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER);
CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0);
@ -350,7 +350,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
friendship = 120;
SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship);
SetMonData(temp, MON_DATA_POKERUS, &pokerus);
SetMonData(temp, MON_DATA_EVENT_LEGAL, &isEventLegal);
SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
*egg = *temp;
}

View File

@ -343,7 +343,7 @@ static void Task_EReader(u8 taskId)
case ER_STATE_MSG_SELECT_CONNECT:
if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_SelectConnectFromEReaderMenu))
{
AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA);
MG_AddMessageTextPrinter(gJPText_SelectConnectWithGBA);
ResetTimer(&data->timer);
data->state = ER_STATE_MSG_SELECT_CONNECT_WAIT;
}
@ -397,7 +397,7 @@ static void Task_EReader(u8 taskId)
data->state = ER_STATE_MSG_SELECT_CONNECT;
break;
case ER_STATE_CONNECTING:
AddTextPrinterToWindow1(gJPText_Connecting);
MG_AddMessageTextPrinter(gJPText_Connecting);
// XXX: This (u32 *) cast is discarding the const qualifier from gMultiBootProgram_EReader_Start
EReader_Load(&gEReaderData, gMultiBootProgram_EReader_End - gMultiBootProgram_EReader_Start, (u32 *)gMultiBootProgram_EReader_Start);
data->state = ER_STATE_TRANSFER;
@ -416,7 +416,7 @@ static void Task_EReader(u8 taskId)
else if (data->status == TRANSFER_SUCCESS)
{
ResetTimer(&data->timer);
AddTextPrinterToWindow1(gJPText_PleaseWaitAMoment);
MG_AddMessageTextPrinter(gJPText_PleaseWaitAMoment);
data->state = ER_STATE_TRANSFER_SUCCESS;
}
else // TRANSFER_CANCELED
@ -430,7 +430,7 @@ static void Task_EReader(u8 taskId)
break;
case ER_STATE_LOAD_CARD_START:
OpenEReaderLink();
AddTextPrinterToWindow1(gJPText_AllowEReaderToLoadCard);
MG_AddMessageTextPrinter(gJPText_AllowEReaderToLoadCard);
data->state = ER_STATE_LOAD_CARD;
break;
case ER_STATE_LOAD_CARD:
@ -439,7 +439,7 @@ static void Task_EReader(u8 taskId)
case RECV_ACTIVE:
break;
case RECV_SUCCESS:
AddTextPrinterToWindow1(gJPText_Connecting);
MG_AddMessageTextPrinter(gJPText_Connecting);
data->state = ER_STATE_WAIT_RECV_CARD;
break;
case RECV_CANCELED:
@ -487,7 +487,7 @@ static void Task_EReader(u8 taskId)
case ER_STATE_SAVE:
if (TryWriteTrainerHill((struct EReaderTrainerHillSet *)&gDecompressionBuffer))
{
AddTextPrinterToWindow1(gJPText_ConnectionComplete);
MG_AddMessageTextPrinter(gJPText_ConnectionComplete);
ResetTimer(&data->timer);
data->state = ER_STATE_SUCCESS_MSG;
}
@ -499,7 +499,7 @@ static void Task_EReader(u8 taskId)
case ER_STATE_SUCCESS_MSG:
if (UpdateTimer(&data->timer, 120))
{
AddTextPrinterToWindow1(gJPText_NewTrainerHasComeToHoenn);
MG_AddMessageTextPrinter(gJPText_NewTrainerHasComeToHoenn);
PlayFanfare(MUS_OBTAIN_ITEM);
data->state = ER_STATE_SUCCESS_END;
}

Some files were not shown because too many files have changed in this diff Show More