Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 21-installer-nodd
  • 2210-pre1
  • 2210-pre2
  • 2210-rc1
  • 2210-rc2
  • 2210-rc3
  • 2211-pre1
  • 2211-pre2
  • 2211-rc1
  • 2212-pre1
  • 2212-pre2
  • 2212-pre3
  • 2212-rc1
  • 2213
  • 2214-pre1
  • 2214-pre2
  • 2214-pre3
  • 2214-pre4
  • 2_2_12
  • 64-gl-log
  • COM_ImmedExecute-lua
  • DJGPP
  • accel-momentum
  • acs
  • action-args
  • alpha-fixes
  • any-resolution
  • appveyor
  • better-distance-math
  • blend-locking
  • blentran
  • blua-unary-not-fix
  • boost-tickrate
  • bustablesoundz
  • cleanup-opengl
  • cleanupmusic
  • clipmidtex
  • cmake-valgrind
  • crawlacommander-sprites
  • custom-map-names
  • custom-teams
  • cutscene-cleanup
  • dd-music-bypass
  • dd-music-fix
  • delfile2
  • deprecate-lua-dedicated-server
  • dpl-2
  • dropshadows-spawning
  • dynabsp
  • emblem-drawing
  • exchndl-xp-fix
  • extra-textures
  • few-kart-lua-changes
  • ffloorclip
  • fix-167
  • fix-cvar-conflicts
  • fix-opengl-parameter-crash
  • fix-opengl-shear-roll
  • flipfuncpointers
  • fof-lightlist-fixes
  • font-FUCK
  • frictionrefactor
  • fuck-macros-1
  • gamepad-luakeydown
  • gamepad-morefixes
  • gamepad_experiments
  • gametype-refactor
  • gametype-refactor-1
  • gametype-refactor-player-spawns
  • ghost-networking
  • gif-splitting
  • grr-lj
  • hitboxviewer
  • hwr-texture-cache-refactor
  • hwrender2
  • improve-439
  • increase-maxconditionsets
  • increase-packet-tics
  • input-display
  • input-display-translucency
  • io
  • joystick-juggling-maz
  • just-in-case
  • keycodes-only
  • ksf-wadfiles
  • ld413-mp-fix
  • levelstruct
  • libpng-version-support
  • linedef-actions
  • lj-test
  • lol-states
  • loopedsounds
  • lower-unpegged-fix
  • lua-change-gametype
  • lua-command-netids
  • lua-gfx-2
  • lua-gfx-sprites
  • lua-local
  • makefile-auto-mingw-gcc
  • makefile-tinkering
  • SRB2_release_2.1
  • SRB2_release_2.1.1
  • SRB2_release_2.1.10
  • SRB2_release_2.1.11
  • SRB2_release_2.1.12
  • SRB2_release_2.1.14
  • SRB2_release_2.1.15
  • SRB2_release_2.1.16
  • SRB2_release_2.1.16a
  • SRB2_release_2.1.17
  • SRB2_release_2.1.18
  • SRB2_release_2.1.19
  • SRB2_release_2.1.2
  • SRB2_release_2.1.20
  • SRB2_release_2.1.21
  • SRB2_release_2.1.22
  • SRB2_release_2.1.23
  • SRB2_release_2.1.24
  • SRB2_release_2.1.25
  • SRB2_release_2.1.3
  • SRB2_release_2.1.4
  • SRB2_release_2.1.5
  • SRB2_release_2.1.6
  • SRB2_release_2.1.7
  • SRB2_release_2.1.8
  • SRB2_release_2.1.9
  • SRB2_release_2.2.0
  • SRB2_release_2.2.1
  • SRB2_release_2.2.10
  • SRB2_release_2.2.11
  • SRB2_release_2.2.12
  • SRB2_release_2.2.13
  • SRB2_release_2.2.15
  • SRB2_release_2.2.2
  • SRB2_release_2.2.3
  • SRB2_release_2.2.4
  • SRB2_release_2.2.5
  • SRB2_release_2.2.6
  • SRB2_release_2.2.7
  • SRB2_release_2.2.8
  • SRB2_release_2.2.9
  • td-release-v1.0.0
142 results

Target

Select target project
  • STJr/SRB2
  • Sryder/SRB2
  • wolfy852/SRB2
  • Alpha2244/SRB2
  • Inuyasha/SRB2
  • yoshibot/SRB2
  • TehRealSalt/SRB2
  • PrisimaTF/SRB2
  • Hatninja/SRB2
  • SteelT/SRB2
  • james/SRB2
  • ShaderWraith/SRB2
  • SinnamonLat/SRB2
  • mazmazz_/SRB2
  • filpAM/SRB2
  • chaoloveicemdboy/SRB2
  • Whooa21/SRB2
  • Machturne/SRB2
  • Golden/SRB2
  • Tatsuru/SRB2
  • Snu/SRB2
  • Zwip-Zwap_Zapony/SRB2
  • fickleheart/SRB2
  • alphaRexJames/SRB2
  • JJK/SRB2
  • diskpoppy/SRB2
  • Hannu_Hanhi/SRB2
  • ZipperQR/SRB2
  • kays/SRB2
  • spherallic/SRB2
  • Zippy_Zolton/SRB2
  • namiishere/SRB2
  • Ors/SRB2
  • SMS_Alfredo/SRB2
  • sonic_edge/SRB2
  • lavla/SRB2
  • ashi/SRB2
  • X.organic/SRB2
  • Fafabis/SRB2
  • Meziu/SRB2
  • v-rob/SRB2
  • tertu/SRB2
  • bitten2up/SRB2
  • flarn2006/SRB2
  • Krabs/SRB2
  • clairebun/SRB2
  • Lactozilla/SRB2
  • thehackstack/SRB2
  • Spice/SRB2
  • win8linux/SRB2
  • JohnFrostFox/SRB2
  • talktoneon726/SRB2
  • Wane/SRB2
  • Lamibe/SRB2
  • spectrumuk2/srb-2
  • nerdyminer18/srb-2
  • 256nil/SRB2
  • ARJr/SRB2
  • Alam/SRB2
  • Zenya/srb-2-marathon-demos
  • Acelite/srb-2-archivedmodifications
  • MIDIMan/SRB2
  • Lach/SRB2
  • Frostiikin/bounce-tweaks
  • Jaden/SRB2
  • Tyron/SRB2
  • Astronight/SRB2
  • Mari0shi06/SRB2
  • aiire/SRB2
  • Galactice/SRB2
  • srb2-ports/srb2-dreamcast
  • sdasdas/SRB2
  • chreas/srb-2-vr
  • StarManiaKG/the-story-of-sinically-rocketing-and-botching-the-2nd
  • LoganAir/SRB2
  • NepDisk/srb-2
  • alufolie91/SRB2
  • Felicia.iso/SRB2
  • twi/SRB2
  • BarrelsOFun/SRB2
  • Speed2411/SRB2
  • Leather_Realms/SRB2
  • Ayemar/SRB2
  • Acelite/SRB2
  • VladDoc/SRB2
  • kaldrum/model-features
  • strawberryfox417/SRB2
  • Lugent/SRB2
  • Rem/SRB2
  • Refrag/SRB2
  • Henry_3230/srb-3230
  • TehPuertoRicanSpartan2/tprs-srb2
  • Leminn/srb-2-marathon-stuff
  • chromaticpipe2/SRB2
  • MiguelGustavo15/SRB2
  • Maru/srb-2-tests
  • SilicDev/SRB2
  • UnmatchedBracket/SRB2
  • HybridDog/SRB2
  • xordspar0/SRB2
  • jsjhbewfhh/SRB2
  • Fancy2209/SRB2
  • Lorsoen/SRB2
  • shindoukin/SRB2
  • GamerOfDays/SRB2
  • Craftyawesome/SRB2
  • tenshi-tensai-tennoji/SRB2
  • Scarfdudebalder/SRB2
  • luigi-budd/srb-2-fix-interplag-lockon
  • mskluesner/SRB2
  • johnpetersa19/SRB2
  • Pheazant/SRB2
  • chromaticpipe2/srb2classic
  • romoney5/SRB2
  • PAS/SRB2Classic
  • BlueStaggo/SRB2
  • Jisk/srb-2-beef-jerky
  • voltybystorm/SRB2
  • ZenithNeko/srb-2-xp
  • Nep2Disk/SRB2
  • Cloudeon/SRB2
