Commit Graph

2180 Commits

Author SHA1 Message Date
Matthew Duggan
8a460765a9 ULTIMA8: Terminate more processes on Crusader level change
Previously we used the Ultima 8 behavior of not terminating any obj id 0
processes on level change, but that occasionally left never ending "alarm has
been activated" background audio and similar problems.

This changes so that all but the "persistent" processes are terminated.

At the same time, also correctly clean up the snap egg and target lists when
changing maps - previously these were left sitting around.
2022-06-26 08:42:55 +09:00
Matthew Duggan
b92c9f981b ULTIMA8: Fix Crusader crash if splash item destroyed before damage happens 2022-06-26 08:36:11 +09:00
Matthew Duggan
b23fd8c334 ULTIMA8: Expand comments on a couple of U8 script fixes.
Not sure how long sourceforge bugtracker for Pentagram will exist so nice to
document the reason for the workaround in the code.
2022-06-26 08:36:11 +09:00
Matthew Duggan
b1bb9aa6e5 ULTIMA8: JANITORIAL: whitespace 2022-06-26 08:36:11 +09:00
Cameron Cawley
5a5eb7811d ULTIMA8: Avoid internal compiler error on RISC OS with -O2 and -mfpu=vfp 2022-06-20 00:29:07 +03:00
Matthew Duggan
75b8da08aa ULTIMA8: Reset crusader teleport flag on item selection
The original game resets this flag when 'g' or 's' buttons are pressed.  I
assume this was a workaround in the original for the same problem we see in bug
13381.  Reproduce the hack from the original game.
2022-06-12 16:09:31 +09:00
Matthew Duggan
ed6348ef73 ULTIMA8: Fix Crusader debug code (disabled by default)
The code block inside an #if 0 is sometimes useful for testing but had a syntax
error.  Fix that.
2022-06-12 10:33:03 +09:00
Matthew Duggan
5e00777108 ULTIMA8: Rename unk crusdader flag to crusaderTeleporting
After inspecting the usecode, this flag seems to only be set and cleared on
teleport events.  It has no real effect on the behavior of the C code but it's
nice to name it correctly.
2022-06-12 10:30:04 +09:00
Matthew Jimenez
45b5ee94d0 ULTIMA8: Re-enable game specific options for Utima 8 2022-06-09 22:33:40 -05:00
Cameron Cawley
c0aa33528d ULTIMA8: The Christmas easter egg in No Regret is not in the demo version 2022-06-10 09:01:29 +09:00
Cameron Cawley
026ed0d1d5 ULTIMA8: Use ADExtraGuiOptionsMap for all games 2022-06-10 09:01:29 +09:00
Matthew Duggan
af71186284 ULTIMA8: Allow key-tap turns running in combat in Crusader
Key tap should turn whether in combat or not.

This fixes #13383.
2022-06-04 19:52:14 +09:00
Paul Gilbert
e699d4a371 ULTIMA8: Refactor RenderSurface _format from being a global object 2022-05-31 19:18:27 -07:00
Paweł Kołodziejski
e63595d303
ULTIMA: Avoid global constructor 2022-05-29 18:01:39 +02:00
Paweł Kołodziejski
60fdd9dfc7
ULTIMA: Silence compiler warning 2022-05-29 17:31:37 +02:00
Donovan Watteau
5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
Paul Gilbert
4284ca5773 ULTIMA: NUVIE: Fix spelling of view.cpp 2022-05-14 17:09:35 -07:00
Torbjörn Andersson
e06f3c9a5a GUI: Allow game option checkboxes to be disabled
Depending on other game option checkboxes. This is used to
enable/disable the semi-smooth scrolling checkboxes for FM Towns Loom,
since it's only used when smooth scrolling is enabled.
2022-04-21 11:07:17 +02:00
Matthew Duggan
125288c634 ULTIMA8: Fix treasure frame validation again, 0 is ok.
My previous comment and code were a bit wrong due to a copy-paste error.
2022-03-25 18:10:21 +09:00
D G Turner
2e53f76ed8 ULTIMA: ULTIMA8: Fix Type Limits GCC Compiler Warning
This appears to be a missed equals symbol in cut and paste when
compared to the comment so correcting.
2022-03-25 09:05:27 +00:00
Matthew Duggan
2345a0d3a6 ULTIMA8: Add error checking for treasure loader
This might help with bug #12182 where the comment suggests there is a problem
with loading the treasure data.  To make sure it loads properly, added a lot
more error checking and error messages, and created unit tests for the same.
2022-03-25 16:44:59 +09:00
Matthew Duggan
3d2a2cc610 ULTIMA8: Small const correctness improvements 2022-03-25 13:37:07 +09:00
Matthew Duggan
8d9081e7aa ULTIMA8: Destroy actor contents on death only for FAST_ONLY
On death, the original game only destroys the contents for actors who are
marked as FAST_ONLY, so important NPCs should not lose their contents.

This should improve the behavior a bit and might help to fix bug #12504 (where
malchir should drop a book) - but it does not totally fix that problem so there
is still something else that needs fixing.
2022-03-25 13:34:07 +09:00
D G Turner
4ec462f2d3 ULTIMA: NUVIE: Fix Remaining Undefined Macro Definition Warnings
These are emitted by GCC when -Wundef is passed.
2022-03-21 22:20:52 +00:00
D G Turner
92c5f36388 ULTIMA: NUVIE: Remove Usage of Undefined SDL Byte Order Symbols
This code was originally intended to support Big Endian audio using
libSDL. However, since the missing symbols defaulted to 0 in both cases,
this code was active in all cases which is very wrong for Little Endian
platforms. This should be reviewed and fixed for both BE and LE targets
with testing.

