AERMRE 1.5.1
AER modding framework for Hyper Light Drifter.
|
Definition of a mod. More...
#include <mod.h>
Public Attributes | |
void(* | constructor )(void) |
Callback function which constructs a mod. More... | |
void(* | destructor )(void) |
Callback function which destructs a mod. More... | |
void(* | registerSprites )(void) |
Callback function which registers a mod's sprites. More... | |
void(* | registerObjects )(void) |
Callback function which registers a mod's objects. More... | |
void(* | registerObjectListeners )(void) |
Callback function which registers a mod's object event listeners. More... | |
void(* | gameStepListener )(void) |
Mod's game step pseudo-event listener. More... | |
void(* | gamePauseListener )(bool paused) |
Mod's game pause pseudo-event listener. More... | |
void(* | roomChangeListener )(int32_t newRoomIdx, int32_t prevRoomIdx) |
This member is a deprecated alias for AERModDef::roomStartListener. More... | |
void(* | registerFonts )(void) |
Callback function which registers a mod's fonts. More... | |
void(* | gameSaveListener )(int32_t curSlotIdx) |
Mod's game save pseudo-event listener. More... | |
void(* | gameLoadListener )(int32_t curSlotIdx) |
Mod's game load pseudo-event listener. More... | |
void(* | roomStartListener )(int32_t newRoomIdx, int32_t prevRoomIdx) |
Mod's room-start pseudo-event listener. More... | |
void(* | roomEndListener )(int32_t newRoomIdx, int32_t prevRoomIdx) |
Mod's room-end pseudo-event listener. More... | |
Definition of a mod.
constructor |
Callback function which constructs a mod.
__attribute__((constructor))
. NULL
if mod does not need construction.destructor |
Callback function which destructs a mod.
__attribute__((destructor))
. NULL
if mod does not need destruction.gameLoadListener |
Mod's game load pseudo-event listener.
If provided and the game data gets loaded, the MRE will call this function immediately after the game reads and parses data from the savefile but immediately before that gets applied to any in-game state.
This means that any calls to the functions in save.h from within this listener will be saved at the next save point. However, this also means that any changes made to vanilla state (i.e. changing the number of gearbits that the player has) will be overwritten and will not be saved at the next save point.
NULL
.[in] | curSlotIdx | Index of save slot from which the game is loading data. |
gamePauseListener |
Mod's game pause pseudo-event listener.
If provided and the game is paused or unpaused, the MRE will call this function at the very start of the first step of the new pause state (immediately before calling gameStepListener).
This event does not exist in the GameMaker engine; the MRE provides it as a convenience to mod developers.
NULL
.[in] | paused | Whether game was paused (true ) or unpaused (false ). |
gameSaveListener |
Mod's game save pseudo-event listener.
If provided and the game data gets saved, the MRE will call this function immediately after the game has finalized its vanilla save data but immediately before that data has been written to the savefile.
This means that any calls to the functions in save.h from within this listener will make it into the savefile. However, this also means that any changes made to vanilla state (i.e. changing the number of gearbits that the player has) will not make it into the savefile.
NULL
.[in] | curSlotIdx | Index of save slot to which the game is saving data. |
gameStepListener |
Mod's game step pseudo-event listener.
This is effectively the global "tick" function of a mod. If provided, the MRE will unconditionally call it at the very start of every in-game step (before any object event listeners are called, including pre-step listeners).
This event does not exist in the GameMaker engine; the MRE provides it as a convenience to mod developers.
NULL
.registerFonts |
Callback function which registers a mod's fonts.
NULL
if mod does not register any fonts.registerObjectListeners |
Callback function which registers a mod's object event listeners.
NULL
if mod does not register any object event listeners.registerObjects |
Callback function which registers a mod's objects.
NULL
if mod does not register any objects.registerSprites |
Callback function which registers a mod's sprites.
NULL
if mod does not register/replace any sprites.roomChangeListener |
This member is a deprecated alias for AERModDef::roomStartListener.
roomEndListener |
Mod's room-end pseudo-event listener.
If provided and the game switches to a new room, the MRE will call this function immediately before the new room is the current room but immediately after all object room-end listeners have been called.
NULL
.[in] | newRoomIdx | Index of new room that is about to be switched to. |
[in] | prevRoomIdx | Index of current room that is about to be switched away from. |
roomStartListener |
Mod's room-start pseudo-event listener.
If provided and the game switches to a new room, the MRE will call this function once the new room is the current room, immediately before all object room-start listeners have been called.
NULL
.[in] | newRoomIdx | Index of current, new room that was just switched to. |
[in] | prevRoomIdx | Index of previous room that was switched away from. |