mirror of
https://github.com/zeldaret/st
synced 2026-06-18 15:35:30 -04:00
5e934a8c9b
* name func_01ffd3d8 and func_01ffd400 * name func_01ffd3b0 * match func_ov024_020cf9d4 + improve the Random struct * UnkStruct_027e0cf8_00_0C_024 45% * match PassengerManager::GetRandomIndex * UnkStruct_027e0cf8_00_0C_024 OK * UnkStruct_027e0cf8_00_0C_024: do other sections * UnkStruct_027e0cf8_08_024 55% * cleanup: remplace delete into null by the delete macro * UnkStruct_027e0cf8_08_024 OK * fix build issues * UnkStruct_ov024_020d86a0_024 OK * PlayerActor_A0_38_024 .text OK, CreditsEndingType OK * tools: create courselist.py to convert .CLB data to yaml * UnkDataStruct4_14 OK * UnkDataStruct4 17% * UnkDataStruct4 OK * MiscAdvManager OK * PassengerManager OK * fix build issues * ZeldaTrainBinary OK * mark PassengerManager as complete and adjust delinks * UnkStruct_027e0cf8_08_00_024 OK * document more of UnkStruct_027e0ce0 * savefile hotfixes * UnkStruct_027e0ce0_34_024 OK * code_020d46b4_024 OK * UnkStruct_027e0d00 & UnkStruct_027e0d00_20 OK * code_020d51dc_024 OK * fix weird formatting * UnkTrainSystem1 OK * fix jp broken match * UnkTrainSystem2 OK * UnkStruct_027e0d08_024 31% * fix build issues * UnkStruct_027e0d08 OK!!! * remove useless parenthesis * ActorUnk_ov000_020a8bb0_EC OK * move ActorUnk_ov000_020a8bb0_EC to MainGame/Actor/ * ActorUnkOBPC OK * add sjiswrap support * solve remaining gaps and fix build issues * reorganise files + counter docs * tools: remove format command execution from defaults
94 lines
2.4 KiB
C++
94 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#include "Actor/ActorId.hpp"
|
|
#include "Save/AdventureFlags.hpp"
|
|
#include "Unknown/UnkStruct_027e09a4.hpp"
|
|
#include "types.h"
|
|
|
|
enum HappinessLevel_ {
|
|
HappinessLevel_0,
|
|
HappinessLevel_1,
|
|
HappinessLevel_2,
|
|
HappinessLevel_3,
|
|
HappinessLevel_4,
|
|
HappinessLevel_5,
|
|
};
|
|
|
|
struct UnkStruct_Param1 {
|
|
/* 00 */ ActorId actorId;
|
|
/* 04 */ s16 mUnk_04;
|
|
/* 06 */ SceneIndex_Half sceneIndex;
|
|
/* 08 */ u8 roomIndex;
|
|
/* 0C */ unk32 mUnk_0C;
|
|
/* 10 */ unk32 happiness;
|
|
/* 14 */ u16 mUnk_14;
|
|
/* 18 */
|
|
};
|
|
|
|
class Passenger {
|
|
public:
|
|
/* 00 */ ActorId mActorId;
|
|
/* 04 */ unk32 mUnk_04;
|
|
/* 08 */ SceneIndex mSceneIndex;
|
|
/* 0C */ u8 mRoomIndex;
|
|
/* 10 */ unk32 mHappiness;
|
|
|
|
Passenger();
|
|
void Reset();
|
|
};
|
|
|
|
class PassengerManager : public AutoInstance<PassengerManager> {
|
|
public:
|
|
/* 00 */ Passenger mPassenger;
|
|
/* 14 */ Passenger mPassenger2;
|
|
/* 28 */ u16 mDate;
|
|
/* 2A */ unk16 mUnk_2A;
|
|
/* 2C */ unk32 mUnk_2C;
|
|
/* 30 */ unk32 mUnk_30;
|
|
/* 34 */
|
|
|
|
// overlay 1
|
|
PassengerManager();
|
|
~PassengerManager();
|
|
|
|
void func_ov001_020bf8e4();
|
|
void func_ov001_020bf90c();
|
|
void func_ov001_020bf910();
|
|
bool func_ov001_020bfa1c();
|
|
|
|
static bool func_ov001_020bf870();
|
|
|
|
// overlay 24
|
|
void func_ov024_020d41bc(const UnkStruct_Param1 *pActorId);
|
|
void func_ov024_020d41f4(UnkStruct_Param1 *param1);
|
|
void func_ov024_020d4228();
|
|
void func_ov024_020d4258();
|
|
bool TryBoardTrain(ActorId actorId, SceneIndex sceneIndex, u32 roomIndex);
|
|
bool TryReset();
|
|
bool TryResetAtDestination();
|
|
bool ReachedDestination(SceneIndex sceneIndex, u32 roomIndex);
|
|
bool TrySetCaughtByPirates();
|
|
bool CaughtByPiratesTryReset();
|
|
void GiveHappiness(unk32 amount);
|
|
unk32 GetHappiness();
|
|
unk32 GetHappinessCond();
|
|
bool CanCompleteTrip();
|
|
bool IsCaughtByPirates();
|
|
ActorId GetActorId();
|
|
PassengerManager *GetInstance();
|
|
void func_ov024_020d4554();
|
|
void Reset();
|
|
bool IsDateUnset();
|
|
s16 GetDate();
|
|
u32 GetRandomIndex(u32 param1, u32 seed);
|
|
void SetFailedFlag();
|
|
|
|
static u32 GetPassengerInfoIndex(ActorId actorId);
|
|
static AdventureFlag GetBoardFlag(ActorId actorId);
|
|
static AdventureFlag GetFailFlag(ActorId actorId);
|
|
static PassengerManager *Create();
|
|
};
|
|
|
|
extern PassengerManager *gpPassengerManager;
|
|
extern const s16 data_ov024_020d7598[];
|