Add remaining event.inc comments
This commit is contained in:
+23
-14
@@ -1547,13 +1547,13 @@
|
|||||||
.byte \color
|
.byte \color
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened.
|
@ Displays the help menu with the given text.
|
||||||
.macro loadhelp pointer:req
|
.macro loadhelp msg:req
|
||||||
.byte 0xc8
|
.byte 0xc8
|
||||||
.4byte \pointer
|
.4byte \msg
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened.
|
@ Erases the help menu
|
||||||
.macro unloadhelp
|
.macro unloadhelp
|
||||||
.byte 0xc9
|
.byte 0xc9
|
||||||
.endm
|
.endm
|
||||||
@@ -1568,10 +1568,11 @@
|
|||||||
.byte 0xcb
|
.byte 0xcb
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Compares the value of a hidden variable to a dword.
|
@ Reads the value of the specified game stat and compares it to the specified value.
|
||||||
.macro comparehiddenvar a:req, value:req
|
@ Sets the script comparisonResult to 0 if stat < value, 1 if stat == value, and 2 if stat > value.
|
||||||
|
.macro comparestat statId:req, value:req
|
||||||
.byte 0xcc
|
.byte 0xcc
|
||||||
.byte \a
|
.byte \statId
|
||||||
.4byte \value
|
.4byte \value
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@@ -1616,9 +1617,10 @@
|
|||||||
.byte \location
|
.byte \location
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro getbraillestringwidth pointer:req
|
@ Gets the width of the specified message in the Braille font and sets the result to VAR_0x8004.
|
||||||
|
.macro getbraillestringwidth msg:req
|
||||||
.byte 0xd3
|
.byte 0xd3
|
||||||
.4byte \pointer
|
.4byte \msg
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Writes the name of the specified 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
|
||||||
@@ -1796,17 +1798,15 @@
|
|||||||
callstd STD_FIND_ITEM
|
callstd STD_FIND_ITEM
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ Prints the message "{PLAYER} put the {ITEM} in the {POCKET}." The item name is pluralized, if applicable.
|
||||||
.macro putitemaway item:req, amount=1
|
.macro putitemaway item:req, amount=1
|
||||||
setorcopyvar VAR_0x8000, \item
|
setorcopyvar VAR_0x8000, \item
|
||||||
setorcopyvar VAR_0x8001, \amount
|
setorcopyvar VAR_0x8001, \amount
|
||||||
callstd STD_PUT_ITEM_AWAY
|
callstd STD_PUT_ITEM_AWAY
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro giveitem_msg msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP
|
@ Prints the provided message after playing the fanfare music (can only be MUS_LEVEL_UP or MUS_OBTAIN_KEY_ITEM).
|
||||||
additem \item, \amount
|
@ It then prints the message shown by using putitemaway.
|
||||||
msgreceiveditem \msg, \item, \amount, \fanfare
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro msgreceiveditem msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP
|
.macro msgreceiveditem msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP
|
||||||
loadword 0, \msg
|
loadword 0, \msg
|
||||||
setorcopyvar VAR_0x8000, \item
|
setorcopyvar VAR_0x8000, \item
|
||||||
@@ -1815,12 +1815,20 @@
|
|||||||
callstd STD_RECEIVED_ITEM
|
callstd STD_RECEIVED_ITEM
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ Adds the specified item to the bag, then prints a message with fanfare. See description of msgreceiveditem.
|
||||||
|
.macro giveitem_msg msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP
|
||||||
|
additem \item, \amount
|
||||||
|
msgreceiveditem \msg, \item, \amount, \fanfare
|
||||||
|
.endm
|
||||||
|
|
||||||
|
@ Depends on the provided function. With the default argument, unlocks the specified entry in the Fame Checker.
|
||||||
.macro famechecker person:req, index:req, function=SetFlavorTextFlagFromSpecialVars
|
.macro famechecker person:req, index:req, function=SetFlavorTextFlagFromSpecialVars
|
||||||
setvar VAR_0x8004, \person
|
setvar VAR_0x8004, \person
|
||||||
setvar VAR_0x8005, \index
|
setvar VAR_0x8005, \index
|
||||||
special \function
|
special \function
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ Sets the 'defeated' flag for all trainers in the specified gym.
|
||||||
.macro set_gym_trainers gym:req
|
.macro set_gym_trainers gym:req
|
||||||
setvar VAR_0x8008, \gym
|
setvar VAR_0x8008, \gym
|
||||||
call EventScript_SetGymTrainers
|
call EventScript_SetGymTrainers
|
||||||
@@ -1833,6 +1841,7 @@
|
|||||||
goto_if_eq \dest
|
goto_if_eq \dest
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ Prints a braille message, then waits for users input.
|
||||||
.macro braillemessage_wait text:req
|
.macro braillemessage_wait text:req
|
||||||
setvar VAR_0x8006, 0
|
setvar VAR_0x8006, 0
|
||||||
braillemessage \text
|
braillemessage \text
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ gScriptCmdTable::
|
|||||||
.4byte ScrCmd_unloadhelp @ 0xc9
|
.4byte ScrCmd_unloadhelp @ 0xc9
|
||||||
.4byte ScrCmd_signmsg @ 0xca
|
.4byte ScrCmd_signmsg @ 0xca
|
||||||
.4byte ScrCmd_normalmsg @ 0xcb
|
.4byte ScrCmd_normalmsg @ 0xcb
|
||||||
.4byte ScrCmd_comparestattoword @ 0xcc
|
.4byte ScrCmd_comparestat @ 0xcc
|
||||||
.4byte ScrCmd_setmoneventlegal @ 0xcd
|
.4byte ScrCmd_setmoneventlegal @ 0xcd
|
||||||
.4byte ScrCmd_checkmoneventlegal @ 0xce
|
.4byte ScrCmd_checkmoneventlegal @ 0xce
|
||||||
.4byte ScrCmd_trywondercardscript @ 0xcf
|
.4byte ScrCmd_trywondercardscript @ 0xcf
|
||||||
|
|||||||
+9
-9
@@ -578,7 +578,7 @@ bool8 ScrCmd_incrementgamestat(struct ScriptContext * ctx)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ScrCmd_comparestattoword(struct ScriptContext * ctx)
|
bool8 ScrCmd_comparestat(struct ScriptContext * ctx)
|
||||||
{
|
{
|
||||||
u8 statIdx = ScriptReadByte(ctx);
|
u8 statIdx = ScriptReadByte(ctx);
|
||||||
u32 value = ScriptReadWord(ctx);
|
u32 value = ScriptReadWord(ctx);
|
||||||
@@ -1556,23 +1556,23 @@ bool8 ScrCmd_showcontestpainting(struct ScriptContext * ctx)
|
|||||||
|
|
||||||
bool8 ScrCmd_braillemessage(struct ScriptContext * ctx)
|
bool8 ScrCmd_braillemessage(struct ScriptContext * ctx)
|
||||||
{
|
{
|
||||||
u8 *ptr = (u8 *)ScriptReadWord(ctx);
|
u8 *msg = (u8 *)ScriptReadWord(ctx);
|
||||||
if (ptr == NULL)
|
if (msg == NULL)
|
||||||
ptr = (u8 *)ctx->data[0];
|
msg = (u8 *)ctx->data[0];
|
||||||
|
|
||||||
LoadStdWindowFrameGfx();
|
LoadStdWindowFrameGfx();
|
||||||
DrawDialogueFrame(0, 1);
|
DrawDialogueFrame(0, 1);
|
||||||
AddTextPrinterParameterized(0, FONT_BRAILLE, ptr, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(0, FONT_BRAILLE, msg, 0, 1, 0, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ScrCmd_getbraillestringwidth(struct ScriptContext * ctx)
|
bool8 ScrCmd_getbraillestringwidth(struct ScriptContext * ctx)
|
||||||
{
|
{
|
||||||
u8 *ptr = (u8 *)ScriptReadWord(ctx);
|
u8 *msg = (u8 *)ScriptReadWord(ctx);
|
||||||
if (ptr == NULL)
|
if (msg == NULL)
|
||||||
ptr = (u8 *)ctx->data[0];
|
msg = (u8 *)ctx->data[0];
|
||||||
|
|
||||||
gSpecialVar_0x8004 = GetStringWidth(FONT_BRAILLE, ptr, -1);
|
gSpecialVar_0x8004 = GetStringWidth(FONT_BRAILLE, msg, -1);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user