[Scummvm-git-logs] scummvm master -> da233486cd347ea6c6eb1ca61abb0170957b3cf5
mduggan
mgithub at guarana.org
Fri Jul 31 07:51:00 UTC 2020
This automated email contains information about 10 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d5f5f0f2b9 DEVTOOLS: ULTIMA8: Fix credits display frame
19fe957f00 ULTIMA8: Load correct data for crusader anim frames
d8060fcfe8 ULTIMA8: Fix arg size expectation in I_teleportToEgg
0bdef7b947 ULTIMA8: Call usecode event during animations for Crusader
10b2d98780 ULTIMA8: Don't hurl crusader so hard
d8283d1247 ULTIMA8: Slight hack to avoid 16/8 dir messups in crusader
07d63b482a ULTIMA8: Correct offsets of sound index
72917adbb3 ULTIMA8: Add I_canExistAt support to Crusader
47ad50f43a ULTIMA8: Add fade-from-grey to Crusader startup
da233486cd ULTIMA8: Set keypad output as proc result
Commit: d5f5f0f2b93839e5a86bf3758004ed6d046d95a6
https://github.com/scummvm/scummvm/commit/d5f5f0f2b93839e5a86bf3758004ed6d046d95a6
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:13:13+09:00
Commit Message:
DEVTOOLS: ULTIMA8: Fix credits display frame
Changed paths:
devtools/create_ultima/files/ultima8/remorseweapons.ini
diff --git a/devtools/create_ultima/files/ultima8/remorseweapons.ini b/devtools/create_ultima/files/ultima8/remorseweapons.ini
index 5b78bd518d..36f73f5c9f 100644
--- a/devtools/create_ultima/files/ultima8/remorseweapons.ini
+++ b/devtools/create_ultima/files/ultima8/remorseweapons.ini
@@ -261,7 +261,7 @@ display_frame=0x17
[CREDITS]
shape=0x4ED
display_shape=3
-display_frame=0xC
+display_frame=0xD
[KEYCARD]
shape=0x111
Commit: 19fe957f00817a55145f48e25066f724ce981c83
https://github.com/scummvm/scummvm/commit/19fe957f00817a55145f48e25066f724ce981c83
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:13:13+09:00
Commit Message:
ULTIMA8: Load correct data for crusader anim frames
Changed paths:
engines/ultima/ultima8/graphics/anim_dat.cpp
diff --git a/engines/ultima/ultima8/graphics/anim_dat.cpp b/engines/ultima/ultima8/graphics/anim_dat.cpp
index 36875ff5cd..c3bd24cc59 100644
--- a/engines/ultima/ultima8/graphics/anim_dat.cpp
+++ b/engines/ultima/ultima8/graphics/anim_dat.cpp
@@ -193,17 +193,17 @@ void AnimDat::load(Common::SeekableReadStream *rs) {
// byte 1: low nibble part of frame
uint8 x = rs->readByte();
f._frame += (x & 0xF) << 8;
- // byte 2, 3: unknown; byte 3 might contain flags
- f._unk1 = rs->readSint16LE();
+ // byte 2: delta z
+ f._deltaZ = rs->readByte();
+ // byte 3: sfx
+ f._sfx = rs->readByte();
// byte 4: deltadir (signed) - convert to pixels
f._deltaDir = rs->readSByte();
- // byte 5: flags?
+ // byte 5: flags? TODO: Ensure "flipped" flag is mapped correctly
f._flags = rs->readByte();
+ f._flags += (x & 0xF0) << 8;
// byte 6, 7: unknown
f._unk2 = rs->readSint16LE();
-
- f._deltaZ = 0;
- f._sfx = 0;
}
a->_actions[action]->_frames[dir].push_back(f);
}
Commit: d8060fcfe800d0a464213be54e5496eb5ae08545
https://github.com/scummvm/scummvm/commit/d8060fcfe800d0a464213be54e5496eb5ae08545
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:13:13+09:00
Commit Message:
ULTIMA8: Fix arg size expectation in I_teleportToEgg
Changed paths:
engines/ultima/ultima8/world/actors/main_actor.cpp
diff --git a/engines/ultima/ultima8/world/actors/main_actor.cpp b/engines/ultima/ultima8/world/actors/main_actor.cpp
index 98a87c9899..4793f2ece0 100644
--- a/engines/ultima/ultima8/world/actors/main_actor.cpp
+++ b/engines/ultima/ultima8/world/actors/main_actor.cpp
@@ -704,13 +704,13 @@ bool MainActor::loadData(Common::ReadStream *rs, uint32 version) {
uint32 MainActor::I_teleportToEgg(const uint8 *args, unsigned int argsize) {
uint16 mapnum;
- if (argsize == 12) {
+ if (argsize == 6) {
ARG_UINT16(map);
mapnum = map;
} else {
// Crusader teleport intrinsic 096 uses main actor map.
// Intrinsic 079 provides a map argument.
- assert(argsize == 8);
+ assert(argsize == 4);
MainActor *av = getMainActor();
mapnum = av->getMapNum();
}
Commit: 0bdef7b947916b1f7fd6f85dc88c0ca3f3a0172b
https://github.com/scummvm/scummvm/commit/0bdef7b947916b1f7fd6f85dc88c0ca3f3a0172b
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:13:13+09:00
Commit Message:
ULTIMA8: Call usecode event during animations for Crusader
Changed paths:
engines/ultima/ultima8/world/actors/anim_action.h
engines/ultima/ultima8/world/actors/animation_tracker.cpp
engines/ultima/ultima8/world/item.cpp
engines/ultima/ultima8/world/item.h
diff --git a/engines/ultima/ultima8/world/actors/anim_action.h b/engines/ultima/ultima8/world/actors/anim_action.h
index bb3ce36d10..676a1a30c4 100644
--- a/engines/ultima/ultima8/world/actors/anim_action.h
+++ b/engines/ultima/ultima8/world/actors/anim_action.h
@@ -44,7 +44,8 @@ struct AnimFrame {
AFF_UNK1 = 0x0001,
AFF_ONGROUND = 0x0002,
AFF_FLIPPED = 0x0020,
- AFF_SPECIAL = 0x0800
+ AFF_SPECIAL = 0x0800,
+ AFF_USECODE = 0x4000
};
inline bool is_flipped() const {
@@ -53,6 +54,10 @@ struct AnimFrame {
inline int attack_range() const {
return ((_flags >> 2) & 0x07);
}
+
+ inline bool is_callusecode() const {
+ return (_flags & AFF_USECODE) != 0;
+ }
};
class AnimAction {
diff --git a/engines/ultima/ultima8/world/actors/animation_tracker.cpp b/engines/ultima/ultima8/world/actors/animation_tracker.cpp
index d1165e565d..7aa9b37da9 100644
--- a/engines/ultima/ultima8/world/actors/animation_tracker.cpp
+++ b/engines/ultima/ultima8/world/actors/animation_tracker.cpp
@@ -169,7 +169,7 @@ void AnimationTracker::evaluateMaxAnimTravel(int32 &max_endx, int32 &max_endy, D
bool AnimationTracker::step() {
if (_done) return false;
- const Actor *a = getActor(_actor);
+ Actor *a = getActor(_actor);
assert(a);
if (_firstFrame)
@@ -423,6 +423,10 @@ bool AnimationTracker::step() {
}
}
+ if (f.is_callusecode() && GAME_IS_CRUSADER) {
+ a->callUsecodeEvent_calledFromAnim();
+ }
+
return true;
}
diff --git a/engines/ultima/ultima8/world/item.cpp b/engines/ultima/ultima8/world/item.cpp
index 7201d47849..787e50a99f 100644
--- a/engines/ultima/ultima8/world/item.cpp
+++ b/engines/ultima/ultima8/world/item.cpp
@@ -1318,7 +1318,7 @@ uint32 Item::callUsecodeEvent(uint32 event, const uint8 *args, int argsize) {
// CHECKME: to make Pentagram behave as much like the original as possible,
// don't call any usecode if the original would call the wrong class
- if (_objId < 256 && !(_extendedFlags & EXT_PERMANENT_NPC) &&
+ if (GAME_IS_U8 && _objId < 256 && !(_extendedFlags & EXT_PERMANENT_NPC) &&
!(_flags & FLG_FAST_ONLY))
return 0;
@@ -1400,6 +1400,10 @@ uint32 Item::callUsecodeEvent_combine() { // event C
return callUsecodeEvent(0xC); // CONSTANT
}
+uint32 Item::callUsecodeEvent_calledFromAnim() { // event E
+ return callUsecodeEvent(0xE); // CONSTANT
+}
+
uint32 Item::callUsecodeEvent_enterFastArea() { // event F
return callUsecodeEvent(0xF); // CONSTANT
}
diff --git a/engines/ultima/ultima8/world/item.h b/engines/ultima/ultima8/world/item.h
index 96942e3c71..0242ea6c71 100644
--- a/engines/ultima/ultima8/world/item.h
+++ b/engines/ultima/ultima8/world/item.h
@@ -429,6 +429,7 @@ public:
uint32 callUsecodeEvent_equipWithParam(ObjId param); // event A
uint32 callUsecodeEvent_unequip(); // event B
uint32 callUsecodeEvent_combine(); // event C
+ uint32 callUsecodeEvent_calledFromAnim(); // event E
uint32 callUsecodeEvent_enterFastArea(); // event F
uint32 callUsecodeEvent_leaveFastArea(); // event 10
uint32 callUsecodeEvent_cast(uint16 unk); // event 11
Commit: 10b2d98780d17afff88d8a518f7e5e037ba52a5b
https://github.com/scummvm/scummvm/commit/10b2d98780d17afff88d8a518f7e5e037ba52a5b
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:13:13+09:00
Commit Message:
ULTIMA8: Don't hurl crusader so hard
Changed paths:
engines/ultima/ultima8/world/actors/actor_anim_process.cpp
diff --git a/engines/ultima/ultima8/world/actors/actor_anim_process.cpp b/engines/ultima/ultima8/world/actors/actor_anim_process.cpp
index 0d619546ae..912500efec 100644
--- a/engines/ultima/ultima8/world/actors/actor_anim_process.cpp
+++ b/engines/ultima/ultima8/world/actors/actor_anim_process.cpp
@@ -340,6 +340,13 @@ void ActorAnimProcess::run() {
int32 dx, dy, dz;
_tracker->getSpeed(dx, dy, dz);
+ if (GAME_IS_CRUSADER) {
+ // HACK: Hurl people a bit less hard in crusader until
+ // the movement bugs are fixed to make them fall less..
+ dx /= 4;
+ dy /= 4;
+ dz /= 4;
+ }
a->hurl(dx, dy, dz, 2);
// Note: do not wait for the fall to finish: this breaks
@@ -591,8 +598,6 @@ void ActorAnimProcess::doHitSpecial(Item *hit) {
}
-
-
void ActorAnimProcess::terminate() {
#ifdef WATCHACTOR
if (_itemNum == watchactor)
@@ -601,6 +606,7 @@ void ActorAnimProcess::terminate() {
<< "] ActorAnimProcess terminating"
<< Std::endl;
#endif
+
Actor *a = getActor(_itemNum);
if (a) {
if (_tracker) { // if we were really animating...
Commit: d8283d12476a665b18bdb4bac2d35255ba74f927
https://github.com/scummvm/scummvm/commit/d8283d12476a665b18bdb4bac2d35255ba74f927
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:13:13+09:00
Commit Message:
ULTIMA8: Slight hack to avoid 16/8 dir messups in crusader
Changed paths:
engines/ultima/ultima8/world/actors/actor.cpp
diff --git a/engines/ultima/ultima8/world/actors/actor.cpp b/engines/ultima/ultima8/world/actors/actor.cpp
index f708971a3e..16503df330 100644
--- a/engines/ultima/ultima8/world/actors/actor.cpp
+++ b/engines/ultima/ultima8/world/actors/actor.cpp
@@ -478,6 +478,12 @@ uint16 Actor::doAnim(Animation::Sequence anim, Direction dir, unsigned int steps
}
#endif
+ // HACK: When switching from 16-dir combat to 8-dir walking,
+ // fix the direction to only 8 dirs
+ if (GAME_IS_CRUSADER && anim == Animation::stand) {
+ dir = static_cast<Direction>(dir - (static_cast<uint32>(dir) % 2));
+ }
+
Process *p = new ActorAnimProcess(this, anim, dir, steps);
return Kernel::get_instance()->addProcess(p);
Commit: 07d63b482a2adaa6774ae1b2ab76ef9853bfe0a3
https://github.com/scummvm/scummvm/commit/07d63b482a2adaa6774ae1b2ab76ef9853bfe0a3
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:48:09+09:00
Commit Message:
ULTIMA8: Correct offsets of sound index
Changed paths:
engines/ultima/ultima8/audio/sound_flex.cpp
diff --git a/engines/ultima/ultima8/audio/sound_flex.cpp b/engines/ultima/ultima8/audio/sound_flex.cpp
index 3e35c95709..116281670a 100644
--- a/engines/ultima/ultima8/audio/sound_flex.cpp
+++ b/engines/ultima/ultima8/audio/sound_flex.cpp
@@ -38,6 +38,7 @@ SoundFlex::SoundFlex(Common::SeekableReadStream *rs) : Archive(rs), _samples(nul
Common::MemoryReadStream st(buf, size);
+ _index.push_back(SoundFlexEntry(""));
if (buf[0] == 0xFF) {
// Crusader flex has an index in the first object with the format:
// [00 or FF] [ 3 bytes, often 'oB0' or 'pB0' ] [ null-terminated name ]
Commit: 72917adbb3f6cd4ca2d93bb5c46bff38819ac1bc
https://github.com/scummvm/scummvm/commit/72917adbb3f6cd4ca2d93bb5c46bff38819ac1bc
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:49:09+09:00
Commit Message:
ULTIMA8: Add I_canExistAt support to Crusader
Changed paths:
engines/ultima/ultima8/convert/crusader/convert_usecode_crusader.h
engines/ultima/ultima8/usecode/remorse_intrinsics.h
engines/ultima/ultima8/world/current_map.cpp
diff --git a/engines/ultima/ultima8/convert/crusader/convert_usecode_crusader.h b/engines/ultima/ultima8/convert/crusader/convert_usecode_crusader.h
index c5a074d5c8..45c4a29214 100644
--- a/engines/ultima/ultima8/convert/crusader/convert_usecode_crusader.h
+++ b/engines/ultima/ultima8/convert/crusader/convert_usecode_crusader.h
@@ -265,7 +265,7 @@ const char* const ConvertUsecodeCrusader::_intrinsics[] = {
"byte MainActor::I_addItemCru(4 bytes)", // same coff as 037
"int16 Actor::I_getLastAnimSet(4 bytes)", // part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"void Item::I_setQuality(Item *, int)", // same coff as 07F, 125
- "byte Intrinsic0BB(8 bytes)", // TODO: check usecode.. code is weird, something with an imaginary chequered wall shape? (0x31A)
+ "byte CurrentMap::I_canExistAt(int shapeno, word x, word y, byte z)", // NOTE: actually slightly different, uses shape info for an imaginary chequered wall shape? (0x31A)
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
diff --git a/engines/ultima/ultima8/usecode/remorse_intrinsics.h b/engines/ultima/ultima8/usecode/remorse_intrinsics.h
index dd30f8ba8d..a6db10b812 100644
--- a/engines/ultima/ultima8/usecode/remorse_intrinsics.h
+++ b/engines/ultima/ultima8/usecode/remorse_intrinsics.h
@@ -233,7 +233,7 @@ Intrinsic RemorseIntrinsics[] = {
MainActor::I_addItemCru, // int Intrinsic0B8(4 bytes)
Actor::I_getLastAnimSet, // void Intrinsic0B9(4 bytes)
Item::I_setQuality,
- 0, // int Intrinsic0BB(8 bytes)
+ CurrentMap::I_canExistAt, // int Intrinsic0BB(8 bytes)
Item::I_isOn,
Item::I_hurl, // void Intrinsic0BD(12 bytes)
Item::I_getQHi, // based on same coff set as 026
diff --git a/engines/ultima/ultima8/world/current_map.cpp b/engines/ultima/ultima8/world/current_map.cpp
index 2d03cfec79..8af84898f7 100644
--- a/engines/ultima/ultima8/world/current_map.cpp
+++ b/engines/ultima/ultima8/world/current_map.cpp
@@ -1283,21 +1283,29 @@ bool CurrentMap::load(Common::ReadStream *rs, uint32 version) {
return true;
}
-uint32 CurrentMap::I_canExistAt(const uint8 *args, unsigned int /*argsize*/) {
+uint32 CurrentMap::I_canExistAt(const uint8 *args, unsigned int argsize) {
ARG_UINT16(shape);
ARG_UINT16(x);
ARG_UINT16(y);
ARG_UINT16(z);
- //!! TODO: figure these out
- ARG_UINT16(unk1); // is either 1 or 4
- ARG_UINT16(unk2); // looks like it could be an objid
- ARG_UINT16(unk3); // always zero
+ if (argsize > 8) {
+ //!! TODO: figure these out
+ ARG_UINT16(unk1); // is either 1 or 4
+ ARG_UINT16(unk2); // looks like it could be an objid
+ ARG_UINT16(unk3); // always zero
+ }
if (GAME_IS_CRUSADER) {
x *= 2;
y *= 2;
}
+ //
+ // TODO: The crusader version of this function actually checks by
+ // changing the shapeinfo of shape 0x31A to match the target
+ // shape. For a first level approximation, this is the same.
+ //
+
const CurrentMap *cm = World::get_instance()->getCurrentMap();
bool valid = cm->isValidPosition(x, y, z, shape, 0, 0, 0);
Commit: 47ad50f43a2ae9e447587f5f8c9a4020d0cd399e
https://github.com/scummvm/scummvm/commit/47ad50f43a2ae9e447587f5f8c9a4020d0cd399e
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:49:58+09:00
Commit Message:
ULTIMA8: Add fade-from-grey to Crusader startup
Changed paths:
engines/ultima/ultima8/games/start_crusader_process.cpp
diff --git a/engines/ultima/ultima8/games/start_crusader_process.cpp b/engines/ultima/ultima8/games/start_crusader_process.cpp
index e85a318008..767c866f0a 100644
--- a/engines/ultima/ultima8/games/start_crusader_process.cpp
+++ b/engines/ultima/ultima8/games/start_crusader_process.cpp
@@ -113,6 +113,9 @@ void StartCrusaderProcess::run() {
// TODO: The game actually teleports to egg 0x1f (31) which has another
// egg to teleport to egg 99. Is there any purpose to that?
Kernel::get_instance()->addProcess(new TeleportToEggProcess(1, 99));
+
+ Process *fader = new PaletteFaderProcess(0x003F3F3F, true, 0x7FFF, 60, false);
+ Kernel::get_instance()->addProcess(fader);
}
//MusicProcess::get_instance()->playMusic(2);
Commit: da233486cd347ea6c6eb1ca61abb0170957b3cf5
https://github.com/scummvm/scummvm/commit/da233486cd347ea6c6eb1ca61abb0170957b3cf5
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-07-31T16:50:29+09:00
Commit Message:
ULTIMA8: Set keypad output as proc result
Changed paths:
engines/ultima/ultima8/gumps/keypad_gump.cpp
diff --git a/engines/ultima/ultima8/gumps/keypad_gump.cpp b/engines/ultima/ultima8/gumps/keypad_gump.cpp
index 6da1599677..5c8381fd0d 100644
--- a/engines/ultima/ultima8/gumps/keypad_gump.cpp
+++ b/engines/ultima/ultima8/gumps/keypad_gump.cpp
@@ -109,6 +109,7 @@ void KeypadGump::ChildNotify(Gump *child, uint32 message) {
_value /= 10;
sfxno = 0x3a;
} else if (buttonNo == 11) {
+ SetResult(_value);
// TODO: Do something as a result of this other than just play a sound.
if (_value == _targetValue) {
sfxno = 0x32;
More information about the Scummvm-git-logs
mailing list