Commit Graph

203 Commits

Author SHA1 Message Date
Christoph Oelckers fe39236ee1 - scriptified the AltHUD'S powerup drawer. 2018-12-02 14:34:09 +01:00
Christoph Oelckers ddaab4d2ab - scriptified and cleaned up the AltHUD's DrawCoordinates, DrawTime and DrawLatency functions.
Some backing functionality was moved elsewhere because scripting should not have access to low level system information.
2018-12-02 14:34:09 +01:00
Christoph Oelckers 4a1f011dc1 - Alt HUD scriptification, part 1. 2018-12-02 14:34:08 +01:00
Christoph Oelckers bc1990b6d7 - moved AInventory::DoRespawn fully to the script side. 2018-12-01 17:29:37 +01:00
Christoph Oelckers 03015896d6 - seems there are two versions of Hacx's MAP05. 2018-12-01 10:30:50 +01:00
Christoph Oelckers a0c0e8bdfe Merge remote-tracking branch 'remotes/origin/weapon_scriptification' into asmjit
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2018-11-30 21:28:44 +01:00
Christoph Oelckers ef2c433a8b - fixed declaration of ChangeStatNum. 2018-11-29 20:15:24 +01:00
Christoph Oelckers ba2b9430f8 ChangeStatNum must not be virtual
Overriding this would make the engine vulnerable to  badly behaving mods. Intercepting this and altering the behavior can render the entire game inoperable, especially if more internal code gets scriptified later. So even at the risk of breaking some carelsss mods this must be blocked.
2018-11-29 19:00:25 +01:00
Christoph Oelckers 47b1fa774d Merge branch 'asmjit' into weapon_scriptification
# Conflicts:
#	src/gi.cpp
#	wadsrc/static/zscript/base.txt
2018-11-26 00:14:44 +01:00
Christoph Oelckers 9475bfe4f1 - declare builtins as static. 2018-11-25 21:47:28 +01:00
Christoph Oelckers a501a22b28 - define the built-in functions defined in codegen.cpp through the regular interface instead uf just hacking them into the symbol table with incompletely set up data.
- added direct native variants to these builtins and fixed problems with builtin processing.
2018-11-25 11:41:29 +01:00
Christoph Oelckers 7012179904 - moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature. 2018-11-25 07:43:05 +01:00
Christoph Oelckers 460c400315 - scriptified ApplyKickback. 2018-11-25 01:12:45 +01:00
Christoph Oelckers fb91982da2 - scriptified APlayerPawn::Die and fixed a few things I encountered while doing it. 2018-11-24 20:32:12 +01:00
Christoph Oelckers 4c1b3f81ab - scriptified A_RailAttack. 2018-11-24 15:12:30 +01:00
Christoph Oelckers 192104aea2 - scriptified P_MorphPlayer and dependencies.
It still needs its counterpart scriptified as well before it can work.
2018-11-24 07:45:49 +01:00
Marisa Kirisame ee91cf77e4 expose defaultbloodcolor to ZScript. 2018-11-23 22:15:15 +01:00
Major Cooke 9ff7f338fd Added IsPointInMap(Vector3 p).
- Checks if a point is inside the map geometry or not.
2018-11-07 15:16:45 -05:00
Cacodemon345 b1d35eb0b3 Extend SKYEXPLODE flag for LineAttack 2018-11-03 15:24:30 +01:00
ZippeyKeys12 77c5c1eb19 Export AllClasses 2018-11-01 00:20:46 +01:00
Jonathan Russell f39a389e99 - changed the way alpha works on DrawLine and DrawThickLine so they're consistent 2018-11-01 00:10:47 +01:00
Jonathan Russell ea81ab4097 - added Screen.DrawThickLine for drawing lines with thickness 2018-08-30 19:21:57 +02:00
Christoph Oelckers d263f7bcc8 - removed most of the old LastIndexOf methods in FString, only leaving one for ZScript and clearly giving it a name that says it all. RIndexOf has been made the proper version of LastIndexOf internally now. 2018-08-25 20:54:16 +02:00
Christoph Oelckers c04c48d157 - renamed RIndexOf to RightIndexOf 2018-08-25 20:39:58 +02:00
Kevin Caccamo 884de51b70 Add the "RIndexOf" method to FString, which works like String.lastIndexOf from JavaScript
RIndexOf returns the index where the substring starts, instead of the index where the substring ends - 1.

Deprecate the LastIndexOf method of StringStruct
2018-08-25 20:37:40 +02:00
argv-minus-one 1d930b45cf Add ZScript method `LevelLocals.SphericalCoords`.
It computes spherical coordinates from one point in the world to another. Useful for checking whether one actor is inside another actor's view cone.
2018-08-21 08:22:16 +02:00
Christoph Oelckers 4c20553a62 Revert "Add RenderStyle API"
This reverts commit 8c7d3b6ab8.

