Cavestory Mod API
Public Member Functions | Static Public Attributes | List of all members
BaseModInterface Class Reference

The base mod interface. More...

#include <CSMAPI_BaseModInterface.h>

Public Member Functions

 BaseModInterface ()
 Default constructor. More...
 
 ~BaseModInterface ()
 Default deconstructor. More...
 
virtual int OnInit ()
 Called when the mod is initialized. More...
 
virtual void OnShutdown ()
 Called when the mod is exiting.
 
virtual int OnEnterTitleScreen (bool &bImmediateReturn, unsigned char &pAction)
 Called when the titlescreen is initialized. More...
 
virtual bool IsMultiplayer ()
 Defines whether this mod supports multiplayer or not. More...
 
virtual bool IsSingleplayer ()
 Defines whether this mod supports singleplayer or not. More...
 
virtual bool HasIntroSequence ()
 Define whether this mod has an intro sequence or not. More...
 
virtual int GetIntroSequenceLength ()
 Define the length of the intro sequence in ticks. More...
 
virtual bool IsRevivingPlayersAllowed ()
 Define whether this mod allows reviving players. More...
 
virtual bool DisableEveryoneDiedEvent ()
 Defines whether this mod should force the 'TestEveryoneDied()' to always return 'false'. More...
 

Static Public Attributes

static BaseModInterfacegsModInterface
 The current mod interface.
 

Detailed Description

The base mod interface.

This class MUST be defined in a child class for every mod. It provides useful callbacks for mods.

Constructor & Destructor Documentation

◆ BaseModInterface()

BaseModInterface::BaseModInterface ( )

Default constructor.

Note
This does NOT call OnInit().

◆ ~BaseModInterface()

BaseModInterface::~BaseModInterface ( )

Default deconstructor.

Note
This does NOT call OnShutdown().

Member Function Documentation

◆ DisableEveryoneDiedEvent()

virtual bool BaseModInterface::DisableEveryoneDiedEvent ( )
inlinevirtual

Defines whether this mod should force the 'TestEveryoneDied()' to always return 'false'.

Returns
Should return 'true' if 'TestEveryoneDied()' should be forced to always return 'false'.

◆ GetIntroSequenceLength()

virtual int BaseModInterface::GetIntroSequenceLength ( )
inlinevirtual

Define the length of the intro sequence in ticks.

Returns
Returns the length of the intro sequence, in ticks.

◆ HasIntroSequence()

virtual bool BaseModInterface::HasIntroSequence ( )
inlinevirtual

Define whether this mod has an intro sequence or not.

Returns
Returns true if this mod has an intro sequence, false if not.

◆ IsMultiplayer()

virtual bool BaseModInterface::IsMultiplayer ( )
inlinevirtual

Defines whether this mod supports multiplayer or not.

Returns
Returns true if this mod supports multiplayer, false if not.

◆ IsRevivingPlayersAllowed()

virtual bool BaseModInterface::IsRevivingPlayersAllowed ( )
inlinevirtual

Define whether this mod allows reviving players.

Returns
Returns true if this mod allows reviving players.

◆ IsSingleplayer()

virtual bool BaseModInterface::IsSingleplayer ( )
inlinevirtual

Defines whether this mod supports singleplayer or not.

Returns
Returns true if this mod supports singleplayer, false if not.

◆ OnEnterTitleScreen()

virtual int BaseModInterface::OnEnterTitleScreen ( bool &  bImmediateReturn,
unsigned char &  pAction 
)
inlinevirtual

Called when the titlescreen is initialized.

Parameters
bImmediateReturnSet this to true to have the function who called this immediately return with this function's return value. Useful for custom titlescreens.
Returns
Should return the next mode.

◆ OnInit()

virtual int BaseModInterface::OnInit ( )
inlinevirtual

Called when the mod is initialized.

Returns
Should return 0 on success, non-zero on error.

The documentation for this class was generated from the following file: