Commit graph

3632 commits

Author SHA1 Message Date
Christoph Oelckers
b542d1371d - reorganized the ZScript content in gzdoom.pk3 and changed the files' extensions to something unique for easier syntax highlighting. 2019-02-23 12:08:27 +01:00
Christoph Oelckers
2874a36fbe - added the final missing piece of localization support, i.e. forcing text based menus.
Now a localization mod can disable the graphics patches containing text entirely so that it can properly localize the text based menu variant.
If this flag gets set in MAPINFO, it will override all user settings.
2019-02-23 10:40:07 +01:00
Magnus Norddahl
52460d53d9 - compile main.vp and main.fp for vulkan 2019-02-22 11:30:48 +01:00
Nemrtvi
7060f9cc05 Add language menu to Options
In this menu, all languages supported by GZDoom are selectable with one simple click! Credits to @PROPHESSOR for making it!

(This only edits the English and French languages because they are the only languages currently up to date with GZDoom’s development. A Russian translation will follow suit at a later date.)
2019-02-21 17:54:13 +01:00
Christoph Oelckers
48fcdacf06 - more work on graphics substitutiion
* added a CVAR that sets how localizable graphics need to be dealt with.
* pass the substitution string to OkForLocalization so that proper checks can be performed.
* increased item spacing on Doom's list menus to 18 from 16 pixels, because otherwise the diacritic letters would not fit. 20 would have been more ideal but 18 was the limit without compromising its visual style
* added a second text-only main menu because here the spacing cannot be changed. Doing so would render any single-patch main menu non-functional. So here the rules are that if substitution takes place, it will swap out the entire menu class.
* fixed some issues with the summary screen's "entering" and "finished" graphics.
2019-02-21 00:35:27 +01:00
Christoph Oelckers
a0c10df387 - made some adjustments so that the BigFont works as intended.
The auto-calculated height of 24 is too tall, this requires a manual setting here. Also fix the space calculations for the "finished" graphic.
2019-02-21 01:13:42 +01:00
Christoph Oelckers
22781e3cb9 - BigFont update. 2019-02-21 00:43:58 +01:00
Christoph Oelckers
f580d85da6 - fixed typo in menu texts. 2019-02-21 00:24:09 +01:00
Christoph Oelckers
7ea2f135df - did not save the latest changes. 2019-02-21 00:23:49 +01:00
Christoph Oelckers
8bdbd2e915 - fixed layout of summary screen. 2019-02-21 00:16:48 +01:00
Christoph Oelckers
6a742f8d34 - changed all places which used a localized string as a format template for printf, String.Format et.al.
Passing something non-constant at compile time here is extremely dangerous, especially when users can replace those strings if they like.
It now uses FString::Substitute in all cases where something needs to be inserted into a template string.
2019-02-20 20:20:06 +01:00
Christoph Oelckers
74f5211046 - fixed accidental commit of incomplete test code. 2019-02-20 18:54:29 +01:00
Christoph Oelckers
a6a091c83a - reworked summary screen to use consistent contents, either all patches or all text but not mixed 2019-02-20 00:44:17 +01:00
Christoph Oelckers
9f59a84a37 - allow text substitution for StaticPatch items in ListMenus 2019-02-20 00:43:31 +01:00
Christoph Oelckers
5e288ef2d4 - fixed: Doom used Chex Quest's default settings for menu fonts. 2019-02-20 00:01:20 +01:00
Christoph Oelckers
c13e496107 - a bit of text cleanuo. Removed some unused strings and moved a few not-to-be-translated ones to language.def. 2019-02-19 23:18:46 +01:00
Christoph Oelckers
6b8303ed05 - moved the lump/resource names in the string table to their own file and removed them from other language files.
These are neither supposed to be translated nor overridden by other language tables.
Doing so may break later Dehacked refactorings.
2019-02-19 21:47:54 +01:00
Christoph Oelckers
5e7fb16d05 - preparation work for substituting the menu and intermission screen text graphics for localization 2019-02-19 01:22:12 +01:00
Christoph Oelckers
91206f12be - changed zstrformat to allow %c to emit non-ASCII characters as UTF-8. 2019-02-19 00:27:47 +01:00
Christoph Oelckers
b29975503d - fixed issues with text entering
* entering a savegame description did not work anymore
* the length check was too restrictive and always underestimated the available space
* use the console font for entering a savegame description. This has more characters and better contrast for this content.
* the interface to the text enterer used bad measurements.
2019-02-19 00:08:23 +01:00
Rachael Alexanderson
c7103cbe4d - autoload nerve.wad with Doom 2 2019-02-16 17:23:43 +01:00
Alexander
cce270ba72 moved controls to submenus in "Customize Controls" menu
What is done:
D1. Controls are separated by existing sections, each section is now a submenu;
D2. The original sections are preserved;
D3. The original controls order is preserved;
D4. "Controls" section is renamed to "Game", because "Controls" submenu of "Customize Controls" would be too confusing;
D5. Map (automap) controls are added as a section, map controls submenu is unchanged;
D6. Missing controls are added to "Other" section;
D7. Sections are given a title following the scheme "Customize <section> Controls", except N4 (see below).
D8. Inside the sections, spaces are added to group the related controls.

Things that I'm not sure about:
N1. "Game" controls section name is too generic - I'll gladly change it to something more suitable;
N2. "Other" controls section name is too generic - I'll gladly change it to something more suitable;
N3. Map controls submenu could use some spacing, and internal title ("Map Controls") is redundant;
N4. "Strife Popup Screens" section name is too long to fit in scheme described in D7, therefore the title is "Strife Popup Screens Controls";
N5. "Game" section could be divided further, but this will break the original menu structure.
2019-02-16 17:21:55 +01:00
Christoph Oelckers
aa550310f6 - allow the language table to supersede the title patches, if appropriate
For the Doom IWADs the provided font looks almost identical to the characters used on the title patches. So, for any level name that got replaced in some language, it will now check if the retrieved name comes from the default table, and if not, ignore the title patch and print the name with the specified font.

