Some merged polygons for obstacles would get duplicate vertices
This could result in bad pathfinding and actors being stuck while walking to their destinations.
A soft lock could occur, for example in RC02, with Runciter walking to his desk to get
the camera disc, if he started at a point like -15.78f, -1238.894287f, 108432.14f
(ie. Actor_Set_At_XYZ(kActorRunciter, -15.78f, -1238.894287f, 108432.14f, Actor_Query_Facing_1024(kActorRunciter));)
Same could happen to the player's actor, but in Runciter's case from the above example,
the player loses control until Runciter gets the disc and gives it to McCoy, but since
Runctiter never reaches the waypoint to get the disc, the game is soft locked.
This will not automatically fix a scene's obstacles loaded from an old saved game.
For those cases, the player will have to exit the scene and re-enter for the obstacles
to be properly recalculated.
Add it to engines that have MIDI playback.
This essentially compiles the emulator only when an engine that
can potentially use it (e.g. MIDI) is enabled
Prevents compiler warning for potential uninitialized use of color
This would happen if getPixel() dealt with a Surface whose bytePerPixel would be a value other than 1, 2 or 4. So highly unlikely.
This avoids to accmulate all the pages from the previous scenes and
filling the memory on platform without much (like Wii).
This is implemented by adding a doubly circular linked list to the Page
structure.
Every page is moved at the end of the list when it is accessed and a
garbage collection process happens everytime a new page is allocated.
At this time, all pages (starting by the end) unused for 60 seconds are
discarded.
Fixes bug #15321
Prevents a soft lock if Izo is clicked for his final question before he reaches his waypoint outside of his pawn shop in Act 2.
This is also an original game bug.
Generates a new seed for random numbers at the exact point when a new game starts to initialize
Additionally, this command will use a custom seed, if any (set from ScummVM Global Options), for the new game.
And, this avoids the issue of intermediate calculations of random numbers, during setup() initializations
(via initScript.SCRIPT_Initialize_Game()) or in KIA menu, eg. when adjusting speech volume, before starting a new game,
which would result in the new game starting with a different seed than the one set from ScummVM Global Options.
This fixes a (potential) crash when launching ScummVM with boot params and then starting a NEW GAME from KIA menu
Example of cmd line that would lead to crash in the above scenario: scummvm -d0 -b 4021004 bladerunner-win
Allow keeping the designers cut mode if the player sets it in KIA before starting a New Game
This is different from the original behavior, but the code for RC01 (a dialogue cue from the intro is intended to be skipped in designers cut mode) shows that is the intended behavior. Also, setting McCoy's mood in KIA before starting a New Game, maintains the setting, so this change is also consistent with that behavior.
When reaching Izo with no clues to discuss, in Easy Mode, Izo takes the photo anyway
This is only enabled for Restored Content as of yet.
The steps "required" to reach Izo with no clues are:
- It's for Easy Mode only
- It's for Restored Content mode only
- Don't pick up the shell casings at Runciters (Act 1)
- Don't find Lucy's anklet jewelry via ESPER
- Don't interview Grigorian at all
- Don't pick up the dragonfly jewelry outside the Gravity lab (Act 2)
- Find the Kingston Kitchen takeout box either from the Gravity lab scene or via ESPER (Act 2)
- Don't find Sadik's face via ESPER before talking to Izo (Act 2)
- Visit Animoid Row and talk directly to Izo (don't interview the Peruvian lady nor Bullet Bob).
This case is a bit odd since, with this fix, which only applies to Easy Mode,
it's easier and faster to trigger Izo's taking the photo when McCoy has no clues,
than if he has at least one. However, a more complex logic would require
a lot of additional interference with the code, which is not desireable.
For Sadik's earring in the photo
It's for cut content's normal/hard mode
or if McCoy already got the full earring comment from picking up the earring outside the lab
The intent was to create a Common::Array with a maximum capacity of 20.
Instead, _activeCustomEvents was a C array of 20 Common::Arrays.
The -> operator accesses the first element of a C array, so the first
Common::Array was always used.