mirror of
https://github.com/pret/pmd-red.git
synced 2026-03-21 17:46:39 -05:00
UNLOCK_FRIEND_AREA cmd
This commit is contained in:
parent
114cc7a3c6
commit
8bac08d14d
|
|
@ -103,7 +103,8 @@
|
|||
#define SCENARIO_ADVANCE(v,a) { 0xAA, 0, v, a, 0, NULL }
|
||||
#define SET_DUNGEON_RES(r,e) { 0xAB, 0, r, e, 0, NULL }
|
||||
#define SET_PLAYER_KIND(k) { 0xAC, 0, k, 0, 0, NULL }
|
||||
// ad..b2: opaque functions
|
||||
#define UNLOCK_FRIEND_AREA(a) { 0xAD, TRUE, a, 0, 0, NULL }
|
||||
// ae..b2: opaque functions
|
||||
#define JUMPIF_EQUAL(v,i,l) { 0xB3, l, v, i, 0, NULL }
|
||||
#define JUMPIF(o,v,i,l) { 0xB4, o, l, v, i, NULL }
|
||||
#define JUMPIF_2(o,a,b,l) { 0xB5, o, l, a, b, NULL }
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ bool8 CheckQuest(s32 questID);
|
|||
u8 MapIdToFriendAreaId(s16 mapId_); // map -> friend area lookup
|
||||
s16 FriendAreaIdToMapId(u8 friendAreaId); // friend area -> map lookup
|
||||
bool8 sub_80026CC(s16 r0);
|
||||
void sub_80026E8(s16 r0, bool8 r1);
|
||||
void ScriptUnlockFriendArea(s16 r0, bool8 r1);
|
||||
bool8 SaveGlobalScriptVars(void *dest);
|
||||
bool8 RestoreGlobalScriptVars(u8 *src);
|
||||
|
||||
|
|
|
|||
|
|
@ -3054,7 +3054,7 @@ static const struct ScriptCommand s_script_EVENT_S01E02A_START[] = { /* 0x812816
|
|||
SCENARIO_CALC(SCENARIO_SUB1, 31, 1),
|
||||
{ 0xae, 0x01, 0x000f, 0x00000000, 0x00000000, NULL },
|
||||
{ 0xb0, 0x01, 0x000e, 0x00000000, 0x00000000, NULL },
|
||||
{ 0xad, 0x01, 0x0076, 0x00000000, 0x00000000, NULL },
|
||||
UNLOCK_FRIEND_AREA(MAP_FRIEND_AREA_SKY_BLUE_PLAINS),
|
||||
UPDATE_VARINT(CALC_SET, BASE_LEVEL, 2),
|
||||
RET_DIRECT,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -922,7 +922,7 @@ bool8 sub_80026CC(s16 r0)
|
|||
}
|
||||
|
||||
// arm9.bin::0200E568
|
||||
void sub_80026E8(s16 r0, bool8 r1)
|
||||
void ScriptUnlockFriendArea(s16 r0, bool8 r1)
|
||||
{
|
||||
UnlockFriendArea(MapIdToFriendAreaId(r0));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ u32 xxx_script_related_8098468(s32 param_1)
|
|||
s32 local_1c;
|
||||
u32 auStack24;
|
||||
|
||||
GetScriptVarScenario(3,&local_1c,&auStack24);
|
||||
GetScriptVarScenario(SCENARIO_MAIN,&local_1c,&auStack24);
|
||||
gUnknown_20398B8 = local_1c == 0;
|
||||
gUnknown_20398B9 = 1;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2552,31 +2552,31 @@ static s32 ExecuteScriptCommand(Action *action)
|
|||
UpdateScriptVarWithVar(scriptData->localVars.buf, curCmd.argShort, (s16)curCmd.arg1, curCmd.argByte);
|
||||
break;
|
||||
}
|
||||
case 0xa8: {
|
||||
case 0xA8: { // SET_ARRAYVAL
|
||||
SetScriptVarArrayValue(scriptData->localVars.buf, curCmd.argShort, (u16)curCmd.arg1, curCmd.arg2);
|
||||
break;
|
||||
}
|
||||
case 0xa9: {
|
||||
case 0xA9: { // SCENARIO_CALC
|
||||
ScenarioCalc(curCmd.argShort, curCmd.arg1, curCmd.arg2);
|
||||
break;
|
||||
}
|
||||
case 0xaa: {
|
||||
case 0xAA: { // SCENARIO_ADVANCE
|
||||
s32 a, b;
|
||||
GetScriptVarScenario(curCmd.argShort, &a, &b);
|
||||
ScenarioCalc(curCmd.argShort, a, b+1);
|
||||
ScenarioCalc(curCmd.argShort, a, b + 1);
|
||||
break;
|
||||
}
|
||||
case 0xab: {
|
||||
case 0xAB: { // SET_DUNGEON_RES
|
||||
SetScriptVarValue(NULL, DUNGEON_ENTER, curCmd.arg1);
|
||||
SetScriptVarValue(NULL, DUNGEON_RESULT, curCmd.argShort);
|
||||
break;
|
||||
}
|
||||
case 0xac: {
|
||||
case 0xAC: { // SET_PLAYER_KIND
|
||||
SetScriptVarValue(NULL, PLAYER_KIND, curCmd.argShort);
|
||||
break;
|
||||
}
|
||||
case 0xad: {
|
||||
sub_80026E8(curCmd.argShort, (u8)curCmd.argByte > 0);
|
||||
case 0xAD: { // UNLOCK_FRIEND_AREA
|
||||
ScriptUnlockFriendArea(curCmd.argShort, (u8)curCmd.argByte > 0);
|
||||
break;
|
||||
}
|
||||
case 0xae: {
|
||||
|
|
@ -2641,13 +2641,13 @@ static s32 ExecuteScriptCommand(Action *action)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 0xba: { // JUMPIF_SCENE_GT
|
||||
case 0xBA: { // JUMPIF_SCENE_GT
|
||||
if (ScriptVarScenarioAfter(curCmd.argShort, curCmd.arg1, curCmd.arg2)) {
|
||||
scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0xbb: { // JUMPIF_SCENARIOCHECK
|
||||
case 0xBB: { // JUMPIF_SCENARIOCHECK
|
||||
if (CheckQuest(curCmd.argShort)) {
|
||||
scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte);
|
||||
}
|
||||
|
|
@ -3267,7 +3267,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3)
|
|||
}
|
||||
break;
|
||||
case 0x20:
|
||||
sub_80026E8(0x9E, 0x1);
|
||||
ScriptUnlockFriendArea(MAP_FRIEND_AREA_LEGENDARY_ISLAND, TRUE);
|
||||
if (GetRecruitedMonBySpecies(MONSTER_ZAPDOS, 0) == NULL) {
|
||||
static const DungeonLocation zapdosLoc = {.id = DUNGEON_MT_THUNDER_PEAK, .floor = 99};
|
||||
if (TryAddLevel1PokemonToRecruited(MONSTER_ZAPDOS, NULL, ITEM_NOTHING, &zapdosLoc, NULL))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user