This also required removing the 'en' label from the default table,  because with this present, the text would always be picked from 'en' instead of 'default'. Since 'en' and 'default' had the same contents, in any English locale the 'default' table was never hit, so this won't make any difference for the texts being chosen.

Last but not least, wminfo has been made a local variable in G_DoCompleted. There were two places where this was accessed from outside the summary screen or its setup code, and both were incorrect.
2019-02-15 00:29:24 +01:00
Christoph Oelckers
3dce45545f - added U-100-U-17f to the console font.
This was mostly just accent edits of existing characters, so this also contains the less important characters.
2019-02-17 21:01:29 +01:00
Christoph Oelckers
45d75745f0 - reworked console font loading to use the glyph sheets directly and allowing to load more than one per font. 2019-02-17 19:15:57 +01:00
Christoph Oelckers
d39a624942 - fixed the player name display.
This was broken by several small unicode-incompatible code fragments.
This commit also removes the input limit for the player name and the savegame description. With multibyte encoding, limiting them to a fixed length did not work right.
Currently these will just overflow the fields if the text becomes too long, this needs some additional work.
2019-02-16 22:57:02 +01:00
Christoph Oelckers
deb233677e - made the menu's text input handler Unicode capable.
Also make sure that the savegame description remains readable. Unlike in-game text this can be done without double-encoding existing UTF-8.
2019-02-16 21:29:46 +01:00
Christoph Oelckers
d15e3391a0 Merge remote-tracking branch 'remotes/origin/master' into localization
# Conflicts:
#	src/v_font.cpp
2019-02-16 17:35:15 +01:00
Rachael Alexanderson
9f62289507 Merge branch 'master' of https://github.com/coelckers/gzdoom into localization 2019-02-16 10:50:49 -05:00
Ne Mrtvi
0356c2fc67 New BIGFONT, uppercase and lowercase
Now that GZDoom supports uppercase and lowercase characters in the BIGFONT format, this commit actually adds those characters. It contains full support for both the English and Russian (minus the letter Ё) alphabets for both Doom and Strife. As for the existing punctuation graphic lumps in Strife, all extra space is removed, and the sprite offsets are adjusted instead.

This also adjusts the English language file so that all menu header texts utilize these new characters. As a tiny extra, it also adds the letter Ё to the Strife smallfont.

(Credits to Skulltag for the uppercase B, Amuscaria for the uppercase X and Z, and @jnechaevsky for all Russian characters, taken from Russian Doom!)
2019-02-15 19:00:19 +01:00
Christoph Oelckers
6e9b62a43e Merge branch 'master' into localization 2019-02-14 22:24:12 +01:00
Christoph Oelckers
868ac5adf8 - switched the Windows backend to use the Windows Unicode API.
With localization for non-Latin languages on the support list the multibyte API doesn't cut it anymore. It neither can handle system text output outside the local code page nor can an ANSI window receive text input outside its own code page.
Similar problems exist for file names. With the multibyte API it is impossible to handle any file containing characters outside the active local code page.

So as of now, everything that may pass along some Unicode text will use the Unicode API with some text conversion functions. The only places where calls to the multibyte API were left are those where known string literals are passed or where the information is not used for anything but comparing it to other return values from the same API.
2019-02-14 22:23:33 +01:00
alexey.lysiuk
be6ce43045 - added ability to customize font of automap marks
Set am_markfont CVAR to a desired font name
Use am_markcolor to select a text color, has no effect with the default font, AMMNUMx
2019-02-13 21:47:53 +01:00
Christoph Oelckers
914818cb88 - fixed run health clamping.
This didn't scale the move factors properly.
2019-02-13 20:12:13 +01:00
Christoph Oelckers
6ff6a6af00 - made gameaction read only
The script side cannot do anything useful with this, because most actions require parameters in global variables, so this is a first grade candidate for rogue mods to make the engine misbehave.
2019-02-13 14:59:55 +01:00
Christoph Oelckers
e526cebc8e Merge remote-tracking branch 'origin/master' into localization 2019-02-12 00:20:00 +01:00
Christoph Oelckers
0b8fb3ac1a - cleanup of font init to have less special cases
To make things easier, DBIGFONT, SBIGFONT and HBIGFONT will now be renamed in the lump directory to make things a bit easier to handle.

Another change is to make font folders atomic units to prevent cross-pollution between incompatible fonts. The only exception to this are the def* folders because they need to piece together their fonts from both zd_extra.pk3 and the IWADs.
2019-02-12 00:19:44 +01:00
alexey.lysiuk
eaf0ac1f7b - added compatibility entries for maps affected by buggy CheckSwitchRange behavior 2019-02-11 17:57:03 +01:00
alexey.lysiuk
d4d010ac32 - added compatibility flag for buggy CheckSwitchRange behavior
https://forum.zdoom.org/viewtopic.php?t=63008
https://forum.zdoom.org/viewtopic.php?t=63650
2019-02-11 17:57:03 +01:00
Christoph Oelckers
3a440a5fa7 - moved the displayed text in strfhelp.o to the string table. 2019-02-11 00:43:57 +01:00
Christoph Oelckers
4bacde36c0 - moved Strife's map names to the string table. 2019-02-11 00:27:08 +01:00
Christoph Oelckers
88e227f1f3 Merge branch 'new_level_refactor' into localization 2019-02-09 12:22:15 +01:00
Christoph Oelckers
3c0c076226 - removed extraneous parameter in SpawnPlayerMissile call in A_FireProjectile.
The native variant has a MissileActor out parameter in this place, but in ZScript that's a secondary return value.
2019-02-09 09:25:29 +01:00
Christoph Oelckers
3d3f260137 - exported LevelLocals's compatibility flags to scripting and fixed all places where access to combined compatibility flags is needed. 2019-02-09 09:17:57 +01:00
Major Cooke
acc510dfb3 Added inflictor, source and flag parameters to GetModifiedDamage on actors and ModifyDamage on inventory.
- The flags are used by DamageMobj so modders can determine radius damage, for example, by checking for DMG_EXPLOSION.
2019-02-08 20:07:49 +01:00
Christoph Oelckers
c0bbb4fd0d - fixed lowercase handling of non-basic-latin characters and added Undead's Russian translation.
The added table may be overkill but this way the font engine is prepared for things to come.
Currently the text placement in the menu seems a bit broken, that's a task for later.
2019-02-07 13:49:54 +01:00
Christoph Oelckers
5af5717cf1 - added a compatibility fix for KDiZD Z1M3 and fixed some tagging issues in the compatibility handler.
One sector in an underwater area of KDIZD Z1M3 got tagged with an incorrect Transfer_Heights effect which caused render glitches in that area.
There were also a few AddSectorTag calls without first clearing the sector's tags leading to potentially undefined behavior.
2019-02-07 09:42:51 +01:00
Christoph Oelckers
495298079b - rewrote the language table so that it doesn't have to reload everything on a language change.
It now reads everything into a two-dimensional TMap and creates a list of mappings that apply to the current setting.
The constant need for reloading was the main blocker in redesigning how Dehacked strings get inserted. Currently they override everything, but IWAD-based Dehacked text shouldn't block PWAD overrides from PWADs' LANGUAGE lumps and instead be treated as coming from an [en default] block.

