Commit Graph

102 Commits

Author SHA1 Message Date
Christoph Oelckers 9a24771a7d - refactored FDynamicColormap out of sector_t.
This has increasingly become an obstacle with the hardware renderer, so now the values are being stored as plain data in the sector, with the software renderer getting the actual color tables when needed. While this is a bit slower than storing the pregenerated colormap, in realistic situations the added time is mostly negligible in the microseconds range.
2017-03-15 22:04:59 +01:00
Christoph Oelckers 539af96b8e - fixed variable size mismatch and some warnings for 32 bit builds. 2017-03-14 18:48:51 +01:00
Christoph Oelckers 44a087554f - moved the OpenGL fog properties to FLevelLocals to simplify their handling.
- added access to the glow properties for ZSCript and ACS.
2017-03-14 13:54:24 +01:00
Christoph Oelckers 4e1300ecbe - added a script export for ACS's ReplaceTextures function. 2017-02-09 12:02:07 +01:00
Christoph Oelckers d2d6e5d486 - scriptified PowerFlight and PowerWeaponLevel2. 2017-01-15 23:21:38 +01:00
Christoph Oelckers 386c00f17e - scriptified ASoundEnvironment.
This also exposes the functionality as a member function of Sector for easier script access.
2017-01-14 11:43:08 +01:00
Christoph Oelckers 8e7e1ed757 - don't use local TObjPtr variables. 2017-01-13 15:44:16 +01:00
Edoardo Prezioso 6eb9015303 - Fixed GCC/Clang compile errors. 2017-01-13 15:42:53 +01:00
Christoph Oelckers d338ca3ec1 - scriptified the sector actions. 2017-01-13 13:51:47 +01:00
Christoph Oelckers 1400f401e7 - fixed use of multiple sector actions in the same sector.
The entire setup was quite broken with each item using its own activation result and the ones of the subsequent items in the list as the return value.
This rendered the STANDSTILL check in the main function totally unpredictable because the value it depended on could come from any item in the list.
Changed it so that the main dispatcher function is part of sector_t and does the stepping through the list iteratively instead of letting each item recursively call its successor and let this function decide for each item alone whether it should be removed.
The broken setup also had the effect that any MusicChanger would trigger all following SecActEnter specials right on msp start.
2017-01-13 01:34:43 +01:00
Christoph Oelckers 12037fdc95 - made the vertexes array VM friendly. 2017-01-09 00:46:16 +01:00
Christoph Oelckers f78927500e - exported all meaningful parts of side_t to the VM. 2017-01-08 21:42:26 +01:00
Christoph Oelckers cd7986b1b1 - refactored global sides array to be more VM friendly.
- moved FLevelLocals to its own header to resolve some circular include conflicts.
2017-01-08 18:46:17 +01:00
Christoph Oelckers 1c74faea73 - exported line_t's functions to the VM. 2017-01-08 15:45:37 +01:00
Christoph Oelckers cb89a1a81a - fixed inconsistent use of line_t::portaltransferred.
Some parts used 0 as 'nothing' others used UINT_MAX. 0 should refer to the map's default sky, not to nothing.
2017-01-08 14:59:31 +01:00
Christoph Oelckers 71d1138376 - refactored the global lines array into a more VM friendly form, moved it to FLevelLocals and exported it to ZScript.
- disabled the Build map loader after finding out that it has been completely broken and nonfunctional for a long time. Since this has no real value it will probably removed entirely in an upcoming commit.
2017-01-08 14:39:16 +01:00
Christoph Oelckers 3beed216dd - exported all relevant functions from sector_t.
Please note that currently most of these have little use, they are for future feature support.
2017-01-08 00:50:40 +01:00
Christoph Oelckers 82adc5bf1e - exported secplane_t to scripting. 2017-01-07 21:29:43 +01:00
Christoph Oelckers b11c8fef57 - renamed a few variables for clarity. 2017-01-06 11:56:17 +01:00
Christoph Oelckers 1a16f664e4 - added a TStaticArray class that allows safe access to resizable static data (like the sectors, linedefs, etc.) for the VM.
- used this to replace the line list in Sector because that gets already used and implemented proper bounds checks for this type of array.
2017-01-02 21:40:52 +01:00
Christoph Oelckers a13e23dbe6 - scriptified some trivial stuff from g_shared. 2016-11-29 19:50:34 +01:00
Christoph Oelckers b625156df6 - scriptified Strife's flamethrower and grenade launcher. 2016-11-29 14:12:39 +01:00
Christoph Oelckers 55b549c0c6 - converted the rest of a_strifestuff.cpp.
- changed some very old A_Explode calls which passed all values as integer literals.
2016-11-29 00:16:30 +01:00
Christoph Oelckers de6969997a - scriptified Hexen's flies.
A few notes:

 * this accesses the lines array in sector_t which effectively is a pointer to an array of pointers - a type the parser can not represent. The compiler has no problems with it, so for now it is defined internally.
 * array sizes were limited to 65536 entries because the 'bound' instruction only existed as an immediate version with no provisions for larger values. For the static map arrays 65536 is not sufficient so now there are alternative instructions for these cases.
 * despite the above, at the moment there is no proper bounds checking for arrays that have no fixed size. To do this, a lot more work is needed. The type system as-is is not prepared for such a scenario.
