This is to ensure that the Class pointer can be set right on creation. ZDoom had always depended on handling this lazily which poses some problems for the VM.
So now there is a variadic Create<classtype> function taking care of that, but to ensure that it gets used, direct access to the new operator has been blocked.
This also neccessitated making DArgs a regular object because they get created before the type system is up. Since the few uses of DArgs are easily controllable this wasn't a big issue.
- did a bit of optimization on the bots' decision making whether to pick up a health item or not.
This also means that the remaining scriptification of the menu is on hold. The player menu would require even more access to critical game data, which is a no-go, and the other remaining menus offer little benefit from getting scriptified.
This function will truncate everything that is larger than LONG_MAX or smaller than LONG_MIN to fit into a long variable, but longs are 32 bit on Windows and 64 bit elsewhere, so to ensure consistency and the ability to parse larger values better use strtoll which does not truncate 32 bit values.
Needless to say, this is simply too volatile and would require constant active maintenance, not to mention a huge amount of work up front to get going.
It also hid a nasty problem with the Destroy method. Due to the way the garbage collector works, Destroy cannot be exposed to scripts as-is. It may be called from scripts but it may not be overridden from scripts because the garbage collector can call this function after all data needed for calling a scripted override has already been destroyed because if that data is also being collected there is no guarantee that proper order of destruction is observed. So for now Destroy is just a normal native method to scripted classes
- For most cvars, this is equivalent to calling GetGenericRep() to get a
string.
- For float cvars, it uses %g instead of %H, because %H is generally more
information than is needed.
- replace all implicit conversions from FString to const char * in the header files (so that it can be test compiled with the implicit type conversion turned off without throwing thousands of identical errors.)
- For backward compatibility, you need to indicate that substitution is
allowed in the string by prepending it with a % character:
alias asay "say %\"%1\""
The above will substitute the alias parameter.
alias asay "say \"%1\""
The above will not substitute the alias parameter but use the string
literal "%1" directly.
- Old mess:
* Execute autoexec files right away.
* Execute -exec files right away.
* Execute command line commands right away.
- If, during any of the above, an unknown command or a set of an
unknown variable is encountered, store it for later.
- Pullin commands are directly executed and add to the list of files
to load.
* Do a little setup, including parsing CVARINFOs.
* Retry saved commands in case CVARINFO added a cvar they refer to.
- New, less messy, mess:
* Parse autoexec files into an array.
* Parse -exec files.
* Parse command line commands.
- During all of the above, exec commands are also parsed into the
array immediately rather than being saved for execution later.
- Pullin commands are parsed into a different array. The pullin
command doesn't actually do anything directly anymore.
* Add all the pullin files to the list of files to load.
* Do a little setup, including parsing CVARINFOs.
* Execute every command that was parsed in the preceding steps.
- Fixed: Using +set cvarname and +cvarname on the command line would not
work if cvarname was defined in CVARINFO. This should be the proper way to fix
it. Rather than move all command line execution after loading CVARINFO,
keep command line execution before wads are loaded. If an attempt is
made to set an unknown cvar or to run an unknown command (which could
potentially be shorthand for setting an unknown cvar), save it and try
running it again after all CVARINFOs have been handled.
- Command-line console commands are executed before a level is entered, so
trying to use +warp to position yourself at a specific location will not
work. We now specially handle this command so that it does work.
The 'unix' identifier isn't defined when '-std' is passed to the compiler (tested with gcc and clang), so use '__unix__' which is well enough documented.
everything that eventually calls D_AddFile. Also create the list of files
loaded on the command line separately to allow further checks on them.
SVN r2072 (trunk)
- Joystick devices now send key up events for any buttons that are held
down when they are destroyed.
- Changed the joystick enable-y menu items to be nonrepeatable so that you
can't create several device scans per second. Changing them with a
controller is also disabled so that you can't, for example, toggle XInput
support using an XInput controller and have things go haywire when the
game receives an infinite number of key down events when the controller
is reinitialized with the other input system.
- Changed menu input to use a consolidated set of buttons, so most menus
can be navigated with a controller as well as a keyboard.
- Changed the way that X/Y analog axes are converted to digital axes.
Previously, this was done by checking if each axis was outside its deadzone.
Now they are checked together based on their angle, so straight up/down/
left/right are much easier to achieve.
SVN r1739 (trunk)
- fixed: The Dehacked parser could not parse flag values with the highest bit
set because it used atoi to convert the string into a number.
SVN r1624 (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)
buttons are now passed across the network, and there are four new user
buttons specifically for use with this command. Also defined +zoom
and +reload for future implementation.
See http://zdoom.org/files/examples/playerinput.zip for an example.
SVN r1215 (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)
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Added support for quoted strings to the TiMidity config parser.
SVN r957 (trunk)
- Fixed: When changing your name from the menu, you got an extra " appended
to your name if it ended with a backslash.
- Added escape sequences for user info strings, so now they can contain
embedded backslashes.
- Fixed an array-out-of-bounds access when drawing the player setup menu with
an invalid team number.
SVN r598 (trunk)
- Fixed: Placing a /* */ comment at the very end of a file without a
terminating newline would not parse reliably.
- Added a NULL WallSpriteTile check to R_RenderDecal().
SVN r365 (trunk)