summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-11-17 17:15:45 -0500
committerGriffinR <griffin.g.richards@gmail.com>2021-11-17 17:45:59 -0500
commitc940b6771687f7f303e2380a1994939a60e8a139 (patch)
tree5f8bff9cabebdbdf5ab2db77542abe5485821b14
parent700425ef5fcdd5114fb76e362f745f558084638b (diff)
Continue macro comment updating
-rw-r--r--asm/macros/event.inc116
-rw-r--r--data/maps/DewfordTown/scripts.inc16
-rw-r--r--data/maps/Route104/scripts.inc10
-rw-r--r--data/maps/Route109/scripts.inc10
-rw-r--r--data/script_cmd_table.inc6
-rw-r--r--data/scripts/contest_hall.inc2
-rw-r--r--include/event_object_movement.h4
-rw-r--r--src/data/lilycove_lady.h50
-rw-r--r--src/event_object_movement.c4
-rw-r--r--src/scrcmd.c14
10 files changed, 124 insertions, 108 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 4c0bc2922..057ebe392 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -1016,74 +1016,74 @@
@ Writes the name of the given Pokemon species to the specified buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferspeciesname out:req, species:req
+ .macro bufferspeciesname stringVarId:req, species:req
.byte 0x7d
- .byte \out
+ .byte \stringVarId
.2byte \species
.endm
@ Writes the name of the species of the first Pokemon in the player's party to the specified buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferleadmonspeciesname out:req
+ .macro bufferleadmonspeciesname stringVarId:req
.byte 0x7e
- .byte \out
+ .byte \stringVarId
.endm
@ Writes the nickname of the Pokemon in 'slot' (zero-indexed) of the player's party to the specified buffer.
@ If an empty or invalid slot is specified, ten spaces ("") are written to the buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferpartymonnick out:req, slot:req
+ .macro bufferpartymonnick stringVarId:req, slot:req
.byte 0x7f
- .byte \out
+ .byte \stringVarId
.2byte \slot
.endm
@ Writes the name of the specified item to the specified buffer. If itemId is >= ITEMS_COUNT,
@ then the name of ITEM_NONE ("????????") is buffered instead.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferitemname out:req, item:req
+ .macro bufferitemname stringVarId:req, item:req
.byte 0x80
- .byte \out
+ .byte \stringVarId
.2byte \item
.endm
@ Writes the name of the specified decoration to the specified buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferdecorationname out:req, decoration:req
+ .macro bufferdecorationname stringVarId:req, decoration:req
.byte 0x81
- .byte \out
+ .byte \stringVarId
.2byte \decoration
.endm
@ Writes the name of the specified move to the specified buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro buffermovename out:req, move:req
+ .macro buffermovename stringVarId:req, move:req
.byte 0x82
- .byte \out
+ .byte \stringVarId
.2byte \move
.endm
@ Converts the value of input to a decimal string, and writes that string to the specified buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro buffernumberstring out:req, input:req
+ .macro buffernumberstring stringVarId:req, input:req
.byte 0x83
- .byte \out
+ .byte \stringVarId
.2byte \input
.endm
@ Writes the given standard string (STDSTRING_*) to the specified buffer. Invalid std string ids are not handled.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferstdstring out:req, index:req
+ .macro bufferstdstring stringVarId:req, index:req
.byte 0x84
- .byte \out
+ .byte \stringVarId
.2byte \index
.endm
@ Copies the string at the given pointer to the specified buffer.
@ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
- .macro bufferstring out:req, text:req
+ .macro bufferstring stringVarId:req, text:req
.byte 0x85
- .byte \out
+ .byte \stringVarId
.4byte \text
.endm
@@ -1298,25 +1298,30 @@
.byte 0xa5
.endm
- @
- .macro setstepcallback subroutine:req
+ @ Enables the overworld task specified by stepCbId (STEP_CB_*). Only 1 can be active at a time. See src/field_tasks.c for more.
+ .macro setstepcallback stepCbId:req
.byte 0xa6
- .byte \subroutine
+ .byte \stepCbId
.endm
+ @ Sets the current map layout to the one specified by index (LAYOUT_*).
+ @ This should be done before the layout is loaded, typically in the ON_TRANSITION map script.
.macro setmaplayoutindex index:req
.byte 0xa7
.2byte \index
.endm
- .macro setobjectpriority localId:req, map:req, priority:req
+ @ Sets the specified object's sprite's subpriority, and sets fixedPriority to TRUE.
+ @ Only used to hide the player and Briney behind the boat.
+ .macro setobjectsubpriority localId:req, map:req, subpriority:req
.byte 0xa8
.2byte \localId
map \map
- .byte \priority
+ .byte \subpriority
.endm
- .macro resetobjectpriority localId:req, map:req
+ @ Sets the specified object's fixedPriority to FALSE. Does not change the subpriority field.
+ .macro resetobjectsubpriority localId:req, map:req
.byte 0xa9
.2byte \localId
map \map
@@ -1357,14 +1362,14 @@
.byte 0xae
.endm
- @ Sets the door tile at (x, y) to be open without an animation.
+ @ Sets the door metatile at (x, y) to be open without an animation.
.macro setdooropen x:req, y:req
.byte 0xaf
.2byte \x
.2byte \y
.endm
- @ Sets the door tile at (x, y) to be closed without an animation.
+ @ Sets the door metatile at (x, y) to be closed without an animation.
.macro setdoorclosed x:req, y:req
.byte 0xb0
.2byte \x
@@ -1463,21 +1468,21 @@
.4byte \pointer
.endm
- @ Spawns a secondary box showing how many Coins the player has.
+ @ Create a window showing how many Coins the player has.
.macro showcoinsbox x:req, y:req
.byte 0xc0
.byte \x
.byte \y
.endm
- @ Hides the secondary box spawned by showcoins. It consumes its arguments but doesn't use them.
+ @ Destroys the window created by showcoins. It consumes its arguments but doesn't use them.
.macro hidecoinsbox x:req, y:req
.byte 0xc1
.byte \x
.byte \y
.endm
- @ Updates the secondary box spawned by showcoins. It consumes its arguments but doesn't use them.
+ @ Updates the window created by showcoins. It consumes its arguments but doesn't use them.
.macro updatecoinsbox x:req, y:req
.byte 0xc2
.byte \x
@@ -1504,9 +1509,10 @@
.endm
@ Writes the name of the specified (box) PC box to the specified buffer.
- .macro bufferboxname out:req, box:req
+ @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
+ .macro bufferboxname stringVarId:req, box:req
.byte 0xc6
- .byte \out
+ .byte \stringVarId
.2byte \box
.endm
@@ -1583,27 +1589,27 @@
.byte \location
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Moves the objects on the colored puzzle
- @ specified by puzzleNumber one rotation
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Moves the objects one rotation
+ @ on the colored puzzle specified by puzzleNumber.
.macro moverotatingtileobjects puzzleNumber:req
.byte 0xd3
.2byte \puzzleNumber
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles
.macro turnrotatingtileobjects
.byte 0xd4
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects.
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Allocates memory for the puzzle objects.
@ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset
- @ the puzzle tiles start.
+ @ the puzzle tiles start (TRUE for Trick House Room, FALSE for Mossdeep Gym).
.macro initrotatingtilepuzzle isTrickHouse:req
.byte 0xd5
.2byte \isTrickHouse
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Frees the memory allocated for the puzzle objects.
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Frees the memory allocated for the puzzle objects.
.macro freerotatingtilepuzzle
.byte 0xd6
.endm
@@ -1623,6 +1629,7 @@
.byte 0xd9
.endm
+ @ Destroys the window created by braillemessage.
.macro closebraillemessage
.byte 0xda
.endm
@@ -1637,21 +1644,26 @@
.byte \mode
.endm
- .macro buffertrainerclassname out:req, class:req
+ @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
+ .macro buffertrainerclassname stringVarId:req, class:req
.byte 0xdd
- .byte \out
+ .byte \stringVarId
.2byte \class
.endm
- .macro buffertrainername out:req, trainer:req
+ @ Buffers the specified trainer's name to the given string var.
+ @ If the trainer id is >= TRAINERS_COUNT it will be treated as TRAINER_NONE.
+ @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
+ .macro buffertrainername stringVarId:req, trainerId:req
.byte 0xde
- .byte \out
- .2byte \trainer
+ .byte \stringVarId
+ .2byte \trainerId
.endm
- .macro pokenavcall pointer:req
+ @ Starts a Pokenav call with the given text.
+ .macro pokenavcall text:req
.byte 0xdf
- .4byte \pointer
+ .4byte \text
.endm
@ Warp commands can be given either the id of which warp location to go to on the destination map
@@ -1661,18 +1673,21 @@
formatwarp \map, \a, \b, \c
.endm
- .macro buffercontesttypestring out:req, word:req
+ @ Buffers the name of the contest category to the buffer.
+ @ For example a category of CONTEST_CATEGORY_COOL will buffer the string "COOLNESS CONTEST".
+ .macro buffercontestname stringVarId:req, category:req
.byte 0xe1
- .byte \out
- .2byte \word
+ .byte \stringVarId
+ .2byte \category
.endm
- @ Writes the name of the specified (item) item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL
+ @ Writes the name of the specified item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL
@ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended).
@ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead.
- .macro bufferitemnameplural out:req, item:req, quantity:req
+ @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3
+ .macro bufferitemnameplural stringVarId:req, item:req, quantity:req
.byte 0xe2
- .byte \out
+ .byte \stringVarId
.2byte \item
.2byte \quantity
.endm
@@ -1847,6 +1862,7 @@
dofieldeffect FLDEFF_SPARKLE
.endm
+ @ Prints a braille message, waits for an A or B press, then closes the message.
.macro braillemsgbox text:req
braillemessage \text
waitbuttonpress
diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc
index a21ebd0ba..ca6e82250 100644
--- a/data/maps/DewfordTown/scripts.inc
+++ b/data/maps/DewfordTown/scripts.inc
@@ -128,8 +128,8 @@ DewfordTown_EventScript_FishingNotSoGood::
DewfordTown_EventScript_SailToPetalburg::
call EventScript_BackupMrBrineyLocation
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0
applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_DEWFORD
@@ -151,7 +151,7 @@ DewfordTown_EventScript_SailToPetalburg::
setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN
setvar VAR_BOARD_BRINEY_BOAT_STATE, 2
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
waitstate
@@ -160,8 +160,8 @@ DewfordTown_EventScript_SailToPetalburg::
DewfordTown_EventScript_SailToSlateport::
call EventScript_BackupMrBrineyLocation
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1
applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_DEWFORD
@@ -178,7 +178,7 @@ DewfordTown_EventScript_SailToSlateport::
waitmovement 0
setobjectxyperm LOCALID_BRINEY_R109, 21, 26
addobject LOCALID_BRINEY_R109
- setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
+ setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
applymovement LOCALID_BRINEY_R109, DewfordTown_Movement_BrineyExitBoat
waitmovement 0
clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY
@@ -190,8 +190,8 @@ DewfordTown_EventScript_SailToSlateport::
call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_LandedSlateport
closemessage
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
- resetobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
+ resetobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109
copyobjectxytoperm LOCALID_BRINEY_R109
release
end
diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc
index d58bc5060..4cbe5c045 100644
--- a/data/maps/Route104/scripts.inc
+++ b/data/maps/Route104/scripts.inc
@@ -361,8 +361,8 @@ Route104_EventScript_Girl2::
end
Route104_EventScript_SailToDewford::
- setobjectpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0
+ setobjectsubpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0
applymovement LOCALID_BRINEY_R104, Route104_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_R104
@@ -409,7 +409,7 @@ Route104_EventScript_ArriveInDewford::
waitmovement 0
setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8
addobject LOCALID_BRINEY_DEWFORD
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN
applymovement LOCALID_BRINEY_DEWFORD, Route104_Movement_BrineyExitBoat
waitmovement 0
@@ -419,8 +419,8 @@ Route104_EventScript_ArriveInDewford::
setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT
hideobjectat LOCALID_BOAT_R104, MAP_ROUTE104
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104
- resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104
+ resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
copyobjectxytoperm LOCALID_BRINEY_DEWFORD
setvar VAR_BOARD_BRINEY_BOAT_STATE, 0
goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_DeliverLetterReminder
diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc
index 37852c873..08f0a1701 100644
--- a/data/maps/Route109/scripts.inc
+++ b/data/maps/Route109/scripts.inc
@@ -6,8 +6,8 @@ Route109_MapScripts::
Route109_EventScript_StartDepartForDewford::
call EventScript_BackupMrBrineyLocation
- setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0
+ setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0
applymovement LOCALID_BRINEY_R109, Route109_Movement_BrineyEnterBoat
waitmovement 0
removeobject LOCALID_BRINEY_R109
@@ -50,7 +50,7 @@ Route109_EventScript_DoSailToDewford::
clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8
addobject LOCALID_BRINEY_DEWFORD
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
applymovement LOCALID_BRINEY_DEWFORD, Route109_Movement_BrineyExitBoat
waitmovement 0
clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN
@@ -59,8 +59,8 @@ Route109_EventScript_DoSailToDewford::
msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT
closemessage
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109
- resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109
+ resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
copyobjectxytoperm LOCALID_BRINEY_DEWFORD
release
end
diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc
index f3afb2e43..3d2ab82a9 100644
--- a/data/script_cmd_table.inc
+++ b/data/script_cmd_table.inc
@@ -168,8 +168,8 @@ gScriptCmdTable::
.4byte ScrCmd_doweather @ 0xa5
.4byte ScrCmd_setstepcallback @ 0xa6
.4byte ScrCmd_setmaplayoutindex @ 0xa7
- .4byte ScrCmd_setobjectpriority @ 0xa8
- .4byte ScrCmd_resetobjectpriority @ 0xa9
+ .4byte ScrCmd_setobjectsubpriority @ 0xa8
+ .4byte ScrCmd_resetobjectsubpriority @ 0xa9
.4byte ScrCmd_createvobject @ 0xaa
.4byte ScrCmd_turnvobject @ 0xab
.4byte ScrCmd_opendoor @ 0xac
@@ -225,7 +225,7 @@ gScriptCmdTable::
.4byte ScrCmd_buffertrainername @ 0xde
.4byte ScrCmd_pokenavcall @ 0xdf
.4byte ScrCmd_warpsootopolislegend @ 0xe0
- .4byte ScrCmd_buffercontesttype @ 0xe1
+ .4byte ScrCmd_buffercontestname @ 0xe1
.4byte ScrCmd_bufferitemnameplural @ 0xe2
gScriptCmdTableEnd::
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index 13f31e9bd..696903e2f 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -283,7 +283,7 @@ ContestHall_EventScript_GetCategoryTough::
return
ContestHall_EventScript_ContestGettingStarted::
- buffercontesttypestring 1, VAR_0x8008
+ buffercontestname 1, VAR_0x8008
bufferstdstring 2, VAR_0x8009
call ContestHall_EventScript_GettingStarted
lockall
diff --git a/include/event_object_movement.h b/include/event_object_movement.h
index 6ad4b55e4..8ceea4d29 100644
--- a/include/event_object_movement.h
+++ b/include/event_object_movement.h
@@ -110,8 +110,8 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId);
void SetObjectInvisibility(u8, u8, u8, bool8);
void FreeAndReserveObjectSpritePalettes(void);
void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
-void ResetObjectPriority(u8, u8, u8);
-void SetObjectPriority(u8, u8, u8, u8);
+void ResetObjectSubpriority(u8, u8, u8);
+void SetObjectSubpriority(u8, u8, u8, u8);
void AllowObjectAtPosTriggerGroundEffects(s16, s16);
void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup);
void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16);
diff --git a/src/data/lilycove_lady.h b/src/data/lilycove_lady.h
index 1f1caa35f..dd0885ff8 100644
--- a/src/data/lilycove_lady.h
+++ b/src/data/lilycove_lady.h
@@ -5,11 +5,11 @@
static const u16 sContestLadyMonGfxId[] =
{
- OBJ_EVENT_GFX_ZIGZAGOON_1,
- OBJ_EVENT_GFX_SKITTY,
- OBJ_EVENT_GFX_POOCHYENA,
- OBJ_EVENT_GFX_KECLEON,
- OBJ_EVENT_GFX_PIKACHU
+ [CONTEST_CATEGORY_COOL] = OBJ_EVENT_GFX_ZIGZAGOON_1,
+ [CONTEST_CATEGORY_BEAUTY] = OBJ_EVENT_GFX_SKITTY,
+ [CONTEST_CATEGORY_CUTE] = OBJ_EVENT_GFX_POOCHYENA,
+ [CONTEST_CATEGORY_SMART] = OBJ_EVENT_GFX_KECLEON,
+ [CONTEST_CATEGORY_TOUGH] = OBJ_EVENT_GFX_PIKACHU
};
static const u16 sLilycoveLadyGfxId[] =
@@ -434,36 +434,36 @@ static const u16 sFavorLadyPrizes[] =
static const u8 *const sContestLadyMonNames[] =
{
- gText_ContestLady_Handsome,
- gText_ContestLady_Vinny,
- gText_ContestLady_Moreme,
- gText_ContestLady_Ironhard,
- gText_ContestLady_Muscle
+ [CONTEST_CATEGORY_COOL] = gText_ContestLady_Handsome,
+ [CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Vinny,
+ [CONTEST_CATEGORY_CUTE] = gText_ContestLady_Moreme,
+ [CONTEST_CATEGORY_SMART] = gText_ContestLady_Ironhard,
+ [CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Muscle
};
static const u8 *const sContestLadyCategoryNames[] =
{
- gText_ContestLady_Coolness,
- gText_ContestLady_Beauty,
- gText_ContestLady_Cuteness,
- gText_ContestLady_Smartness,
- gText_ContestLady_Toughness
+ [CONTEST_CATEGORY_COOL] = gText_ContestLady_Coolness,
+ [CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Beauty,
+ [CONTEST_CATEGORY_CUTE] = gText_ContestLady_Cuteness,
+ [CONTEST_CATEGORY_SMART] = gText_ContestLady_Smartness,
+ [CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Toughness
};
static const u8 *const sContestNames[] =
{
- gText_CoolnessContest,
- gText_BeautyContest,
- gText_CutenessContest,
- gText_SmartnessContest,
- gText_ToughnessContest
+ [CONTEST_CATEGORY_COOL] = gText_CoolnessContest,
+ [CONTEST_CATEGORY_BEAUTY] = gText_BeautyContest,
+ [CONTEST_CATEGORY_CUTE] = gText_CutenessContest,
+ [CONTEST_CATEGORY_SMART] = gText_SmartnessContest,
+ [CONTEST_CATEGORY_TOUGH] = gText_ToughnessContest
};
static const u16 sContestLadyMonSpecies[] =
{
- SPECIES_ZIGZAGOON,
- SPECIES_SKITTY,
- SPECIES_POOCHYENA,
- SPECIES_KECLEON,
- SPECIES_PIKACHU
+ [CONTEST_CATEGORY_COOL] = SPECIES_ZIGZAGOON,
+ [CONTEST_CATEGORY_BEAUTY] = SPECIES_SKITTY,
+ [CONTEST_CATEGORY_CUTE] = SPECIES_POOCHYENA,
+ [CONTEST_CATEGORY_SMART] = SPECIES_KECLEON,
+ [CONTEST_CATEGORY_TOUGH] = SPECIES_PIKACHU
};
diff --git a/src/event_object_movement.c b/src/event_object_movement.c
index c29f8466b..b9a8fe3a7 100644
--- a/src/event_object_movement.c
+++ b/src/event_object_movement.c
@@ -1915,7 +1915,7 @@ void AllowObjectAtPosTriggerGroundEffects(s16 x, s16 y)
}
}
-void SetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
+void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
{
u8 objectEventId;
struct ObjectEvent *objectEvent;
@@ -1930,7 +1930,7 @@ void SetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
}
}
-void ResetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup)
+void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup)
{
u8 objectEventId;
struct ObjectEvent *objectEvent;
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 1dad3575c..5b7c95e8e 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -1128,24 +1128,24 @@ bool8 ScrCmd_hideobject_at(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_setobjectpriority(struct ScriptContext *ctx)
+bool8 ScrCmd_setobjectsubpriority(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx);
u8 priority = ScriptReadByte(ctx);
- SetObjectPriority(localId, mapNum, mapGroup, priority + 83);
+ SetObjectSubpriority(localId, mapNum, mapGroup, priority + 83);
return FALSE;
}
-bool8 ScrCmd_resetobjectpriority(struct ScriptContext *ctx)
+bool8 ScrCmd_resetobjectsubpriority(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx);
- ResetObjectPriority(localId, mapNum, mapGroup);
+ ResetObjectSubpriority(localId, mapNum, mapGroup);
return FALSE;
}
@@ -1635,12 +1635,12 @@ bool8 ScrCmd_bufferstdstring(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_buffercontesttype(struct ScriptContext *ctx)
+bool8 ScrCmd_buffercontestname(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
- u16 index = VarGet(ScriptReadHalfword(ctx));
+ u16 category = VarGet(ScriptReadHalfword(ctx));
- BufferContestName(sScriptStringVars[stringVarIndex], index);
+ BufferContestName(sScriptStringVars[stringVarIndex], category);
return FALSE;
}