Commit Graph

15997 Commits

Author SHA1 Message Date
Christoph Oelckers 3b5ce4ecca - fixed: SBar_SetClipRect had a superfluous argument resulting in incorrect behavior 2018-12-04 19:14:14 +01:00
Christoph Oelckers e928b94ab2 - missed the header... 2018-12-04 18:53:12 +01:00
Christoph Oelckers d0f037d14f - the native APlayerPawn::PlayAttacking2 function is not needed anymore. 2018-12-04 18:51:03 +01:00
Christoph Oelckers 8025f02935 - fix bad return type. 2018-12-04 18:47:03 +01:00
Christoph Oelckers d7da2d838f - handle JIT errors in a more user-friendly fashion than aborting.
* use I_Error instead of I_FatalError to abort. I_FatalError is only for things that are not recoverable and should not be handled outside of error cleanup and rethrowing.
* only catch CRecoverableError in JitCompile. Everything else should fall through to the outermost catch block.
* Do not I_FatalError out after handling the exception locally. Just print an error and return null, indicating failure.
2018-12-04 18:45:07 +01:00
Christoph Oelckers 45d7e5a038 - scriptified ASpecialSpot.
This only had two simple native methods so the class is not fully scripted.
2018-12-04 18:21:48 +01:00
Christoph Oelckers de9805d5c7 - treat REGT_STRING | REGT_ADDROF just like REGT_STRING for direct native functions.
Both pass a reference so there's no need to treat them differently.
2018-12-04 18:21:00 +01:00
Christoph Oelckers 062528e0e2 - more direct native function calls. 2018-12-04 18:16:01 +01:00
Christoph Oelckers 5e4b366724 Removed all native components from AInventory. 2018-12-04 18:06:09 +01:00
Christoph Oelckers d66516ec82 - scriptified A_SpawnSingleItem, which was the last piece of native code still referencing AInventory 2018-12-04 17:55:45 +01:00
Christoph Oelckers 2459b27895 - scriptified A_SelectWeapon and inlined the last remaining use of APlayerPawn::SelectWeapon. 2018-12-04 17:41:55 +01:00
Christoph Oelckers 44e43c48b5 - scriptified A_SelectWeapon 2018-12-04 17:31:25 +01:00
Christoph Oelckers 9348baeeb1 Removed all remaining references to AInventory
What remains is the class definition and one single reference that will be scriptified.
2018-12-04 17:11:36 +01:00
Christoph Oelckers cd563cc4db Removed more literal references to AInventory. 2018-12-04 17:00:48 +01:00
Christoph Oelckers 3d28006eda - started removing literal references of AInventory, so far only simple stuff. 2018-12-04 00:41:39 +01:00
Christoph Oelckers 99a87f62b6 - The 'A' prefix has no meaning in class names on the script side - even in comments. 2018-12-04 00:23:52 +01:00
Christoph Oelckers a573c63f60 - removed all direct access to AInventory's members.
We are getting closer to make class Inventory fully scripted.
2018-12-04 00:22:26 +01:00
Magnus Norddahl e333a886e9 Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-12-03 23:39:20 +01:00
Magnus Norddahl 14919f49ec - gcc/clang didn't like having this in a class 2018-12-03 23:39:03 +01:00
Christoph Oelckers 9e70701e50 - fixed max. ammo display on AltHud. 2018-12-03 23:34:23 +01:00
Magnus Norddahl ae44b936eb - add bool and unsigned int to the allowed types
- fix one case where floats were used (the JIT always calls with doubles)
2018-12-03 23:09:23 +01:00
Magnus Norddahl ba0c7652eb - perform compile time validation of direct native function signatures 2018-12-03 22:59:56 +01:00
Magnus Norddahl 5d9784f215 - fix VM native calls containing strings and enable them again 2018-12-03 21:58:01 +01:00
Magnus Norddahl 4f078dfcb3 - fix compile error 2018-12-03 21:57:07 +01:00
Magnus Norddahl 3ac2e74f1c - GetInventoryIcon must return an integer for it to work for VM native calls 2018-12-03 21:56:06 +01:00
Christoph Oelckers 7df8245102 - added missing min/max unsigned instructions for the VM. 2018-12-03 21:12:39 +01:00
Rachael Alexanderson 493ff5f089 - always apply vid_scalefactor now, even when vid_scalemode is not 0 or 1. 2018-12-03 13:38:18 -05:00
Christoph Oelckers b6d0492478 - fixed crash with weapons which remove themselves from the inventory but continue calling action functions.
This is still an error, so now this throws a meaningful exception.
2018-12-03 18:51:24 +01:00
Christoph Oelckers 6faeadaceb - hardened the seg integrity checks against extremely broken mods.
Temple of the Lizardmen 3 has segs lumps in every level that seem to use a different data format and are completely unusable, up to triggering undefined behavior.
2018-12-03 18:10:36 +01:00
Christoph Oelckers 1b07bded47 - fixed: The static variant of PClass::FindFunction may only be used for actual static variables. 2018-12-03 17:41:05 +01:00
Christoph Oelckers 0e095b0c05 - removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code. 2018-12-03 17:41:05 +01:00
Marisa Kirisame d6d3dd038e Fix RemoveInventory not calling DetachFromOwner when an item is the first in the owner's inventory.
Fix CheckAddToSlots not working because it uses GetReplacement incorrectly.
2018-12-03 17:29:08 +01:00
Christoph Oelckers 53291b0abf Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-12-03 15:54:09 +01:00
Christoph Oelckers 40a67b8c9a - fixed issues with Dehacked's ad-hoc script code generation
* The functions had no prototype and caused crashes.
* even after creating a prototype it didn't work because CreateAnonymousFunction was set up incorrectly for the case where a known return type was given.
2018-12-03 12:24:55 +01:00
Magnus Norddahl 1e30bc72fe - compare against the thing renderstyle since the local copy has been modified 2018-12-03 11:10:40 +01:00
Magnus Norddahl 4604c9379c - disable alpha test on models if the renderstyle isn't STYLE_Normal 2018-12-03 10:46:28 +01:00
Christoph Oelckers 39d90d022b - made the BUddha checks readable again. 2018-12-03 09:48:05 +01:00
Christoph Oelckers d7bb1726ab - fixed compile warning 2018-12-03 09:14:11 +01:00
Christoph Oelckers 099b278f18 - removed assert that got triggered in an edge case that must pass here. 2018-12-02 23:35:18 +01:00
Christoph Oelckers d222e82bbc - implemented missing 'exact' parameter for ThinkerIterator.Next. 2018-12-02 23:15:34 +01:00
Christoph Oelckers d96d505520 - fixed accidentally misnamed parameter in A_Explode. 2018-12-02 21:39:28 +01:00
Christoph Oelckers bfcd714186 - started replacing direct references to class AInventory.
The easiest part was the type checks which could be changed to the name variant with a global search and replace.
2018-12-02 21:35:55 +01:00
Major Cooke 6fd3bea38c - fixed: P_PoisonPlayer and P_PoisonDamage did not check for NODAMAGE.
- fixed: P_PoisonDamage's check for Buddha2 and the Buddha powerup were inverted.
- fixed: P_PoisonDamage checked the modified damage instead of the raw, allowing amplifiers to boost the damage beyond telefrag and circumventing regular buddha.
2018-12-02 21:14:22 +01:00
Christoph Oelckers 807df33e1a - scriptified AInventory::Tick.
This was the last bit of code standing in the way of making AInventory a fully scripted class.
All that's left to sort out is some variable accesses - the vast majority of them in SBARINFO.
2018-12-02 20:58:15 +01:00
Magnus Norddahl d88d173b38 - ptest is a SSE 4.1 instruction 2018-12-02 20:44:36 +01:00
Christoph Oelckers 2e383073e8 - scriptified the AutoUseHealth feature.
This again is a piece of code that reads and even writes to inventory items' properties, so better have it on the script side.
2018-12-02 19:45:45 +01:00
Christoph Oelckers 3182569fb8 - scriptified the decision making of the invuseall CCMD.
Custom items had no way to adjust to this - and it also was the last native access to ItemFlags.
2018-12-02 18:43:38 +01:00
Christoph Oelckers 93f91d1039 - scriptified P_DropItem. 2018-12-02 18:31:18 +01:00
Christoph Oelckers a5fc26b37c - scriptified the no-spawn flag check for armor and health items. 2018-12-02 18:04:44 +01:00
Christoph Oelckers 319f8743db - consolidated the check for "is actor an owned inventory item" into a subfunction.
This check occured 9 times in the source, better have it only once.
2018-12-02 16:53:12 +01:00