Commit graph

24 commits

Author SHA1 Message Date
antoniou79
f17eb9980b ASYLUM: Use decimal values for angle tables
The angle unit is in degrees
2025-01-08 18:45:06 +02:00
antoniou79
a8e97ffc1b ASYLUM: Fix crash for game menu
And also clean up code and fix eyes movement to match original

This fix was proposed by eriktorbjorn in a previous PR https://github.com/scummvm/scummvm/pull/6383 (now closed in favor of this one).

This prevents an overflow for int32 in Actor::getAngle() for the calculation of the "index" variable value, which would happen (before) when diffY would be >= 0x800000 (ie. 2^23) and was multiplied by 256 (ie. 2^8). This, in the context of the game's main menu would happen when moving the cursor to the top part of the screen.

The code in getAngle() is also cleaned up to be more readable.

An additional fix for the values of angleTable03[] is included, since previously it was populated by wrong hex values. What seems to have happened here was that the decimal values were wrongly entered as hex values by putting the "0x" prefix on the literal.

This is a potential fix for bug ticket: https://bugs.scummvm.org/ticket/15658
2025-01-08 18:45:06 +02:00
Cameron Cawley
3e4640a7ed ASYLUM: Use the actor constants in more places 2024-06-26 10:28:09 +03:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
alxpnv
77a35a5c75
ASYLUM: get rid of global constructors 2021-05-17 15:37:56 +02:00
alxpnv
ac43968c47
ASYLUM: formatting 2021-05-17 15:37:55 +02:00
alxpnv
48e164b2d7
ASYLUM: clean up includes 2021-05-17 15:37:54 +02:00
Littleboy
8f2a9464e0
ASYLUM: Fix initialization of second portrait in Encounter::initPortraits()
- Rename keyword start index member
2021-05-17 15:37:19 +02:00
Littleboy
99f2521155
ASYLUM: Cleanup Menu class 2021-05-17 15:37:15 +02:00
Littleboy
44540643e8
ASYLUM: Cleanup base classes
- Made some public members of cursors private and add accessors
 - Add const modifiers as needed
 - Add missing casts
 - Add some null-pointers checks
 - etc.
2021-05-17 15:37:15 +02:00
Julien Templier
cae5eaa927
ASYLUM: Implement Actor::checkPath() 2021-05-17 15:36:59 +02:00
Julien Templier
1db67c5c88
ASYLUM: Remove SVN keywords 2021-05-17 15:36:57 +02:00
Julien Templier
2a785f0b52
ASYLUM: Implement Menu::clickSaveGame()
- Handle delete key as backspace
- Handle keypad period as delete
- Correct invalid width test when typing save name
- Fix problems with Menu::clickDeleteGame()

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@695 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:41 +02:00
Julien Templier
9ce5f05ba9
ASYLUM: Implement Menu::updateViewMovies()
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@685 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:39 +02:00
Julien Templier
3d7b00db63
ASYLUM: Implement some menu helper functions
- Switch last two rects (the icons are "inversed")
- Remove now useles EyesAnimation enumeration

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@601 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:27 +02:00
Julien Templier
8a6d76b65e
ASYLUM: Overhaul event handling
- Cleanup game initialization
- Update event loop to use the defined handler
- Menu is now the default event handler
- Implement eye direction update using existing Actor helper method
- Add stubs for all menu update & click event handlers

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@600 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:27 +02:00
Julien Templier
4ddf064c3f
ASYLUM: Implement Encounter init methods
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@586 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:24 +02:00
Julien Templier
b090514dbd
ASYLUM: Add missing case in Speech::playIndexed
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@551 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:19 +02:00
Julien Templier
f0c46d5e7c
ASYLUM: Implement remaining opcodes
- Add relevant needed stubs in Actor/Sound/Scene/Screen/Engine classes
- Have Encounter & BlowUpPuzzle compile again

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@470 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:07 +02:00
Julien Templier
744b1c1a80
ASYLUM: Introduce GameFlag enumeration
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@465 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:36:06 +02:00
Alex Bevilacqua
7485e6ad7f
ASYLUM: a little more formatting
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@407 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:35:57 +02:00
Alex Bevilacqua
7506f2d470
ASYLUM: minor whitespace cleanup
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@406 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:35:57 +02:00
Alex Bevilacqua
9e8cd4c502
ASYLUM: move video subtitle resource lookup table to staticres
git-svn-id: http://asylumengine.googlecode.com/svn/trunk@405 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:35:57 +02:00
Alex Bevilacqua
63b9cfeb0a
ASYLUM: commit staticres.h (forgot to do an svn add :P)
svn props for speech.cpp/h

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@392 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
2021-05-17 15:35:55 +02:00