[Scummvm-git-logs] scummvm master -> 5f8346e0767f790af021025c34df1f4bd62d1efc
mduggan
mgithub at guarana.org
Sun Jun 20 06:08:45 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2acbdceab0 ULTIMA8: Only search around item corner x/y when triggered from usecode
5f8346e076 ULTIMA8: Use some proctype names instead of constants
Commit: 2acbdceab02a2280f5671066a5c83c17314a0f6e
https://github.com/scummvm/scummvm/commit/2acbdceab02a2280f5671066a5c83c17314a0f6e
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-06-20T15:07:38+09:00
Commit Message:
ULTIMA8: Only search around item corner x/y when triggered from usecode
Previously, areaSearch from usecode would use the whole bounding box of the
item and expand it by the range value on each side. However, inspecting the
disassembly shows that the range for area search opcode should be only applied
around the corner x/y of the item.
This almost never makes any difference except for the end of Mission 12 of
Crusader: No Remorse, where too many triggers get activated if the bounding box
is used, and the laser walls are enabled then disabled straight away.
Changed paths:
engines/ultima/ultima8/usecode/uc_machine.cpp
diff --git a/engines/ultima/ultima8/usecode/uc_machine.cpp b/engines/ultima/ultima8/usecode/uc_machine.cpp
index ad1118f29d..75cea8c28b 100644
--- a/engines/ultima/ultima8/usecode/uc_machine.cpp
+++ b/engines/ultima/ultima8/usecode/uc_machine.cpp
@@ -1755,9 +1755,11 @@ void UCMachine::execProcess(UCProcess *p) {
const uint16 range = GAME_IS_CRUSADER ? ui16b * 2 : ui16b;
if (item) {
+ int ix, iy, iz;
+ item->getLocationAbsolute(ix, iy, iz);
world->getCurrentMap()->areaSearch(itemlist, script,
- scriptsize, item,
- range, recurse);
+ scriptsize, nullptr,
+ range, recurse, ix, iy);
} else {
// return error or return empty list?
perr << "Warning: invalid item " << ui16a << " passed to area search"
Commit: 5f8346e0767f790af021025c34df1f4bd62d1efc
https://github.com/scummvm/scummvm/commit/5f8346e0767f790af021025c34df1f4bd62d1efc
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-06-20T15:08:29+09:00
Commit Message:
ULTIMA8: Use some proctype names instead of constants
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 39c6b80eec..c6a4296bcb 100644
--- a/engines/ultima/ultima8/world/actors/actor.cpp
+++ b/engines/ultima/ultima8/world/actors/actor.cpp
@@ -1008,13 +1008,13 @@ void Actor::receiveHitCru(uint16 other, Direction dir, int damage, uint16 damage
}
if (damage_type == 0xf || damage_type == 7) {
if (shape == 1) {
- kernel->killProcesses(_objId, 0x204, true);
+ kernel->killProcesses(_objId, PathfinderProcess::PATHFINDER_PROC_TYPE, true);
doAnim(static_cast<Animation::Sequence>(0x37), dir_current);
} else if (shape == 0x4e6 || shape == 0x338 || shape == 0x385 || shape == 899) {
if (!(getRandom() % 3)) {
// Randomly stun the NPC for these damage types.
// CHECK ME: is this time accurate?
- Process *attack = kernel->findProcess(_objId, 0x259);
+ Process *attack = kernel->findProcess(_objId, AttackProcess::ATTACK_PROCESS_TYPE);
uint stun = ((getRandom() % 10) + 8) * 60;
if (attack && stun) {
Process *delay = new DelayProcess(stun);
@@ -1697,7 +1697,7 @@ CombatProcess *Actor::getCombatProcess() {
}
AttackProcess *Actor::getAttackProcess() {
- Process *p = Kernel::get_instance()->findProcess(_objId, 0x259); // CONSTANT!
+ Process *p = Kernel::get_instance()->findProcess(_objId, AttackProcess::ATTACK_PROCESS_TYPE);
if (!p)
return nullptr;
AttackProcess *ap = dynamic_cast<AttackProcess *>(p);
More information about the Scummvm-git-logs
mailing list