Commit Graph

3461 Commits

Author SHA1 Message Date
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 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
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