Commit graph

135 commits

Author SHA1 Message Date
Christoph Oelckers
a4d61e6fb1 - everything compiles again.
As a bonus this already fixes several bugs caused by the botched texture scaling implementation the original texture manager came with.
System cursors are currently disabled because they rely on functionality that needs to be moved to different classes.
2018-12-06 20:12:15 +01:00
Christoph Oelckers
6eab4a882c - narrowing down the public interface of the texture class
Cannot refactor if the entire class is this wide open to everything.
Not complete yet, doesn't fully compile!
2018-12-06 01:11:04 +01:00
Christoph Oelckers
a7e472b4b3 - moved all exports from class Font to vmthunks.cpp and gave them direct native entrypoints.
- changed PARAM_STRING to use the passed string by reference instead of by value. The 3 instances where passing by value was needed now use PARAM_STRING_VAL.
2018-12-01 10:30:50 +01:00
Christoph Oelckers
25ad71a113 - Changed a few allocations into usin TArrays
S_SoundCurve in particular looked like a candidate for leaking memory.
2018-11-30 17:07:42 +01:00
Christoph Oelckers
0d54d335c4 - use a saner data structure to store the BrokenLines.
Calling the old method with a pointer to an array of unspecified length 'dirty' would be an understatement.
Now it uses a TArray to store the single elements
2018-10-31 19:13:54 +01:00
alexey.lysiuk
050d72724f - fixed: always initialize active colors in special font
https://forum.zdoom.org/viewtopic.php?t=61859
2018-08-31 10:42:53 +03:00
alexey.lysiuk
2ae8d39441 Removed all superfluous #include's
Automatically optimized by CLion IDE with manual corrections
2018-04-24 14:30:35 +03:00
Christoph Oelckers
6d6196388e - made SPROFS a more usable feature.
This was originally invented to fix the sprite offsets for the hardware renderer.
Changed it so that it doesn't override the original offsets but acts as a second set.
A new CVAR has been added to allow controlling the behavior per renderer.
2018-03-31 10:37:46 +02:00
Christoph Oelckers
a001a5304d - removed the old software renderer framebuffers for Windows
This cannot be refactored with the old code still present and done properly both renderers should share what they can.
2018-03-30 23:18:25 +02:00
Christoph Oelckers
e89a598b31 - renamed FTexture's UseType flags and gave them a dedicated type.
This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
2018-03-25 20:26:16 +02:00
Christoph Oelckers
7301001a3f - made the necessary adjustments to the HW2D interfaces to handle alpha textures properly.
These cannot be done with the regular textures so there needs to be an option to create more than one native texture per FTexture. For completeness' sake there is also the option now to create a paletted version of a texture if the regular one is true color. This fixes a long standing problem that translations were not applied to non-paletted textures.
2018-03-23 23:04:30 +01:00
Christoph Oelckers
f4d9ad1123 - extended FTexture::GetPixels and FTexture::GetColumn by a RenderStyle parameter.
Now it is no longer necessary to provide specially set up textures for rendering shaded decals, they can use any PNG texture now that contains a proper red channel.
Handling of the alPh chunk has been removed as a result as it in no longer needed.
2018-03-18 21:33:44 +01:00
Christoph Oelckers
a399d79f8a - minor reformatting. 2018-03-18 14:18:42 +01:00
Christoph Oelckers
b939836846 - renamed FileRdr back to FileReader. 2018-03-11 19:29:37 +01:00
Christoph Oelckers
0be1ed252b - rewrote the operator>> methods of FileReader as normal functions for clarity. 2018-03-11 18:20:49 +01:00
Christoph Oelckers
5fa63c396d - sound code and most of texture code converted to FileRdr.
This allowed to remove a lot of bad pointer voodoo in the music loader, because the new class does not allow duplication of the reader object
2018-03-10 18:45:11 +01:00
Christoph Oelckers
cc54db6e6d - let the 3 relevant text functions handle UTF-8 strings
These functions are: DCanvas::DrawTextCommon, V_BreakLines and FFont::StringWidth.
This will allow strings from UTF-8 encoded assets to display properly, but also handle the OpenAL device name on international systems, as this will be returned as an UTF-8 string.