With DTA_LegacyRenderStyle being added there is no pressing need for this. Aside from that there's an utterly unhealthy amount of information duplication here and it is missing some more recent additions.
2018-08-05 20:17:50 +02:00
Zombie 8c7d3b6ab8 Add RenderStyle API 2018-08-05 09:44:05 -04:00
Christoph Oelckers 7a692b1557 - added DTA_LegacyRenderStyle so that STYLE_* constants can be passed directly to the Draw functions.
- fixed the optional parameter in Shape2D.Clear.
2018-07-14 22:58:24 +02:00
Marisa Kirisame 2d0fb4ed2e Adds 2D shape (triangle array) drawer, usable from ZScript. Handles most drawtexture parameters excluding those related to scaling, at the moment. 2018-07-13 20:24:06 +02:00
Jonathan Russell e9050a38b3 - added LevelLocals vec2/3Offset(Z) functions for portal-aware offsetting without needing actors 2018-05-16 20:47:43 +02:00
ZZYZX da089b09b1 Added missing commented enum entry for ETraceFlags on ZScript side 2018-04-25 19:38:29 +02:00
Christoph Oelckers 8b4c74fad8 - the global portal data table also needs to be protected. 2018-04-15 12:16:46 +02:00
Christoph Oelckers 3671fd7f97 Merge branch 'master' into 2D_Refactor 2018-04-01 08:44:39 +02:00
Christoph Oelckers 23146c9b18 - made all elements of DehInfo and State read-only.
This data must be immutable, if any mod plays loose here, very bad things can happen, so this hole got plugged, even at the expense risking to break some badly behaving mods.
2018-04-01 08:41:06 +02:00
Christoph Oelckers a40e085a46 - 2D drawer implementation complete for hardware renderer.
This also replaces DTA_ColormapStyle with proper implementations of its components. As implemented it was a very awkward mixture of various effects that already existed in a separate form. As a result of its implementation it required additional but completely redundant shader support which could be removed now. As a side effect of this change a new DTA_Desaturate option was added.
2018-03-29 16:21:21 +02:00
Christoph Oelckers 16480a3f4b - it compiles again.
This won't work, though, because no backend for the new 2D code exists yet.
2018-03-28 16:40:09 +02:00
Christoph Oelckers 5d223bb8c3 - removed clearscope from DSectorEffect.GetSector.
Just because this is a getter does not mean that the data may even exist on the client side!
2018-03-03 09:28:25 +01:00
Marisa Kirisame 4cc8ba3399 Export GetSector() again, removed lightingdata assignment. 2018-03-03 09:26:11 +01:00
Christoph Oelckers 7ceb70bcc1 - renamed 'Tracer' class to 'LineTracer', because 'Tracer' is a too common name that had been used by some mods. 2018-01-27 09:32:26 +01:00
Marisa Kirisame 92547028f3 Exports sky textures to ZScript (readonly, needs setter function due to the setup required) and speeds, along with a ChangeSky function for setting the textures. 2018-01-26 21:00:44 +01:00
ZZYZX ee1a8f71bb Disable TRACE_PCross and TRACE_Impact on ZScript side 2018-01-21 10:54:23 +01:00
ZZYZX 74b937620e Added texture detection for walls and 3D floors; renamed some fields to more intuitive names 2018-01-21 10:54:23 +01:00
ZZYZX a7ff62316d Exported Trace() interface to ZScript 2018-01-21 10:54:23 +01:00
Jonathan Russell 708d24aba7 - added Screen.getViewWindow function 2018-01-20 21:56:34 +01:00
Marisa Kirisame a01ca4c3a1 Exported S_IsActorPlayingSomething and S_GetMSLength to ZScript.
Added missing vm.h include, moved A_IsPlayingSound to p_actionfunctions.cpp.

- make A_IsPlayingSound ui only
2018-01-20 19:01:47 +01:00
Rachael Alexanderson 9fd78e90ad - export 'GetChecksum' as part of FLevelLocals in ZScript 2018-01-06 19:59:49 -05:00
Major Cooke c3c1e76e8a Added vector diff functions to ZScript LevelLocals class
Vec2Diff() and Vec3Diff() work like Actor’s Vec2To() and Vec3To() but use arbitrary points
2018-01-02 14:18:59 +02:00
alexey.lysiuk 996bddd602 Exposed pixel stretch to ZScript as member variable instead of function
https://forum.zdoom.org/viewtopic.php?t=58539
2017-12-29 09:42:03 +02:00
Major Cooke 1e7df5505e Added GetPixelStretch to LevelLocals struct. 2017-12-27 17:50:39 -05:00