mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-03-21 17:55:13 -05:00
Document ov5_021D12D0, which clearly handles zone changes in distortion world (#995)
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
This commit is contained in:
parent
fbcfa7400a
commit
8cf15a6854
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
extern const ApplicationManagerTemplate gFieldMapTemplate;
|
||||
|
||||
void ov5_021D12D0(FieldSystem *fieldSystem, u32 param1);
|
||||
void FieldMap_ChangeZoneDistortionWorld(FieldSystem *fieldSystem, u32 mapId);
|
||||
void ov5_021D1434(BgConfig *param0);
|
||||
void ov5_021D143C(BgConfig *param0);
|
||||
void ov5_021D16F4(FieldSystem *fieldSystem, BOOL param1);
|
||||
|
|
|
|||
|
|
@ -455,23 +455,20 @@ static BOOL FieldMap_ChangeZone(FieldSystem *fieldSystem)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void ov5_021D12D0(FieldSystem *fieldSystem, u32 param1)
|
||||
void FieldMap_ChangeZoneDistortionWorld(FieldSystem *fieldSystem, u32 mapId)
|
||||
{
|
||||
u32 mapId;
|
||||
FieldOverworldState *fieldState;
|
||||
u32 oldMapId = fieldSystem->location->mapId;
|
||||
FieldOverworldState *fieldState = SaveData_GetFieldOverworldState(fieldSystem->saveData);
|
||||
|
||||
mapId = fieldSystem->location->mapId;
|
||||
fieldState = SaveData_GetFieldOverworldState(fieldSystem->saveData);
|
||||
fieldSystem->location->mapId = mapId;
|
||||
|
||||
fieldSystem->location->mapId = param1;
|
||||
|
||||
MapHeaderData_Load(fieldSystem, param1);
|
||||
MapHeaderData_Load(fieldSystem, mapId);
|
||||
FieldMapChange_UpdateGameDataDistortionWorld(fieldSystem, 1);
|
||||
|
||||
int objEventCount = MapHeaderData_GetNumObjectEvents(fieldSystem);
|
||||
const ObjectEvent *objEventList = MapHeaderData_GetObjectEvents(fieldSystem);
|
||||
|
||||
sub_0206184C(fieldSystem->mapObjMan, mapId, param1, objEventCount, objEventList);
|
||||
sub_0206184C(fieldSystem->mapObjMan, oldMapId, mapId, objEventCount, objEventList);
|
||||
|
||||
Sound_TryFadeOutToBGM(fieldSystem, Sound_GetOverrideBGM(fieldSystem, fieldSystem->location->mapId), 1);
|
||||
sub_0203A418(fieldSystem);
|
||||
|
|
|
|||
|
|
@ -4717,7 +4717,7 @@ static int ov9_0224CCB8(DistWorldSystem *param0, UnkStruct_ov9_0224CBD8 *param1)
|
|||
v2 = GetConnectionsForMap(v2->nextID);
|
||||
param1->unk_0C = v2->currID;
|
||||
|
||||
ov5_021D12D0(param0->fieldSystem, param1->unk_0C);
|
||||
FieldMap_ChangeZoneDistortionWorld(param0->fieldSystem, param1->unk_0C);
|
||||
ov9_0224BF18(param0, v2->nextID);
|
||||
LandDataManager_DistortionWorldEndWithoutFreeing(fieldSystem->landDataMan);
|
||||
|
||||
|
|
@ -4841,7 +4841,7 @@ static int ov9_0224CEBC(DistWorldSystem *param0, UnkStruct_ov9_0224CBD8 *param1)
|
|||
|
||||
param1->unk_0C = v2->currID;
|
||||
|
||||
ov5_021D12D0(param0->fieldSystem, param1->unk_0C);
|
||||
FieldMap_ChangeZoneDistortionWorld(param0->fieldSystem, param1->unk_0C);
|
||||
ov9_0224BEB4(param0, param1->unk_0C);
|
||||
|
||||
if (v1->unk_10 == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user