121 results
Select Git revision
  • 21-installer-nodd
  • 2210-pre1
  • 2210-pre2
  • 2210-rc1
  • 2210-rc2
  • 2210-rc3
  • 2211-pre1
  • 2211-pre2
  • 622-teamlives-hud
  • 64-gl-log
  • COM_ImmedExecute-lua
  • DJGPP
  • accel-momentum
  • add-arg-passing-alias
  • add-forth-interpreter
  • add-ipv6-indicator
  • add-namechange-lua-hook
  • add-server-pm-logging
  • add-textinput-hook
  • add-unblockable-console-key
  • alien-breed-3d
  • allow-non-important-files-dedicated
  • allow-percent-ipv6-address
  • appveyor
  • avoid-double-checkmobjtrigger-call
  • avoid-frame-cap-busywait
  • bbox
  • bbox-tweaks
  • blend-locking
  • blentran
  • blua-unary-not-fix
  • boost-tickrate
  • botchanges
  • bustablemobjzfix
  • bustablesoundz
  • checksector-refactor
  • cleanup-opengl
  • cleanupmusic
  • close-connection-timeout
  • cmake-clang-tidy
  • cmake-enable-cxx
  • cmake-valgrind
  • compile-ffast-math
  • crawlacommander-sprites
  • cutscene-cleanup
  • dd-music-bypass
  • dd-music-fix
  • deprecate-lua-dedicated-server
  • doomcom-global-refactor
  • dpl-2
  • dropshadows-spawning
  • emblem-drawing
  • ensure-ackpak-response
  • exchndl-xp-fix
  • few-kart-lua-changes
  • ffloorclip
  • fix-acknum-not-incrementing
  • fix-bot-2pai-desync
  • fix-compiler-error-touch
  • fix-cvar-conflicts
  • fix-dedicated-segfault
  • fix-move-mobj-reference
  • fix-netxcmd-integer-overflow
  • fix-opengl-shear-roll
  • fix-removemobj-seesound
  • fix-silver-segfault
  • fix-tty-not-resetting-properly
  • fix-unack-lockup
  • flipfuncpointers
  • floorsprite-and-shadow-fake-planes-fix
  • fof-lightlist-fixes
  • font-FUCK
  • font_drawer
  • forceverticalflipflag
  • forkmaster
  • frictionrefactor
  • fuck-macros-1
  • fullscreen-toggle
  • gamepad-luakeydown
  • gamepad-morefixes
  • gamepad_experiments
  • ghost-networking
  • gif-splitting
  • gitlab-ci
  • grr-lj
  • hitboxviewer
  • hwr-texture-cache-refactor
  • hwrender2
  • improve-439
  • increase-packet-tics
  • increase-unlockables
  • inline-mobjwasremoved
  • input-display
  • input-display-translucency
  • io
  • io-limit
  • ipv6
  • joystick-juggling-maz
  • keycodes-only
  • ksf-wadfiles
  • SRB2_release_2.1
  • SRB2_release_2.1.1
  • SRB2_release_2.1.10
  • SRB2_release_2.1.11
  • SRB2_release_2.1.12
  • SRB2_release_2.1.14
  • SRB2_release_2.1.15
  • SRB2_release_2.1.16
  • SRB2_release_2.1.16a
  • SRB2_release_2.1.17
  • SRB2_release_2.1.18
  • SRB2_release_2.1.19
  • SRB2_release_2.1.2
  • SRB2_release_2.1.20
  • SRB2_release_2.1.21
  • SRB2_release_2.1.22
  • SRB2_release_2.1.23
  • SRB2_release_2.1.24
  • SRB2_release_2.1.25
  • SRB2_release_2.1.3
  • SRB2_release_2.1.4
  • SRB2_release_2.1.5
  • SRB2_release_2.1.6
  • SRB2_release_2.1.7
  • SRB2_release_2.1.8
  • SRB2_release_2.1.9
  • SRB2_release_2.2.0
  • SRB2_release_2.2.1
  • SRB2_release_2.2.10
  • SRB2_release_2.2.2
  • SRB2_release_2.2.3
  • SRB2_release_2.2.4
  • SRB2_release_2.2.5
  • SRB2_release_2.2.6
  • SRB2_release_2.2.7
  • SRB2_release_2.2.8
  • SRB2_release_2.2.9
  • td-release-v1.0.0
