Merge branch 'romhack' into lighting

This commit is contained in:
Ariel A 2021-12-22 22:59:59 -05:00
commit 5034d14ffb
8 changed files with 17 additions and 30 deletions

View File

@ -720,6 +720,7 @@ Common_EventScript_OutOfCenterPartyHeal::
playfanfare MUS_HEAL
waitfanfare
special HealPlayerParty
callnative UpdateFollowingPokemon
fadescreen FADE_FROM_BLACK
return

View File

@ -79,6 +79,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern::
playfanfare MUS_HEAL
waitfanfare
special HealPlayerParty
callnative UpdateFollowingPokemon
removeobject LOCALID_CAPT_STERN
setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA
call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch
@ -437,4 +438,3 @@ SlateportCity_OceanicMuseum_2F_Text_SSAnneReplica:
.string "“S.S. ANNE\p"
.string "“A replica of the luxury liner that\n"
.string "circles the globe.”$"

View File

@ -96,6 +96,7 @@ TrainerHill_Entrance_EventScript_PlayerExitChallenge::
waitmovement 0
setvar VAR_TRAINER_HILL_IS_ACTIVE, 0
special HealPlayerParty
callnative UpdateFollowingPokemon
releaseall
TrainerHill_Entrance_EventScript_EndExitChallenge::
end
@ -161,6 +162,7 @@ TrainerHill_Entrance_EventScript_ChooseChallenge::
setvar VAR_TRAINER_HILL_IS_ACTIVE, 1
setvar VAR_TEMP_5, 0
special HealPlayerParty
callnative UpdateFollowingPokemon
msgbox TrainerHill_Entrance_Text_TimeProgessGetSetGo, MSGBOX_DEFAULT
trainerhill_start
releaseall

View File

@ -33,13 +33,14 @@ EventScript_PkmnCenterNurse_IllTakeYourPkmn2::
return
EventScript_PkmnCenterNurse_TakeAndHealPkmn::
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft @ TODO: Make follower disappear here
waitmovement 0
dofieldeffect FLDEFF_POKECENTER_HEAL
waitfieldeffect FLDEFF_POKECENTER_HEAL
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
special HealPlayerParty
callnative UpdateFollowingPokemon
return
EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom::

View File

@ -646,6 +646,7 @@ SecretBase_EventScript_BattleTrainer::
call_if_eq VAR_RESULT, B_OUTCOME_WON, SecretBase_EventScript_WonSecretBaseBattle
call_if_eq VAR_RESULT, B_OUTCOME_LOST, SecretBase_EventScript_LostSecretBaseBattle
special HealPlayerParty
callnative UpdateFollowingPokemon
release
end

View File

@ -92,6 +92,7 @@ void OverrideSecretBaseDecorationSpriteScript(u8 localId, u8 mapNum, u8 mapGroup
void GetMapCoordsFromSpritePos(s16, s16, s16 *, s16 *);
u8 GetFaceDirectionAnimNum(u8);
void SetSpritePosToOffsetMapCoords(s16 *, s16 *, s16, s16);
void ClearObjectEventMovement(struct ObjectEvent *objectEvent, struct Sprite *sprite);
void ObjectEventClearHeldMovement(struct ObjectEvent *);
void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *);
struct Pokemon * GetFirstLiveMon(void);

View File

@ -156,7 +156,6 @@ static void CameraObject_0(struct Sprite *);
static void CameraObject_1(struct Sprite *);
static void CameraObject_2(struct Sprite *);
static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count);
static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *);
static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8);
static void SetSpriteDataForNormalStep(struct Sprite *, u8, u8);
static void InitSpriteForFigure8Anim(struct Sprite *sprite);
@ -5115,7 +5114,7 @@ bool8 MovementType_Invisible_Step2(struct ObjectEvent *objectEvent, struct Sprit
return FALSE;
}
static void ClearObjectEventMovement(struct ObjectEvent *objectEvent, struct Sprite *sprite)
void ClearObjectEventMovement(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
objectEvent->singleMovementActive = FALSE;
objectEvent->heldMovementActive = FALSE;

View File

@ -1011,14 +1011,8 @@ bool8 ScrCmd_applymovement(struct ScriptContext *ctx)
if (objEvent == NULL || gSprites[objEvent->spriteId].data[1] == 0) {
return FALSE;
}
// ClearEventObjectMovement(
objEvent->singleMovementActive = 0;
objEvent->heldMovementActive = FALSE;
objEvent->heldMovementFinished = FALSE;
objEvent->movementActionId = 0xFF;
gSprites[objEvent->spriteId].data[1] = 0;
// )
gSprites[objEvent->spriteId].animCmdIndex = 0; // Needed because of weird animCmdIndex stuff
ClearObjectEventMovement(objEvent, &gSprites[objEvent->spriteId]);
gSprites[objEvent->spriteId].animCmdIndex = 0; // Needed to set start frame of animation
ScriptMovement_StartObjectMovementScript(OBJ_EVENT_ID_FOLLOWER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, EnterPokeballMovement);
}
return FALSE;
@ -1268,15 +1262,9 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
{
u8 playerObjectId;
struct ObjectEvent *followerObject = GetFollowerObject();
if (followerObject) { // Release follower from movement
// ObjectEventClearHeldMovement( TODO: Change the way data[1] determines state
followerObject->singleMovementActive = FALSE;
followerObject->movementActionId = 0xFF;
followerObject->heldMovementActive = FALSE;
followerObject->heldMovementFinished = FALSE;
gSprites[followerObject->spriteId].data[2] = 0;
// )
}
// Release follower from movement iff it exists and is in the shadowing state
if (followerObject && gSprites[followerObject->spriteId].data[1] == 0)
ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]);
HideFieldMessageBox();
playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0);
@ -1290,15 +1278,9 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
{
u8 playerObjectId;
struct ObjectEvent *followerObject = GetFollowerObject();
if (followerObject) { // Release follower from movement
// ObjectEventClearHeldMovement(
followerObject->singleMovementActive = FALSE;
followerObject->movementActionId = 0xFF;
followerObject->heldMovementActive = FALSE;
followerObject->heldMovementFinished = FALSE;
gSprites[followerObject->spriteId].data[2] = 0;
// )
}
// Release follower from movement iff it exists and is in the shadowing state
if (followerObject && gSprites[followerObject->spriteId].data[1] == 0)
ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]);
HideFieldMessageBox();
if (gObjectEvents[gSelectedObjectEvent].active)