This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
This seriously needs to be independent from the data store and better abstracted. More work to come to move this to its proper place.
# Conflicts:
# src/g_inventory/a_pickups.cpp
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.
Since it forwards directly to FindState and has no script bindings there is no need to keep it, it'd only complicate the full scriptification of the weapon class if it stuck around.
* it was never saved in savegames, leaving the state of dead bodies undefined
* it shouldn't be subjected to pointer substitution because all it contains is old dead bodies, not live ones.
# Conflicts:
# src/r_data/r_translate.cpp
Since the only thing it gets used for is swapping out PlayerPawns it can safely skip all global variables that never point to a live player, which allowed to remove quite a bit of code here that stood in the way of scriptifying more content
For the varargs functions that used the Type field to validate their parameters, now a hidden additional argument is passed which contains a byte array with the type info for the current call's arguments. Since this is static per call location it can be better prepared once when the code is being compiled instead of being put in a runtime created array for each invocation. Everything else uses the per-function instance of the same data.
The only thing that still needed the type field with a VMValue is the defaults array, so this uses a different struct type now to store its data.
# Conflicts:
# src/v_draw.cpp
Currently used for loading parameters into registers.
For checking parameters of native functions some more work is needed to get the info to the function. Currently it doesn't receive the function descriptor.
src/scripting/vm/jit_call.cpp:164:38: warning: offset of on non-standard-layout type 'VMScriptFunction' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:87:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:96:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:257:53: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
The amount of support code for this minor optimization was quite large and this stood in the way of streamlining the VM's calling convention, so it was preferable to remove it before moving on.
With a proper count value available this can be done properly. The only relevant targets are the jumps immediately succeeding the IJMP instructions, nothing else.
This removes the last non-vararg cases where a native VM function checks 'numparam'. As of this commit all function calls will pass the complete list of arguments.
This isn't used for the 3 action function calls because it requires an array allocation which would be a bit too costly for something as frequently called as action functions.
They will need a different approach.
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.
# Conflicts:
# src/r_data/r_sections.h
Since this function creates dynamic copies for 3D floors that need to be split it requires the vertex buffer index to be set up.
In older versions this did not produce errors because there was a fallback render path that was less efficient.
Now with that fallback removed this resulted in temporary 3D floors being created without valid vertex data.
# Conflicts:
# src/p_setup.cpp
# Conflicts:
# src/p_setup.cpp
The destination mode sould be 'One', not 'InvSrcColor'.
Now both of these are available as explicit modes, not just through the optional mapping.
# Conflicts:
# src/hwrenderer/scene/hw_sprites.cpp
# src/r_data/renderstyle.cpp
# src/r_data/renderstyle.h
With additional render styles from " - abstraction of render style in render state.". drfrag
# Conflicts:
# src/r_data/renderstyle.cpp
# src/r_data/renderstyle.h
With additional render styles from "- made the screen blend work for the software renderer.". drfrag
src/doomerrors.h:74:14: error: exception specification of overriding function is more lax than base version
src/posix/sdl/i_main.cpp:272:28: error: 'class std::exception' has no member named 'GetMessage'
Null pointers must be allowed and non-object pointers which are not null must be explicitly checked for because the code could crash on them when performing a static_cast on an incorrect type.
Both need the bMasked flag, or some code will think that the texture is not fully opaque if no holes were found.
# Conflicts:
# src/gl/textures/gl_material.h
# src/textures/texture.cpp
This reuses the FTexCoordInfo class the hardware renderer had been using to calculate wall texture offsetting.
The software renderers still need this sorted out to bring them in line with the rest of the code, though, but they do not have this code sufficiently well organized to make this a straightforward task.
# Conflicts:
# src/hwrenderer/textures/hw_material.cpp
# src/textures/textures.h
There were some issues here:
* a check for mismatching count is too strict because it is legal to omit return values
* it failed to detect returning multiple values in a single expression.
Since CallStateChain is a public member in CustomInventory we cannot really be sure that the given state is valid so it needs checking as well.
# Conflicts:
# .gitignore
This can happen if a state that's retrieved with FindState gets used with a different actor type and can lead to hard to trace problems if not checked.
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.
The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.
# Conflicts:
# src/hwrenderer/scene/hw_renderstate.h
# src/hwrenderer/scene/hw_walls.cpp
# Conflicts:
# src/gl/scene/gl_walls_draw.cpp
Until now this wasn't doable because these could have come from hw_FakeFlat which only were local copies on the stack.
With the recent change these faked sectors live long enough so that they can be passed around here.
# Conflicts:
# src/hwrenderer/scene/hw_decal.cpp
# src/hwrenderer/scene/hw_walls.cpp
# Conflicts:
# src/gl/scene/gl_wall.h
# src/gl/scene/gl_walls.cpp
# src/gl/scene/gl_walls_draw.cpp
# src/hwrenderer/scene/hw_decal.cpp
An exception is made for the sprite drawer which needs to call this in the worker thread on some occasions for as-yet unprocessed sectors.
This case may not alter the cache to avoid having to add thread synchronization to it.
The main reason for this change is that pointers to such manipulated sectors can now be considered static in the renderer.
Due to them being short lived local buffers it was not possible to carry them along with the render data for information retrieval.
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/hwrenderer/scene/hw_bsp.cpp
# src/hwrenderer/scene/hw_drawinfo.h
# src/hwrenderer/scene/hw_drawlist.cpp
# src/hwrenderer/scene/hw_fakeflat.cpp
# src/hwrenderer/scene/hw_renderhacks.cpp
# Conflicts:
# src/gl/renderer/gl_renderer.cpp
# src/gl/renderer/gl_renderer.h
# src/gl/scene/gl_bsp.cpp
# src/gl/scene/gl_drawinfo.cpp
# src/gl/scene/gl_fakeflat.cpp
# src/gl/scene/gl_renderhacks.cpp
# src/gl/scene/gl_scene.cpp
# src/hwrenderer/scene/hw_drawinfo.h
# src/hwrenderer/scene/hw_drawlist.cpp
# src/hwrenderer/scene/hw_fakeflat.h
# src/hwrenderer/scene/hw_sprites.cpp
# src/hwrenderer/scene/hw_weapon.cpp
src/p_udmf.cpp:2052:6: error: no matching member function for call to 'OpenMem'
src/sc_man.h:24:7: note: candidate function not viable: expects an l-value for 2nd argument
src/sc_man.h:23:7: note: candidate function not viable: requires 3 arguments, but 2 were provided
src/resourcefiles/file_directory.cpp:198:32: error: use of undeclared identifier 'Filename'; did you mean 'FileName'?
Otherwise this may contain residual data from the last call.
One can only hope that this doesn't cause other side effects - this entire code is one horrendous mess of bad ideas.
- Added a function to the Actor class to get its spawn time relative to the current level.
- Added spawn time information to the output of the "info" console command.
This had absolutely no sanity checks and unconditionally picked the source texture if one existed.
It should only be done for wall textures, only for those defined in TEXTUREx and only for those where the scale is identical with the underlying texture.
- Uses the same code as Thing_ProjectileIntercept to aim and move the projectile.
- targ: The actor the caller will aim at.
- speed: Used for calculating the new angle/pitch and adjusts the speed accordingly. Default is -1 (current speed).
- aimpitch: If true, aims the pitch in the travelling direction. Default is true.
- oldvel: If true, does not replace the velocity with the specified speed. Default is false.
- Split the code from Thing_ProjectileIntercept and have that function call VelIntercept.
Calling the old method with a pointer to an array of unspecified length 'dirty' would be an understatement.
Now it uses a TArray to store the single elements
# Conflicts:
# src/g_shared/hudmessages.cpp
# src/v_font.cpp
This reverts commit d086c3d4dc.
# Conflicts:
# src/polyrenderer/drawers/poly_triangle.cpp
# src/polyrenderer/drawers/poly_triangle.h
The softpoly renderer crashed at high resolutions without them.
This partially reverts "- don't let the video scale let the screen end up with a client size less than 320x200, which may cause undefined behavior and trigger asserts in debug builds."
The instruction one free instruction byte so it's now using that to extend its argument's register range to 65535.
For param this is needed because it passes strings by reference and creating an implicit temporary copy for string constants does not work here.
Add smoothGroup member to OBJFace struct, and assign the current smooth group number to it
Move face normal calculation code to CalculateNormalFlat
Add AddVertFaces method, which initializes and populates the vertFaces array of arrays, which holds references to triangle references per vertex
Only initialize and populate vertFaces if the model has missing normals and smooth groups
Assign smooth groups to triangle data
Add CalculateNormalSmooth method, which calculates the normals for each face the vertex is attached to, depending on whether or not the faces are part of the given smooth group, and averages them out
Add OBJTriRef struct, which holds references to triangles on OBJ surfaces
Make {agg,cur}SurfFaceCount unsigned ints
Change nvec to a value instead of a pointer
They would also pass the test if a menu just was open but not the actual invoker.
Also error out if this happens so that modders can see that they are doing unsupported things. Silent failure is not a good idea here.
(This clearly shows that using 'long' as parameters in any interface must be stopped. It is fundamentally unsafe to have a type whose size is not reliable - it's either an int-sized nor a pointer sized value, depending on the platform, and essentially worthless.)
Added full-panning stereo, improvement of channel management, and many other things.
Also, I have implemented an ability to use custom WOPL (for libADLMIDI) and WOPN (for libOPNMIDI) banks from the same path as "soundfonts", but also, in the same environment, the "fm_banks" folder was added for WOPL/WOPN storing purposes.
To toggle usage of embedded or custom bank, I have added togglable booleans. When bank fails to be loaded, the default embedded bank is getting to be used as fallback.
ADLMIDI 1.4.0 2018-10-01
* Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
* Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
* Added support for GS way of custom drum channels (through SysEx events)
* Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
* Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
* Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
* Fixed correctness of CMF files playing
* Fixed unnecessary overuse of chip channels by blank notes
* Added API to disable specific MIDI tracks or play one of MIDI tracks solo
* Added support for more complex loop (loopStart=XX, loopEnd=0). Where XX - count of loops, or 0 - infinite. Nested loops are supported without of any limits.
* Added working implementation of TMB's velocity offset
* Added support for full-panning stereo option (Thanks to [Christopher Snowhill](https://github.com/kode54) for a work!)
* Fixed inability to play high notes due physical tone frequency out of range on the OPL3 chip
OPNMIDI 1.4.0 2018-10-01
* Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
* Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
* Added support for GS way of custom drum channels (through SysEx events)
* Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
* Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
* Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
* Resolved a trouble which sometimes makes a junk noise sound and unnecessary overuse of chip channels
* Volume models support taken from libADLMIDI has been adapted to OPN2's chip speficis
* Fixed inability to play high notes due physical tone frequency out of range on the OPN2 chip
* Added support for full-panning stereo option
ADL&OPN Hotfix: re-calculated default banks
The fix on side of measurer of OPL3-BE and OPN2-BE where some instruments getting zero releasing time.
# Conflicts:
# src/sound/mididevices/music_adlmidi_mididevice.cpp
# src/sound/mididevices/music_opnmidi_mididevice.cpp
# wadsrc/static/menudef.txt
Although this doesn't look as good as the PCF version it is a lot less calculation intensive and therefore more suitable for weaker hardware.
It also tends to bleed through walls a lot less.
(refactored patch by Graf)
Legacy used some strange blending formula to calculate its colormaps for colored 3D floor lighting, this is not available in the software lighting mode, so for these the engine has to temporarily revert to light mode 2 to render them correctly.
# Conflicts:
# src/gl/compatibility/gl_20.cpp
# src/gl/renderer/gl_lightdata.cpp
# src/gl/renderer/gl_renderstate.h
# src/gl/scene/gl_sprite.cpp
# src/hwrenderer/scene/hw_weapon.cpp
# src/hwrenderer/utility/hw_lighting.cpp
# src/hwrenderer/utility/hw_lighting.h
# src/v_2ddrawer.cpp
Pass surf->vbStart to SetupFrame instead of 0, and pass 0 to DrawArrays instead of surf->vbStart.
Use a potentially faster method of modifying the OBJ file text buffer by modifying it directly.
Add RealignVector and FixUV methods to begin work on re-aligning OBJ models to the same orientation as MD3 models.
Re-align OBJ models to match MD3 models
Fix normal calculation for re-aligned OBJs
Ensure AddSkins does not go out of bounds of surfaceskinIDs
Do not precache skins that were replaced by the user.
Fix OBJs with a large number of materials not being fully rendered
Print a warning message if a material referenced by the OBJ could not be found.
Free surface triangles once they are no longer needed
Also, use continue instead of return so that surfaces after those with missing materials are still rendered.
Fail if a face side has no vertex reference. Vertex references are required for a valid OBJ.
Clean up OBJ model code
Remove commented code, mainly Printf's that aren't used any more.
Add more documentation comments, and tweak existing documentation comments
Replace ParseVector2 and ParseVector3 with a template ParseVector function
Create a new surface for each 'usemtl' statement in the OBJ file, and fix memory errors caused by TriangulateQuad.
Calculate missing normals, and fix incorrect UV coordinates
Fix construction of vertex buffer for objects with multiple surfaces
Localize curMtl, curSurface, aggSurfFaceCount, and curSurfFaceCount to FOBJModel::Load(), since they are not used anywhere else.
Fix parsing of OBJs without UV references
Internally, I replaced hashtag line comments with C-style line comments, and I replaced each forward slash with newSideSep.
If no UV coordinates are available, add a default vector of (0,0).
Also, remove "this->" from ResolveIndex to make the code a bit cleaner, and fix a minor garbage issue I failed to notice earlier (normref would pick up garbage if there was no normal reference).
Ensure usemtl statements remain intact
It may be a bit inefficient, but I tried modifying the buffer directly, and I got memory corruption errors. In this case, it's a lot better to be safe than sorry.
What works:
- Parsing the model
- Constructing geometry (surfaces) for triangulated models
What doesn't:
- Rendering the model
- Building the vertex buffer
- Triangulating quads
RIndexOf returns the index where the substring starts, instead of the index where the substring ends - 1.
Deprecate the LastIndexOf method of StringStruct