138 results
Show changes
...@@ -19,11 +19,10 @@ void CON_Init(void); ...@@ -19,11 +19,10 @@ void CON_Init(void);
void CON_StartRefresh(void); void CON_StartRefresh(void);
void CON_StopRefresh(void); void CON_StopRefresh(void);
boolean CON_PreResponder(event_t *ev);
boolean CON_Responder(event_t *ev); boolean CON_Responder(event_t *ev);
#ifdef HAVE_THREADS
extern I_mutex con_mutex; extern I_mutex con_mutex;
#endif
// set true when screen size has changed, to adapt console // set true when screen size has changed, to adapt console
extern boolean con_recalc; extern boolean con_recalc;
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
/// plus functions to parse command line parameters, configure game /// plus functions to parse command line parameters, configure game
/// parameters, and call the startup functions. /// parameters, and call the startup functions.
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON) #if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -93,6 +97,7 @@ ...@@ -93,6 +97,7 @@
#endif #endif
#include "lua_script.h" #include "lua_script.h"
#include "lua_hud.h"
// Version numbers for netplay :upside_down_face: // Version numbers for netplay :upside_down_face:
int VERSION; int VERSION;
...@@ -227,6 +232,9 @@ void D_ProcessEvents(void) ...@@ -227,6 +232,9 @@ void D_ProcessEvents(void)
} }
} }
if (CON_PreResponder(ev))
continue;
// Screenshots over everything so that they can be taken anywhere. // Screenshots over everything so that they can be taken anywhere.
if (M_ScreenshotResponder(ev)) if (M_ScreenshotResponder(ev))
continue; // ate the event continue; // ate the event
...@@ -244,15 +252,11 @@ void D_ProcessEvents(void) ...@@ -244,15 +252,11 @@ void D_ProcessEvents(void)
} }
// Menu input // Menu input
#ifdef HAVE_THREADS
I_lock_mutex(&m_menu_mutex); I_lock_mutex(&m_menu_mutex);
#endif
{ {
eaten = M_Responder(ev); eaten = M_Responder(ev);
} }
#ifdef HAVE_THREADS
I_unlock_mutex(m_menu_mutex); I_unlock_mutex(m_menu_mutex);
#endif
if (eaten) if (eaten)
continue; // menu ate the event continue; // menu ate the event
...@@ -264,15 +268,11 @@ void D_ProcessEvents(void) ...@@ -264,15 +268,11 @@ void D_ProcessEvents(void)
} }
// console input // console input
#ifdef HAVE_THREADS
I_lock_mutex(&con_mutex); I_lock_mutex(&con_mutex);
#endif
{ {
eaten = CON_Responder(ev); eaten = CON_Responder(ev);
} }
#ifdef HAVE_THREADS
I_unlock_mutex(con_mutex); I_unlock_mutex(con_mutex);
#endif
if (eaten) if (eaten)
continue; // ate the event continue; // ate the event
...@@ -575,7 +575,7 @@ static void D_Display(void) ...@@ -575,7 +575,7 @@ static void D_Display(void)
V_SetPalette(0); V_SetPalette(0);
// draw pause pic // draw pause pic
if (paused && cv_showhud.value && (!menuactive || netgame)) if (paused && cv_showhud.value && LUA_HudEnabled(hud_pause) && (!menuactive || netgame))
{ {
#if 0 #if 0
INT32 py; INT32 py;
...@@ -596,13 +596,9 @@ static void D_Display(void) ...@@ -596,13 +596,9 @@ static void D_Display(void)
// vid size change is now finished if it was on... // vid size change is now finished if it was on...
vid.recalc = 0; vid.recalc = 0;
#ifdef HAVE_THREADS
I_lock_mutex(&m_menu_mutex); I_lock_mutex(&m_menu_mutex);
#endif
M_Drawer(); // menu is drawn even on top of everything M_Drawer(); // menu is drawn even on top of everything
#ifdef HAVE_THREADS
I_unlock_mutex(m_menu_mutex); I_unlock_mutex(m_menu_mutex);
#endif
// focus lost moved to M_Drawer // focus lost moved to M_Drawer
CON_Drawer(); CON_Drawer();
...@@ -705,16 +701,11 @@ static void D_Display(void) ...@@ -705,16 +701,11 @@ static void D_Display(void)
tic_t rendergametic; tic_t rendergametic;
static void D_RunFrame(void);
static tic_t oldentertics = 0;
void D_SRB2Loop(void) void D_SRB2Loop(void)
{ {
tic_t entertic = 0, oldentertics = 0, realtics = 0, rendertimeout = INFTICS;
double deltatics = 0.0;
double deltasecs = 0.0;
static lumpnum_t gstartuplumpnum;
boolean interp = false;
boolean doDisplay = false;
if (dedicated) if (dedicated)
server = true; server = true;
...@@ -750,21 +741,68 @@ void D_SRB2Loop(void) ...@@ -750,21 +741,68 @@ void D_SRB2Loop(void)
// hack to start on a nice clear console screen. // hack to start on a nice clear console screen.
COM_ImmedExecute("cls;version"); COM_ImmedExecute("cls;version");
#ifdef __EMSCRIPTEN__
EM_ASM(
try {
StartedMainLoopCallback();
} catch (err) {
console.log('Faild to find StartedMainLoopCallback()');
}
);
#endif
I_FinishUpdate(); // page flip or blit buffer I_FinishUpdate(); // page flip or blit buffer
/* /*
LMFAO this was showing garbage under OpenGL LMFAO this was showing garbage under OpenGL
because I_FinishUpdate was called afterward because I_FinishUpdate was called afterward
*/ */
/* Smells like a hack... Don't fade Sonic's ass into the title screen. */ /* Smells like a hack... Don't fade Sonic's ass into the title screen. */
if (gamestate != GS_TITLESCREEN) if (gamestate != GS_TITLESCREEN)
{ {
gstartuplumpnum = W_CheckNumForPatchName("STARTUP"); lumpnum_t gstartuplumpnum = W_CheckNumForPatchName("STARTUP");
if (gstartuplumpnum == LUMPERROR) if (gstartuplumpnum == LUMPERROR)
gstartuplumpnum = W_GetNumForPatchName("MISSING"); gstartuplumpnum = W_GetNumForPatchName("MISSING");
V_DrawScaledPatch(0, 0, 0, W_CachePatchNum(gstartuplumpnum, PU_PATCH)); V_DrawScaledPatch(0, 0, 0, W_CachePatchNum(gstartuplumpnum, PU_PATCH));
} }
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(D_RunFrame, 0, 1);
#else
for (;;) for (;;)
{
D_RunFrame();
}
#endif
}
static boolean D_LockFrame = false;
#ifdef __EMSCRIPTEN__
int EMSCRIPTEN_KEEPALIVE pause_loop(void)
{
D_LockFrame = true;
emscripten_pause_main_loop();
return 0;
}
int EMSCRIPTEN_KEEPALIVE resume_loop(void)
{
D_LockFrame = false;
emscripten_resume_main_loop();
return 0;
}
#endif
static void D_RunFrame(void)
{
static tic_t entertic = 0, realtics = 0, rendertimeout = INFTICS;
static double deltatics = 0.0;
static double deltasecs = 0.0;
static boolean interp = false;
static boolean doDisplay = false;
if (!D_LockFrame)
{ {
// capbudget is the minimum precise_t duration of a single loop iteration // capbudget is the minimum precise_t duration of a single loop iteration
precise_t capbudget; precise_t capbudget;
...@@ -920,6 +958,7 @@ void D_SRB2Loop(void) ...@@ -920,6 +958,7 @@ void D_SRB2Loop(void)
deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision(); deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision();
deltatics = deltasecs * NEWTICRATE; deltatics = deltasecs * NEWTICRATE;
} }
return;
} }
// //
...@@ -1367,9 +1406,6 @@ void D_SRB2Main(void) ...@@ -1367,9 +1406,6 @@ void D_SRB2Main(void)
P_SetRandSeed(M_RandomizedSeed()); P_SetRandSeed(M_RandomizedSeed());
if (M_CheckParm("-password") && M_IsNextParm())
D_SetPassword(M_GetNextParm());
// player setup menu colors must be initialized before // player setup menu colors must be initialized before
// any wad file is added, as they may contain colors themselves // any wad file is added, as they may contain colors themselves
M_InitPlayerSetupColors(); M_InitPlayerSetupColors();
...@@ -1377,6 +1413,9 @@ void D_SRB2Main(void) ...@@ -1377,6 +1413,9 @@ void D_SRB2Main(void)
CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n"); CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n");
Z_Init(); Z_Init();
if (M_CheckParm("-password") && M_IsNextParm())
D_SetPassword(M_GetNextParm());
clientGamedata = M_NewGameDataStruct(); clientGamedata = M_NewGameDataStruct();
serverGamedata = M_NewGameDataStruct(); serverGamedata = M_NewGameDataStruct();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1993-1996 by id Software, Inc.
// Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 1998-2000 by DooM Legacy Team.
// Copyright (C) 1999-2024 by Sonic Team Junior. // Copyright (C) 1999-2025 by Sonic Team Junior.
// //
// This program is free software distributed under the // This program is free software distributed under the
// terms of the GNU General Public License, version 2. // terms of the GNU General Public License, version 2.
...@@ -47,13 +47,14 @@ typedef enum ...@@ -47,13 +47,14 @@ typedef enum
SF_DASHMODE = 1<<11, // Sonic Advance 2 style top speed increase? SF_DASHMODE = 1<<11, // Sonic Advance 2 style top speed increase?
SF_FASTWAIT = 1<<12, // Faster wait animation? SF_FASTWAIT = 1<<12, // Faster wait animation?
SF_FASTEDGE = 1<<13, // Faster edge teeter? SF_FASTEDGE = 1<<13, // Faster edge teeter?
SF_MULTIABILITY = 1<<14, // Revenge of Final Demo. SF_JETFUME = 1<<14, // Follow item uses Metal Sonic's jet fume behavior
SF_NONIGHTSROTATION = 1<<15, // Disable sprite rotation for NiGHTS SF_MULTIABILITY = 1<<15, // Revenge of Final Demo.
SF_NONIGHTSSUPER = 1<<16, // Disable super colors for NiGHTS (if you have SF_SUPER) SF_NONIGHTSROTATION = 1<<16, // Disable sprite rotation for NiGHTS
SF_NOSUPERSPRITES = 1<<17, // Don't use super sprites while super SF_NONIGHTSSUPER = 1<<17, // Disable super sprites and colors for NiGHTS
SF_NOSUPERJUMPBOOST = 1<<18, // Disable the jump boost given while super (i.e. Knuckles) SF_NOSUPERSPRITES = 1<<18, // Don't use super sprites while super
SF_CANBUSTWALLS = 1<<19, // Can naturally bust walls on contact? (i.e. Knuckles) SF_NOSUPERJUMPBOOST = 1<<19, // Disable the jump boost given while super (i.e. Knuckles)
SF_NOSHIELDABILITY = 1<<20, // Disable shield abilities SF_CANBUSTWALLS = 1<<20, // Can naturally bust walls on contact? (i.e. Knuckles)
SF_NOSHIELDABILITY = 1<<21, // Disable shield abilities
// free up to and including 1<<31 // free up to and including 1<<31
} skinflags_t; } skinflags_t;
......
...@@ -28,18 +28,11 @@ ...@@ -28,18 +28,11 @@
// To compile this as "ANSI C with classes" we will need to handle the various // To compile this as "ANSI C with classes" we will need to handle the various
// action functions cleanly. // action functions cleanly.
// //
typedef void (*actionf_v)();
typedef void (*actionf_p1)(void *); typedef void (*actionf_p1)(void *);
typedef union
{
actionf_v acv;
actionf_p1 acp1;
} actionf_t;
// Historically, "think_t" is yet another function pointer to a routine // Historically, "think_t" is yet another function pointer to a routine
// to handle an actor. // to handle an actor.
typedef actionf_t think_t; typedef actionf_p1 think_t;
// Doubly linked list of actors. // Doubly linked list of actors.
typedef struct thinker_s typedef struct thinker_s
......
...@@ -1181,10 +1181,8 @@ static void I_RegisterSignals (void) ...@@ -1181,10 +1181,8 @@ static void I_RegisterSignals (void)
INT32 I_StartupSystem(void) INT32 I_StartupSystem(void)
{ {
#ifdef HAVE_THREADS
I_start_threads(); I_start_threads();
I_AddExitFunc(I_stop_threads); I_AddExitFunc(I_stop_threads);
#endif
I_StartupConsole(); I_StartupConsole();
I_RegisterSignals(); I_RegisterSignals();
#ifndef NOMUMBLE #ifndef NOMUMBLE
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "../i_threads.h" #include "../i_threads.h"
#include "../doomdef.h" #include "../doomdef.h"
#include "../doomtype.h"
typedef struct thread_s thread_t; typedef struct thread_s thread_t;
...@@ -42,10 +41,11 @@ static void *HandleThread(void *data) ...@@ -42,10 +41,11 @@ static void *HandleThread(void *data)
return NULL; return NULL;
} }
void I_spawn_thread(const char *name, I_thread_fn entry, void *userdata) int I_spawn_thread(const char *name, I_thread_fn entry, void *userdata)
{ {
thread_t *thread; thread_t *thread;
(void)name; (void)name;
pthread_mutex_lock(&thread_lock); pthread_mutex_lock(&thread_lock);
thread = thread_list; thread = thread_list;
while (thread != NULL) while (thread != NULL)
...@@ -69,6 +69,13 @@ void I_spawn_thread(const char *name, I_thread_fn entry, void *userdata) ...@@ -69,6 +69,13 @@ void I_spawn_thread(const char *name, I_thread_fn entry, void *userdata)
thread->userdata = userdata; thread->userdata = userdata;
pthread_create(&thread->thread, NULL, HandleThread, thread); pthread_create(&thread->thread, NULL, HandleThread, thread);
pthread_mutex_unlock(&thread_lock); pthread_mutex_unlock(&thread_lock);
return true;
}
int I_can_thread(void)
{
return true;
} }
int I_thread_is_stopped(void) int I_thread_is_stopped(void)
......
...@@ -188,7 +188,7 @@ static inline int lib_freeslot(lua_State *L) ...@@ -188,7 +188,7 @@ static inline int lib_freeslot(lua_State *L)
// Arguments: mobj_t actor, int var1, int var2 // Arguments: mobj_t actor, int var1, int var2
static int action_call(lua_State *L) static int action_call(lua_State *L)
{ {
actionf_t *action = *((actionf_t **)luaL_checkudata(L, 1, META_ACTION)); actionf_p1 *action = *((actionf_p1 **)luaL_checkudata(L, 1, META_ACTION));
mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
var1 = (INT32)luaL_optinteger(L, 3, 0); var1 = (INT32)luaL_optinteger(L, 3, 0);
...@@ -199,7 +199,7 @@ static int action_call(lua_State *L) ...@@ -199,7 +199,7 @@ static int action_call(lua_State *L)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
} }
action->acp1(actor); (*action)(actor);
return 0; return 0;
} }
...@@ -632,7 +632,7 @@ FUNCINLINE static ATTRINLINE int getEnum(lua_State *L, boolean mathlib, const ch ...@@ -632,7 +632,7 @@ FUNCINLINE static ATTRINLINE int getEnum(lua_State *L, boolean mathlib, const ch
{ {
if (fasticmp(word, actionpointers[i].name)) if (fasticmp(word, actionpointers[i].name))
{ {
// We push the actionf_t* itself as userdata! // We push the actionf_p1* itself as userdata!
LUA_PushUserdata(L, &actionpointers[i].action, META_ACTION); LUA_PushUserdata(L, &actionpointers[i].action, META_ACTION);
return 1; return 1;
} }
...@@ -770,7 +770,7 @@ static int lib_getActionName(lua_State *L) ...@@ -770,7 +770,7 @@ static int lib_getActionName(lua_State *L)
{ {
if (lua_isuserdata(L, 1)) // arg 1 is built-in action, expect action userdata if (lua_isuserdata(L, 1)) // arg 1 is built-in action, expect action userdata
{ {
actionf_t *action = *((actionf_t **)luaL_checkudata(L, 1, META_ACTION)); actionf_p1 *action = *((actionf_p1 **)luaL_checkudata(L, 1, META_ACTION));
const char *name = NULL; const char *name = NULL;
if (!action) if (!action)
return luaL_error(L, "not a valid action?"); return luaL_error(L, "not a valid action?");
...@@ -840,11 +840,11 @@ int LUA_SOCLib(lua_State *L) ...@@ -840,11 +840,11 @@ int LUA_SOCLib(lua_State *L)
const char *LUA_GetActionName(void *action) const char *LUA_GetActionName(void *action)
{ {
actionf_t *act = (actionf_t *)action; actionf_p1 *act = (actionf_p1 *)action;
size_t z; size_t z;
for (z = 0; actionpointers[z].name; z++) for (z = 0; actionpointers[z].name; z++)
{ {
if (actionpointers[z].action.acv == act->acv) if (actionpointers[z].action == *act)
return actionpointers[z].name; return actionpointers[z].name;
} }
return NULL; return NULL;
...@@ -859,8 +859,6 @@ void LUA_SetActionByName(void *state, const char *actiontocompare) ...@@ -859,8 +859,6 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
if (fasticmp(actiontocompare, actionpointers[z].name)) if (fasticmp(actiontocompare, actionpointers[z].name))
{ {
st->action = actionpointers[z].action; st->action = actionpointers[z].action;
st->action.acv = actionpointers[z].action.acv; // assign
st->action.acp1 = actionpointers[z].action.acp1;
return; return;
} }
} }
......
...@@ -874,6 +874,7 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame) ...@@ -874,6 +874,7 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame)
char *tmp; char *tmp;
INT32 value; INT32 value;
char *lastline; char *lastline;
boolean available = false;
do do
{ {
...@@ -925,9 +926,15 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame) ...@@ -925,9 +926,15 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame)
value = atoi(word2); // used for numerical settings value = atoi(word2); // used for numerical settings
if (fastcmp(word, "XPIVOT")) if (fastcmp(word, "XPIVOT"))
sprinfo->pivot[frame].x = value; {
sprinfo->frames[frame].pivot.x = value;
available = true;
}
else if (fastcmp(word, "YPIVOT")) else if (fastcmp(word, "YPIVOT"))
sprinfo->pivot[frame].y = value; {
sprinfo->frames[frame].pivot.y = value;
available = true;
}
// TODO: 2.3: Delete // TODO: 2.3: Delete
else if (fastcmp(word, "ROTAXIS")) else if (fastcmp(word, "ROTAXIS"))
deh_warning("SpriteInfo: ROTAXIS is deprecated and will be removed."); deh_warning("SpriteInfo: ROTAXIS is deprecated and will be removed.");
...@@ -938,6 +945,10 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame) ...@@ -938,6 +945,10 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame)
} }
} }
} while (!myfeof(f)); // finish when the line is empty } while (!myfeof(f)); // finish when the line is empty
if (available)
sprinfo->frames[frame].pivot.available = true;
Z_Free(s); Z_Free(s);
} }
...@@ -955,7 +966,6 @@ void readspriteinfo(MYFILE *f, INT32 num, boolean sprite2) ...@@ -955,7 +966,6 @@ void readspriteinfo(MYFILE *f, INT32 num, boolean sprite2)
// allocate a spriteinfo // allocate a spriteinfo
spriteinfo_t *info = Z_Calloc(sizeof(spriteinfo_t), PU_STATIC, NULL); spriteinfo_t *info = Z_Calloc(sizeof(spriteinfo_t), PU_STATIC, NULL);
info->available = true;
do do
{ {
...@@ -1074,6 +1084,12 @@ void readspriteinfo(MYFILE *f, INT32 num, boolean sprite2) ...@@ -1074,6 +1084,12 @@ void readspriteinfo(MYFILE *f, INT32 num, boolean sprite2)
// read sprite frame and store it in the spriteinfo_t struct // read sprite frame and store it in the spriteinfo_t struct
readspriteframe(f, info, frame); readspriteframe(f, info, frame);
set_bit_array(info->available, frame);
// TODO: 2.3: Delete
info->frames[SPRINFO_DEFAULT_FRAME].pivot.available = true;
set_bit_array(info->available, SPRINFO_DEFAULT_FRAME);
if (sprite2) if (sprite2)
{ {
INT32 i; INT32 i;
...@@ -2844,7 +2860,7 @@ void readframe(MYFILE *f, INT32 num) ...@@ -2844,7 +2860,7 @@ void readframe(MYFILE *f, INT32 num)
for (z = 0; actionpointers[z].name; z++) for (z = 0; actionpointers[z].name; z++)
{ {
if (actionpointers[z].action.acv == states[num].action.acv) if (actionpointers[z].action == states[num].action)
break; break;
} }
...@@ -2856,8 +2872,6 @@ void readframe(MYFILE *f, INT32 num) ...@@ -2856,8 +2872,6 @@ void readframe(MYFILE *f, INT32 num)
if (fastcmp(actiontocompare, actionpointers[z].name)) if (fastcmp(actiontocompare, actionpointers[z].name))
{ {
states[num].action = actionpointers[z].action; states[num].action = actionpointers[z].action;
states[num].action.acv = actionpointers[z].action.acv; // assign
states[num].action.acp1 = actionpointers[z].action.acp1;
found = true; found = true;
break; break;
} }
...@@ -3490,6 +3504,18 @@ static void readcondition(UINT8 set, UINT32 id, char *word2) ...@@ -3490,6 +3504,18 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
return; return;
} }
} }
else if (fastcmp(params[0], "LUA"))
{
PARAMCHECK(1);
ty = UC_LUA;
re = atoi(params[1]);
if (re <= 0 || re > MAXLUACONDITIONS)
{
deh_warning("Lua condition %d out of range (1 - %d)", re, MAXLUACONDITIONS);
return;
}
}
else if (fastcmp(params[0], "CONDITIONSET")) else if (fastcmp(params[0], "CONDITIONSET"))
{ {
PARAMCHECK(1); PARAMCHECK(1);
......
This diff is collapsed.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define __DEH_TABLES_H__ #define __DEH_TABLES_H__
#include "doomdef.h" // Constants #include "doomdef.h" // Constants
#include "d_think.h" // actionf_t #include "d_think.h" // actionf_p1
#include "info.h" // Mobj, state, sprite, etc constants #include "info.h" // Mobj, state, sprite, etc constants
#include "lua_script.h" #include "lua_script.h"
...@@ -44,7 +44,7 @@ struct flickytypes_s { ...@@ -44,7 +44,7 @@ struct flickytypes_s {
*/ */
typedef struct typedef struct
{ {
actionf_t action; ///< Function pointer corresponding to the actual action. actionf_p1 action; ///< Function pointer corresponding to the actual action.
const char *name; ///< Name of the action in ALL CAPS. const char *name; ///< Name of the action in ALL CAPS.
} actionpointer_t; } actionpointer_t;
......
...@@ -77,6 +77,31 @@ typedef struct ...@@ -77,6 +77,31 @@ typedef struct
INT16 x, y; INT16 x, y;
}ATTRPACK mapvertex_t; }ATTRPACK mapvertex_t;
typedef enum {
UDMF_TYPE_STRING,
UDMF_TYPE_FIXED,
UDMF_TYPE_NUMERIC,
UDMF_TYPE_BOOLEAN
} udmf_field_type_t;
typedef union { // v added to avoid random compilers cry about nonsense
char* vstring;
fixed_t vfloat;
INT32 vint;
boolean vbool;
} udmf_field_value_t;
// UDMF's Custom Arguments
typedef struct customargs_s
{
char* name;
udmf_field_type_t type;
udmf_field_value_t value;
struct customargs_s* next;
}ATTRPACK customargs_t;
// A SideDef, defining the visual appearance of a wall, // A SideDef, defining the visual appearance of a wall,
// by setting textures and offsets. // by setting textures and offsets.
typedef struct typedef struct
...@@ -218,6 +243,7 @@ typedef struct ...@@ -218,6 +243,7 @@ typedef struct
fixed_t spritexscale, spriteyscale; fixed_t spritexscale, spriteyscale;
INT32 args[NUMMAPTHINGARGS]; INT32 args[NUMMAPTHINGARGS];
char *stringargs[NUMMAPTHINGSTRINGARGS]; char *stringargs[NUMMAPTHINGSTRINGARGS];
struct customargs_s* customargs;
struct mobj_s *mobj; struct mobj_s *mobj;
} mapthing_t; } mapthing_t;
......
...@@ -703,7 +703,9 @@ extern int ...@@ -703,7 +703,9 @@ extern int
/// This stops the game from storing backups of the states, sprites, and mobjinfo tables. /// This stops the game from storing backups of the states, sprites, and mobjinfo tables.
/// Though this info is compressed under normal circumstances, it's still a lot of extra /// Though this info is compressed under normal circumstances, it's still a lot of extra
/// memory that never gets touched. /// memory that never gets touched.
#if !(defined (__EMSCRIPTEN__) && (__SIZEOF_SIZE_T__ == 4))
#define ALLOW_RESETDATA #define ALLOW_RESETDATA
#endif
/// Experimental tweaks to analog mode. (Needs a lot of work before it's ready for primetime.) /// Experimental tweaks to analog mode. (Needs a lot of work before it's ready for primetime.)
//#define REDSANALOG //#define REDSANALOG
...@@ -731,7 +733,7 @@ extern int ...@@ -731,7 +733,7 @@ extern int
/// Maintain compatibility with older 2.2 demos /// Maintain compatibility with older 2.2 demos
#define OLD22DEMOCOMPAT #define OLD22DEMOCOMPAT
#ifdef HAVE_CURL #if defined (HAVE_CURL) && !(defined(__EMSCRIPTEN__) && !defined(__EMSCRIPTEN_PTHREADS__))
#define MASTERSERVER #define MASTERSERVER
#else #else
#undef UPDATE_ALERT #undef UPDATE_ALERT
......
...@@ -249,6 +249,7 @@ extern textprompt_t *textprompts[MAX_PROMPTS]; ...@@ -249,6 +249,7 @@ extern textprompt_t *textprompts[MAX_PROMPTS];
// For the Custom Exit linedef. // For the Custom Exit linedef.
extern INT16 nextmapoverride; extern INT16 nextmapoverride;
extern UINT8 skipstats; extern UINT8 skipstats;
extern boolean keepcutscene;
extern INT16 nextgametype; extern INT16 nextgametype;
extern UINT32 ssspheres; // Total # of spheres in a level extern UINT32 ssspheres; // Total # of spheres in a level
......
...@@ -110,7 +110,7 @@ int startswith (const char *base, const char *tag); ...@@ -110,7 +110,7 @@ int startswith (const char *base, const char *tag);
int endswith (const char *base, const char *tag); int endswith (const char *base, const char *tag);
char *xstrtok(char *line, const char *delims); char *xstrtok(char *line, const char *delims);
#if defined (_WIN32) || defined (__HAIKU__) #if defined (_WIN32) || defined (__HAIKU__) || defined (__EMSCRIPTEN__)
#define HAVE_DOSSTR_FUNCS #define HAVE_DOSSTR_FUNCS
#endif #endif
...@@ -156,6 +156,7 @@ typedef int32_t boolean; ...@@ -156,6 +156,7 @@ typedef int32_t boolean;
#endif #endif
#ifndef __cplusplus #ifndef __cplusplus
#ifndef __bool_true_false_are_defined
#ifndef _WIN32 #ifndef _WIN32
enum {false = 0, true = 1}; enum {false = 0, true = 1};
#else #else
...@@ -163,6 +164,7 @@ enum {false = 0, true = 1}; ...@@ -163,6 +164,7 @@ enum {false = 0, true = 1};
#define true TRUE #define true TRUE
#endif #endif
#endif #endif
#endif
/* 7.18.2.1 Limits of exact-width integer types */ /* 7.18.2.1 Limits of exact-width integer types */
...@@ -245,6 +247,8 @@ enum {false = 0, true = 1}; ...@@ -245,6 +247,8 @@ enum {false = 0, true = 1};
#define FUNCNOINLINE __attribute__((noinline)) #define FUNCNOINLINE __attribute__((noinline))
#define FUNCWARNRV __attribute__((warn_unused_result))
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) // >= GCC 4.4 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) // >= GCC 4.4
#ifdef __i386__ // i386 only #ifdef __i386__ // i386 only
#define FUNCTARGET(X) __attribute__ ((__target__ (X))) #define FUNCTARGET(X) __attribute__ ((__target__ (X)))
...@@ -296,6 +300,9 @@ enum {false = 0, true = 1}; ...@@ -296,6 +300,9 @@ enum {false = 0, true = 1};
#ifndef FUNCTARGET #ifndef FUNCTARGET
#define FUNCTARGET(x) #define FUNCTARGET(x)
#endif #endif
#ifndef FUNCWARNRV
#define FUNCWARNRV
#endif
#ifndef ATTRPACK #ifndef ATTRPACK
#define ATTRPACK #define ATTRPACK
#endif #endif
......
...@@ -919,13 +919,9 @@ void F_IntroTicker(void) ...@@ -919,13 +919,9 @@ void F_IntroTicker(void)
I_OsPolling(); I_OsPolling();
I_UpdateNoBlit(); I_UpdateNoBlit();
#ifdef HAVE_THREADS
I_lock_mutex(&m_menu_mutex); I_lock_mutex(&m_menu_mutex);
#endif
M_Drawer(); // menu is drawn even on top of wipes M_Drawer(); // menu is drawn even on top of wipes
#ifdef HAVE_THREADS
I_unlock_mutex(m_menu_mutex); I_unlock_mutex(m_menu_mutex);
#endif
I_FinishUpdate(); // Update the screen with the image Tails 06-19-2001 I_FinishUpdate(); // Update the screen with the image Tails 06-19-2001
if (moviemode) // make sure we save frames for the white hold too if (moviemode) // make sure we save frames for the white hold too
...@@ -1053,6 +1049,7 @@ static const char *credits[] = { ...@@ -1053,6 +1049,7 @@ static const char *credits[] = {
"Logan \"GBA\" Arias", "Logan \"GBA\" Arias",
"Zolton \"Zippy_Zolton\" Auburn", "Zolton \"Zippy_Zolton\" Auburn",
"Colette \"fickleheart\" Bordelon", "Colette \"fickleheart\" Bordelon",
"\"candelavla\"",
"Andrew \"orospakr\" Clunis", "Andrew \"orospakr\" Clunis",
"Sally \"TehRealSalt\" Cochenour", "Sally \"TehRealSalt\" Cochenour",
"Gregor \"Oogaland\" Dick", "Gregor \"Oogaland\" Dick",
...@@ -1065,7 +1062,6 @@ static const char *credits[] = { ...@@ -1065,7 +1062,6 @@ static const char *credits[] = {
"Julio \"Chaos Zero 64\" Guir", "Julio \"Chaos Zero 64\" Guir",
"\"Hanicef\"", "\"Hanicef\"",
"\"Hannu_Hanhi\"", // For many OpenGL performance improvements! "\"Hannu_Hanhi\"", // For many OpenGL performance improvements!
"\"hazepastel\"",
"Kepa \"Nev3r\" Iceta", "Kepa \"Nev3r\" Iceta",
"Thomas \"Shadow Hog\" Igoe", "Thomas \"Shadow Hog\" Igoe",
"Iestyn \"Monster Iestyn\" Jealous", "Iestyn \"Monster Iestyn\" Jealous",
...@@ -1644,7 +1640,7 @@ void F_GameEvaluationTicker(void) ...@@ -1644,7 +1640,7 @@ void F_GameEvaluationTicker(void)
|| finalecount == (7*TICRATE)/2 || finalecount == (7*TICRATE)/2
|| finalecount == ((7*TICRATE)/2)+5) || finalecount == ((7*TICRATE)/2)+5)
{ {
S_StartSound(NULL, sfx_s3k5c); S_StartSoundFromEverywhere(sfx_s3k5c);
sparklloop = 10; sparklloop = 10;
} }
} }
...@@ -1683,7 +1679,7 @@ void F_GameEvaluationTicker(void) ...@@ -1683,7 +1679,7 @@ void F_GameEvaluationTicker(void)
M_SilentUpdateUnlockablesAndEmblems(serverGamedata); M_SilentUpdateUnlockablesAndEmblems(serverGamedata);
if (M_UpdateUnlockablesAndExtraEmblems(clientGamedata)) if (M_UpdateUnlockablesAndExtraEmblems(clientGamedata))
S_StartSound(NULL, sfx_s3k68); S_StartSoundFromEverywhere(sfx_s3k68);
G_SaveGameData(clientGamedata); G_SaveGameData(clientGamedata);
} }
...@@ -3819,7 +3815,7 @@ void F_ContinueTicker(void) ...@@ -3819,7 +3815,7 @@ void F_ContinueTicker(void)
cont_spr2[1][2] = 0; cont_spr2[1][2] = 0;
if (continuetime == (3*TICRATE)-10) if (continuetime == (3*TICRATE)-10)
S_StartSound(NULL, sfx_cdfm56); // or 31 S_StartSoundFromEverywhere(sfx_cdfm56); // or 31
else if (continuetime == 5) else if (continuetime == 5)
{ {
cont_spr2[0][0] = P_GetSkinSprite2(contskins[0], SPR2_CNT2, NULL); cont_spr2[0][0] = P_GetSkinSprite2(contskins[0], SPR2_CNT2, NULL);
...@@ -3893,7 +3889,7 @@ boolean F_ContinueResponder(event_t *event) ...@@ -3893,7 +3889,7 @@ boolean F_ContinueResponder(event_t *event)
keypressed = true; keypressed = true;
imcontinuing = true; imcontinuing = true;
S_StartSound(NULL, sfx_kc6b); S_StartSoundFromEverywhere(sfx_kc6b);
I_FadeSong(0, MUSICRATE, &S_StopMusic); I_FadeSong(0, MUSICRATE, &S_StopMusic);
return true; return true;
...@@ -4589,9 +4585,9 @@ void F_TextPromptDrawer(void) ...@@ -4589,9 +4585,9 @@ void F_TextPromptDrawer(void)
players[j].powers[pw_nocontrol] = 1;\ players[j].powers[pw_nocontrol] = 1;\
if (players[j].mo)\ if (players[j].mo)\
{\ {\
if (players[j].mo->state == states+S_PLAY_STND && players[j].mo->tics != -1)\ if (P_IsPlayerInState(&players[j], S_PLAY_STND) && players[j].mo->tics != -1)\
players[j].mo->tics++;\ players[j].mo->tics++;\
else if (players[j].mo->state == states+S_PLAY_WAIT)\ else if (P_IsPlayerInState(&players[j], S_PLAY_WAIT))\
P_SetMobjState(players[j].mo, S_PLAY_STND);\ P_SetMobjState(players[j].mo, S_PLAY_STND);\
}\ }\
} }
...@@ -4693,7 +4689,7 @@ void F_TextPromptTicker(void) ...@@ -4693,7 +4689,7 @@ void F_TextPromptTicker(void)
{ {
F_AdvanceToNextPage(); F_AdvanceToNextPage();
if (promptactive) if (promptactive)
S_StartSound(NULL, sfx_menu1); S_StartSoundFromEverywhere(sfx_menu1);
} }
keypressed = true; // prevent repeat events keypressed = true; // prevent repeat events
} }
......
...@@ -601,13 +601,9 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu) ...@@ -601,13 +601,9 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
if (drawMenu) if (drawMenu)
{ {
#ifdef HAVE_THREADS
I_lock_mutex(&m_menu_mutex); I_lock_mutex(&m_menu_mutex);
#endif
M_Drawer(); // menu is drawn even on top of wipes M_Drawer(); // menu is drawn even on top of wipes
#ifdef HAVE_THREADS
I_unlock_mutex(m_menu_mutex); I_unlock_mutex(m_menu_mutex);
#endif
} }
I_FinishUpdate(); // page flip or blit buffer I_FinishUpdate(); // page flip or blit buffer
......
...@@ -162,6 +162,8 @@ INT16 nextmapoverride; ...@@ -162,6 +162,8 @@ INT16 nextmapoverride;
UINT8 skipstats; UINT8 skipstats;
INT16 nextgametype = -1; INT16 nextgametype = -1;
boolean keepcutscene;
// Pointers to each CTF flag // Pointers to each CTF flag
mobj_t *redflag; mobj_t *redflag;
mobj_t *blueflag; mobj_t *blueflag;
...@@ -1411,7 +1413,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) ...@@ -1411,7 +1413,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
ticcmd_centerviewdown[forplayer] = true; ticcmd_centerviewdown[forplayer] = true;
} }
else if (ticcmd_centerviewdown[forplayer] || (leveltime < 5)) else if (ticcmd_centerviewdown[forplayer])
{ {
if (controlstyle == CS_SIMPLE) if (controlstyle == CS_SIMPLE)
{ {
...@@ -1426,7 +1428,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) ...@@ -1426,7 +1428,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
{ {
if ( if (
P_MobjWasRemoved(ticcmd_ztargetfocus[forplayer]) || P_MobjWasRemoved(ticcmd_ztargetfocus[forplayer]) ||
(leveltime < 5) || (cv_directionchar[forplayer].value != 2) ||
(R_PointToDist2(player->mo->x, player->mo->y, ticcmd_ztargetfocus[forplayer]->x, ticcmd_ztargetfocus[forplayer]->y) > 3000<<FRACBITS) || // Locks on to the wrong mobj if too far away, so just cancel it
(player->playerstate != PST_LIVE) || (player->playerstate != PST_LIVE) ||
player->exiting || player->exiting ||
!ticcmd_ztargetfocus[forplayer]->health || !ticcmd_ztargetfocus[forplayer]->health ||
...@@ -1479,8 +1482,20 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) ...@@ -1479,8 +1482,20 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
} }
} }
if (ticcmd_centerviewdown[forplayer] && controlstyle == CS_SIMPLE) if (ticcmd_centerviewdown[forplayer] && chasecam)
{
if (controlstyle == CS_SIMPLE)
controlstyle = CS_LEGACY; controlstyle = CS_LEGACY;
}
else if (cv_directionchar[forplayer].value == 2)
{
if (P_MobjWasRemoved(ticcmd_ztargetfocus[forplayer]) || !chasecam)
{
P_SetTarget(&ticcmd_ztargetfocus[forplayer], NULL);
CV_SetValue(&cv_directionchar[forplayer], 1);
}
}
if (PLAYERINPUTDOWN(ssplayer, GC_CAMRESET)) if (PLAYERINPUTDOWN(ssplayer, GC_CAMRESET))
{ {
...@@ -2270,6 +2285,11 @@ boolean G_LuaResponder(event_t *ev) ...@@ -2270,6 +2285,11 @@ boolean G_LuaResponder(event_t *ev)
cancelled = LUA_HookKey(ev, HOOK(KeyUp)); cancelled = LUA_HookKey(ev, HOOK(KeyUp));
LUA_InvalidateUserdata(ev); LUA_InvalidateUserdata(ev);
} }
else if (ev->type == ev_text)
{
cancelled = LUA_HookText(ev, HOOK(TextInput));
LUA_InvalidateUserdata(ev);
}
return cancelled; return cancelled;
} }
...@@ -3159,6 +3179,7 @@ void G_DoReborn(INT32 playernum) ...@@ -3159,6 +3179,7 @@ void G_DoReborn(INT32 playernum)
nextmapoverride = gamemap; nextmapoverride = gamemap;
countdown2 = TICRATE; countdown2 = TICRATE;
skipstats = 2; skipstats = 2;
keepcutscene = 0;
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
...@@ -4209,7 +4230,7 @@ void G_AfterIntermission(void) ...@@ -4209,7 +4230,7 @@ void G_AfterIntermission(void)
if ((gametyperules & GTR_CUTSCENES) && mapheaderinfo[gamemap-1]->cutscenenum if ((gametyperules & GTR_CUTSCENES) && mapheaderinfo[gamemap-1]->cutscenenum
&& !modeattacking && !modeattacking
&& skipstats <= 1 && (skipstats <= 1 || keepcutscene == true)
&& (gamecomplete || !(marathonmode & MA_NOCUTSCENES)) && (gamecomplete || !(marathonmode & MA_NOCUTSCENES))
&& stagefailed == false) && stagefailed == false)
{ {
...@@ -4335,6 +4356,8 @@ static void G_DoContinued(void) ...@@ -4335,6 +4356,8 @@ static void G_DoContinued(void)
// when something new is added. // when something new is added.
void G_EndGame(void) void G_EndGame(void)
{ {
LUA_HookVoid(HOOK(GameEnd));
// Only do evaluation and credits in coop games. // Only do evaluation and credits in coop games.
if (gametyperules & GTR_CUTSCENES) if (gametyperules & GTR_CUTSCENES)
{ {
......
...@@ -566,7 +566,7 @@ static inline void HWR_SubsecPoly(INT32 num, poly_t *poly) ...@@ -566,7 +566,7 @@ static inline void HWR_SubsecPoly(INT32 num, poly_t *poly)
// the bsp divline have not enouth presition // the bsp divline have not enouth presition
// search for the segs source of this divline // search for the segs source of this divline
static inline void SearchDivline(node_t *bsp, fdivline_t *divline) static inline void SearchDivline(bspnode_t *bsp, fdivline_t *divline)
{ {
divline->x = FIXED_TO_FLOAT(bsp->x); divline->x = FIXED_TO_FLOAT(bsp->x);
divline->y = FIXED_TO_FLOAT(bsp->y); divline->y = FIXED_TO_FLOAT(bsp->y);
...@@ -607,7 +607,7 @@ static void loading_status(void) ...@@ -607,7 +607,7 @@ static void loading_status(void)
// poly : the convex polygon that encloses all child subsectors // poly : the convex polygon that encloses all child subsectors
static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *bbox) static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *bbox)
{ {
node_t *bsp; bspnode_t *bsp;
poly_t *backpoly, *frontpoly; poly_t *backpoly, *frontpoly;
fdivline_t fdivline; fdivline_t fdivline;
polyvertex_t *pt; polyvertex_t *pt;
......
...@@ -483,11 +483,14 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex, GLMipmap_t ...@@ -483,11 +483,14 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex, GLMipmap_t
realpatch = W_CachePatchNumPwad(wadnum, lumpnum, PU_PATCH); realpatch = W_CachePatchNumPwad(wadnum, lumpnum, PU_PATCH);
} }
if (realpatch != NULL)
{
HWR_DrawTexturePatchInCache(mipmap, blockwidth, blockheight, texture, patch, realpatch); HWR_DrawTexturePatchInCache(mipmap, blockwidth, blockheight, texture, patch, realpatch);
if (free_patch) if (free_patch)
Patch_Free(realpatch); Patch_Free(realpatch);
} }
}
//Hurdler: not efficient at all but I don't remember exactly how HWR_DrawPatchInCache works :( //Hurdler: not efficient at all but I don't remember exactly how HWR_DrawPatchInCache works :(
if (format2bpp(mipmap->format)==4) if (format2bpp(mipmap->format)==4)
{ {
......
...@@ -256,8 +256,8 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p ...@@ -256,8 +256,8 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
} }
// positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1 // positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1
cx = -1 + (cx / (vid.width/2)); cx = -1.0f + (cx / (vid.width / 2.0f));
cy = 1 - (cy / (vid.height/2)); cy = 1.0f - (cy / (vid.height / 2.0f));
// fwidth and fheight are similar // fwidth and fheight are similar
fwidth /= vid.width / 2; fwidth /= vid.width / 2;
...@@ -598,43 +598,76 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, ...@@ -598,43 +598,76 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Fills a box of pixels using a flat texture as a pattern // Fills a box of pixels using a flat texture as a pattern
// Fixed to properly align like the other draw functions -luigi budd
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
void HWR_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum) void HWR_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum)
{ {
FOutVector v[4]; FOutVector v[4];
const size_t len = W_LumpLength(flatlumpnum); const size_t len = W_LumpLength(flatlumpnum);
UINT16 flatflag = R_GetFlatSize(len) - 1; UINT16 flatflag = R_GetFlatSize(len);
double dflatsize = (double)(flatflag + 1); double dflatsize = (double)(flatflag);
// compilers are COOL!
float dup = (float)vid.dup;
float fx = (float)x * dup;
float fy = (float)y * dup;
float fw = (float)w * dup;
float fh = (float)h * dup;
/*
fx *= dup;
fy *= dup;
fw *= dup;
fh *= dup;
*/
if (fw <= 0 || fh <= 0)
return;
if (fabsf((float)vid.width - (float)BASEVIDWIDTH * vid.dup) > 1.0E-36f)
{
fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 2;
}
if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * vid.dup) > 1.0E-36f)
{
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 2;
}
if (fx >= vid.width || fy >= vid.height)
return;
fx = -1.0f + (fx / (vid.width / 2.0f));
fy = 1.0f - (fy / (vid.height / 2.0f));
fw /= vid.width / 2;
fh /= vid.height / 2;
// 3--2 // 3--2
// | /| // | /|
// |/ | // |/ |
// 0--1 // 0--1
v[0].x = v[3].x = (x - 160.0f)/160.0f; // position vertices
v[2].x = v[1].x = ((x+w) - 160.0f)/160.0f; v[0].x = v[3].x = fx;
v[0].y = v[1].y = -(y - 100.0f)/100.0f; v[2].x = v[1].x = fx + fw;
v[2].y = v[3].y = -((y+h) - 100.0f)/100.0f;
v[0].y = v[1].y = fy;
v[2].y = v[3].y = fy - fh;
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f; v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
v[0].s = v[3].s = (float)((x & flatflag)/dflatsize); // sides
v[2].s = v[1].s = (float)(v[0].s + w/dflatsize); v[0].s = v[3].s = (float)(flatflag/dflatsize) * 2;
v[0].t = v[1].t = (float)((y & flatflag)/dflatsize); v[2].s = v[1].s = (float)(v[0].s + w/dflatsize) * 2;
v[2].t = v[3].t = (float)(v[0].t + h/dflatsize);
HWR_GetRawFlat(flatlumpnum); // top/bottom
v[0].t = v[1].t = (float)(flatflag/dflatsize) * 2;
v[2].t = v[3].t = (float)(v[0].t + h/dflatsize) * 2;
//Hurdler: Boris, the same comment as above... but maybe for pics // needed to texture the poly
// it not a problem since they don't have any transparent pixel HWR_GetRawFlat(flatlumpnum);
// if I'm right !?
// BTW, I see we put 0 for PFs, and If I'm right, that
// means we take the previous PFs as default
// how can we be sure they are ok?
HWD.pfnDrawPolygon(NULL, v, 4, PF_NoDepthTest); //PF_Translucent); HWD.pfnDrawPolygon(NULL, v, 4, PF_NoDepthTest); //PF_Translucent);
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Fade down the screen so that the menu drawn on top of it looks brighter // Fade down the screen so that the menu drawn on top of it looks brighter
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -1140,10 +1173,12 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT32 ...@@ -1140,10 +1173,12 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT32
void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color) void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
{ {
FOutVector v[4]; FOutVector v[4];
FBITFIELD flags;
FSurfaceInfo Surf; FSurfaceInfo Surf;
float fx, fy, fw, fh; float fx, fy, fw, fh;
RGBA_t *palette = HWR_GetTexturePalette(); RGBA_t *palette = HWR_GetTexturePalette();
UINT8 alphalevel = ((color & V_ALPHAMASK) >> V_ALPHASHIFT); UINT8 alphalevel = ((color & V_ALPHAMASK) >> V_ALPHASHIFT);
UINT8 blendmode = ((color & V_BLENDMASK) >> V_BLENDSHIFT);
UINT8 perplayershuffle = 0; UINT8 perplayershuffle = 0;
...@@ -1308,6 +1343,199 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color) ...@@ -1308,6 +1343,199 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
Surf.PolyColor = palette[color&0xFF]; Surf.PolyColor = palette[color&0xFF];
flags = HWR_GetBlendModeFlag(blendmode+1)|PF_NoDepthTest|PF_NoTexture|PF_Modulated;
if (alphalevel)
{
if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF
else if (alphalevel == 11) Surf.PolyColor.s.alpha = softwaretranstogl[st_translucency]; // V_HUDTRANS
else if (alphalevel == 12) Surf.PolyColor.s.alpha = softwaretranstogl_hi[st_translucency]; // V_HUDTRANSDOUBLE
else Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
}
HWD.pfnDrawPolygon(&Surf, v, 4,
flags);
}
// -----------------+
// HWR_DrawFixedFill: draw flat coloured rectangle, with no texture (with fixed point values !!)
// -----------------+
void HWR_DrawFixedFill(fixed_t x, fixed_t y, fixed_t w, fixed_t h, INT32 color)
{
FOutVector v[4];
FSurfaceInfo Surf;
FBITFIELD flags;
float fx = FIXED_TO_FLOAT(x);
float fy = FIXED_TO_FLOAT(y);
float fw = FIXED_TO_FLOAT(w);
float fh = FIXED_TO_FLOAT(h);
RGBA_t *palette = HWR_GetTexturePalette();
UINT8 alphalevel = ((color & V_ALPHAMASK) >> V_ALPHASHIFT);
UINT8 blendmode = ((color & V_BLENDMASK) >> V_BLENDSHIFT);
UINT8 perplayershuffle = 0;
// 3--2
// | /|
// |/ |
// 0--1
if (splitscreen && (color & V_PERPLAYER))
{
float adjusty = ((color & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
fh /= 1;
fy /= 2;
#ifdef QUADS
if (splitscreen > 1) // 3 or 4 players
{
float adjustx = ((color & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
fw /= 2;
fx /= 2;
if (stplyr == &players[displayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
color &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
}
else if (stplyr == &players[secondarydisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
fx += adjustx;
color &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
}
else if (stplyr == &players[thirddisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
fy += adjusty;
color &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
}
else //if (stplyr == &players[fourthdisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
fx += adjustx;
fy += adjusty;
color &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
}
}
else
#endif
// 2 players
{
if (stplyr == &players[displayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
color &= ~V_SNAPTOBOTTOM;
}
else //if (stplyr == &players[secondarydisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
fy += adjusty;
color &= ~V_SNAPTOTOP;
}
}
}
if (!(color & V_NOSCALESTART))
{
/*
if (x == 0 && y == 0 && w == BASEVIDWIDTH && h == BASEVIDHEIGHT)
{
RGBA_t rgbaColour = palette[color&0xFF];
FRGBAFloat clearColour;
clearColour.red = (float)rgbaColour.s.red / 255;
clearColour.green = (float)rgbaColour.s.green / 255;
clearColour.blue = (float)rgbaColour.s.blue / 255;
clearColour.alpha = 1;
HWD.pfnClearBuffer(true, false, &clearColour);
return;
}
*/
fx *= vid.dup;
fy *= vid.dup;
fw *= vid.dup;
fh *= vid.dup;
if (fabsf((float)vid.width - (float)BASEVIDWIDTH * vid.dup) > 1.0E-36f)
{
if (color & V_SNAPTORIGHT)
fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup));
else if (!(color & V_SNAPTOLEFT))
fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 2;
if (perplayershuffle & 4)
fx -= ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 4;
else if (perplayershuffle & 8)
fx += ((float)vid.width - ((float)BASEVIDWIDTH * vid.dup)) / 4;
}
if (fabsf((float)vid.height - (float)BASEVIDHEIGHT * vid.dup) > 1.0E-36f)
{
// same thing here
if (color & V_SNAPTOBOTTOM)
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup));
else if (!(color & V_SNAPTOTOP))
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 2;
if (perplayershuffle & 1)
fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 4;
else if (perplayershuffle & 2)
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * vid.dup)) / 4;
}
}
if (fx >= vid.width || fy >= vid.height)
return;
if (fx < 0)
{
fw += fx;
fx = 0;
}
if (fy < 0)
{
fh += fy;
fy = 0;
}
if (fw <= 0 || fh <= 0)
return;
if (fx + fw > vid.width)
fw = (float)vid.width - fx;
if (fy + fh > vid.height)
fh = (float)vid.height - fy;
fx = -1.0f + (fx / (vid.width / 2.0f));
fy = 1.0f - (fy / (vid.height / 2.0f));
fw = fw / (vid.width / 2);
fh = fh / (vid.height / 2);
v[0].x = v[3].x = fx;
v[2].x = v[1].x = fx + fw;
v[0].y = v[1].y = fy;
v[2].y = v[3].y = fy - fh;
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
v[0].s = v[3].s = 0.0f;
v[2].s = v[1].s = 1.0f;
v[0].t = v[1].t = 0.0f;
v[2].t = v[3].t = 1.0f;
Surf.PolyColor = palette[color&0xFF];
flags = HWR_GetBlendModeFlag(blendmode+1)|PF_NoDepthTest|PF_NoTexture|PF_Modulated;
if (alphalevel) if (alphalevel)
{ {
if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF if (alphalevel == 10) Surf.PolyColor.s.alpha = softwaretranstogl_lo[st_translucency]; // V_HUDTRANSHALF
...@@ -1317,7 +1545,7 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color) ...@@ -1317,7 +1545,7 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
} }
HWD.pfnDrawPolygon(&Surf, v, 4, HWD.pfnDrawPolygon(&Surf, v, 4,
PF_Modulated|PF_NoTexture|PF_NoDepthTest|PF_Translucent); flags);
} }
#ifdef HAVE_PNG #ifdef HAVE_PNG
......