Commit Graph
215 Commits
Author SHA1 Message Date
Filippos Karapetis 155bba57d3 ASYLUM: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08: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
alxpnv 3a17edceaa ASYLUM: rename Actor::clearFields() 2022-11-02 14:18:07 +03:00
alxpnv e2e3ec2dd5 ASYLUM: fix showing Sarah's reflection in Chapter 4b 2022-11-02 13:57:01 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
alxpnv 0c82035515 ASYLUM: fix unsigned wrap around 2021-12-08 11:36:18 +03:00
alxpnv 7ec7e45043 ASYLUM: fix invalid direction crash
Bug no. 13130
2021-12-06 14:21:27 +03:00
alxpnv 6a53897ac3 ASYLUM: switch lighting effects to synchronous model 2021-11-25 14:55:25 +03:00
alxpnv 5c73fbc8e1 ASYLUM: remove duplicated code in Actor::update() 2021-11-22 14:08:44 +03:00
alxpnv a930286e6c ASYLUM: fix checking region flag in Actor::actionAreaCheck() 2021-11-22 14:08:44 +03:00
Orgad Shaneh 57cdbc9072 ASYLUM: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
alxpnv 146941f368 ASYLUM: formatting 2021-10-25 13:07:57 +03:00
alxpnv b8cfb363a3 ASYLUM: fix buffer overruns in Actor::getStride()
CIDs 1457938 and 1457990
2021-09-20 15:36:45 +03:00
alxpnv 2fd785c12c ASYLUM: add support for Sanitarium Demo 2021-08-30 15:50:15 +03:00
alxpnv 75c1b820ea ASYLUM: rename two ActorStatus values and related opcodes
kActorStatusPickupItem -> kActorStatusStoppedInteracting
kActorStatus20 -> kActorStatusStoppedHitting

Interact -> WalkToActor
UpdateActor -> Interact
2021-06-11 13:29:30 +03:00
alxpnv de625e4f53 ASYLUM: rename more Actor methods
Also removed Actor::compare()
2021-06-10 13:34:27 +03:00
alxpnv 7df4708049 ASYLUM: rename Actor::updateStatus1*() methods 2021-06-10 13:34:27 +03:00
alxpnv 8ba3df6821 ASYLUM: refactor inventory 2021-06-04 12:53:52 +03:00
alxpnv 1746134db6 ASYLUM: prevent Armed Max from going to idle state 2021-05-24 15:58:18 +03:00
alxpnv c81c046450 ASYLUM: clean up destructors 2021-05-17 15:37:58 +02:00
alxpnv 77a35a5c75 ASYLUM: get rid of global constructors 2021-05-17 15:37:56 +02:00
alxpnv c78293e4ce ASYLUM: simplify computation of inventory ring points 2021-05-17 15:37:55 +02:00
alxpnv ac43968c47 ASYLUM: formatting 2021-05-17 15:37:55 +02:00
alxpnv 15bb6fd728 ASYLUM: replace 'Fallback to next case' comments with 'fallthrough' 2021-05-17 15:37:53 +02:00
alxpnv 263e20c004 ASYLUM: replace sprintf() with snprintf() 2021-05-17 15:37:53 +02:00
alxpnv 5b32634e45 ASYLUM: remove superfluous returns 2021-05-17 15:37:52 +02:00
alxpnv f1c0563024 ASYLUM: prevent actors from getting stuck when standing close to each other 2021-05-17 15:37:51 +02:00
alxpnv efcae39518 ASYLUM: fixes to Actor::canInteract() 2021-05-17 15:37:50 +02:00
alxpnv 8d1c397c48 ASYLUM: fix object 30's frameIndex ouf of range 2021-05-17 15:37:50 +02:00
alxpnv e11f8232cb ASYLUM: fix a few bugs in reflection positioning 2021-05-17 15:37:50 +02:00
alxpnv e6f2916eea ASYLUM: access chapter 2 data using a single array 2021-05-17 15:37:49 +02:00
alxpnv b2a9192793 ASYLUM: make AsylumEngine::getRandom() generate a number from [0; max) to match the original 2021-05-17 15:37:49 +02:00
alxpnv 2d5d820c93 ASYLUM: add a missing else 2021-05-17 15:37:48 +02:00
alxpnv b754af14d6 ASYLUM: fix tentacle's status update 2021-05-17 15:37:48 +02:00
alxpnv 8eb94fc95e ASYLUM: restart chapter 11 properly 2021-05-17 15:37:48 +02:00
alxpnv c5547820fe ASYLUM: fixes to chapter 11's hard-coded logic 2021-05-17 15:37:48 +02:00
alxpnv 74f1691ca1 ASYLUM: fix inventory ring drawing 2021-05-17 15:37:48 +02:00
alxpnv bc3ebf36db ASYLUM: implement Special::chapter11() 2021-05-17 15:37:48 +02:00
alxpnv 54fe4387c5 ASYLUM: corrections to Scare Crow behavior 2021-05-17 15:37:44 +02:00
alxpnv f60246580b ASYLUM: fix Actor::isOnScreen() 2021-05-17 15:37:44 +02:00
alxpnv 27f69f5a32 ASYLUM: fix kActorStatusWalking2 updating 2021-05-17 15:37:44 +02:00
alxpnv b725db3de0 ASYLUM: identify more ActorStatus values 2021-05-17 15:37:44 +02:00
alxpnv 4fb8b25682 ASYLUM: add a separate debug channel for script commands 2021-05-17 15:37:44 +02:00
alxpnv e4af6a5045 ASYLUM: fix Actor::hasMoreReactions() 2021-05-17 15:37:42 +02:00
alxpnv c1a974d415 ASYLUM: small fixes to Actor::update() 2021-05-17 15:37:42 +02:00
alxpnv 46c7750585 ASYLUM: unblock chapter 11 2021-05-17 15:37:40 +02:00
alxpnv 761d99e299 ASYLUM: fix index out of range 2021-05-17 15:37:39 +02:00
alxpnv f1da4bf798 ASYLUM: fix chapter 13 loading 2021-05-17 15:37:38 +02:00
alxpnv 305b370e5c ASYLUM: fix JumpIfActorCoordinates 2021-05-17 15:37:37 +02:00