Due to backwards compatibility needs the decoding function is rather lax to allow both UTF-8 and ISO 8859-1 to pass through correctly - and this also implies that it will allow mixed encodings which may happen if strings from different sources get concatenated.
2017-12-02 21:21:57 +01:00
alexey.lysiuk
724d711d1f Fixed a few cases when IWAD was checked by hardcoded index 2017-10-21 11:10:36 +03:00
alexey.lysiuk
f174111128 Fixed read beyond buffer boundary during font color parsing
Printing of string that ends with '\c' led to undefined behavior
Example: 'echo \c' in console
2017-09-23 11:57:06 +03:00
Rachael Alexanderson
765646ee1c - fixed: Changed IWAD_FILENUM to a dynamic lookup. 2017-09-13 04:19:03 -04:00
Christoph Oelckers
aa8424982c - fixed: The color for untranslated font was missing its alpha channel. 2017-08-12 12:04:40 +02:00
alexey.lysiuk
f4672d67bc Fixed crash when drawing untranslated font
https://forum.zdoom.org/viewtopic.php?t=57268
2017-07-19 13:24:19 +03:00
Christoph Oelckers
6599e2c425 - moved the VM types into their own file and only include it where really needed. 2017-04-13 01:12:04 +02:00
Christoph Oelckers
01b095c911 - added colorization for untranslated fonts. This uses the light color of the vertices. The software rendered 2D code will ignore this infomation.
- added a virtual OnRetrun method to menus.
2017-03-29 21:22:05 +02:00
Christoph Oelckers
622b4a6457 - switched over to the scripted intermission screens. 2017-03-18 21:19:32 +01:00
Christoph Oelckers
c008ddaf66 - replaced homegrown SWORD, SBYTE and uint32_t types. 2017-03-09 19:31:45 +01:00
Rachael Alexanderson
cc9a2e5121 Merge https://github.com/coelckers/gzdoom 2017-03-08 21:25:24 -05:00
Christoph Oelckers
8ab562ef13 - the fourth. 2017-03-08 18:55:54 +01:00
Rachael Alexanderson
7a5df2bc28 Merge commit 'b0eb19b' 2017-02-26 13:41:02 -05:00
Christoph Oelckers
b0eb19bbc8 - added an option to define untranslated fonts through FONTDEFS. Note that due to how the fonts work they cannot be colorized AT ALL! 2017-02-26 19:29:27 +01:00
Rachael Alexanderson
8c176575c8 Merge https://github.com/coelckers/gzdoom 2017-02-12 21:39:20 -05:00
Christoph Oelckers
947b625c50 - all menu items scriptified, but not yet active. 2017-02-11 16:11:48 +01:00
Rachael Alexanderson
a52f79055d Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/menu/playerdisplay.cpp
2017-02-11 05:05:24 -05:00
Christoph Oelckers
be9b2b38fc - ColorpickerMenu.MouseEvent exported. 2017-02-10 11:44:46 +01:00
Rachael Alexanderson
942f90a759 Merge remote-tracking branch 'gzdoom/master' 2017-02-05 16:07:48 -05:00
Christoph Oelckers
d8a1ce88b0 - a few more exports from FFont. 2017-02-05 13:55:38 +01:00
Christoph Oelckers
b570d0819b - streamlined font handling for scripts a bit.
- moved the two 'you raised the alarm' messages for Strife to the string table
2017-02-05 13:14:22 +01:00
Rachael Alexanderson
59f32d497d Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/r_things.cpp
#	src/v_draw.cpp
2017-02-05 00:08:01 -05:00
Christoph Oelckers
abac756289 - exported some stuff for fonts and screen size that will be needed for the menus. 2017-02-04 00:46:22 +01:00
Rachael Alexanderson
a78b713f4b Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/v_video.cpp
2016-12-06 18:19:08 -05:00
Christoph Oelckers
21e3aba1c7 - optionally allow passing a script position object to V_GetColor and subfunctions for better error output. Implemented this for all occurences where this info was available. 2016-12-03 16:27:53 +01:00
Magnus Norddahl
5ef46d1730 Merge remote-tracking branch 'gzdoom/master' into qzdoom 2016-09-24 09:37:18 +02:00
Christoph Oelckers
f93e4813d1 - removed farchive.cpp and .h 2016-09-22 00:48:22 +02:00
Christoph Oelckers
ab43e0c8cb - all thinker serializers done. 2016-09-20 00:41:22 +02:00
Magnus Norddahl
8ba6a4f175 Precache, Unload and FillSimplePoly bug fix 2016-06-13 21:39:55 +02:00
Christoph Oelckers
db86385cf6 - removed STACK_ARGS.
The only reason this even existed was that ZDoom's original VC projects used __fastcall. The CMake generated project do not, they stick to __cdecl.
Since no performance gain can be seen by using __fastcall the best course of action is to just remove all traces of it from the source and forget that it ever existed.
2016-04-11 10:46:30 +02:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Braden Obrzut
88a616da75 - Removed what appears to be a debug breakpoint.
- Cleared some GCC and Clang warnings. Mostly static analysis false positives, but one of them generated a pretty massive warning in a release build.
- Use -Wno-unused-result since I doubt we're going to address those unless they actually prove to be a problem (and they only appear in release builds).
2016-01-23 19:36:13 -05:00
Christoph Oelckers
ca4179caa3 - allow texture lookup by full path names. Due to technical limitations this may result in double textures if the same graphics lump is also referenced by its short texture name. 2014-05-13 20:51:16 +02:00
Edoardo Prezioso
1fb757f6f1 - Fixed useless 'array != NULL' check.
- 'notranslate != NULL' is completely useless, because 'notranslate' is an array, hence removed.
- I interpreted 'SbarInfoScript != NULL' as a typo, since 1)in the next expression inside the condition there's a dereference to 'SBarInfoScript[SCRIPT_CUSTOM]' and 2)'SBarInfoScript[SCRIPT_CUSTOM]' is checked against 'NULL', in line 352, and then dereferenced when introducing 'cstype'.
2014-03-01 22:27:40 +01:00