- "If it ain't broke, don't fix it."
- Some of the changes were downright wrong and some were pointless, so undo
everything that doesn't look like an actual improvement.
counterparts except that their value argument is an ACS string. (Note that they work with any
type of cvar, not just string cvars.)
- Make UCVarValue::String point to a constant string.
SVN r4292 (trunk)
* int GetUserCVar(int playernum, "cvarname")
* bool SetCVar("cvarname", newvalue)
* bool SetUserCVar(int playernum, "cvarname", newvalue)
GetUserCVar is analogous to GetCVar, except it returns the value of a user cvar for a
specific player. (All user cvars can be examined using the playerinfo console command.)
SetCVar sets a cvar to a new value. If the cvar is floating point, then newvalue is treated
as a fixed point number, otherwise it's treated as an integer. SetUserCVar is the same, but
for a specific player's user cvar.
SetCVar and SetUserCVar can only change cvars created via CVARINFO. They cannot alter built-in cvars.
If you use GetCVar or SetCVar with a user cvar, they will act on the copy of the user cvar
for the player who activated the script. e.g.
GetCVar("gender")
is the same as
GetUserCVar(PlayerNumber(), "gender")
If you get the value of a floating point cvar, it will be returned as a fixed point number.
Otherwise, it will be returned as an integer.
SVN r4283 (trunk)
- Separated CVAR_MODARCHIVE into CVAR_MOD|CVAR_ARCHIVE so that mod-defined cvars can still be
identified when they aren't meant to be archived.
SVN r4281 (trunk)
of the form:
<scope> [noarchive] <type> <name> [= <defaultvalue>];
Where <scope> is one of:
* server: This cvar is shared by all players, and in network games, only select players can
change it.
* user: Each player has their own copy of this cvar, which they can change independently.
To prevent the cvar from being written to the config file, add noarchive to its definition.
<Type> is one of:
* int: An integral value. Defaults to 0.
* float: A value that can include a fraction. Defaults to 0.0.
* color: A color value. Default to black ("00 00 00").
* bool: A boolean value that can hold either true or false. Defaults to false.
* string: A string value. It's not too useful for mods but is included for completeness. Defaults to "".
<Name> is the cvar's name and must begin with a letter and may only include alphanumeric
characters and the underscore character.
If you wish a non-standard default add an = character after the cvar's name followed by the
default value you want to use. Example:
server int mymod_coolness = 10;
- Fixed: FStringCVar::SetGenericRepDefault() did not make a copy of the input string.
SVN r4280 (trunk)
number to represent a flag combination is stupid unreadable now that there's more than just
the two possibilities it had when it was first written.
SVN r4278 (trunk)
- allow setting 'Shadow' as default fuzz effect
- changed CVAR conversion that strings 'false' and 'true' get evaluated as integers 0 and 1 respectively so that changing boolean CVARs to int does not destroy their values.
SVN r3076 (trunk)
- Removed #pragma warnings from cmdlib.h and fixed the places where they were
still triggered.
These #pragmas were responsible for >90% of the GCC warnings that were not
listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
parameter handling of the sound functions for attenuation was changed.
Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values.
Also added the option to specify attenuation with direct values in addition
to the predefined names.
SVN r1583 (trunk)
the title screen, because the demo loop reset the server cvars after each
attempt to play a demo, even though the demos never actually played. The
proper long-term solution would be to make shadow copies of all cvars
touched by demos and use those for the demo and the real things for
everything else, but this should do for now and is a lot easier.
SVN r1463 (trunk)
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
that the drivers will treat a BackBufferCount of 0 as a request for
double buffering.
- Fixed: Unsetting a cvar did not remove it from the list of tab
completions.
- Added "" as a synonym for "nullimage" in SBARINFO.
- Fixed: MAKESAVESIG's stringifier in version.h did not work as expected.
It stringified the passed macro name, not the value of the macro.
- Moved DCajunMaster off the DObject hierarchy.
- Changed DCajunMaster::getspawned into a TArray of FStrings. It was
mysteriously being left pointing to uninitialized memory during the
final GC at exit and crashing.
- Fixed: The code that removed hexdd.wad from the list of IWADs when
hexen.wad was not present did not work.
SVN r861 (trunk)
- The net arbitrator can add or remove players to an access list so they
can or cannot control game settings:
* net_addcontroller <player number> - Adds a player to the control list. Only net arbitrators have access to this command.
* net_removecontroller <player number> - Removes a player from the control list. Only net arbitrators have access to this command.
* net_listcontrollers - Lists the players who are able to control the game settings.
- Fixed: The 'Printf'' occurrences in the 'addplayerclass' console command were all missing a '\n' at the end.
- Enhanced the 'playerinfo' console command so more information about each setting is shown.
SVN r750 (trunk)
- The stat meters now return an FString instead of sprintfing into a fixed
output buffer.
- NOASM is now automatically defined when compiling for a non-x86 target.
- Some changes have been made to the integral types in doomtype.h:
- For consistancy with the other integral types, byte is no longer a
synonym for BYTE.
- Most uses of BOOL have been change to the standard C++ bool type. Those
that weren't were changed to INTBOOL to indicate they may contain values
other than 0 or 1 but are still used as a boolean.
- Compiler-provided types with explicit bit sizes are now used. In
particular, DWORD is no longer a long so it will work with both 64-bit
Windows and Linux.
- Since some files need to include Windows headers, uint32 is a synonym
for the non-Windows version of DWORD.
- Removed d_textur.h. The pic_t struct it defined was used nowhere, and that
was all it contained.
SVN r326 (trunk)
data file.
- Removed the setcolor CCMD. It's been obsolete for years, ever since color-
aware cvars were added.
- Changed V_GetColorStringByName() to return an FString, because it did a
copystring() call.
- Extended V_GetColorFromString() so that it accepts HTML-style #RRGGBB and
#RGB color strings.
SVN r313 (trunk)
functions added to the exit chain with atterm so that they can be called
in a deterministic order and not whatever order the linker decides to put
them in.
- Fixed: DCajunMaster did not free its getspawned.
- Fixed: P_FreeLevelData() did not free ACS scripts.
- Fixed: Level snapshots were not freed at exit.
- Fixed: The save/load menu list was not freed at exit.
- Fixed: FCompressedMemFile needs a destructor to free the m_ImplodedBuffer.
- Fixed: G_DoLoadGame() did not free the engine string.
- Fixed: M_ReadSaveStrings() did not free the engine string.
- Fixed: Processing DEM_SAVEGAME did not free the pathname string.
- Added a check for truncated flats to FFlatTexture::MakeTexture() because
Heretic's F_SKY1 is only four bytes long.
- Added a dump of the offending state to the "Cannot find state..." diagnostic.
- Fixed: FCompressedFile did not initialize m_Mode in its default constructor.
- Fixed: Heretic and Hexen status bars did not initialize ArtiRefresh.
- Fixed: PNGHandle destructor should use delete[] to free TextChunks.
SVN r111 (trunk)
- The CRT no longer detects any memory leaks when I run to the IWAD picker and quit.
- Fixed: The memory used to hold the path to zdoom.wad/.pk3 was not freed if
the IWAD picker was cancelled.
- Fixed: Some implementations of cvar->GetGenericRep (CVAR_String) returned a
statically allocated string and others returned a dynamically allocated string.
To be consistant, they should all be static.
- Fixed: DObject also has three static TArrays that should not be explicitly
initialized: Objects, FreeIndices, and ToDestroy.
- Added a new do-nothing constructor for TArray that can be used for BSS objects
that are manipulated before startup. Specifically, this was added because
C_AddTabCommand() is called before main, but the TabCommands constructor is
called after the array already has over 100 entries in it, orphaning everything
that was already inserted. And since the code is much nicer-looking now, I didn't
want to revert to the old non-TArray version.
This could also have been used to fix FName, but I consider the current
implementation to be better than the old one, so I'm leaving it as-is.
- Fixed: Scanned IWAD paths were not freed if you exited without selecting one.
- Fixed: Dynamically allocated cvars were not freed on exit.
- Fixed: FConfigFile's destructor did not free space used for Values.
SVN r82 (trunk)
actually work.
- Turned the list of TabCommands into a TArray because I saw lots of console
commands in the memory leak report at exit. Then I realized those were actually
key bindings, so I changed the Bindings and DoubleBindings arrays into FString
arrays.
- Fixed: FStringCVar was missing a destructor.
- Added TArray::Insert().
- Fixed: TArray::Delete() used memmove().
- Renamed Malloc(), Realloc(), and Calloc() to M_Malloc(), M_Realloc(), and
M_Calloc() so that the debug versions can be defined as macros.
- Enabled the CRT's memory leak detection in WinMain().
- Moved contents of PO_DeInit() into P_FreeLevelData().
- Removed "PolyBlockMap = NULL;" from P_SetupLevel(), because the P_FreeLevelData()
call it makes next does the exact same thing, but also freeing it if needed.
- Fixed: Unneeded memcpy in UnpackUserCmd() when ucmd and basis are the same
SVN r75 (trunk)