Skip to content
Snippets Groups Projects
Select Git revision
  • better-distance-math
  • next default protected
  • movie
  • softcode-info
  • master protected
  • acs
  • spriteinfo-refactor
  • clipmidtex
  • custom-map-names
  • nogravity-trampolines
  • 2214-pre4
  • 2214-pre3
  • just-in-case
  • fix-opengl-parameter-crash
  • 2214-pre2
  • 2214-pre1
  • delfile2
  • cleanupmusic
  • gametype-refactor-1
  • extra-textures
  • SRB2_release_2.2.15
  • SRB2_release_2.2.13
  • SRB2_release_2.2.12
  • SRB2_release_2.2.11
  • SRB2_release_2.2.10
  • SRB2_release_2.2.9
  • SRB2_release_2.2.8
  • SRB2_release_2.2.7
  • SRB2_release_2.2.6
  • SRB2_release_2.2.5
  • SRB2_release_2.2.4
  • SRB2_release_2.2.3
  • SRB2_release_2.2.2
  • SRB2_release_2.2.1
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
40 results

lua_hook.h

Blame
  • spherallic's avatar
    sphere authored
    14295ac7
    History
    lua_hook.h 6.05 KiB
    // SONIC ROBO BLAST 2
    //-----------------------------------------------------------------------------
    // Copyright (C) 2012-2016 by John "JTE" Muniz.
    // Copyright (C) 2012-2022 by Sonic Team Junior.
    //
    // This program is free software distributed under the
    // terms of the GNU General Public License, version 2.
    // See the 'LICENSE' file for more details.
    //-----------------------------------------------------------------------------
    /// \file  lua_hook.h
    /// \brief hooks for Lua scripting
    
    #include "r_defs.h"
    #include "d_player.h"
    #include "s_sound.h"
    #include "d_event.h"
    
    /*
    Do you know what an 'X Macro' is? Such a macro is called over each element of
    a list and expands the input. I use it for the hook lists because both an enum
    and array of hook names need to be kept in order. The X Macro handles this
    automatically.
    */
    
    #define MOBJ_HOOK_LIST(X) \
    	X (MobjSpawn),/* P_SpawnMobj */\
    	X (MobjCollide),/* PIT_CheckThing */\
    	X (MobjLineCollide),/* ditto */\
    	X (MobjMoveCollide),/* tritto */\
    	X (TouchSpecial),/* P_TouchSpecialThing */\
    	X (MobjFuse),/* when mobj->fuse runs out */\
    	X (MobjThinker),/* P_MobjThinker, P_SceneryThinker */\
    	X (BossThinker),/* P_GenericBossThinker */\
    	X (ShouldDamage),/* P_DamageMobj (Should mobj take damage?) */\
    	X (MobjDamage),/* P_DamageMobj (Mobj actually takes damage!) */\
    	X (MobjDeath),/* P_KillMobj */\
    	X (BossDeath),/* A_BossDeath */\
    	X (MobjRemoved),/* P_RemoveMobj */\
    	X (BotRespawn),/* B_CheckRespawn */\
    	X (MobjMoveBlocked),/* P_XYMovement (when movement is blocked) */\
    	X (MapThingSpawn),/* P_SpawnMapThing */\
    	X (FollowMobj),/* P_PlayerAfterThink Smiles mobj-following */\
    
    #define HOOK_LIST(X) \
    	X (NetVars),/* add to archive table (netsave) */\
    	X (MapChange),/* (before map load) */\
    	X (MapLoad),\
    	X (PlayerJoin),/* Got_AddPlayer */\
    	X (PreThinkFrame)/* frame (before mobj and player thinkers) */,\
    	X (ThinkFrame),/* frame (after mobj and player thinkers) */\
    	X (PostThinkFrame),/* frame (at end of tick, ie after overlays, precipitation, specials) */\
    	X (JumpSpecial),/* P_DoJumpStuff (Any-jumping) */\
    	X (AbilitySpecial),/* P_DoJumpStuff (Double-jumping) */\
    	X (SpinSpecial),/* P_DoSpinAbility (Spin button effect) */\
    	X (JumpSpinSpecial),/* P_DoJumpStuff (Spin button effect (mid-air)) */\
    	X (BotTiccmd),/* B_BuildTiccmd */\
    	X (PlayerMsg),/* chat messages */\
    	X (HurtMsg),/* imhurttin */\
    	X (PlayerSpawn),/* G_SpawnPlayer */\
    	X (ShieldSpawn),/* P_SpawnShieldOrb */\
    	X (ShieldSpecial),/* shield abilities */\
    	X (PlayerCanDamage),/* P_PlayerCanDamage */\
    	X (PlayerQuit),\
    	X (IntermissionThinker),/* Y_Ticker */\
    	X (TeamSwitch),/* team switching in... uh... *what* speak, spit it the fuck out */\
    	X (ViewpointSwitch),/* spy mode (no trickstabs) */\
    	X (SeenPlayer),/* MT_NAMECHECK */\
    	X (PlayerThink),/* P_PlayerThink */\
    	X (GameQuit),\
    	X (PlayerCmd),/* building the player's ticcmd struct (Ported from SRB2Kart) */\