// SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 1999-2023 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 p_spec.h /// \brief Implements special effects: /// Texture animation, height or lighting changes /// according to adjacent sectors, respective /// utility functions, etc. #ifndef __P_SPEC__ #define __P_SPEC__ extern mobj_t *skyboxmo[2]; // current skybox mobjs: 0 = viewpoint, 1 = centerpoint extern mobj_t *skyboxviewpnts[16]; // array of MT_SKYBOX viewpoint mobjs extern mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs extern size_t secportalcount; extern size_t secportalcapacity; extern sectorportal_t *secportals; // Amount (dx, dy) vector linedef is shifted right to get scroll amount #define SCROLL_SHIFT 5 typedef enum { TMM_DOUBLESIZE = 1, TMM_SILENT = 1<<1, TMM_ALLOWYAWCONTROL = 1<<2, TMM_SWING = 1<<3, TMM_MACELINKS = 1<<4, TMM_CENTERLINK = 1<<5, TMM_CLIP = 1<<6, TMM_ALWAYSTHINK = 1<<7, } textmapmaceflags_t; typedef enum { TMDA_BOTTOMOFFSET = 1, TMDA_BOTTOM = 1<<1, TMDA_MIDDLE = 1<<2, TMDA_TOP = 1<<3, } textmapdronealignment_t; typedef enum { TMSF_RETRACTED = 1, TMSF_INTANGIBLE = 1<<1, } textmapspikeflags_t; typedef enum { TMFF_AIMLESS = 1, TMFF_STATIONARY = 1<<1, TMFF_HOP = 1<<2, } textmapflickyflags_t; typedef enum { TMFH_NOFLAME = 1, TMFH_CORONA = 1<<1, } textmapflameholderflags_t; typedef enum { TMDS_NOGRAVITY = 1, TMDS_ROTATEEXTRA = 1<<1, } textmapdiagonalspringflags_t; typedef enum { TMF_INVISIBLE = 1, TMF_NODISTANCECHECK = 1<<1, } textmapfanflags_t; typedef enum { TMGD_BACK = 0, TMGD_RIGHT = 1, TMGD_LEFT = 2, } textmapguarddirection_t; typedef enum { TMNI_BONUSONLY = 1, TMNI_REVEAL = 1<<1, } textmapnightsitem_t; typedef enum { TMP_NORMAL = 0, TMP_SLIDE = 1, TMP_IMMOVABLE = 2, TMP_CLASSIC = 3, } textmappushabletype_t; typedef enum { TMED_NONE = 0, TMED_RIGHT = 1, TMED_LEFT = 2, } textmapeggrobodirection_t; typedef enum { TMMR_SAME = 0, TMMR_WEAK = 1, TMMR_STRONG = 2, } textmapmonitorrespawn_t; typedef enum { TMF_GRAYSCALE = 1, TMF_SKIPINTRO = 1<<1, } textmapfangflags_t; typedef enum { TMB_NODEATHFLING = 1, TMB_BARRIER = 1<<1, } textmapbrakflags_t; typedef enum { TMEF_SKIPTALLY = 1, TMEF_EMERALDCHECK = 1<<1, } textmapexitflags_t; typedef enum { TMSP_NOTELEPORT = 1, TMSP_FORCESPIN = 1<<1, } textmapspeedpadflags_t; //FOF flags typedef enum { TMFA_NOPLANES = 1, TMFA_NOSIDES = 1<<1, TMFA_INSIDES = 1<<2, TMFA_ONLYINSIDES = 1<<3, TMFA_NOSHADE = 1<<4, TMFA_SPLAT = 1<<5, } textmapfofappearance_t; typedef enum { TMFT_INTANGIBLETOP = 1, TMFT_INTANGIBLEBOTTOM = 1<<1, TMFT_DONTBLOCKPLAYER = 1<<2, TMFT_VISIBLEFROMINSIDE = (TMFT_INTANGIBLETOP|TMFT_INTANGIBLEBOTTOM|TMFT_DONTBLOCKPLAYER), TMFT_DONTBLOCKOTHERS = 1<<3, TMFT_INTANGIBLE = (TMFT_DONTBLOCKPLAYER|TMFT_DONTBLOCKOTHERS), } textmapfoftangibility_t; typedef enum { TMFW_NOSIDES = 1, TMFW_DOUBLESHADOW = 1<<1, TMFW_COLORMAPONLY = 1<<2, TMFW_NORIPPLE = 1<<3, TMFW_GOOWATER = 1<<4, TMFW_SPLAT = 1<<5, } textmapfofwater_t; typedef enum { TMFB_REVERSE = 1, TMFB_SPINDASH = 1<<1, TMFB_DYNAMIC = 1<<2, } textmapfofbobbing_t; typedef enum { TMFC_NOSHADE = 1, TMFC_NORETURN = 1<<1, TMFC_AIRBOB = 1<<2, TMFC_FLOATBOB = 1<<3, TMFC_SPLAT = 1<<4, } textmapfofcrumbling_t; typedef enum { TMFR_REVERSE = 1, TMFR_SPINDASH = 1<<1, } textmapfofrising_t; typedef enum { TMFM_BRICK = 1, TMFM_INVISIBLE = 1<<1, } textmapfofmario_t; typedef enum { TMFB_TOUCH, TMFB_SPIN, TMFB_REGULAR, TMFB_STRONG, } textmapfofbusttype_t; typedef enum { TMFB_PUSHABLES = 1, TMFB_EXECUTOR = 1<<1, TMFB_ONLYBOTTOM = 1<<2, TMFB_SPLAT = 1<<3, } textmapfofbustflags_t; typedef enum { TMFL_NOBOSSES = 1, TMFL_SPLAT = 1<<1, } textmapfoflaserflags_t; typedef enum { TMT_CONTINUOUS = 0, TMT_ONCE = 1, TMT_EACHTIMEMASK = TMT_ONCE, TMT_EACHTIMEENTER = 2, TMT_EACHTIMEENTERANDEXIT = 3, } textmaptriggertype_t; typedef enum { TMXT_CONTINUOUS = 0, TMXT_EACHTIMEMASK = TMXT_CONTINUOUS, TMXT_EACHTIMEENTER = 1, TMXT_EACHTIMEENTERANDEXIT = 2, } textmapxtriggertype_t; typedef enum { TMF_HASALL = 0, TMF_HASANY = 1, TMF_HASEXACTLY = 2, TMF_DOESNTHAVEALL = 3, TMF_DOESNTHAVEANY = 4, } textmapflagcheck_t; typedef enum { TMT_RED = 0, TMT_BLUE = 1, } textmapteam_t; typedef enum { TMC_EQUAL = 0, TMC_LTE = 1, TMC_GTE = 2, } textmapcomparison_t; typedef enum { TMG_NORMAL = 0, TMG_REVERSE = 1, TMG_TEMPREVERSE = 2, } textmapgravity_t; typedef enum { TMNP_FASTEST = 0, TMNP_SLOWEST = 1, TMNP_TRIGGERER = 2, } textmapnightsplayer_t; typedef enum { TMN_ALWAYS = 0, TMN_FROMNONIGHTS = 1, TMN_FROMNIGHTS = 2, } textmapnighterizeoptions_t; typedef enum { TMN_BONUSLAPS = 1, TMN_LEVELCOMPLETION = 1<<2, } textmapnightserizeflags_t; typedef enum { TMD_ALWAYS = 0, TMD_NOBODYNIGHTS = 1, TMD_SOMEBODYNIGHTS = 2, } textmapdenighterizeoptions_t; typedef enum { TMS_IFENOUGH = 0, TMS_IFNOTENOUGH = 1, TMS_ALWAYS = 2, } textmapspherescheck_t; typedef enum { TMI_BONUSLAPS = 1, TMI_ENTER = 1<<2, } textmapideyacaptureflags_t; typedef enum { TMP_FLOOR = 0, TMP_CEILING = 1, TMP_BOTH = 2, } textmapplanes_t; typedef enum { TMT_ADD = 0, TMT_REMOVE = 1, TMT_REPLACEFIRST = 2, TMT_TRIGGERTAG = 3, } textmaptagoptions_t; typedef enum { TMT_SILENT = 1, TMT_KEEPANGLE = 1<<1, TMT_KEEPMOMENTUM = 1<<2, TMT_RELATIVE = 1<<3, } textmapteleportflags_t; typedef enum { TMM_ALLPLAYERS = 1, TMM_OFFSET = 1<<1, TMM_FADE = 1<<2, TMM_NORELOAD = 1<<3, TMM_FORCERESET = 1<<4, TMM_NOLOOP = 1<<5, } textmapmusicflags_t; typedef enum { TMSS_TRIGGERMOBJ = 0, TMSS_TRIGGERSECTOR = 1, TMSS_NOWHERE = 2, TMSS_TAGGEDSECTOR = 3, } textmapsoundsource_t; typedef enum { TMSL_EVERYONE = 0, TMSL_TRIGGERER = 1, TMSL_TAGGEDSECTOR = 2, } textmapsoundlistener_t; typedef enum { TML_SECTOR = 0, TML_FLOOR = 1, TML_CEILING = 2, } textmaplightareas_t; typedef enum { TMLC_NOSECTOR = 1, TMLC_NOFLOOR = 1<<1, TMLC_NOCEILING = 1<<2, } textmaplightcopyflags_t; typedef enum { TMF_RELATIVE = 1, TMF_OVERRIDE = 1<<1, TMF_TICBASED = 1<<2, } textmapfadeflags_t; typedef enum { TMB_USETARGET = 1, TMB_SYNC = 1<<1, } textmapblinkinglightflags_t; typedef enum { TMFR_NORETURN = 1, TMFR_CHECKFLAG = 1<<1, } textmapfofrespawnflags_t; typedef enum { TMST_RELATIVE = 1, TMST_DONTDOTRANSLUCENT = 1<<1, } textmapsettranslucencyflags_t; typedef enum { TMFT_RELATIVE = 1, TMFT_OVERRIDE = 1<<1, TMFT_TICBASED = 1<<2, TMFT_IGNORECOLLISION = 1<<3, TMFT_GHOSTFADE = 1<<4, TMFT_DONTDOTRANSLUCENT = 1<<5, TMFT_DONTDOEXISTS = 1<<6, TMFT_DONTDOLIGHTING = 1<<7, TMFT_DONTDOCOLORMAP = 1<<8, TMFT_USEEXACTALPHA = 1<<9, } textmapfadetranslucencyflags_t; typedef enum { TMS_VIEWPOINT = 0, TMS_CENTERPOINT = 1, TMS_BOTH = 2, } textmapskybox_t; typedef enum { TMP_CLOSE = 1, TMP_RUNPOSTEXEC = 1<<1, TMP_CALLBYNAME = 1<<2, TMP_KEEPCONTROLS = 1<<3, TMP_KEEPREALTIME = 1<<4, //TMP_ALLPLAYERS = 1<<5, //TMP_FREEZETHINKERS = 1<<6, } textmappromptflags_t; typedef enum { TMF_NOCHANGE = 0, TMF_ADD = 1, TMF_REMOVE = 2, } textmapsetflagflags_t; typedef enum { TMSD_FRONT = 0, TMSD_BACK = 1, TMSD_FRONTBACK = 2, } textmapsides_t; typedef enum { TMS_SCROLLCARRY = 0, TMS_SCROLLONLY = 1, TMS_CARRYONLY = 2, } textmapscroll_t; typedef enum { TMST_REGULAR = 0, TMST_ACCELERATIVE = 1, TMST_DISPLACEMENT = 2, TMST_TYPEMASK = 3, TMST_NONEXCLUSIVE = 4, } textmapscrolltype_t; typedef enum { TMPF_SLIDE = 1, TMPF_NONEXCLUSIVE = 1<<1, } textmappusherflags_t; typedef enum { TMPP_NOZFADE = 1, TMPP_PUSHZ = 1<<1, TMPP_NONEXCLUSIVE = 1<<2, } textmappointpushflags_t; typedef enum { TMB_TRANSLUCENT = 0, TMB_ADD = 1, TMB_SUBTRACT = 2, TMB_REVERSESUBTRACT = 3, TMB_MODULATE = 4, } textmapblendmodes_t; typedef enum { TMSECPORTAL_NORMAL = 0, TMSECPORTAL_COPIED = 1, TMSECPORTAL_SKYBOX = 2, TMSECPORTAL_PLANE = 3, TMSECPORTAL_HORIZON = 4, TMSECPORTAL_COPY_PORTAL_TO_LINE = 5, TMSECPORTAL_INTERACTIVE = 6, // unimplemented // The two portal types below are new to SRB2 TMSECPORTAL_SECTOR = 7, TMSECPORTAL_OBJECT = 8 } textmapsecportaltype_t; // GETSECSPECIAL (specialval, section) // // Pulls out the special # from a particular section. // #define GETSECSPECIAL(i,j) ((i >> ((j-1)*4))&15) // This must be updated whenever we up the max flat size - quicker to assume rather than figuring out the sqrt of the specific flat's filesize. #define MAXFLATSIZE (2048<