Commit graph

123 commits

Author SHA1 Message Date
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
Randy Heit
8565484e29 - Heretic and Hexen can now have their big fonts overridden by a font named "HBIGFONT". In
addition, a font named "BIGFONT" will override the big font for every game.

SVN r4302 (trunk)
2013-06-01 02:04:44 +00:00
Braden Obrzut
dabd48ab81 - Fixed: 4, 2, and 1 bit grayscale images weren't properly supported.
- Fixed: Valgrind uninitialized memory error and a signed/unsigned warning.

SVN r4288 (trunk)
2013-05-26 04:03:47 +00:00
Randy Heit
ce28c9c991 - Added parentheses for clarity.
SVN r4286 (trunk)
2013-05-26 00:53:48 +00:00
Randy Heit
6ada6158ef - Added a fallback for accented characters to use unaccented ones.
- Updated Portuguese strings with the version here: http://forum.zdoom.org/viewtopic.php?p=672839#p672839

SVN r4271 (trunk)
2013-05-17 02:35:35 +00:00
Randy Heit
cc5110575f - Fixed: The constructor for single-lump fonts did not initialize the Cursor field.
SVN r4239 (trunk)
2013-04-30 03:14:49 +00:00
Braden Obrzut
c845675b9b - Fixed: When using PALVERS on the sky, it used the scaling from the true color version. (Side Note: I changed a line that scales the sky position according to the y scaling factor. This is because a 2x high resolution sky at 2048x256 wasn't positioned the same as a 1024x128 unscaled version. I moved the expression to the > 200 height path only, but I'm not sure if it's even still needed.)
- Fixed: PALVERS crashed with unknown textures since a value was never given for %s.
- Fixed: FON2 loader didn't set ActiveColors correctly.

SVN r3973 (trunk)
2012-11-30 23:36:02 +00:00
Braden Obrzut
cb296a6660 - Fixed: Valgrind error when copying the FON2 palettes.
SVN r3812 (trunk)
2012-08-07 20:09:07 +00:00
Braden Obrzut
5f4889d99e - Backported SPACEWIDTH for fontdefs from ECWolf.
SVN r3811 (trunk)
2012-08-07 08:11:56 +00:00
Braden Obrzut
6af0744f75 - Removed unused variable in v_font.cpp.
SVN r3810 (trunk)
2012-08-06 20:59:52 +00:00
Braden Obrzut
70d8daa341 - Merged some ECWolf's font code changes. In particular support for retranslating the fonts should the palette change at run time. (This required storing what lump the font was generated from for FON1. This information is stored in FFont since ECWolf also uses the information to allow FONTDEF fonts to be overriden with single lump fonts consistently, but I didn't merge that part as it might break something.)
SVN r3808 (trunk)
2012-08-06 10:25:51 +00:00
Braden Obrzut
cb413c600e - Fixed: Memory error when loading BMF palettes.
- Fixed: When locating WhiteIndex and BlackIndex in the palette index 0 was skipped.
- Fixed: When filling an area black for vid_fps or pillarbox/letterbox use GPalette.BlackIndex instead of assuming palette index 0 is black.

SVN r3807 (trunk)
2012-08-06 09:49:15 +00:00
Christoph Oelckers
1529c91b80 - fixed: FFont::GetChar was unable to handle 8 bit signed chars.
SVN r3556 (trunk)
2012-04-12 17:33:55 +00:00