mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-07-19 17:01:51 -05:00
This documents the `unk_02027F50.c` file, which is in charge of managing data used by some maps to be more dynamic, and that needs to be persisted in the save file. Examples include Sunyshore Gym's bridges rotation, Pastoria Gym's water level, Canalave Gym's platform positions... This also documents related code in the save data module, and names constants used as IDs for identifying the map that is currently using dynamic features. Signed-off-by: Kuruyia <github@kuruyia.net>
29 lines
756 B
C
29 lines
756 B
C
#include "persisted_map_features.h"
|
|
|
|
#include <nitro.h>
|
|
#include <string.h>
|
|
|
|
void PersistedMapFeatures_Init(PersistedMapFeatures *persistedMapFeatures)
|
|
{
|
|
MI_CpuClear8(persistedMapFeatures, sizeof(PersistedMapFeatures));
|
|
}
|
|
|
|
void *PersistedMapFeatures_InitWithID(PersistedMapFeatures *persistedMapFeatures, int id)
|
|
{
|
|
PersistedMapFeatures_Init(persistedMapFeatures);
|
|
persistedMapFeatures->id = id;
|
|
|
|
return persistedMapFeatures->buffer;
|
|
}
|
|
|
|
void *PersistedMapFeatures_GetBuffer(PersistedMapFeatures *persistedMapFeatures, int id)
|
|
{
|
|
GF_ASSERT(persistedMapFeatures->id == id);
|
|
return persistedMapFeatures->buffer;
|
|
}
|
|
|
|
int PersistedMapFeatures_GetID(const PersistedMapFeatures *persistedMapFeatures)
|
|
{
|
|
return persistedMapFeatures->id;
|
|
}
|