2016-11-27 18:52:24 +01:00
Christoph Oelckers 4e802652c7 - scriptified ArtiBlastRadius. 2016-11-26 09:51:14 +01:00
Christoph Oelckers 8dba322775 - scriptified Heretic's Skull Rod.
- Took the opportunity and fixed the logic for the Skull Rod's rain spawner. The old code which was part of the 3D floor submission was unable to work with portals at all. The new approach no longer tries to hide the dead projectile in the ceiling, it leaves it where it is and changes a few flags, so that its z-position can be used as reference to get the actual ceiling. This works for line portals, but for sector portals still requires some changes to sector_t::NextHighestCeilingAt to work, but at least this can be made to work unlike the old code.
- added names for the player-related translations to A_SetTranslation.
- fixed: Failure to resolve a function argument was checked for, too late.
- made the parameter for A_SetTranslation a name instead of a string, because it is more efficient. We do not need full strings here.
2016-11-25 16:05:03 +01:00
Christoph Oelckers a5000ead4c - another batch. 2016-09-19 19:58:04 +02:00
Christoph Oelckers e89d072abc - most thinkers are done. Some stuff about polyobject pointers is temporarily disabled right now because some of the required functions have already been pulled out. 2016-09-19 19:14:30 +02:00
Christoph Oelckers 43d93a19a0 - fixed: P_AlignFlat had the 'dist' value negated. Also simplified the code a bit. 2016-05-11 11:36:53 +02:00
Christoph Oelckers 0f99d7d73f - floatified the few remaining linedef and sector properties that still were fixed_t. The only fixed point things left in r_defs.h are the nodes and a fixed point setter function for vertex_t, which is still needed by the node builder. 2016-04-24 12:15:09 +02:00
Christoph Oelckers 082042818b - refactored sector portal data so that it does not rely on actors.
This is necessary because otherwise the level data cannot be serialized before the actors.
2016-04-20 19:20:11 +02:00
Christoph Oelckers 322b9fc0ae - wrap access to portal properties into sector_t:: member functions. 2016-04-19 11:35:28 +02:00
Christoph Oelckers 42e88ef120 - removed sector_t::FloorDisplacement and CeilingDisplacement.
Using the values these return directly is just as much code.
2016-04-18 13:40:09 +02:00
Christoph Oelckers f606ba315f - fixed: The return value of sector_t::FindHighestFloorPoint lost its '-' sign during the floating point conversion. 2016-04-05 10:55:13 +02:00
Christoph Oelckers 3ee42f6aa6 - removed all savegame compatibility handling, since the data is just too different from what it was before to try to convert it. 2016-04-03 20:55:23 +02:00
Christoph Oelckers 4e5ba49aca - got rid of secplane_t::fA and fB. All uses could be replaced by other functions. 2016-04-03 19:46:00 +02:00
Christoph Oelckers fc5f98a0be - floatified the sector planes.
This should conclude the floating point conversions for now.
2016-04-03 19:28:53 +02:00
Christoph Oelckers 6445615b5d - fixed the sound location calculations which got somewhat broken by the constant changes during the conversion. 2016-03-31 21:13:32 +02:00
Christoph Oelckers 27bad66f61 - floatified the remaining parts of p_sector.cpp. 2016-03-30 16:51:19 +02:00
Christoph Oelckers 77f2530236 - floatified the sector plane movers and removed some of the ZatPoint conversion cruft. 2016-03-30 09:41:46 +02:00
Christoph Oelckers ff0b371582 - made the linedef deltas private and only accessible through access functions.
Now everything should be in place to remove the fixed point math from the rest of the play code.
2016-03-29 16:13:16 +02:00
Christoph Oelckers 25f5e8449a - replaced all direct access to sector plane coefficients with wrapper functions. 2016-03-29 12:40:41 +02:00
Christoph Oelckers c7ae4688a3 - replaced all direct access to vertex coordinates with wrapper functions.
So that code replacement can be done piece by piece and not all at once.
2016-03-29 10:07:06 +02:00
Christoph Oelckers a46a4c81b1 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_lnspec.cpp
#	src/p_spec.cpp
#	src/p_spec.h
2016-03-28 17:46:19 +02:00
Christoph Oelckers 1877eca2ab - more floatification of p_map, plus some stuff used in those functions. 2016-03-27 01:06:54 +01:00
Christoph Oelckers 7a26318bf0 - floatified friction. 2016-03-24 22:50:03 +01:00
Christoph Oelckers 8add60ed38 - fixed: Getting the nearest ceiling height failed for height-less actors. 2016-03-24 19:24:33 +01:00
Christoph Oelckers 7ebb96f15c - use one of the new floating point special variables to store the portal plane height of the skybox things. 2016-03-21 00:05:44 +01:00
Christoph Oelckers 5875e91f39 - finished conversion of most of g_doom.
Only things left here are accesses to AActor::ceilingz and radius in A_PainShootSkull, plus scaleX and scaleY in the ScriptedMarine sprite setting code.
Most is still using wrapper functions around the fixed point versions.
2016-03-20 10:52:10 +01:00
Christoph Oelckers 51b05d331d - replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed.

Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
2016-03-20 00:54:18 +01:00