59 Commits

Author SHA1 Message Date
athrxx
1831f02c36 KYRA: (EOB/LOL) - reduce text displayer hacks
Trying to make this code a bit less ugly. It has been
hacked up by basically every Japanese and Chinese
version in different ways. This is a start to revert some
of the hacks.
2023-07-11 14:34:56 +02:00
athrxx
5e8333f638 KYRA: (EOB II/ZH) - fix/improve text display
The text display glitches in many different ways, since the
original devs did some pretty ugly hacks that we have to
emulate somehow. This commit fixes a couple of things
(spacing, pixel/line overdrawing, shadow, original
linebreak style). There are still several things that have to
be addressed separately, like various text colors, the
whole character portrait/stats pages, etc.
2023-07-11 14:34:52 +02:00
athrxx
5c8e799b22 KYRA: some var renames 2023-05-12 14:52:43 +02:00
Vladimir Serbinenko
09051b940d KYRA: Adjust layout of exit button in Chinese LoL 2023-04-30 20:01:06 +02:00
Vladimir Serbinenko
230803ec2b KYRA: Use FID_CHINESE_FNT in Chinese LoL 2023-04-30 20:01:06 +02:00
Cameron Cawley
28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Cameron Cawley
ef07d1621e KYRA: Use SeekableReadStreamEndianWrapper 2022-11-29 00:06:49 +01:00
Le Philousophe
dbe47a28ba KYRA: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
athrxx
7204eaaf34 KYRA: more code style cleanup 2022-09-24 15:44:14 +02:00
athrxx
b44471c6b8 KYRA: add sanity asserts 2022-09-23 02:27:42 +02:00
athrxx
3a49ea6248 KYRA: reduce unsafe string ops
(replace all strcpy calls and similar fixes)
2022-09-22 21:01:16 +02:00
athrxx
6378e505b5 KYRA: init non-initialized member vars 2022-09-20 00:27:09 +02:00
athrxx
e6ba0eff15 KYRA: (DOS/CD) - add workaround for text glitch
(in the cave with the bridge, when falling into the river)
2022-06-23 19:06:09 +02:00
athrxx
6d83986bca KYRA: (LoK/KOR) - more font related fixes
e. g.
- font spacing
- scene message field
- ingame menus
- Brynn's note
2022-06-09 00:49:05 +02:00
athrxx
b874bfb016 KYRA: (LoL/KOR) - fix script handling 2022-06-09 00:49:05 +02:00
eientei
7c0659d859 KYRA: Extract Korean strings, preliminary work 2022-06-09 00:49:05 +02:00
athrxx
4d37fb08b6 Revert "KYRA: (HOF) - add script var check"
This reverts commit 1030283cf44605fa385fa4cb679d58cf6b938dbd.

