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
  • 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

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
117 results
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
  • 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
  • map-components-signedness-fixes
  • 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
Show changes
Commits on Source (178)
version: 2.2.14.{branch}-{build} version: 2.2.16.{branch}-{build}
os: MinGW os: MinGW
environment: environment:
......
...@@ -21,6 +21,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 ...@@ -21,6 +21,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32
console.c console.c
hu_stuff.c hu_stuff.c
i_time.c i_time.c
i_threads.c
y_inter.c y_inter.c
st_stuff.c st_stuff.c
m_aatree.c m_aatree.c
......
...@@ -13,11 +13,6 @@ ifdef MINGW ...@@ -13,11 +13,6 @@ ifdef MINGW
libs+=-mconsole libs+=-mconsole
endif endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=dedicated/i_threads.c
endif
NOOPENMPT=1 NOOPENMPT=1
NOGME=1 NOGME=1
NOHW=1 NOHW=1
......
...@@ -18,6 +18,11 @@ opts+=-DHWRENDER ...@@ -18,6 +18,11 @@ opts+=-DHWRENDER
sources+=$(call List,hardware/Sourcefile) sources+=$(call List,hardware/Sourcefile)
endif endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=i_threads.c
endif
ifndef NOMD5 ifndef NOMD5
sources+=md5.c sources+=md5.c
endif endif
......
...@@ -43,11 +43,6 @@ sources+=sdl/mixer_sound.c ...@@ -43,11 +43,6 @@ sources+=sdl/mixer_sound.c
endif endif
endif endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=sdl/i_threads.c
endif
ifdef SDL_PKGCONFIG ifdef SDL_PKGCONFIG
$(eval $(call Use_pkg_config,SDL)) $(eval $(call Use_pkg_config,SDL))
else else
......
...@@ -85,7 +85,7 @@ endif ...@@ -85,7 +85,7 @@ endif
#WFLAGS+=-Wunreachable-code #WFLAGS+=-Wunreachable-code
WFLAGS+=-Winline WFLAGS+=-Winline
ifdef DEBUGMODE ifdef DEBUGMODE
WFLAGS+=-Wno-error=inline WFLAGS+=-Wno-inline
endif endif
ifdef GCC43 ifdef GCC43
WFLAGS+=-funit-at-a-time WFLAGS+=-funit-at-a-time
...@@ -152,12 +152,8 @@ else ...@@ -152,12 +152,8 @@ else
endif endif
ifdef DEBUGMODE ifdef DEBUGMODE
ifdef GCC48
opts+=-Og
else
opts+=-O0 opts+=-O0
endif endif
endif
ifdef VALGRIND ifdef VALGRIND
ifdef GCC46 ifdef GCC46
......
...@@ -27,23 +27,8 @@ void I_SetPalette(RGBA_t *palette) ...@@ -27,23 +27,8 @@ void I_SetPalette(RGBA_t *palette)
(void)palette; (void)palette;
} }
INT32 VID_NumModes(void)
{
return 1;
}
INT32 VID_GetModeForSize(INT32 w, INT32 h)
{
(void)w;
(void)h;
return 0;
}
void VID_PrepareModeList(void){}
INT32 VID_SetMode(INT32 modenum) INT32 VID_SetMode(INT32 modenum)
{ {
vid.modenum = 0;
vid.width = 320; vid.width = 320;
vid.height = 240; vid.height = 240;
vid.bpp = 1; vid.bpp = 1;
...@@ -61,11 +46,6 @@ void VID_CheckGLLoaded(rendermode_t oldrender) ...@@ -61,11 +46,6 @@ void VID_CheckGLLoaded(rendermode_t oldrender)
(void)oldrender; (void)oldrender;
} }
const char *VID_GetModeName(INT32 modenum)
{
return "A320x240";
}
void I_UpdateNoBlit(void){} void I_UpdateNoBlit(void){}
void I_FinishUpdate(void) { void I_FinishUpdate(void) {
......
...@@ -625,7 +625,7 @@ void B_HandleFlightIndicator(player_t *player) ...@@ -625,7 +625,7 @@ void B_HandleFlightIndicator(player_t *player)
} }
// if the mobj isn't a flight indicator, let's not mess with it // if the mobj isn't a flight indicator, let's not mess with it
if (tails->hnext->type != MT_OVERLAY || (tails->hnext->state != states+S_FLIGHTINDICATOR)) if (tails->hnext->type != MT_OVERLAY || (tails->hnext->state->num != S_FLIGHTINDICATOR))
return; return;
// if it shouldn't exist, remove it // if it shouldn't exist, remove it
......
...@@ -85,7 +85,7 @@ CV_PossibleValue_t CV_TrueFalse[] = {{0, "False"}, {1, "True"}, {0, NULL}}; ...@@ -85,7 +85,7 @@ CV_PossibleValue_t CV_TrueFalse[] = {{0, "False"}, {1, "True"}, {0, NULL}};
// First implementation is 26 (2.1.21), so earlier configs default at 25 (2.1.20) // First implementation is 26 (2.1.21), so earlier configs default at 25 (2.1.20)
// Also set CV_HIDEN during runtime, after config is loaded // Also set CV_HIDEN during runtime, after config is loaded
static boolean execversion_enabled = false; static boolean execversion_enabled = false;
consvar_t cv_execversion = CVAR_INIT ("execversion","25",CV_CALL,CV_Unsigned, CV_EnforceExecVersion); consvar_t cv_execversion = CVAR_INIT ("execversion", "25", NULL, CV_CALL, CV_Unsigned, CV_EnforceExecVersion);
// for default joyaxis detection // for default joyaxis detection
static boolean joyaxis_default = false; static boolean joyaxis_default = false;
...@@ -315,6 +315,7 @@ void COM_ImmedExecute(const char *ptext) ...@@ -315,6 +315,7 @@ void COM_ImmedExecute(const char *ptext)
typedef struct xcommand_s typedef struct xcommand_s
{ {
const char *name; const char *name;
const char *desc;
struct xcommand_s *next; struct xcommand_s *next;
com_func_t function; com_func_t function;
com_flags_t flags; com_flags_t flags;
...@@ -338,17 +339,17 @@ void COM_Init(void) ...@@ -338,17 +339,17 @@ void COM_Init(void)
VS_Alloc(&com_text, COM_BUF_SIZE); VS_Alloc(&com_text, COM_BUF_SIZE);
// add standard commands // add standard commands
COM_AddCommand("alias", COM_Alias_f, 0); COM_AddCommand("alias", "Create or list commands that expand to other commands", COM_Alias_f, 0);
COM_AddCommand("echo", COM_Echo_f, COM_LUA); COM_AddCommand("echo", "Print the specified text, useful for scripts", COM_Echo_f, COM_LUA);
COM_AddCommand("cecho", COM_CEcho_f, COM_LUA); COM_AddCommand("cecho", "Display text on-screen", COM_CEcho_f, COM_LUA);
COM_AddCommand("cechoflags", COM_CEchoFlags_f, COM_LUA); COM_AddCommand("cechoflags", NULL, COM_CEchoFlags_f, COM_LUA);
COM_AddCommand("cechoduration", COM_CEchoDuration_f, COM_LUA); COM_AddCommand("cechoduration", NULL, COM_CEchoDuration_f, COM_LUA);
COM_AddCommand("exec", COM_Exec_f, 0); COM_AddCommand("exec", "Run a script", COM_Exec_f, 0);
COM_AddCommand("wait", COM_Wait_f, 0); COM_AddCommand("wait", NULL, COM_Wait_f, 0);
COM_AddCommand("help", COM_Help_f, COM_LUA); COM_AddCommand("help", "Show information about a variable or command", COM_Help_f, COM_LUA);
COM_AddCommand("find", COM_Find_f, COM_LUA); COM_AddCommand("find", "Search commands and variables", COM_Find_f, COM_LUA);
COM_AddCommand("toggle", COM_Toggle_f, COM_LUA); COM_AddCommand("toggle", "Toggle a variable on or off", COM_Toggle_f, COM_LUA);
COM_AddCommand("add", COM_Add_f, COM_LUA); COM_AddCommand("add", NULL, COM_Add_f, COM_LUA);
RegisterNetXCmd(XD_NETVAR, Got_NetVar); RegisterNetXCmd(XD_NETVAR, Got_NetVar);
} }
...@@ -487,7 +488,7 @@ static void COM_TokenizeString(char *ptext) ...@@ -487,7 +488,7 @@ static void COM_TokenizeString(char *ptext)
* \param name Name of the command. * \param name Name of the command.
* \param func Function called when the command is run. * \param func Function called when the command is run.
*/ */
void COM_AddCommand(const char *name, com_func_t func, com_flags_t flags) void COM_AddCommand(const char *name, const char *desc, com_func_t func, com_flags_t flags)
{ {
xcommand_t *cmd; xcommand_t *cmd;
...@@ -516,6 +517,7 @@ void COM_AddCommand(const char *name, com_func_t func, com_flags_t flags) ...@@ -516,6 +517,7 @@ void COM_AddCommand(const char *name, com_func_t func, com_flags_t flags)
cmd = ZZ_Alloc(sizeof *cmd); cmd = ZZ_Alloc(sizeof *cmd);
cmd->name = name; cmd->name = name;
cmd->desc = desc;
cmd->function = func; cmd->function = func;
cmd->flags = flags; cmd->flags = flags;
cmd->next = com_commands; cmd->next = com_commands;
...@@ -527,7 +529,7 @@ void COM_AddCommand(const char *name, com_func_t func, com_flags_t flags) ...@@ -527,7 +529,7 @@ void COM_AddCommand(const char *name, com_func_t func, com_flags_t flags)
* *
* \param name Name of the command. * \param name Name of the command.
*/ */
int COM_AddLuaCommand(const char *name) int COM_AddLuaCommand(const char *name, const char *desc)
{ {
xcommand_t *cmd; xcommand_t *cmd;
...@@ -549,6 +551,7 @@ int COM_AddLuaCommand(const char *name) ...@@ -549,6 +551,7 @@ int COM_AddLuaCommand(const char *name)
// Add a new command. // Add a new command.
cmd = ZZ_Alloc(sizeof *cmd); cmd = ZZ_Alloc(sizeof *cmd);
cmd->name = name; cmd->name = name;
cmd->desc = desc;
cmd->function = COM_Lua_f; cmd->function = COM_Lua_f;
cmd->flags = COM_LUA; cmd->flags = COM_LUA;
cmd->next = com_commands; cmd->next = com_commands;
...@@ -892,7 +895,12 @@ static void COM_Help_f(void) ...@@ -892,7 +895,12 @@ static void COM_Help_f(void)
{ {
boolean floatmode = false; boolean floatmode = false;
const char *cvalue = NULL; const char *cvalue = NULL;
CONS_Printf("\x82""Variable %s:\n", cvar->name); CONS_Printf("\x82""Variable %s: \x80", cvar->name);
if (cvar->desc != NULL)
CONS_Printf("%s\n", cvar->desc);
else
CONS_Printf("No description provided\n");
CONS_Printf(M_GetText(" flags: ")); CONS_Printf(M_GetText(" flags: "));
if (cvar->flags & CV_SAVE) if (cvar->flags & CV_SAVE)
CONS_Printf("AUTOSAVE "); CONS_Printf("AUTOSAVE ");
...@@ -984,14 +992,15 @@ static void COM_Help_f(void) ...@@ -984,14 +992,15 @@ static void COM_Help_f(void)
if (strcmp(cmd->name, help)) if (strcmp(cmd->name, help))
continue; continue;
CONS_Printf("\x82""Command %s:\n", cmd->name); CONS_Printf("\x82""Command %s: \x80", cmd->name);
CONS_Printf(" help is not available for commands"); if (cmd->desc != NULL)
CONS_Printf("\x82""\nCheck wiki.srb2.org for more or try typing <name> without arguments\n"); CONS_Printf("%s\n", cmd->desc);
else
CONS_Printf("No description provided\n");
return; return;
} }
CONS_Printf("No variable or command named %s", help); CONS_Printf("No variable or command named %s\n", help);
CONS_Printf("\x82""\nCheck wiki.srb2.org for more or try typing help without arguments\n");
} }
return; return;
} }
...@@ -1014,8 +1023,7 @@ static void COM_Help_f(void) ...@@ -1014,8 +1023,7 @@ static void COM_Help_f(void)
CONS_Printf("%s ",cmd->name); CONS_Printf("%s ",cmd->name);
i++; i++;
} }
CONS_Printf("\n");
CONS_Printf("\x82""\nCheck wiki.srb2.org for more or type help <command or variable>\n");
CONS_Debug(DBG_GAMELOGIC, "\x82Total : %d\n", i); CONS_Debug(DBG_GAMELOGIC, "\x82Total : %d\n", i);
} }
...@@ -2482,22 +2490,6 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr) ...@@ -2482,22 +2490,6 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
if (!CV_FilterJoyAxisVars(v, valstr)) if (!CV_FilterJoyAxisVars(v, valstr))
return false; return false;
} }
if (GETMAJOREXECVERSION(cv_execversion.value) < 57) // 57 = 2.2.16
{
if (
(!stricmp(v->name, "movebob") && atoi(valstr) == FRACUNIT) ||
(!stricmp(v->name, "playersforexit") && atoi(valstr) == 4) || // 4 = all
(!stricmp(v->name, "advancemap") && atoi(valstr) == 1) || // 1 = next
(!stricmp(v->name, "cam_speed") && !stricmp(valstr, "0.3")) ||
(!stricmp(v->name, "cam2_speed") && !stricmp(valstr, "0.3")) ||
(!stricmp(v->name, "timerres") && atoi(valstr) == 0) || // 0 = classic
(!stricmp(v->name, "gr_modelinterpolation")) || // Force reset
(!stricmp(v->name, "fov") && atoi(valstr) == 90)
)
return false;
}
return true; return true;
} }
......
...@@ -37,8 +37,8 @@ typedef enum ...@@ -37,8 +37,8 @@ typedef enum
typedef void (*com_func_t)(void); typedef void (*com_func_t)(void);
void COM_AddCommand(const char *name, com_func_t func, com_flags_t flags); void COM_AddCommand(const char *name, const char *desc, com_func_t func, com_flags_t flags);
int COM_AddLuaCommand(const char *name); int COM_AddLuaCommand(const char *name, const char *desc);
size_t COM_Argc(void); size_t COM_Argc(void);
const char *COM_Argv(size_t arg); // if argv > argc, returns empty string const char *COM_Argv(size_t arg); // if argv > argc, returns empty string
...@@ -137,6 +137,7 @@ typedef struct consvar_s //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NUL ...@@ -137,6 +137,7 @@ typedef struct consvar_s //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NUL
{ {
const char *name; const char *name;
const char *defaultvalue; const char *defaultvalue;
const char *desc;
INT32 flags; // flags see cvflags_t above INT32 flags; // flags see cvflags_t above
CV_PossibleValue_t *PossibleValue; // table of possible values CV_PossibleValue_t *PossibleValue; // table of possible values
void (*func)(void); // called on change, if CV_CALL set void (*func)(void); // called on change, if CV_CALL set
...@@ -161,7 +162,7 @@ typedef struct consvar_s //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NUL ...@@ -161,7 +162,7 @@ typedef struct consvar_s //NULL, NULL, 0, NULL, NULL |, 0, NULL, NULL, 0, 0, NUL
struct consvar_s *next; struct consvar_s *next;
} consvar_t; } consvar_t;
/* name, defaultvalue, flags, PossibleValue, func */ /* name, defaultvalue, desc, flags, PossibleValue, func */
#define CVAR_INIT( ... ) \ #define CVAR_INIT( ... ) \
{ __VA_ARGS__, NULL, 0, NULL, NULL, {0, {NULL}}, 0U, (char)0, NULL } { __VA_ARGS__, NULL, 0, NULL, NULL, {0, {NULL}}, 0U, (char)0, NULL }
......
...@@ -123,23 +123,23 @@ static char con_buffer[CON_BUFFERSIZE]; ...@@ -123,23 +123,23 @@ static char con_buffer[CON_BUFFERSIZE];
// how many seconds the hud messages lasts on the screen // how many seconds the hud messages lasts on the screen
// CV_Unsigned can overflow when multiplied by TICRATE later, so let's use a 3-year limit instead // CV_Unsigned can overflow when multiplied by TICRATE later, so let's use a 3-year limit instead
static CV_PossibleValue_t hudtime_cons_t[] = {{0, "MIN"}, {99999999, "MAX"}, {0, NULL}}; static CV_PossibleValue_t hudtime_cons_t[] = {{0, "MIN"}, {99999999, "MAX"}, {0, NULL}};
static consvar_t cons_hudtime = CVAR_INIT ("con_hudtime", "5", CV_SAVE, hudtime_cons_t, NULL); static consvar_t cons_hudtime = CVAR_INIT ("con_hudtime", "5", NULL, CV_SAVE, hudtime_cons_t, NULL);
// number of lines displayed on the HUD // number of lines displayed on the HUD
static CV_PossibleValue_t hudlines_cons_t[] = {{0, "MIN"}, {MAXHUDLINES, "MAX"}, {0, NULL}}; static CV_PossibleValue_t hudlines_cons_t[] = {{0, "MIN"}, {MAXHUDLINES, "MAX"}, {0, NULL}};
static consvar_t cons_hudlines = CVAR_INIT ("con_hudlines", "5", CV_CALL|CV_SAVE, hudlines_cons_t, CONS_hudlines_Change); static consvar_t cons_hudlines = CVAR_INIT ("con_hudlines", "5", NULL, CV_CALL|CV_SAVE, hudlines_cons_t, CONS_hudlines_Change);
// number of lines console move per frame // number of lines console move per frame
// (con_speed needs a limit, apparently) // (con_speed needs a limit, apparently)
static CV_PossibleValue_t speed_cons_t[] = {{0, "MIN"}, {64, "MAX"}, {0, NULL}}; static CV_PossibleValue_t speed_cons_t[] = {{0, "MIN"}, {64, "MAX"}, {0, NULL}};
static consvar_t cons_speed = CVAR_INIT ("con_speed", "8", CV_SAVE, speed_cons_t, NULL); static consvar_t cons_speed = CVAR_INIT ("con_speed", "8", NULL, CV_SAVE, speed_cons_t, NULL);
// percentage of screen height to use for console // percentage of screen height to use for console
static consvar_t cons_height = CVAR_INIT ("con_height", "50", CV_CALL|CV_SAVE, CV_Unsigned, CONS_height_Change); static consvar_t cons_height = CVAR_INIT ("con_height", "50", NULL, CV_CALL|CV_SAVE, CV_Unsigned, CONS_height_Change);
static CV_PossibleValue_t backpic_cons_t[] = {{0, "translucent"}, {1, "picture"}, {0, NULL}}; static CV_PossibleValue_t backpic_cons_t[] = {{0, "translucent"}, {1, "picture"}, {0, NULL}};
// whether to use console background picture, or translucent mode // whether to use console background picture, or translucent mode
static consvar_t cons_backpic = CVAR_INIT ("con_backpic", "translucent", CV_SAVE, backpic_cons_t, NULL); static consvar_t cons_backpic = CVAR_INIT ("con_backpic", "translucent", NULL, CV_SAVE, backpic_cons_t, NULL);
static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Black"}, {2, "Sepia"}, static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Black"}, {2, "Sepia"},
{3, "Brown"}, {4, "Pink"}, {5, "Raspberry"}, {3, "Brown"}, {4, "Pink"}, {5, "Raspberry"},
...@@ -151,7 +151,7 @@ static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Black"}, { ...@@ -151,7 +151,7 @@ static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Black"}, {
{0, NULL}}; {0, NULL}};
consvar_t cons_backcolor = CVAR_INIT ("con_backcolor", "Green", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change); consvar_t cons_backcolor = CVAR_INIT ("con_backcolor", "Green", "Color of the console background", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change);
static void CON_Print(char *msg); static void CON_Print(char *msg);
...@@ -477,7 +477,7 @@ void CON_Init(void) ...@@ -477,7 +477,7 @@ void CON_Init(void)
// register our commands // register our commands
// //
COM_AddCommand("cls", CONS_Clear_f, 0); COM_AddCommand("cls", "Clear the console", CONS_Clear_f, 0);
//COM_AddCommand("english", CONS_English_f); //COM_AddCommand("english", CONS_English_f);
// set console full screen for game startup MAKE SURE VID_Init() done !!! // set console full screen for game startup MAKE SURE VID_Init() done !!!
Lock_state(); Lock_state();
...@@ -504,7 +504,7 @@ void CON_Init(void) ...@@ -504,7 +504,7 @@ void CON_Init(void)
CV_RegisterVar(&cons_height); CV_RegisterVar(&cons_height);
CV_RegisterVar(&cons_backpic); CV_RegisterVar(&cons_backpic);
CV_RegisterVar(&cons_backcolor); CV_RegisterVar(&cons_backcolor);
COM_AddCommand("bind", CONS_Bind_f, 0); COM_AddCommand("bind", "Bind a command to a button", CONS_Bind_f, 0);
} }
else else
{ {
...@@ -918,6 +918,22 @@ static void CON_InputDelChar(void) ...@@ -918,6 +918,22 @@ static void CON_InputDelChar(void)
// ---- // ----
// //
//
// Same as CON_Responder, but is process before everything else, so it cannot be blocked.
//
boolean CON_PreResponder(event_t *ev)
{
if (ev->type == ev_keydown && shiftdown == 1 && ev->key == KEY_ESCAPE)
{
I_SetTextInputMode(con_destlines == 0); // inverse, since this is changed next tic.
consoletoggle = true;
return true;
}
return false;
}
//
// Handles console key input // Handles console key input
// //
boolean CON_Responder(event_t *ev) boolean CON_Responder(event_t *ev)
...@@ -1557,13 +1573,6 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...) ...@@ -1557,13 +1573,6 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...)
// //
void CONS_Error(const char *msg) void CONS_Error(const char *msg)
{ {
#if defined(RPC_NO_WINDOWS_H) && defined(_WINDOWS)
if (!graphics_started)
{
MessageBoxA(vid.WndParent, msg, "SRB2 Warning", MB_OK);
return;
}
#endif
CONS_Printf("\x82%s", msg); // write error msg in different colour CONS_Printf("\x82%s", msg); // write error msg in different colour
CONS_Printf(M_GetText("Press ENTER to continue\n")); CONS_Printf(M_GetText("Press ENTER to continue\n"));
......
...@@ -19,6 +19,7 @@ void CON_Init(void); ...@@ -19,6 +19,7 @@ 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 #ifdef HAVE_THREADS
...@@ -37,7 +38,8 @@ extern boolean con_refresh; ...@@ -37,7 +38,8 @@ extern boolean con_refresh;
// 0 means console if off, or moving out // 0 means console if off, or moving out
extern INT32 con_destlines; extern INT32 con_destlines;
extern UINT32 con_scalefactor; // console text scale factor // console text scale factor
extern UINT32 con_scalefactor;
extern consvar_t cons_backcolor; extern consvar_t cons_backcolor;
......
...@@ -101,9 +101,6 @@ int SUBVERSION; ...@@ -101,9 +101,6 @@ int SUBVERSION;
// platform independant focus loss // platform independant focus loss
UINT8 window_notinfocus = false; UINT8 window_notinfocus = false;
static addfilelist_t startupwadfiles;
static addfilelist_t startuppwads;
boolean devparm = false; // started game with -devparm boolean devparm = false; // started game with -devparm
boolean singletics = false; // timedemo boolean singletics = false; // timedemo
...@@ -227,6 +224,9 @@ void D_ProcessEvents(void) ...@@ -227,6 +224,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
...@@ -328,7 +328,7 @@ static void D_Display(void) ...@@ -328,7 +328,7 @@ static void D_Display(void)
// 4. The frame is ready to be drawn! // 4. The frame is ready to be drawn!
// Check for change of renderer or screen size (video mode) // Check for change of renderer or screen size (video mode)
if ((setrenderneeded || setmodeneeded) && !wipe) if (vid.change.set && !wipe)
SCR_SetMode(); // change video mode SCR_SetMode(); // change video mode
// Recalc the screen // Recalc the screen
...@@ -509,18 +509,20 @@ static void D_Display(void) ...@@ -509,18 +509,20 @@ static void D_Display(void)
// render the second screen // render the second screen
if (splitscreen && players[secondarydisplayplayer].mo) if (splitscreen && players[secondarydisplayplayer].mo)
{ {
viewwindowy = vid.height / 2; #ifdef HWRENDER
if (rendermode != render_soft)
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_RenderPlayerView(1, &players[secondarydisplayplayer]); HWR_RenderPlayerView(1, &players[secondarydisplayplayer]);
else else
#endif #endif
if (rendermode != render_none) if (rendermode != render_none)
{ {
viewwindowy = vid.height / 2;
topleft = screens[0] + viewwindowy*vid.width + viewwindowx; topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
R_RenderPlayerView(&players[secondarydisplayplayer]); R_RenderPlayerView(&players[secondarydisplayplayer]);
viewwindowy = 0;
} }
viewwindowy = 0; viewwindowy = 0;
...@@ -1123,7 +1125,7 @@ static void ChangeDirForUrlHandler(void) ...@@ -1123,7 +1125,7 @@ static void ChangeDirForUrlHandler(void)
// Identify the SRB2 version, and IWAD file to use. // Identify the SRB2 version, and IWAD file to use.
// ========================================================================== // ==========================================================================
static void IdentifyVersion(void) static void IdentifyVersion(addfilelist_t *startupwadfiles)
{ {
char *srb2wad; char *srb2wad;
const char *srb2waddir = NULL; const char *srb2waddir = NULL;
...@@ -1166,7 +1168,7 @@ static void IdentifyVersion(void) ...@@ -1166,7 +1168,7 @@ static void IdentifyVersion(void)
// Load the IWAD // Load the IWAD
if (srb2wad != NULL && FIL_ReadFileOK(srb2wad)) if (srb2wad != NULL && FIL_ReadFileOK(srb2wad))
D_AddFile(&startupwadfiles, srb2wad); D_AddFile(startupwadfiles, srb2wad);
else else
I_Error("srb2.pk3 not found! Expected in %s, ss file: %s\n", srb2waddir, srb2wad); I_Error("srb2.pk3 not found! Expected in %s, ss file: %s\n", srb2waddir, srb2wad);
...@@ -1177,14 +1179,14 @@ static void IdentifyVersion(void) ...@@ -1177,14 +1179,14 @@ static void IdentifyVersion(void)
// checking in D_SRB2Main // checking in D_SRB2Main
// Add the maps // Add the maps
D_AddFile(&startupwadfiles, va(pandf,srb2waddir, "zones.pk3")); D_AddFile(startupwadfiles, va(pandf,srb2waddir, "zones.pk3"));
// Add the characters // Add the characters
D_AddFile(&startupwadfiles, va(pandf,srb2waddir, "characters.pk3")); D_AddFile(startupwadfiles, va(pandf,srb2waddir, "characters.pk3"));
#ifdef USE_PATCH_DTA #ifdef USE_PATCH_DTA
// Add our crappy patches to fix our bugs // Add our crappy patches to fix our bugs
D_AddFile(&startupwadfiles, va(pandf,srb2waddir, "patch.pk3")); D_AddFile(startupwadfiles, va(pandf,srb2waddir, "patch.pk3"));
#endif #endif
#if !defined (HAVE_SDL) || defined (HAVE_MIXER) #if !defined (HAVE_SDL) || defined (HAVE_MIXER)
...@@ -1194,7 +1196,7 @@ static void IdentifyVersion(void) ...@@ -1194,7 +1196,7 @@ static void IdentifyVersion(void)
const char *musicpath = va(pandf,srb2waddir,str);\ const char *musicpath = va(pandf,srb2waddir,str);\
int ms = W_VerifyNMUSlumps(musicpath, false); \ int ms = W_VerifyNMUSlumps(musicpath, false); \
if (ms == 1) \ if (ms == 1) \
D_AddFile(&startupwadfiles, musicpath); \ D_AddFile(startupwadfiles, musicpath); \
else if (ms == 0) \ else if (ms == 0) \
I_Error("File "str" has been modified with non-music/sound lumps"); \ I_Error("File "str" has been modified with non-music/sound lumps"); \
} }
...@@ -1239,6 +1241,14 @@ void D_SRB2Main(void) ...@@ -1239,6 +1241,14 @@ void D_SRB2Main(void)
INT32 pstartmap = 1; INT32 pstartmap = 1;
boolean autostart = false; boolean autostart = false;
addfilelist_t startupwads;
addfilelist_t startupwadfiles;
startupwads.files = NULL;
startupwads.numfiles = 0;
startupwadfiles.files = NULL;
startupwadfiles.numfiles = 0;
/* break the version string into version numbers, for netplay */ /* break the version string into version numbers, for netplay */
D_ConvertVersionNumbers(); D_ConvertVersionNumbers();
...@@ -1270,6 +1280,9 @@ void D_SRB2Main(void) ...@@ -1270,6 +1280,9 @@ void D_SRB2Main(void)
// initialise locale code // initialise locale code
M_StartupLocale(); M_StartupLocale();
CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n");
Z_Init();
// get parameters from a response file (eg: srb2 @parms.txt) // get parameters from a response file (eg: srb2 @parms.txt)
M_FindResponseFile(); M_FindResponseFile();
...@@ -1283,7 +1296,7 @@ void D_SRB2Main(void) ...@@ -1283,7 +1296,7 @@ void D_SRB2Main(void)
ChangeDirForUrlHandler(); ChangeDirForUrlHandler();
// identify the main IWAD file to use // identify the main IWAD file to use
IdentifyVersion(); IdentifyVersion(&startupwadfiles);
#if !defined(NOTERMIOS) #if !defined(NOTERMIOS)
setbuf(stdout, NULL); // non-buffered output setbuf(stdout, NULL); // non-buffered output
...@@ -1367,15 +1380,12 @@ void D_SRB2Main(void) ...@@ -1367,15 +1380,12 @@ 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();
CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n"); if (M_CheckParm("-password") && M_IsNextParm())
Z_Init(); D_SetPassword(M_GetNextParm());
clientGamedata = M_NewGameDataStruct(); clientGamedata = M_NewGameDataStruct();
serverGamedata = M_NewGameDataStruct(); serverGamedata = M_NewGameDataStruct();
...@@ -1383,7 +1393,7 @@ void D_SRB2Main(void) ...@@ -1383,7 +1393,7 @@ void D_SRB2Main(void)
// Do this up here so that WADs loaded through the command line can use ExecCfg // Do this up here so that WADs loaded through the command line can use ExecCfg
COM_Init(); COM_Init();
COM_AddCommand("assert", Command_assert, COM_LUA); COM_AddCommand("assert", NULL, Command_assert, COM_LUA);
// Add any files specified on the command line with // Add any files specified on the command line with
// "-file <file>" or "-folder <folder>" to the add-on list // "-file <file>" or "-folder <folder>" to the add-on list
...@@ -1401,9 +1411,9 @@ void D_SRB2Main(void) ...@@ -1401,9 +1411,9 @@ void D_SRB2Main(void)
else if (myargv[i][0] == '-' || myargv[i][0] == '+') else if (myargv[i][0] == '-' || myargv[i][0] == '+')
addontype = 0; addontype = 0;
else if (addontype == 1) else if (addontype == 1)
D_AddFile(&startuppwads, myargv[i]); D_AddFile(&startupwads, myargv[i]);
else if (addontype == 2) else if (addontype == 2)
D_AddFolder(&startuppwads, myargv[i]); D_AddFolder(&startupwads, myargv[i]);
} }
} }
...@@ -1429,7 +1439,8 @@ void D_SRB2Main(void) ...@@ -1429,7 +1439,8 @@ void D_SRB2Main(void)
I_InitializeTime(); I_InitializeTime();
// Make backups of some SOCcable tables. // Make backups of some SOCcable tables.
P_BackupTables(); P_InitializeTables();
//P_BackupTables();
mainwads = 3; // doesn't include music.pk3 mainwads = 3; // doesn't include music.pk3
#ifdef USE_PATCH_DTA #ifdef USE_PATCH_DTA
...@@ -1488,11 +1499,11 @@ void D_SRB2Main(void) ...@@ -1488,11 +1499,11 @@ void D_SRB2Main(void)
CON_StopRefresh(); // Temporarily stop refreshing the screen for wad loading CON_StopRefresh(); // Temporarily stop refreshing the screen for wad loading
if (startuppwads.numfiles) if (startupwads.numfiles)
{ {
CONS_Printf("W_InitMultipleFiles(): Adding extra PWADs.\n"); CONS_Printf("W_InitMultipleFiles(): Adding extra PWADs.\n");
W_InitMultipleFiles(&startuppwads); W_InitMultipleFiles(&startupwads);
D_CleanFile(&startuppwads); D_CleanFile(&startupwads);
} }
CON_StartRefresh(); // Restart the refresh! CON_StartRefresh(); // Restart the refresh!
...@@ -1513,7 +1524,7 @@ void D_SRB2Main(void) ...@@ -1513,7 +1524,7 @@ void D_SRB2Main(void)
G_LoadGameData(clientGamedata); G_LoadGameData(clientGamedata);
M_CopyGameData(serverGamedata, clientGamedata); M_CopyGameData(serverGamedata, clientGamedata);
VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen allow_fullscreen = true;
// set user default mode or mode set at cmdline // set user default mode or mode set at cmdline
SCR_CheckDefaultMode(); SCR_CheckDefaultMode();
...@@ -1776,7 +1787,7 @@ const char *D_Home(void) ...@@ -1776,7 +1787,7 @@ const char *D_Home(void)
const char *userhome = NULL; const char *userhome = NULL;
#ifdef ANDROID #ifdef ANDROID
return "/data/data/org.srb2/"; return "/data/data/org.srb2classic/";
#endif #endif
if (M_CheckParm("-home") && M_IsNextParm()) if (M_CheckParm("-home") && M_IsNextParm())
...@@ -1865,8 +1876,8 @@ boolean D_IsPathAllowed(const char *path) ...@@ -1865,8 +1876,8 @@ boolean D_IsPathAllowed(const char *path)
// Sort folder paths by longest to shortest so // Sort folder paths by longest to shortest so
// overlapping paths work. E.g.: // overlapping paths work. E.g.:
// Path 1: /home/james/.srb2/addons // Path 1: /home/james/.srb2classic/addons
// Path 2: /home/james/.srb2 // Path 2: /home/james/.srb2classic
qsort(paths, n_paths, sizeof *paths, cmp_strlen_desc); qsort(paths, n_paths, sizeof *paths, cmp_strlen_desc);
// These paths are allowed to be absolute // These paths are allowed to be absolute
......
...@@ -7,7 +7,7 @@ rendermode_t chosenrendermode = render_none; ...@@ -7,7 +7,7 @@ rendermode_t chosenrendermode = render_none;
boolean allow_fullscreen = false; boolean allow_fullscreen = false;
consvar_t cv_vidwait = CVAR_INIT ("vid_wait", "On", CV_SAVE, CV_OnOff, NULL); consvar_t cv_vidwait = CVAR_INIT ("vid_wait", "On", "Has no effect on this build", CV_SAVE, CV_OnOff, NULL);
void I_StartupGraphics(void){} void I_StartupGraphics(void){}
void I_ShutdownGraphics(void){} void I_ShutdownGraphics(void){}
...@@ -19,26 +19,6 @@ void I_SetPalette(RGBA_t *palette) ...@@ -19,26 +19,6 @@ void I_SetPalette(RGBA_t *palette)
(void)palette; (void)palette;
} }
INT32 VID_NumModes(void)
{
return 0;
}
INT32 VID_GetModeForSize(INT32 w, INT32 h)
{
(void)w;
(void)h;
return 0;
}
void VID_PrepareModeList(void){}
INT32 VID_SetMode(INT32 modenum)
{
(void)modenum;
return 0;
}
boolean VID_CheckRenderer(void) boolean VID_CheckRenderer(void)
{ {
return false; return false;
...@@ -49,12 +29,6 @@ void VID_CheckGLLoaded(rendermode_t oldrender) ...@@ -49,12 +29,6 @@ void VID_CheckGLLoaded(rendermode_t oldrender)
(void)oldrender; (void)oldrender;
} }
const char *VID_GetModeName(INT32 modenum)
{
(void)modenum;
return NULL;
}
UINT32 I_GetRefreshRate(void) { return 35; } UINT32 I_GetRefreshRate(void) { return 35; }
void I_UpdateNoBlit(void){} void I_UpdateNoBlit(void){}
...@@ -76,3 +50,15 @@ void I_ReadScreen(UINT8 *scr) ...@@ -76,3 +50,15 @@ void I_ReadScreen(UINT8 *scr)
void I_BeginRead(void){} void I_BeginRead(void){}
void I_EndRead(void){} void I_EndRead(void){}
void VID_SetSize(INT32 width, INT32 height)
{
(void)width;
(void)height;
}
boolean VID_IsMaximized(void)
{
return false;
}
void VID_RestoreWindow(void){}
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
#include "deh_lua.h" #include "deh_lua.h"
#ifdef MUSICSLOT_COMPATIBILITY
#include "deh_soc.h" // for get_mus
#endif
// freeslot takes a name (string only!) // freeslot takes a name (string only!)
// and allocates it to the appropriate free slot. // and allocates it to the appropriate free slot.
// Returns the slot number allocated for it or nil if failed. // Returns the slot number allocated for it or nil if failed.
...@@ -55,7 +59,7 @@ static inline int lib_freeslot(lua_State *L) ...@@ -55,7 +59,7 @@ static inline int lib_freeslot(lua_State *L)
sfxenum_t sfx; sfxenum_t sfx;
strlwr(word); strlwr(word);
CONS_Printf("Sound sfx_%s allocated.\n",word); CONS_Printf("Sound sfx_%s allocated.\n",word);
sfx = S_AddSoundFx(word, false, 0, false); sfx = S_AddSoundFx(word, false, 0);
if (sfx != sfx_None) { if (sfx != sfx_None) {
lua_pushinteger(L, sfx); lua_pushinteger(L, sfx);
r++; r++;
...@@ -65,56 +69,23 @@ static inline int lib_freeslot(lua_State *L) ...@@ -65,56 +69,23 @@ static inline int lib_freeslot(lua_State *L)
else if (fastcmp(type, "SPR")) else if (fastcmp(type, "SPR"))
{ {
spritenum_t j; spritenum_t j;
CONS_Printf("Sprite SPR_%s allocated.\n",word);
if (strlen(word) > MAXSPRITENAME) j = P_AllocateSpriteinfo(Z_StrDup(word));
return luaL_error(L, "Sprite name is longer than %d characters\n", MAXSPRITENAME); LUA_UpdateSprName(word, j);
lua_pushinteger(L, j);
for (j = SPR_FIRSTFREESLOT; j <= SPR_LASTFREESLOT; j++) r++;
{
if (in_bit_array(used_spr, j - SPR_FIRSTFREESLOT))
continue; // Already allocated, next.
// Found a free slot!
CONS_Printf("Sprite SPR_%s allocated.\n",word);
strcpy(sprnames[j], word);
set_bit_array(used_spr, j - SPR_FIRSTFREESLOT); // Okay, this sprite slot has been named now.
// Lua needs to update the value in _G if it exists
LUA_UpdateSprName(word, j);
lua_pushinteger(L, j);
r++;
break;
}
if (j > SPR_LASTFREESLOT)
CONS_Alert(CONS_WARNING, "Ran out of free sprite slots!\n");
} }
else if (fastcmp(type, "S")) else if (fastcmp(type, "S"))
{ {
statenum_t i; CONS_Printf("State S_%s allocated.\n",word);
for (i = 0; i < NUMSTATEFREESLOTS; i++) lua_pushinteger(L, P_AllocateState(Z_StrDup(word)));
if (!FREE_STATES[i]) { r++;
CONS_Printf("State S_%s allocated.\n",word);
FREE_STATES[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
strcpy(FREE_STATES[i],word);
lua_pushinteger(L, S_FIRSTFREESLOT + i);
r++;
break;
}
if (i == NUMSTATEFREESLOTS)
CONS_Alert(CONS_WARNING, "Ran out of free State slots!\n");
} }
else if (fastcmp(type, "MT")) else if (fastcmp(type, "MT"))
{ {
mobjtype_t i; CONS_Printf("MobjType MT_%s allocated.\n",word);
for (i = 0; i < NUMMOBJFREESLOTS; i++) lua_pushinteger(L, P_AllocateMobjinfo(Z_StrDup(word)));
if (!FREE_MOBJS[i]) { r++;
CONS_Printf("MobjType MT_%s allocated.\n",word);
FREE_MOBJS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL);
strcpy(FREE_MOBJS[i],word);
lua_pushinteger(L, MT_FIRSTFREESLOT + i);
r++;
break;
}
if (i == NUMMOBJFREESLOTS)
CONS_Alert(CONS_WARNING, "Ran out of free MobjType slots!\n");
} }
else if (fastcmp(type, "SKINCOLOR")) else if (fastcmp(type, "SKINCOLOR"))
{ {
...@@ -136,21 +107,15 @@ static inline int lib_freeslot(lua_State *L) ...@@ -136,21 +107,15 @@ static inline int lib_freeslot(lua_State *L)
{ {
// Search if we already have an SPR2 by that name... // Search if we already have an SPR2 by that name...
playersprite_t i; playersprite_t i;
for (i = SPR2_FIRSTFREESLOT; i < free_spr2; i++) for (i = 0; i < numplayersprites; i++)
if (memcmp(spr2names[i],word,4) == 0) if (memcmp(playersprites[i]->name,word,4) == 0)
break; break;
// We don't, so allocate a new one. if (i >= numplayersprites)
if (i >= free_spr2) { {
if (free_spr2 < NUMPLAYERSPRITES) // We don't, so allocate a new one.
{ CONS_Printf("Sprite SPR2_%s allocated.\n",word);
CONS_Printf("Sprite SPR2_%s allocated.\n",word); lua_pushinteger(L, P_AllocatePlayersprite(Z_StrDup(word)));
strncpy(spr2names[free_spr2],word,4); r++;
spr2defaults[free_spr2] = 0;
lua_pushinteger(L, free_spr2);
r++;
spr2names[free_spr2++][4] = 0;
} else
CONS_Alert(CONS_WARNING, "Ran out of free SPR2 slots!\n");
} }
} }
else if (fastcmp(type, "TOL")) else if (fastcmp(type, "TOL"))
...@@ -421,42 +386,32 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) ...@@ -421,42 +386,32 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (fastncmp("S_",word,2)) { else if (fastncmp("S_",word,2)) {
p = word+2; p = word+2;
for (i = 0; i < NUMSTATEFREESLOTS; i++) { for (i = 0; (UINT32)i < numstates; i++)
if (!FREE_STATES[i]) {
break; if (fastcmp(p, states[i]->name))
if (fastcmp(p, FREE_STATES[i])) { {
CacheAndPushConstant(L, word, S_FIRSTFREESLOT+i);
return 1;
}
}
for (i = 0; i < S_FIRSTFREESLOT; i++)
if (fastcmp(p, STATE_LIST[i]+2)) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
}
return luaL_error(L, "state '%s' does not exist.\n", word); return luaL_error(L, "state '%s' does not exist.\n", word);
} }
else if (fastncmp("MT_",word,3)) { else if (fastncmp("MT_",word,3)) {
p = word+3; p = word+3;
for (i = 0; i < NUMMOBJFREESLOTS; i++) { for (i = 0; (UINT32)i < nummobjinfo; i++)
if (!FREE_MOBJS[i]) {
break; if (fastcmp(p, mobjinfo[i]->name))
if (fastcmp(p, FREE_MOBJS[i])) { {
CacheAndPushConstant(L, word, MT_FIRSTFREESLOT+i);
return 1;
}
}
for (i = 0; i < MT_FIRSTFREESLOT; i++)
if (fastcmp(p, MOBJTYPE_LIST[i]+3)) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
}
return luaL_error(L, "mobjtype '%s' does not exist.\n", word); return luaL_error(L, "mobjtype '%s' does not exist.\n", word);
} }
else if (fastncmp("SPR_",word,4)) { else if (fastncmp("SPR_",word,4)) {
p = word+4; p = word+4;
i = R_GetSpriteNumByName(p); i = R_GetSpriteNumByName(p);
if (i != NUMSPRITES) if ((UINT32)i != numspriteinfo)
{ {
// updating overridden sprnames is not implemented for soc parser, // updating overridden sprnames is not implemented for soc parser,
// so don't use cache // so don't use cache
...@@ -472,18 +427,20 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) ...@@ -472,18 +427,20 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (fastncmp("SPR2_",word,5)) { else if (fastncmp("SPR2_",word,5)) {
p = word+5; p = word+5;
for (i = 0; i < (fixed_t)free_spr2; i++) for (i = 0; i < (fixed_t)numplayersprites; i++)
if (!spr2names[i][4]) if (!playersprites[i]->name[4])
{ {
// special 3-char cases, e.g. SPR2_RUN // special 3-char cases, e.g. SPR2_RUN
// the spr2names entry will have "_" on the end, as in "RUN_" // the playersprites entry will have "_" on the end, as in "RUN_"
if (spr2names[i][3] == '_' && !p[3]) { if (playersprites[i]->name[3] == '_' && !p[3])
if (fastncmp(p,spr2names[i],3)) { {
if (fastncmp(p,playersprites[i]->name,3))
{
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
} }
else if (fastncmp(p,spr2names[i],4)) { else if (fastncmp(p,playersprites[i]->name,4)) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
...@@ -493,8 +450,8 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) ...@@ -493,8 +450,8 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (!mathlib && fastncmp("sfx_",word,4)) { else if (!mathlib && fastncmp("sfx_",word,4)) {
p = word+4; p = word+4;
for (i = 0; i < NUMSFX; i++) for (i = 0; (UINT32)i < S_numsfx; i++)
if (S_sfx[i].name && fastcmp(p, S_sfx[i].name)) { if (S_sfx[i]->name && fastcmp(p, S_sfx[i]->name)) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
...@@ -502,8 +459,8 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) ...@@ -502,8 +459,8 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (mathlib && fastncmp("SFX_",word,4)) { // SOCs are ALL CAPS! else if (mathlib && fastncmp("SFX_",word,4)) { // SOCs are ALL CAPS!
p = word+4; p = word+4;
for (i = 0; i < NUMSFX; i++) for (i = 0; (UINT32)i < S_numsfx; i++)
if (S_sfx[i].name && fasticmp(p, S_sfx[i].name)) { if (S_sfx[i]->name && fasticmp(p, S_sfx[i]->name)) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
...@@ -511,14 +468,37 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) ...@@ -511,14 +468,37 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word)
} }
else if (mathlib && fastncmp("DS",word,2)) { else if (mathlib && fastncmp("DS",word,2)) {
p = word+2; p = word+2;
for (i = 0; i < NUMSFX; i++) for (i = 0; (UINT32)i < S_numsfx; i++)
if (S_sfx[i].name && fasticmp(p, S_sfx[i].name)) { if (S_sfx[i]->name && fasticmp(p, S_sfx[i]->name)) {
CacheAndPushConstant(L, word, i); CacheAndPushConstant(L, word, i);
return 1; return 1;
} }
if (mathlib) return luaL_error(L, "sfx '%s' could not be found.\n", word); if (mathlib) return luaL_error(L, "sfx '%s' could not be found.\n", word);
return 0; return 0;
} }
#ifdef MUSICSLOT_COMPATIBILITY
else if (!mathlib && fastncmp("mus_",word,4)) {
p = word+4;
if ((i = get_mus(p, false)) == 0)
return 0;
lua_pushinteger(L, i);
return 1;
}
else if (mathlib && fastncmp("MUS_",word,4)) { // SOCs are ALL CAPS!
p = word+4;
if ((i = get_mus(p, false)) == 0)
return luaL_error(L, "music '%s' could not be found.\n", word);
lua_pushinteger(L, i);
return 1;
}
else if (mathlib && (fastncmp("O_",word,2) || fastncmp("D_",word,2))) {
p = word+2;
if ((i = get_mus(p, false)) == 0)
return luaL_error(L, "music '%s' could not be found.\n", word);
lua_pushinteger(L, i);
return 1;
}
#endif
else if (!mathlib && fastncmp("pw_",word,3)) { else if (!mathlib && fastncmp("pw_",word,3)) {
p = word+3; p = word+3;
for (i = 0; i < NUMPOWERS; i++) for (i = 0; i < NUMPOWERS; i++)
......
This diff is collapsed.
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "info.h" #include "info.h"
#include "dehacked.h" #include "dehacked.h"
#include "doomdef.h" // HWRENDER #include "doomdef.h" // MUSICSLOT_COMPATIBILITY, HWRENDER
// Crazy word-reading stuff // Crazy word-reading stuff
/// \todo Put these in a seperate file or something. /// \todo Put these in a seperate file or something.
...@@ -52,6 +52,9 @@ statenum_t get_state(const char *word); ...@@ -52,6 +52,9 @@ statenum_t get_state(const char *word);
spritenum_t get_sprite(const char *word); spritenum_t get_sprite(const char *word);
playersprite_t get_sprite2(const char *word); playersprite_t get_sprite2(const char *word);
sfxenum_t get_sfx(const char *word); sfxenum_t get_sfx(const char *word);
#ifdef MUSICSLOT_COMPATIBILITY
UINT16 get_mus(const char *word, UINT8 dehacked_mode);
#endif
hudnum_t get_huditem(const char *word); hudnum_t get_huditem(const char *word);
menutype_t get_menutype(const char *word); menutype_t get_menutype(const char *word);
//INT16 get_gametype(const char *word); //INT16 get_gametype(const char *word);
......
This diff is collapsed.
...@@ -20,14 +20,10 @@ ...@@ -20,14 +20,10 @@
// Free slot names // Free slot names
// The crazy word-reading stuff uses these. // The crazy word-reading stuff uses these.
extern char *FREE_STATES[NUMSTATEFREESLOTS];
extern char *FREE_MOBJS[NUMMOBJFREESLOTS];
extern char *FREE_SKINCOLORS[NUMCOLORFREESLOTS]; extern char *FREE_SKINCOLORS[NUMCOLORFREESLOTS];
extern bitarray_t used_spr[BIT_ARRAY_SIZE(NUMSPRITEFREESLOTS)]; // Sprite freeslots in use extern bitarray_t used_spr[BIT_ARRAY_SIZE(NUMSPRITEFREESLOTS)]; // Sprite freeslots in use
#define initfreeslots() {\ #define initfreeslots() {\
memset(FREE_STATES, 0, sizeof(FREE_STATES));\
memset(FREE_MOBJS, 0, sizeof(FREE_MOBJS));\
memset(FREE_SKINCOLORS, 0, sizeof(FREE_SKINCOLORS));\ memset(FREE_SKINCOLORS, 0, sizeof(FREE_SKINCOLORS));\
memset(used_spr, 0, sizeof(used_spr));\ memset(used_spr, 0, sizeof(used_spr));\
memset(actionsoverridden, LUA_REFNIL, sizeof(actionsoverridden));\ memset(actionsoverridden, LUA_REFNIL, sizeof(actionsoverridden));\
...@@ -57,8 +53,6 @@ struct int_const_s { ...@@ -57,8 +53,6 @@ struct int_const_s {
extern const char NIGHTSGRADE_LIST[]; extern const char NIGHTSGRADE_LIST[];
extern struct flickytypes_s FLICKYTYPES[]; extern struct flickytypes_s FLICKYTYPES[];
extern actionpointer_t actionpointers[]; // Array mapping action names to action functions. extern actionpointer_t actionpointers[]; // Array mapping action names to action functions.
extern const char *const STATE_LIST[];
extern const char *const MOBJTYPE_LIST[];
extern const char *const MOBJFLAG_LIST[]; extern const char *const MOBJFLAG_LIST[];
extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2 extern const char *const MOBJFLAG2_LIST[]; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2
extern const char *const MOBJEFLAG_LIST[]; extern const char *const MOBJEFLAG_LIST[];
......
...@@ -305,11 +305,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ...@@ -305,11 +305,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_mobjtype(word2); // find a thing by name i = get_mobjtype(word2); // find a thing by name
if (i < NUMMOBJTYPES && i > 0) if (i < (INT32)nummobjinfo && i > 0)
readthing(f, i); readthing(f, i);
else else
{ {
deh_warning("Thing %d out of range (1 - %d)", i, NUMMOBJTYPES-1); deh_warning("Thing %d out of range (1 - %d)", i, nummobjinfo-1);
ignorelines(f); ignorelines(f);
} }
} }
...@@ -329,11 +329,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ...@@ -329,11 +329,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_sprite2(word2); // find a sprite by name i = get_sprite2(word2); // find a sprite by name
if (i < (INT32)free_spr2 && i >= (INT32)SPR2_FIRSTFREESLOT) if (i < (INT32)numplayersprites && i >= 0)
readsprite2(f, i); readsprite2(f, i);
else else
{ {
deh_warning("Sprite2 number %d out of range (%d - %d)", i, SPR2_FIRSTFREESLOT, free_spr2-1); deh_warning("Sprite2 number %d out of range (1 - %d)", i, numplayersprites-1);
ignorelines(f); ignorelines(f);
} }
} }
...@@ -354,11 +354,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ...@@ -354,11 +354,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_sprite(word2); // find a sprite by name i = get_sprite(word2); // find a sprite by name
if (i < NUMSPRITES && i > 0) if ((UINT32)i < numspriteinfo && i > 0)
readspriteinfo(f, i, false); readspriteinfo(f, i, false);
else else
{ {
deh_warning("Sprite number %d out of range (0 - %d)", i, NUMSPRITES-1); deh_warning("Sprite number %d out of range (0 - %d)", i, numspriteinfo-1);
ignorelines(f); ignorelines(f);
} }
} }
...@@ -366,11 +366,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ...@@ -366,11 +366,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_sprite2(word2); // find a sprite by name i = get_sprite2(word2); // find a sprite by name
if (i < NUMPLAYERSPRITES && i >= 0) if ((UINT32)i < numplayersprites && i >= 0)
readspriteinfo(f, i, true); readspriteinfo(f, i, true);
else else
{ {
deh_warning("Sprite2 number %d out of range (0 - %d)", i, NUMPLAYERSPRITES-1); deh_warning("Sprite2 number %d out of range (0 - %d)", i, numplayersprites-1);
ignorelines(f); ignorelines(f);
} }
} }
...@@ -445,11 +445,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ...@@ -445,11 +445,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_state(word2); // find a state by name i = get_state(word2); // find a state by name
if (i < NUMSTATES && i >= 0) if ((UINT32)i < numstates && i >= 0)
readframe(f, i); readframe(f, i);
else else
{ {
deh_warning("Frame %d out of range (0 - %d)", i, NUMSTATES-1); deh_warning("Frame %d out of range (0 - %d)", i, numstates-1);
ignorelines(f); ignorelines(f);
} }
} }
...@@ -457,11 +457,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ...@@ -457,11 +457,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
{ {
if (i == 0 && word2[0] != '0') // If word2 isn't a number if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_sfx(word2); // find a sound by name i = get_sfx(word2); // find a sound by name
if (i < NUMSFX && i > 0) if ((UINT32)i < S_numsfx && i > 0)
readsound(f, i); readsound(f, i);
else else
{ {
deh_warning("Sound %d out of range (1 - %d)", i, NUMSFX-1); deh_warning("Sound %d out of range (1 - %d)", i, S_numsfx-1);
ignorelines(f); ignorelines(f);
} }
} }
......