add actions forward decl header (#699)

* add actions forward decl header

* newline

* format

* remove existing fwd declares

* Headers

* replace COMPAT_MODE check

* flip

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Ramen2X 2024-03-19 15:54:13 -04:00 committed by GitHub
parent eaa935f646
commit 2477b89e32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 285 additions and 111 deletions

View file

@ -5,7 +5,7 @@
namespace Act2mainScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace Act3Script
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -0,0 +1,246 @@
// This file was automatically generated by the actionheadergen tool.
// Please do not manually edit this file.
#ifndef ACTIONSFWD_H
#define ACTIONSFWD_H
namespace SndanimScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace SndanimScript
namespace NocdScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace NocdScript
namespace CreditsScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace CreditsScript
namespace IntroScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace IntroScript
namespace HospitalScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace HospitalScript
namespace CarraceScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace CarraceScript
namespace JetraceScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace JetraceScript
namespace CarracerScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace CarracerScript
namespace JetracerScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace JetracerScript
namespace InfoscorScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace InfoscorScript
namespace RegbookScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace RegbookScript
namespace HistbookScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace HistbookScript
namespace InfomainScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace InfomainScript
namespace ElevbottScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace ElevbottScript
namespace InfodoorScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace InfodoorScript
namespace RacecarScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace RacecarScript
namespace DunecarScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace DunecarScript
namespace CopterScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace CopterScript
namespace JetskiScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace JetskiScript
namespace GarageScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace GarageScript
namespace Act3Script
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace Act3Script
namespace Act2mainScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace Act2mainScript
namespace JukeboxwScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxwScript
namespace IsleScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
#if __cplusplus >= 201103L
enum Script2 : int;
#else
enum Script2;
#endif
} // namespace IsleScript
namespace JukeboxScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
namespace PoliceScript
{
#if __cplusplus >= 201103L
enum Script : int;
#else
enum Script;
#endif
} // namespace PoliceScript
#endif // ACTIONSFWD_H

View file

@ -5,7 +5,7 @@
namespace CarraceScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace CarracerScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace CopterScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace CreditsScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace DunecarScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace ElevbottScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace GarageScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace HistbookScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace HospitalScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace InfodoorScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace InfomainScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace InfoscorScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace IntroScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace IsleScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {
@ -2017,7 +2017,7 @@ enum Script {
c_frt139df_10_sfx = 2005
};
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script2 : int {
#else
enum Script2 {

View file

@ -5,7 +5,7 @@
namespace JetraceScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace JetracerScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace JetskiScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace JukeboxScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace JukeboxwScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace NocdScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace PoliceScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace RacecarScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace RegbookScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -5,7 +5,7 @@
namespace SndanimScript
{
#ifdef COMPAT_MODE
#if __cplusplus >= 201103L
enum Script : int {
#else
enum Script {

View file

@ -1,6 +1,7 @@
#ifndef HOSPITAL_H
#define HOSPITAL_H
#include "actionsfwd.h"
#include "decomp.h"
#include "hospitalstate.h"
#include "legogamestate.h"
@ -8,15 +9,6 @@
#include "mxstillpresenter.h"
#include "radio.h"
namespace HospitalScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace HospitalScript
// VTABLE: LEGO1 0x100d9730
// SIZE 0x12c
class Hospital : public LegoWorld {

View file

@ -1,6 +1,7 @@
#ifndef INFOCENTER_H
#define INFOCENTER_H
#include "actionsfwd.h"
#include "legogamestate.h"
#include "legoworld.h"
#include "mxrect32.h"
@ -10,15 +11,6 @@ class InfocenterState;
class MxStillPresenter;
class LegoControlManagerEvent;
namespace InfomainScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace InfomainScript
// SIZE 0x18
struct InfocenterMapEntry {
// FUNCTION: LEGO1 0x1006ec80

View file

@ -1,6 +1,7 @@
#ifndef ISLE_H
#define ISLE_H
#include "actionsfwd.h"
#include "legogamestate.h"
#include "legoworld.h"
#include "radio.h"
@ -19,24 +20,6 @@ class RaceCar;
class Jetski;
class Act1State;
namespace IsleScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace IsleScript
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
// VTABLE: LEGO1 0x100d6fb8
// SIZE 0x140
class Isle : public LegoWorld {

View file

@ -1,17 +1,9 @@
#ifndef JUKEBOXENTITY_H
#define JUKEBOXENTITY_H
#include "actionsfwd.h"
#include "legoentity.h"
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
// VTABLE: LEGO1 0x100da8a0
// SIZE 0x6c
class JukeBoxEntity : public LegoEntity {

View file

@ -1,6 +1,7 @@
#ifndef LEGOANIMATIONMANAGER_H
#define LEGOANIMATIONMANAGER_H
#include "actionsfwd.h"
#include "animstate.h"
#include "decomp.h"
#include "legotraninfolist.h"
@ -13,15 +14,6 @@ struct Character {
MxBool m_active; // 0x14
};
namespace IsleScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace IsleScript
// VTABLE: LEGO1 0x100d8c18
// SIZE 0x500
class LegoAnimationManager : public MxCore {

View file

@ -19,9 +19,6 @@ struct LegoCharacterComparator {
// SIZE 0x08
struct LegoCharacter {
LegoROI* m_roi; // 0x00
MxU32 m_refCount; // 0x04
LegoCharacter(LegoROI* p_roi)
{
m_roi = p_roi;
@ -29,6 +26,9 @@ struct LegoCharacter {
}
inline void AddRef() { m_refCount++; }
LegoROI* m_roi; // 0x00
MxU32 m_refCount; // 0x04
};
typedef map<const char*, LegoCharacter*, LegoCharacterComparator> LegoCharacterMap;

View file

@ -1,6 +1,7 @@
#ifndef LEGOGAMESTATE_H
#define LEGOGAMESTATE_H
#include "actionsfwd.h"
#include "decomp.h"
#include "legobackgroundcolor.h"
#include "legofullscreenmovie.h"
@ -17,15 +18,6 @@ struct ColorStringStruct {
const char* m_colorName;
};
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
// SIZE 0x430
class LegoGameState {
public:

View file

@ -3,6 +3,8 @@
#include "compat.h"
#include "decomp.h"
// Long include path due to dependency of misc library on LegoOmni
#include "lego/legoomni/include/actions/actionsfwd.h"
#include "mxtypes.h"
class IslePathActor;
@ -27,15 +29,6 @@ class MxTransitionManager;
class ViewLODListManager;
class ViewManager;
namespace JukeboxScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace JukeboxScript
extern MxBool g_isWorldActive;
LegoOmni* Lego();

View file

@ -1,19 +1,11 @@
#ifndef POLICESTATE_H
#define POLICESTATE_H
#include "actionsfwd.h"
#include "decomp.h"
#include "legostate.h"
#include "police.h"
namespace PoliceScript
{
#ifdef COMPAT_MODE
enum Script : int;
#else
enum Script;
#endif
} // namespace PoliceScript
// VTABLE: LEGO1 0x100d8af0
// SIZE 0x10
class PoliceState : public LegoState {