mirror of
https://github.com/zeldaret/st
synced 2026-07-10 23:11:57 -04:00
Improve or match actor static initializers (#44)
* use the new DECL_PROFILE macro to match static initializers * forgot to keep the mode macro * same thing with mapobjects * create profile.hpp * update delink and symbols for eur * update delink and symbols for jp * ninja format * fix some stuff 1 * fix jp build
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Actor/ActorId.hpp"
|
||||
#include "Physics/Cylinder.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "profile.hpp"
|
||||
#include "types.h"
|
||||
|
||||
class Actor;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Map/MapObjectId.hpp"
|
||||
#include "Physics/Cylinder.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "profile.hpp"
|
||||
#include "types.h"
|
||||
|
||||
class MapObject;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#define DECL_PROFILE(T) \
|
||||
T ProfileInstance<T>::sProfile; \
|
||||
T *T::GetProfile() { \
|
||||
return &ProfileInstance<T>::sProfile; \
|
||||
}
|
||||
|
||||
template <typename T> struct ProfileInstance {
|
||||
static T sProfile;
|
||||
};
|
||||
Reference in New Issue
Block a user