This also renames the main block from [enu default] to [en default], because it should be treated as the English default for all English locales and not just make it fall through to the base default as it did before.
2019-02-06 13:59:41 +01:00
Christoph Oelckers
0936a2fa19 - exported all texts from Strife's dialogues to the string table.
Now all this content can be localized. However, since this is actual game content it was placed in a secondary file in zd_extra.pk3, so that it won't affect the GPL-compatible status of the main one.
2019-02-05 13:39:38 +01:00
Christoph Oelckers
546d3d1bf5 - allow localization of Hexen's original ACS strings.
This way of looking up strings is intentionally limited to content from Hexen.wad and Hexdd.wad.
2019-02-05 11:51:19 +01:00
Christoph Oelckers
a0042fd653 - removed bad character from A_CustomPunch definition. 2019-02-04 14:08:34 +01:00
Christoph Oelckers
53162a8a5c Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/am_map.cpp
2019-02-03 09:20:13 +01:00
Christoph Oelckers
25071e26e5 - fixed: The CheckEnvironmant call in PlayerThink can already invalidate the PlayerPawn so even the calls to CheckUndoMorph and CheckUse need to get the pawn through the PlayerInfo. 2019-02-03 09:11:33 +01:00
Nemrtvi
4af80fa43b Fixed “Finished:” and “Now entering” in Heretic
The text file
gzdoom/wadsrc/static/zscript/statscreen/statscreen.txt
is set to use strings called “$ENTERING” and “$FINISHED”, located in the language files, in intermission screens between levels in Heretic. However, these strings are named incorrectly in the language files, instead being written as “$WI_ENTERING” and “$WI_FINISHED” for some reason I’m unaware of. After renaming the original script, the ingame text shows up through what is written in the language files, as intended.

On a miscellaneous note: in GZDoom, the text between levels in Heretic says “Entering:”. In the DOS version, it says “Now entering:”. This is accurately reflected in the English language file, though, and thus faithful to the original when displayed ingame.
2019-02-02 18:29:33 +01:00
Christoph Oelckers
1dbbb56a1b Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/p_user.cpp
2019-02-02 16:58:30 +01:00
Christoph Oelckers
235c4c0499 - allow localization of Strife's log text. 2019-02-02 16:56:58 +01:00
Nemrtvi
fa53ae21e6 Localized “FIND HELP” in Strife
The very first quest log that appears in Strife, “FIND HELP”, is located in a source file. This moves it to the language files.
2019-02-02 10:57:14 +01:00
Christoph Oelckers
45dc9a7b47 - renamed the level variables.
currentUILevel is now primaryLevel.
For ZScript, currentVMLevel was added. This is also exported as 'level' and will change as needed.
This also means that no breaking deprecations will be needed in the future, because in order to sandbox a level only 4 variables need to be handled: level, players, playeringame and consoleplayer.
The remaining global variables are not relevant for the level state.

The static 'level' has been mostly removed from the code except some places that still need work.
2019-02-02 00:25:51 +01:00
Major Cooke
695eced81a Added Inventory UNCLEARABLE flag.
- Allows prevention of ClearInventory without stopping it from being dropped.
2019-02-01 18:29:31 +01:00
Christoph Oelckers
ff903da19a Merge remote-tracking branch 'remotes/origin/master' into new_level_refactor 2019-01-31 20:43:24 +01:00
Major Cooke
b1c508fa6c Added CheckReplacee.
- Allows defining of what actor is replacing another for information.
- If multiple arachnotrons, a modder can attribute them as being a replacer of Arachnotron itself, allowing A_BossDeath and GetReplacee to work with it.
2019-01-31 19:05:44 +01:00
Erick Tenorio
b9e71d6db3 - DOOM.WAD fixes 2019-01-31 19:03:57 +01:00
Christoph Oelckers
cfa35f548f - make the file name of savegame nodes read only. 2019-01-31 17:57:39 +01:00
Christoph Oelckers
68bff17d63 - this was missing 2019-01-31 03:29:45 +01:00
Christoph Oelckers
ddab2c3e78 - removed the playernum parameter from CheckLocalView
This was always used with 'consoleplayer' which really is the only thing making sense here. But this is a part of the global state which should be avoided in play code.

