Commit graph

15872 commits

Author SHA1 Message Date
alexey.lysiuk
0dfb0d8427 - fixed broken Z coordinate in Actor.Vec3Angle() native call 2018-12-07 10:20:18 +02:00
Rachael Alexanderson
a7c4fc9dc2 - add plutonia map32 to node regen compatibility - https://forum.zdoom.org/viewtopic.php?f=2&t=62777 2018-12-06 13:57:15 -05:00
alexey.lysiuk
f6561ca23b - fixed native calls to LevelLocals.GetUDMF*() functions
https://forum.zdoom.org/viewtopic.php?t=62774
2018-12-06 17:04:41 +02:00
Rachael Alexanderson
9c023c78a4 - changing vid_scalefactor now always shows current scaling data unless it gets set to "1"
- vid_scaletoheight/width now works in all scaling modes, and can now also scale on custom resolutions directly
2018-12-06 09:20:01 -05:00
Magnus Norddahl
e83af15907 - remove some redundant variables 2018-12-06 04:34:19 +01:00
Magnus Norddahl
2aefeb6401 - Use static ifs (C++11 version of them, anyhow) for the triangle draw function 2018-12-06 03:10:14 +01:00
Christoph Oelckers
e22e249287 - this "genuine hack" was totally redundant... 2018-12-06 00:34:17 +01:00
Christoph Oelckers
aef882c137 - more direct native stuff, this is a week old but was almost forgotten. 2018-12-06 00:28:05 +01:00
Christoph Oelckers
e01306d403 - missed one definition for adding a direct native call. 2018-12-06 00:17:07 +01:00
Christoph Oelckers
494a113920 - more direct native entry points.
- disallow bool as a return value for direct native calls because it only sets the lowest 8 bits of the return register.
- changed return type for several functions from bool to int where the return type was the only thing blocking use as direct native call.
2018-12-05 20:10:44 +01:00
Christoph Oelckers
2e7e6cba9d - scriptified P_CheckMeleeRange2. 2018-12-05 18:58:15 +01:00
Christoph Oelckers
e4e86dd4f8 - fixed: Direct native functions for the JIT compiler may not return bool.
A bool will only set the al register on x64, but the entire eax needs to be set for the JIT code to deal with it.
2018-12-05 18:41:19 +01:00
Christoph Oelckers
de5ab0b4b6 - deprecated a few functions that depend on AAPTR_* to be useful. 2018-12-05 18:33:59 +01:00
alexey.lysiuk
b8c4a506a7 - fixed linking of optimized targets
CMakeFiles/zdoom.dir/r_utility.cpp.o: In function `R_SetupFrame(FRenderViewpoint&, FViewWindow&, AActor*)':
/home/travis/build/coelckers/gzdoom/src/r_utility.cpp:832: undefined reference to `AActor::GetCameraHeight() const'
CMakeFiles/zdoom.dir/g_shared/a_action.cpp.o: In function `A_Unblock(AActor*, bool)':
/home/travis/build/coelckers/gzdoom/src/g_shared/a_action.cpp:64: undefined reference to `AActor::GetDropItems() const'
2018-12-05 18:10:22 +02:00
Christoph Oelckers
148d75251f - fix it 2018-12-05 17:41:25 +01:00
Christoph Oelckers
eb282c0d11 Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts:
#	src/scripting/vmthunks_actors.cpp
2018-12-05 17:34:53 +01:00
Christoph Oelckers
6c9d0b166a Added direct native entry points to a larger number of functions. 2018-12-05 17:34:11 +01:00
alexey.lysiuk
101ebe1731
- fixed linking of optimized POSIX targets
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x6ab): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance3DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x75f): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec3To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x850): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec2To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x930): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_DistanceBySpeed(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0xa00): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o:vmthunks_actors.cpp:(.text+0xad3): more undefined references to `AActor::PosRelative(AActor const*) const' follow
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_PosRelative(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x1200): undefined reference to `AActor::PosRelative(sector_t*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_ClearInterpolation(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x127d): undefined reference to `AActor::ClearInterpolation()'
vmthunks_actors.cpp:(.text+0x1298): undefined reference to `AActor::ClearInterpolation()'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_GetBobOffset(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x135a): undefined reference to `AActor::GetBobOffset(double) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2D(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x222b): undefined reference to `AActor::PosRelative(AActor const*) const'
2018-12-05 10:25:07 +02:00
Christoph Oelckers
a846ed391e - fixed: ST_FormatMapName did not clear the string it wrote to before appending text. 2018-12-05 08:29:39 +01:00
Christoph Oelckers
5e1fc45816 fixed missing include. 2018-12-05 08:22:24 +01:00
Christoph Oelckers
2f2ce8126b - fixed definition of GetUDMFString export. 2018-12-05 08:18:07 +01:00
Christoph Oelckers
fd801ca91b - fixed: SlotPriority must be a float.
It was a fixed before but I missed that when refactoring it into an automatic property.
2018-12-05 08:13:52 +01:00
Rachael Alexanderson
0d891b6289 - Enforce CheckCheatmode() for cheat-enforced CVARs, allowing them to be changed in normal single player games 2018-12-05 00:21:39 +01:00
Christoph Oelckers
33db5792b4 - moved a large part of the VM thunks out of p_mobj.cpp. 2018-12-05 00:21:16 +01:00
Christoph Oelckers
a3265c2963 - more direct native entry points. 2018-12-04 23:12:16 +01:00
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