This generated GCC undefined macro compiler warnings when -Wundef was
passed.
2022-03-21 22:00:37 +00:00
Matthew Duggan
3698340e3a ULTIMA8: Fix meaning of flag in I_legalMoveToPoint
In cbcebce55d, I changed the meaning of the flag from "force" to
"move_if_blocked" to fix Crusader's spider bombs. However, with bug #13359
and re-reading the disassembly, true meaning of the flag is more like the
opposite, "abort_if_blocked".

* If the flag is set and the move is blocked, it should not do the move at all.
* If the flag is clear, it should move as far as the blocker.

The return value is 1 if the move completed with no blockers - always 0 if
there was a blocker, even if a partial move was done.

This fixes #13359, and spider bombs still work.  Probably fixes some other
weird behavior too.
2022-03-21 11:56:32 +09:00
eientei
93b16b59f2 ULTIMA: Add detection for The Savage Empire v2.1 2022-03-20 18:20:06 -07:00
Matthew Duggan
35efd2e8fd ULTIMA8: Fix remote viewing during "camera moves with player" option.
The engine code would move the camera to the remote viewing location, but the
snap process pulled it back to the player.  Fix by disabling snap-to-player if
the avatar is in stasis.

This fixes #13360
2022-03-20 11:02:32 +09:00
Matthew Duggan
d33720e950 ULTIMA8: Avoid warnings spamming for missing shapes
In No Regret, there are some areas with a certain invalid shape. Avoid spamming
the log with warnings on every frame in this case.

Also correct variable naming - frame is a local not a member.
2022-03-20 10:13:56 +09:00
D G Turner
eaa70c0c32 ULTIMA8: Fix Undefined Macro Compiler Warnings
These are emitted by GCC when -Wundef is passed.
2022-03-19 15:10:46 +00:00
D G Turner
c569f4b40d ULTIMA: Remove Redundant Declarations
These cause GCC Warnings when -Wredundant-decls is enabled.
2022-03-07 10:20:55 +00:00
Matthew Duggan
7a412c67b0 ULTIMA8: Add comment 2022-01-16 17:54:18 +09:00
Matthew Duggan
90991f3d19 ULTIMA8: Add workaround for No Regret damage data
I spent all day looking at decompilation and I still don't understand why these
items are not destroyed in the original game, but they shouldn't be destroyed.
2022-01-16 17:54:18 +09:00
Matthew Duggan
9f15aa226a ULTIMA8: Add debug logs to Crusader attack process
This does not change the code unless WATCHACTOR is defined. Should help debug
any remaining differences for Bug #12750.
2022-01-16 17:54:18 +09:00
D G Turner
6205a5d4fe ULTIMA4: Minor Improvement in Temporary Variable Scope 2022-01-12 03:43:55 +00:00
Matthew Duggan
31da200237 ULTIMA8: Reset position of Crusader status gumps on load
If user changes the "high resolution" setting, the gumps will now shift to
the new screen bottom.
2022-01-07 17:45:25 +09:00
Matthew Duggan
f9b10f6e6f ULTIMA8: Add Crusader toggle crouch button mapping
Also rework the one-shot movement slightly so there's less if/elses.
2022-01-04 18:03:41 +09:00
Matthew Duggan
0e66f4bd3c ULTIMA8: Expose christmas easter-egg option in GUI 2022-01-04 18:03:41 +09:00
D G Turner
33a9186377 ULTIMA8: Fix Cut and Paste Error 2022-01-03 15:01:50 +00:00
Matthew Duggan
5fe1c35fe0 ULTIMA8: Add No Regret easteregg ini option
Gives players a ways to enjoy festive music at any time of year.
2022-01-03 19:15:49 +09:00
Matthew Duggan
99261d855e ULTIMA8: Add Crusader single-key steps and rolls 2022-01-03 19:02:53 +09:00
Matthew Duggan
c414f85093 ULTIMA8: For now disable startRun anim translation to fix build 2022-01-02 21:11:06 +09:00
Matthew Duggan
6729da5692 ULTIMA8: Fix leftover reference to delete enum 2022-01-02 21:06:45 +09:00
Matthew Duggan
ddc26b2ded ULTIMA8: Clean up lookleft/lookright animations
Having finally worked out what these animation numbers are, a lot of code makes
more sense.  Refactored the absolute anim number code at the same time.
2022-01-02 19:45:31 +09:00
Matthew Duggan
cf859e68f9 ULTIMA: Fix some unused variable warnings 2022-01-02 19:45:31 +09:00
Matthew Duggan
5892b8c05d ULTIMA8: Intrinsic calling convention cleanups
Previously x/y values were being divided and multiplied to get the right values
in Crusader with no explanation why.  Add a small wrapper function to make it
explicit what is happening.

Also replace unused intrinsic variables with ARG_NULL to avoid unused variable
warnings in some newer gcc versions.
2022-01-02 19:45:31 +09:00
Matthew Duggan
04327d03f4 ULTIMA8: Remove some unused varaiable warnings 2022-01-02 19:45:31 +09:00
Matthew Duggan
0f6897c0b1 ULTIMA8: Add Crusader short jump on tab key
This is a single-key jump.  Because tab was previously used to highlight things
for debugging this also changes the default key for that.
2022-01-02 19:45:10 +09:00
Matthew Duggan
4b5d85d215 ULTIMA8: Rename ATTACK_PROCESS_TYPE to ATTACK_PROC_TYPE
For consistency with other proc type constant names.
2022-01-02 19:26:46 +09:00
D G Turner
95182349f1 ULTIMA8: Fix GCC Compiler Shadowing Warning 2022-01-01 17:15:15 +00:00