In particular, this makes no real sense in case of secondary maps where it should always return false.
2019-01-31 03:29:25 +01:00
Christoph Oelckers
0eb3b2abca Merge branch 'master' into new_level_refactor 2019-01-30 22:03:21 +01:00
Christoph Oelckers
a2065cae4b - fixed: RecreateAllAttachedLights must activate the lights it creates.
This also removes the gl_attachedlights CVAR because with the new management this doesn't really work anymore.
2019-01-30 20:21:00 +01:00
Christoph Oelckers
b12de04258 - fixed the remaining deprecation warnings in the base script.
All these required access to the sector's Level reference.
The remaining references to the global 'level' variable are all in deprecated functions which is ok.
2019-01-30 00:58:44 +01:00
Christoph Oelckers
6451b7d592 - moved the combined compatibility flags into FLevelLocals. 2019-01-29 19:28:22 +01:00
Christoph Oelckers
14101fa447 - health groups and software rendering textures freed of 'level'
Edited cherry-pick of an older commit.
2019-01-29 16:06:17 +01:00
Christoph Oelckers
f9239f6e0f - added a compiler-side workaround for the formerly static methods of FLevelLocals.
LevelLocals on the left side of.a function call will now always be remapped to 'Level', which will either remap to the same-named instance variable or the global deprecated one.

In a few degenerate cases where there is a conflicting local variable named 'level' it may error out but that is unavoidable here but this is very unlikely.
2019-01-29 02:04:31 +01:00
Christoph Oelckers
60873bc5d6 Moved the PointInSector functions into FLevelLocals 2019-01-29 01:30:41 +01:00
Christoph Oelckers
259ae41774 - sanitized the 'frozen level' code.
This had two different flags that were checked totally inconsistently, and one was not even saved.
Moved everything into a few subfunctions so that these checks do not have to be scattered all over the code.
2019-01-28 20:15:48 +01:00
Christoph Oelckers
3721771934 - forgot to save this. 2019-01-28 18:44:42 +01:00
Christoph Oelckers
3c14a7db76 - use map time, not hub time for map actions. 2019-01-28 18:42:56 +01:00
Christoph Oelckers
66695ac6a0 - made most of the player spawn spot handliing functions members of FLevelLocals. 2019-01-28 02:44:05 +01:00
Christoph Oelckers
b4acb857ad - the final batch of easy level replacements.
What's left will require a bit more work...
2019-01-27 21:59:19 +01:00
Christoph Oelckers
73ea59179c - fixed some deprecation warnings about 'level'. 2019-01-27 14:48:35 +01:00
Christoph Oelckers
84baa5bb4d - deprecated the global 'level' variable.
This will currently output 9 warnings for the UDMF property getters. To silence these a bit more work is needed.
2019-01-27 14:33:02 +01:00
Christoph Oelckers
05830455e7 - made the automap an object.
This simplifies handling a lot because it allows to make the level the owner of its map.
2019-01-26 15:21:20 +01:00
Christoph Oelckers
10feb446fa - made most of the EV_* functions part of FLevelLocals. 2019-01-26 08:28:45 +01:00
Christoph Oelckers
4e052f2857 - use a separate variable pointing to the current level for the UI code.
UI always runs on the primary level, so this does not need the ability to operate on multiple levels. Additionally, this can later be set to null when running play code so that scope violations result in an abort.
2019-01-25 18:31:40 +01:00
Christoph Oelckers
bf3dc2f99b Merge branch 'rolling_back' into new_level_refactor 2019-01-25 00:57:01 +01:00
Christoph Oelckers
b2ee99c7cc - call level compatibility handlers for all levels and pass the map name as a second parameter.
This is for user-made handlers for which the checksum is rather useless both for deciding whether to call the handler and for identifying the map.
2019-01-25 00:56:15 +01:00
Christoph Oelckers
3cef56249d - moved most functions of portals.cpp into FLevelLocals.
Much of this is used during level init and needs to be independent of the current level.
2019-01-25 00:30:55 +01:00
Christoph Oelckers
0e5986769e - moved the tid hash into FLevelLocals and adjusted the interface to the iterators. 2019-01-24 19:28:40 +01:00
Christoph Oelckers
1f2162fea8 - moved the scripted creation functions for tag iterators to LevelLocals
The old static methods are now deprecated, this was done to clarify the relationships at play here.
2019-01-24 02:17:10 +01:00
Christoph Oelckers
5c8ae72453 - fixed: ScriptUtil.PlayerAmmo must be declared static. 2019-01-23 21:50:11 +01:00
Rachael Alexanderson
dc27011370 - remove vid_hwgamma, force always use shader gamma
*** note to drfrag: Please don't cherry-pick this commit. Systems that do not use renderbuffers will still need this feature!
2019-01-23 21:50:11 +01:00
Christoph Oelckers
477560e1ef - swapped order of checks for picking up an item.
Failure must take precedence over the morph check because this does not return a proper toucher.
2019-01-23 21:50:10 +01:00
Christoph Oelckers
f6ce5f59ae - fixed armor bonus giving in A_CustomPunch 2019-01-23 21:49:18 +01:00
nashmuhandes
d911fa99a1 Move the "time" string in saved game comment into the LANGUAGE lump.
# Conflicts:
#	src/g_game.cpp
2019-01-23 21:48:30 +01:00
alexey.lysiuk
12db808307 - fixed 'missing interpolation point' warning 2019-01-23 21:46:46 +01:00
Rachael Alexanderson
b378b29421 - modify the wording in the preset scaling menu to imply that all it does is pixel scaling, not change the actual screen resolution 2019-01-23 21:45:26 +01:00
Rachael Alexanderson
8f7038aa53 - add 4k UHD resolution to presets 2019-01-23 21:44:27 +01:00
Rachael Alexanderson
c280457635 - fix spacing on one of the resolution preset entries 2019-01-23 21:44:14 +01:00
alexey.lysiuk
7d4765b5cd - workaround code generation issue in PlayerPawn.FindMostRecentWeapon()
Multiple values in returned from a subfunction cannot be used directly as a function result

https://forum.zdoom.org/viewtopic.php?t=63284
2019-01-23 21:41:03 +01:00
alexey.lysiuk
8aa47e664e - fixed disappearing inventory after morphing pickup
When player is picked up item that does morph, the corresponding toucher actor is changed in process
Previously, morhing item was removed from original actor leaving player's inventory in inconsistent state