Giving this some more thought, it seems the safer thing to do. In practive, it shouldn't matter. I haven't encountered a single situation with an emty string...
2022-06-03 14:17:51 +02:00
athrxx
1030283cf4 KYRA: (HOF) - add script var check
(follow-up to https://github.com/scummvm/scummvm/pull/3949)
2022-06-03 02:19:19 +02:00
Orgad Shaneh
5d4baa980e KYRA: Fix pointless NULL validation
Reported by GCC 12:
../scummvm/engines/kyra/script/script_hof.cpp: In member function 'int Kyra::KyraEngine_HoF::o2_defineSceneAnim(Kyra::EMCState*)':
../scummvm/engines/kyra/script/script_hof.cpp:875:32: warning: comparing the result of pointer addition '(((const char*)script->Kyra::EMCState::dataPtr->Kyra::EMCData::text) + ((sizetype)READ_BE_UINT16((((const void*)script->Kyra::EMCState::dataPtr->Kyra::EMCData::text) + ((sizetype)(((int)((Kyra::KyraEngine_HoF*)this)->Kyra::KyraEngine_HoF::<anonymous>.Kyra::KyraEngine_v2::<anonymous>.Kyra::KyraEngine_v1::emcSafeReadStack(script, 12, 875, ((const char*)"../scummvm/engines/kyra/script/script_hof.cpp"))) << 1))))))' and NULL [-Waddress]
  875 |         if (stackPosString(12) != nullptr)
2022-06-03 02:12:46 +02:00
athrxx
e5b35d05e9 KYRA: (LOL) - fix stack access warning 2022-05-22 19:58:06 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
athrxx
b2a1931e40 KYRA: fix outdated comment 2021-12-03 22:43:09 +01:00
athrxx
80812c2f9e KYRA: (LoK/Mac+FM-Towns) - fix fireberry cave glitch
(Thanks to eriktorbjorn for this. I would never have seen this)
2021-12-03 21:31:15 +01:00
athrxx
f436ebbeb0 KYRA: (HOF/Traditional Chinese) - fix ingame texts
(adjust ui, text formatting, menus, etc)
2021-12-01 22:39:24 +01:00
athrxx
a7fda28519 KYRA: (LoK/Traditional Chinese) - finish support
(add font drawing, gui and text formatting fixes etc.)
2021-11-15 01:01:25 +01:00
Orgad Shaneh
da751361a4 KYRA: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
14f516282c KYRA: Replace new[]/memset with new[]() 2021-11-10 19:53:15 +01:00
athrxx
b772bfff2c KYRA: (LoK) - allow quitting the game during Malcolm/Cave sequence 2021-11-09 22:27:07 +01:00
athrxx
f74395715e KYRA: (LOL) - fix invalid script stack access
Thanks to benoit-pierre for finding this.

(see PR #3448, https://github.com/scummvm/scummvm/pull/3448)

I chose a different approach for the fix, since I wanted an easy way of detecting/preventing this for similiar cases and I also didn't want to have so much extra code in that particular script function.
2021-10-24 15:16:19 +02:00
athrxx
ea386eda87 KYRA: (LOL) - fix sound index read on BE platforms (bug no. 12987)
regression from 3ae1d92f
2021-10-14 15:40:30 +02:00
athrxx
072c54318d KYRA: (LOL) - replace sound list char* array with Common::StringArray 2021-10-12 20:45:52 +02:00
athrxx
0afbbd6b20 KYRA: (LOL) - add support for playable talkie demo 2021-04-27 23:12:12 +02:00
athrxx
897173cbac KYRA: (MR/Chinese) - more font related tweaks
(font shading and placement, interface adjustments, etc)
2021-04-27 22:07:24 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Vladimir Serbinenko
280f83242e
KYRA: replace const char * with Common::String around getTableString. (#2603)
Currently const char * points into some random buffer with unclear
lifetime.

Instead use Common::String which ensures lifetime as long as a reference is
held.

This also removes the need of copying into existing buffers in HoF and MR.

UnkBuf* are gone as well.

Co-authored-by: athrxx <athrxx@scummvm.org>
2021-01-01 16:37:27 +01:00
Vladimir Serbinenko
7cda72a79c
KYRA: Fix crash in Siberian Goblin translation of HoF (#2609)
* KYRA: don't attempt to execute functions out of bounds

This fixes crash in Siberian Goblin translation of HoF on scarecrow scene

* KYRA: Add sanity check not to execut out of bounds
2020-11-06 17:00:30 +01:00
Dmitry Gladkov
11368b7d90
KYRA: Support Russian LoK translation by Siberian GRemlin (#2544)
* KYRA: Support Russian LoK translation by Siberian Gremlin

* Mention source of engine data translation

* Mark Russian CD as fan translation to force subtitles
2020-10-18 23:24:11 +02:00
athrxx
7b66f1191d KYRA: whitespace cleanup 2020-08-29 23:50:29 +02:00
athrxx
1ad4925c4e KYRA: (EOB/SegaCD) - hopefully fix Woverloaded-virtual warning 2020-07-30 23:11:29 +02:00
athrxx
dda1559f03 KYRA: (EOB/SegaCD) - SegaCD sound effect adjustments 2020-07-30 22:19:21 +02:00
athrxx
b48a37dc2f KYRA: (EOB/SegaCD) - fix various sequences and gameover screen
(xdeath sequence, portal sequence, npc sequences)
2020-07-30 22:19:15 +02:00
athrxx
a904ba4f48 KYRA: (EOB/SegaCD) - fix text display, inventory and stats page 2020-07-30 22:19:14 +02:00
athrxx
91b18f8343 KYRA: (EOB/SegaCD) - more graphics and sequence player code
- add support for the Sega Font and add text display methods at least for the sequence player
- finish sequence player (add all missing opcodes and other missing code portions)
- some improvement to the resource class
- some renaming and cleanup
2020-07-30 22:19:09 +02:00
mataniko
2f5eb14d4b JANITORIAL: Rename additional RTL references and comments 2020-05-12 10:36:38 +02:00
Bastien Bouclet
551ed6218a KYRA: Add override keywords 2020-02-09 12:43:15 +01:00
athrxx
0239ed5e96 KYRA: (HOF) - fix bug #11331
This reverts the change from 1d5fd780 which was clearly wrong and caused this new bug (no idea what I was thinking there).  To prevent the revival of bug #3721 I now added the proper code for a fix after tracking the whole bug with the DOSBox debugger.
2020-02-01 21:09:50 +01:00
athrxx
8485fdca7e KYRA: (MR) - really fix animation glitch (bug #11312)
The invalid table access takes place in several more locations. I missed the location that is actually responsible for the reported bug in my last fixing attempt (due to the fact that this bug is based on undefined behavior that results from the invalid mem access: in MSVC the bug is nonexistent, with GCC builds it seems to depend on whether they're optimized or not). The location that actually requires the fix is in KyraEngine_MR::enterNewSceneUnk2(). I have now fixed all locations where the table can be incorrectly accessed. The other locations have been marked with comments.
2020-01-15 17:07:25 +01:00
athrxx
40bf41bf30 KYRA: (LOK) - workaround for green potion animation
The optional green potion that can be made at the alchemists' crystals can lead to invalid memory access. The animation frames aren't properly cleaned up like in the snake poisoning sequence.
I just add the same handling as as workaround.
2020-01-08 23:14:34 +01:00
athrxx
24d0159e79 KYRA: (LOK) - fix mouse cursor bug (see #11303) 2020-01-08 20:27:54 +01:00
athrxx
a48591ae0d KYRA: (HOF) - fix bug #10877 (Sound issues in the Legend of Kyrandia 2) 2019-12-22 19:09:34 +01:00