https://forum.zdoom.org/viewtopic.php?t=63124
2019-01-23 21:40:44 +01:00
Christoph Oelckers
5e4ef04a4d - allow assignment of line IDs through LevelCompatbility. 2019-01-23 21:40:19 +01:00
alexey.lysiuk
c6ee8e084c - fixed condition to produce blood splatter during line attack
https://forum.zdoom.org/viewtopic.php?t=63186
2019-01-23 21:23:35 +01:00
Christoph Oelckers
2d90cc288b - fixed: Strife was missing the move factors. 2019-01-23 21:21:22 +01:00
Marrub
af06d7cb9e Make LevelLocals::ExecuteSpecial return int
# Conflicts:
#	wadsrc/static/zscript/base.txt
2019-01-23 21:15:33 +01:00
Christoph Oelckers
4126f8ce72 - made OP_NEW a builtin function instead of an opcode.
The code was present 3 times due to the JIt, and this is not something that benefits from being a real opcode, even in the interpreted case.
2019-01-23 21:12:23 +01:00
Christoph Oelckers
a1ae01e392 - fixed last PR.
The result of GetPointer must be null checked as well!
2019-01-23 20:43:23 +01:00
Cacodemon345
70a07e154c Move receiver NULL check above the orresult check (#695)
This is to prevent a VM abort from happening here if orresult is false.
2019-01-23 20:42:41 +01:00
Christoph Oelckers
c651045ed3 - let RunHealth clamping respect the newly added global properties. 2019-01-05 15:37:14 +01:00
Christoph Oelckers
dab68184f5 - moved the global spot state into FLevelLocals.
This way it doesn't even have to be a thinker.
2019-01-05 10:04:27 +01:00
Christoph Oelckers
bfbf7ff9c9 - made forwardmove and sidemove defaults configurable through the gameinfo section. 2019-01-05 08:48:57 +01:00
Christoph Oelckers
d898cadda5 - fixed: Trying to remove the first item in an actor's inventory would lose all owned items. 2019-01-04 18:56:14 +01:00
Magnus Norddahl
f10ded756e - split shadowmap AABB tree into two parts. one for static and one for dynamic
- upload only the dynamic AABB subtree using glBufferSubData
- change internal raytracing stack limit from 16 to 32
- update shadowmap AABB tree after R_SetupFrame for proper frame interpolation
2019-01-04 15:51:59 +01:00
Christoph Oelckers
f9ff097457 - fixed A_Chase default detection. 2019-01-03 23:43:15 +01:00
Christoph Oelckers
9521b6cd1f - removed all remaining native parts of APlayerPawn.
Unlike the other classes, the places where variables from this class were accessed were quite scattered so there isn't much scriptified code. Instead, most of these places are now using the script variable access methods.
This was the last remaining subclass of AActor, meaning that class Actor can now be opened for user-side extensions.
2019-01-03 22:05:49 +01:00
Christoph Oelckers
c18e895272 - exported all native components of APlayerPawn.
Only the class definition itself remains and needs to be taken care of.
2019-01-03 18:01:58 +01:00
Christoph Oelckers
3314a1efe5 - scriptified the remaining PlayerPawn methods. 2019-01-03 14:35:17 +01:00
Christoph Oelckers
2258a71c36 - took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places. 2019-01-03 13:59:46 +01:00
Christoph Oelckers
23146f1af2 - scriptified PlayerPawn.ResetAirSupply. 2019-01-03 13:04:48 +01:00
Christoph Oelckers
badacbb968 - scriptified APlayerPawn's DamageFade handling. 2019-01-03 12:47:34 +01:00
Christoph Oelckers
2bd72478ee - scriptified P_CalcHeight.
This was the only code using the ViewBob member variable.
This also moves the range check for this variable to its application, because a badly behaved mod can just as easily change it at run time instead of just setting an absurdly large value in the class definition.
2019-01-03 11:57:20 +01:00
Christoph Oelckers
9e5c5b68c5 - did some more lightening on the PlayerPawn class. 4 more properties and one native member function have been handled. 2019-01-03 10:06:45 +01:00
Christoph Oelckers
c753d59a72 - scriptified A_SkullPop and ObtainInventory.
These were the last relevant items to access PlayerPawn.InvFirst.
2019-01-03 00:35:56 +01:00
Christoph Oelckers
6eb8ded471 - made ColorRangeStart and ColorRangeEnd meta properties of APlayerPawn.
These are only used during initialization and they should have been readonly from the start.
2019-01-02 22:13:57 +01:00
Christoph Oelckers
bc47fdfa78 - scriptified useflechette CCMD's item finding code. 2019-01-02 11:58:26 +01:00
Marrub
3e3d21cd35 Fix A_CustomBulletAttack's spawnofs_xy parameter
The current behaviour offsets to the front of the actor rather than the side, due to an oversight in the code, which oddly is not present in the A_FireBullets equivalent.
2019-01-02 08:13:53 +01:00
Christoph Oelckers
dc612703d5 - scriptified the declaration of AmbientSound
Most of the code is still native, but this means that PlayerPawn is the last remaining child of AActor.
2019-01-02 01:05:20 +01:00
Player701
68091db598 - Since GetParentAmmo is now virtual, BackpackItem and the "give ammo" cheat should call GetParentAmmo to determine base ammo classes. 2019-01-01 22:00:35 +01:00
Christoph Oelckers
d654e02dea - rewrote dynamic lights to not use actors for the internal representation and made DynamicLight a purely scripted class.
This should be less of a drag on the playsim than having each light a separate actor. A quick check with ZDCMP2 showed that the light processing time was reduced to 1/3rd from 0.5 ms to 0.17 ms per tic.
It's also one native actor class less.
2019-01-01 19:35:55 +01:00
alexey.lysiuk
99479d84b1 - fixed everlasting fast projectile after hitting ceiling
Without the test for ceiling hit fast projectile could enter its Death state every tick infinitely

https://forum.zdoom.org/viewtopic.php?t=63023
2019-01-01 08:14:28 +01:00
Christoph Oelckers
0b2a919bbe - fixed crash in AutoUseStrifeHealth
The loop never checked if the item was still valid and would continue to try to use it, even after it was removed from the inventory and destroyed.
As native code this just failed silently, but with the VM it needs to be explicitly checked.
2018-12-31 19:03:02 +01:00
Major Cooke
8d9d71f55f - Fixed: SXF_CLEARCALLERSPECIAL cleared the spawned actor's special instead of the caller. 2018-12-30 19:01:31 +01:00
alexey.lysiuk
36896a1224 - fixed ammo check for weapon with 'uses both' flags
https://forum.zdoom.org/viewtopic.php?t=63047
2018-12-29 13:36:10 +02:00
alexey.lysiuk
8e684f9687 - fixed missing attack sound in A_CustomPunch
See 7bb3855439/src/p_actionfunctions.cpp (L1729)

https://forum.zdoom.org/viewtopic.php?t=63049
2018-12-29 12:34:38 +02:00
Christoph Oelckers
dd3dba2ef1 - made PlayerPawn.TweakSpeeds virtual. 2018-12-29 08:43:36 +01:00
Christoph Oelckers
3559f7dffb Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-12-28 23:14:22 +01:00
Christoph Oelckers
5f303859e9 - made some changes to how the compatibility code works to allow removing the last remaining global variables of the map loading code.
Everything temporary is now part of the MapLoader class.
2018-12-28 23:14:11 +01:00
Erick Tenorio
0a6ec054d2 - TNT.WAD fixes 2018-12-27 20:52:08 +01:00
Erick Tenorio
9ee0271320 - Have Plutonia MAP16 pit kill player 2018-12-27 18:59:29 +01:00
Kevin Caccamo
e04fc026ff Expand UDMF and ZScript API for side's own additive colors
Add 'useowncoloradd_{top,mid,bottom}' sidedef properties to the UDMF 
spec
Only use side's additive colors if 'useowncoloradd_(top|mid|bottom)' is 
set.
Rename UseOwnColors flag to UseOwnSpecialColors
Add UseOwnAdditiveColor flag to side_t::part
Add EnableAdditiveColor to side_t
Add Side.EnableAdditiveColor to ZScript API
2018-12-26 16:58:27 +01:00
Kevin Caccamo
286886e161 Minor fixes for additive colour ZScript API
Sector.SetAdditiveColor actually called Sector.SetSpecialColor
Add use boolean property, used to determine whether or not to override the sector's additive wall colour with the side's additive colour.
2018-12-26 16:58:27 +01:00
Kevin Caccamo
9622ca7517 Add additive color before applying object colors
Based on what I saw in this video (https://youtu.be/Yx1tflavea8), the 
additive colors are applied before the object colors
2018-12-26 16:58:27 +01:00
Kevin Caccamo
0773e6a98e Rework implementation as per the new specification
The new specification is more flexible, and allows assigning additive 
colors to individual parts of a sector (walls, sprites, flats) and even 
individual parts of a side (top, middle, bottom)

Add AdditiveColors arrays to sector_t and side_t::part
Initialize AdditiveColors arrays to 0
Export AdditiveColors to ZScript
Save AdditiveColors in saved game files
Use colors from AdditiveColors arrays when setting the additive color 
for the render state
Add code to parse the new UDMF additive color properties
Remove additive color slot from sector color/part enum
Add SetAdditiveColor to sector_t and side_t
Add GetAdditiveColor to side_t
Export new methods and additive color arrays to ZScript
2018-12-26 16:58:27 +01:00
Kevin Caccamo
33723e8904 Implement additive colour on walls and sprites
Also, don't modify the alpha channel when adding the additive colour.
2018-12-26 16:58:27 +01:00
Kevin Caccamo
758cd77e55 Rename ColorAdd to AddColor, and use it ingame
Rename ColorAdd to AddColor
Add AddColor to FRenderState
Tweak SpecialColors array in ZScript to include the additive color
Add uAddColor to the shader compiler
Add uAddColor to the texel
2018-12-26 16:58:27 +01:00
Major Cooke
6372cdaa41 Split off pain chance triggering from ReactToDamage into its own function and gave ZScript access to it.
- TriggerPainChance(Name mod, bool forcedPain)
- One exception: PainThrehold is only checked in ReactToDamage, since this function does not require checking damage amount.
2018-12-26 11:55:42 +01:00
alexey.lysiuk
0584ecf65e - declared Actor's Morph() and UnMorph() functions virtual
They are expected to be virtual on C++ side
2018-12-25 16:27:33 +02:00
Magnus Norddahl
0c4602507e - remove shadow acne when dynlights perfectly align with planes 2018-12-23 15:13:38 +01:00
Christoph Oelckers
fcfccfe739 - fixed random number generation in SpawnFizzle.
This should now produce the same value range as Hexen's original code.
2018-12-23 12:40:26 +01:00
Christoph Oelckers
c1a86e9a4d - fixed bad attempt at restoring position in A_CustomBulletAttack. 2018-12-23 12:13:53 +01:00
Christoph Oelckers
9208fb9b77 - missed this. 2018-12-22 19:12:34 +01:00
Christoph Oelckers
36058df025 - gave the strifehumanoid's burn states dynamic lights.
Unlike everything else from the IWADs this had to use the 'light' keyword in ZScript because this is merely a base class for many others and the light definitions here need to be inheritable.
2018-12-22 16:11:18 +01:00
Christoph Oelckers
5e086ec384 - renamed back arguments of A_FireProjectile. 2018-12-22 16:11:18 +01:00
Christoph Oelckers
f6d9110c70 - removed the redundant GetOffsetPosition export and added direct native support to its existing variants 2018-12-21 13:52:30 +01:00
Christoph Oelckers
0770c0022c - cleaned up use of the random function in script files.
Many uses of random() & value have been turned into random(0, value).
This is not only more efficient, it also ensures better random distribution because the parameter-less variant only returns values between 0 and 255.
2018-12-21 12:40:05 +01:00
Christoph Oelckers
1deedd5671 - fixed PlayerInfo.FindMostRecentWeapon
returning multiple values from a subfunction is currently not working so this has to add an indirection.
2018-12-21 12:40:05 +01:00
Christoph Oelckers
9fab5f3b2c - fixed: For an initial weapon pickup, sv_unlimited_pickup wasn't checked for the included ammo. 2018-12-21 08:59:37 +01:00
Cacodemon345
789941f24d Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript 2018-12-20 22:54:45 +01:00
Player701
d049b3b3eb - Fixed the position of the soul sphere within one of the secret areas (sector 324) of Alien Vendetta MAP28. 2018-12-20 19:03:15 +01:00
Christoph Oelckers
3291d8e9ac - made Ammo.GetParentAmmo virtual 2018-12-19 18:18:15 +01:00
Magnus Norddahl
bc648015c7 - vWorldNormal is not normalized but R_DoomColormap requires this 2018-12-19 11:07:39 +01:00
Chronos Ouroboros
bb8fcd63c4 Added a function for triggering use/push specials for usage in custom monster AI. 2018-12-18 21:09:13 +01:00
Chronos Ouroboros
e7118804ba Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript. 2018-12-18 21:09:13 +01:00
Christoph Oelckers
462fe891bd - fixed: A powered up weapon which shares its ready state with the parent but is currently in a firing sequence may not force-switch the weapon, because that will cause the sequence to run in the wrong weapon's context. 2018-12-18 20:38:25 +01:00
Christoph Oelckers
1422a95aa8 Merge branch 'Texture_Cleanup'
# Conflicts:
#	src/textures/formats/multipatchtexture.cpp
2018-12-16 10:19:58 +01:00
Magnus Norddahl
f1fe9a0286 - fix vanilla light mode angle calculation 2018-12-15 10:02:57 +01:00
Christoph Oelckers
3d0fb6cf90 Merge branch 'master' into Texture_Cleanup 2018-12-15 09:45:26 +01:00
Magnus Norddahl
3af6ae4b37 - add vanilla lightmode that behaves exactly as Doom's original light did 2018-12-15 07:11:28 +01:00
Christoph Oelckers
656dbc9647 Merge branch 'master' into Texture_Cleanup
# Conflicts:
#	src/textures/texture.cpp
2018-12-14 22:36:26 +01:00
Player701
74ec789d0e - Force node rebuild for Plutonia 2 MAP29 to fix BSP glitches 2018-12-13 14:54:33 -05:00
Rachael Alexanderson
172b4bb846 - added a number of darken2.wad maps to rebuild nodes in compatibility.txt 2018-12-12 11:22:53 -05:00
Christoph Oelckers
ab624c8c5a Merge branch 'master' into Texture_Cleanup
# Conflicts:
#	src/textures/hires/hqresize.cpp
2018-12-11 20:27:24 +01:00
Player701
eb8614fc71 - Force node rebuild for Plutonia 2 MAP25 to fix BSP glitches 2018-12-11 09:15:05 -05:00
Christoph Oelckers
f6aa16947a - re-added PlayerInfo.BringUpWeapon. 2018-12-11 00:35:53 +01:00
Rachael Alexanderson
28516c2def - split gl_texture_hqresize into two variables - one for mode, one for multiplier. 2018-12-10 14:25:29 -05:00
Christoph Oelckers
91a8f5cd04 Merge remote-tracking branch 'remotes/origin/master' into Texture_Cleanup
# Conflicts:
#	src/polyrenderer/poly_renderthread.cpp
#	src/swrenderer/r_renderthread.cpp
2018-12-10 18:47:21 +01:00
Player701
888af3d684 - Added Plutonia 2 MAP10 and MAP11 to the "rebuildnodes" compatibility list. 2018-12-08 12:26:22 +01:00
Christoph Oelckers
79a0f76801 - replaced TexMan.operator() with two functions.
This was done to make reviewing easier, again because it is virtually impossible to search for the operators in the code.

Going through this revealed quite a few places where texture animations were on but shouldn't and even more places that did not check PASLVERS, although they were preparing some paletted rendering.
2018-12-07 02:53:18 +01:00
Christoph Oelckers
32e245f2b9 - moved the software rendering specific parts of the sky setup to r_skyplane.cpp. 2018-12-06 20:52:03 +01:00
Christoph Oelckers
d500dc99ea - handle the Harmony status bar icon scaling a bit more robustly.
Considering that the physical texture size should be abstracted away from modding this needs to be done differently.
Doing any calculations with physical texture sizes on the mod side is only going to cause errors so this had been changed to always return scaled size.
2018-12-06 20:21:33 +01: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
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
de5ab0b4b6 - deprecated a few functions that depend on AAPTR_* to be useful. 2018-12-05 18:33:59 +01:00
Christoph Oelckers
6c9d0b166a Added direct native entry points to a larger number of functions. 2018-12-05 17:34:11 +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
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
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
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
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
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
9e70701e50 - fixed max. ammo display on AltHud. 2018-12-03 23:34:23 +01: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
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
d96d505520 - fixed accidentally misnamed parameter in A_Explode. 2018-12-02 21:39:28 +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
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
ee08412e49 - scriptified G_PlayerFinishLevel.
Outside of SBARINFO this was the biggest remaining piece of code that referenced AInventory internals.
2018-12-02 16:26:02 +01:00
Christoph Oelckers
1f33ba2c4d - fixed incomplete null checks in A_RadiusThrust. 2018-12-02 16:06:04 +01:00
Christoph Oelckers
719598aae4 - scriptified AActor::ClearInventory 2018-12-02 15:24:44 +01:00
Christoph Oelckers
d11b33e8fd - scriptified the last components of the alternative HUD.
- moved the ALTHUDCF parser PClass::StaticInit, so that it gets done right after creating the actor definitions.

All left to do is not to reallocate the AltHud object for each frame but store it in a better suited place.
2018-12-02 14:34:10 +01:00
Christoph Oelckers
ba905321b0 - scriptified the main drawer for the in-game HUD and removed all intermediate VM calls from the native source. 2018-12-02 14:34:09 +01:00
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
4431ec06fd - scriptified the AltHUD's inventory drawer and fixed the InvPrev CCMD. 2018-12-02 14:34:09 +01:00
Christoph Oelckers
714ca9b2ce - scriptified the AltHUD's weapon drawer. 2018-12-02 14:34:08 +01:00
Christoph Oelckers
1406c11f8e - added the missing TNT1A0 check for icon-less keys.
Since it tries to get the icon from the spawn state it also has to check if that actually has a valid sprite.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
fbc441673a - AltHUD ammo drawer scriptified. 2018-12-02 14:34:08 +01:00
Christoph Oelckers
4a1f011dc1 - Alt HUD scriptification, part 1. 2018-12-02 14:34:08 +01:00
Major Cooke
49f2a38799 Fixed A_JumpIfNoAmmo not working. 2018-12-02 07:28:20 +01:00
Christoph Oelckers
a291ed21fe - fixed the AngleToVector calls in stateprovider.txt.
This looks like a search & replace gone wrong.
2018-12-02 00:41:23 +01:00
Major Cooke
e9df56198c - Restored A_SpawnItemEx's "chance" to "failchance" to prevent mod breakage from named parameters. 2018-12-01 23:39:54 +01:00
Christoph Oelckers
577af8860c - scriptified invnext and invprev CCMDs. 2018-12-01 22:37:12 +01:00
Christoph Oelckers
5c647de70c - moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory. 2018-12-01 17:46:20 +01:00
Christoph Oelckers
bc1990b6d7 - moved AInventory::DoRespawn fully to the script side. 2018-12-01 17:29:37 +01:00
Christoph Oelckers
a14b0c58bf - re-fixed the massacre fix for Dehacked-modified inventory items.
Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.

# Conflicts:
#	src/g_inventory/a_pickups.cpp
#	src/g_inventory/a_pickups.h
2018-12-01 17:20:52 +01:00
Christoph Oelckers
7301bbc58e - scriptified GiveAmmo and the one remaining piece of native code still using it. 2018-12-01 17:20:23 +01:00
Christoph Oelckers
2c59172c42 - scriptified DropInventory. 2018-12-01 17:18:26 +01:00
Christoph Oelckers
09129e0113 - scriptified UseInventory and several functions using the already scriptified ones, 2018-12-01 17:17:08 +01:00
Christoph Oelckers
588ddd185b - scriptified TakeInventory, including the ACS/FS interfaces. 2018-12-01 17:11:09 +01:00
Christoph Oelckers
023efc7685 - scriptified RemoveInventory and Inventory.OnDestroy. 2018-12-01 17:09:23 +01:00
Christoph Oelckers
eb47fb9adc - scriptified GiveInventory and made the interface a bit more configurable by mods.
Now a child type can decide for itself how to treat 'amount'.
The scripting interfaces to this function in ACS and FraggleScript have been consolidated and also scriptified.
2018-12-01 17:07:09 +01:00
Christoph Oelckers
a426655d61 - scriptified AddInventory. 2018-12-01 17:03:58 +01:00
Christoph Oelckers
aa32acae25 - a bit of code reordering for adding direct native entry points.
- offloaded key list generation for alternative HUD to non-UI parts.

This change also revealed a problem with handling empty sprites in the key list so this got fixed, too.
2018-12-01 14:18:28 +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
8e46cb3a21 Merge remote-tracking branch 'remotes/origin/master' into asmjit 2018-11-30 18:49:28 +01:00
Player701
927d333063 - Exported AActor::Grind to ZScript. 2018-11-29 23:46:47 +01:00
Christoph Oelckers
df6fe563c3 - cleaned up the sound options menu.
There were still some leftover definitions from FMod and far too many things were at the top level. Anything non-essential has been moved to the "Advanced Sound Options" submenu and the pointless sound backend switch has been removed entirely.
2018-11-29 19:42:53 +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
3acd9c8116 Made all virtual base functions for the event handler scripted
This was by far the largest block of native virtuals, and they were only native to be able to allow checking if the event was implemented for the current handler. This can easily be done by looking at the byte code, just like VMCall also does but in turn it removes more than half of the existing native virtuals from the interface.
2018-11-29 18:46:28 +01:00
Christoph Oelckers
f43f0b9bd4 - added a few more direct native entry points. 2018-11-29 00:27:09 +01:00
Christoph Oelckers
a5a9ab07af Merge branch 'master' into asmjit 2018-11-28 18:44:42 +01:00
Christoph Oelckers
7ff0cd70ad - explicitly declare the constructor and destructor methods of FCheckPosition so that they get a working prototype. 2018-11-28 17:33:37 +01:00
Player701
91ea22e85a - Fixed textures on the two switches that rise from the floor in the eastern area of TNT MAP31 2018-11-27 21:14:52 +01:00
Christoph Oelckers
5e4e9e2c2b Merge branch 'master' into asmjit 2018-11-27 19:53:22 +01:00
Alexander
4a85e24228 fixed spelling (mostly comments) 2018-11-27 19:44:06 +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
90d79865a5 Merge branch 'master' into asmjit 2018-11-25 23:33:23 +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
43d434b071 - removed AStateProvider from native code.
The only place still referencing it was CallStateChain, so this has been made a static function now instead of a class method.
2018-11-25 10:09:06 +01:00
Christoph Oelckers
f4789bdefc - fixed handling of dummy flags. 2018-11-25 10:06:00 +01:00
Christoph Oelckers
d6b781312c - removed all remaining native components of the weapon class. 2018-11-25 10:00:55 +01:00
Christoph Oelckers
70d3c31551 - allow defining flags in the script declaration of a class and do that for Weapon. 2018-11-25 09:29:12 +01:00
Christoph Oelckers
b5c4ab8c47 - removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2018-11-25 08:17:37 +01:00