BLADERUNNER: Item spin command in Debugger

This commit is contained in:
Thanasis Antoniou 2019-05-25 18:21:03 +03:00
parent 4dda6324b8
commit 93768c3307
3 changed files with 22 additions and 11 deletions

View File

@ -38,6 +38,7 @@
#include "bladerunner/scene.h"
#include "bladerunner/scene_objects.h"
#include "bladerunner/items.h"
#include "bladerunner/item_pickup.h"
#include "bladerunner/screen_effects.h"
#include "bladerunner/settings.h"
#include "bladerunner/set.h"
@ -1601,6 +1602,15 @@ bool Debugger::cmdItem(int argc, const char **argv) {
debugPrintf("No item was found with the specified id: %d in the scene\n", itemId);
return true;
}
} else if (modeName == "spin" && argc == 3) {
int itemAnimationId = atoi(argv[2]);
if (itemAnimationId >=0 && itemAnimationId <= 996) {
_vm->_itemPickup->setup(itemAnimationId, 320, 240);
return false; // close the debugger
} else {
debugPrintf("Valid value range for item animation Ids is [0, 996]\n");
return true;
}
} else {
invalidSyntax = true;
}
@ -1617,6 +1627,7 @@ bool Debugger::cmdItem(int argc, const char **argv) {
debugPrintf("Usage 3: %s flags <id> <isVisible> <isTarget>\n", argv[0]);
debugPrintf("Usage 4: %s bounds <id> <posX> <posY> <posZ> <facing> <height> <width>\n", argv[0]);
debugPrintf("Usage 5: %s remove <id>\n", argv[0]);
debugPrintf("Usage 6: %s spin <animationId>\n", argv[0]);
}
return true;
}

View File

@ -1862,7 +1862,7 @@ enum GameModelAnimations {
kModelAnimationWeaponsOrderForm = 965,
kModelAnimationShellCasings = 966,
kModelAnimationSlug = 967,
// kModelAnimation = 968, // unused - a knife?
// kModelAnimationKnife = 968, // unused - a knife? - spins badly
kModelAnimationStrangeScale = 969,
kModelAnimationHysteriaToken = 970,
kModelAnimationToyDog = 971,
@ -1882,14 +1882,14 @@ enum GameModelAnimations {
kModelAnimationCrystalsCigarette = 985,
kModelAnimationSpinnerKeys = 986,
kModelAnimationBriefcase = 987,
kModelAnimationDNAEvidenceOnePart = 988,
// kModelAnimation = 989, // unused?
kModelAnimationDNAEvidenceTwoParts = 990,
kModelAnimationDNAEvidenceThreeParts = 991,
// kModelAnimation = 992, // unused?
kModelAnimationDNAEvidence01OutOf6 = 988,
// kModelAnimationDNAEvidence02OutOf6 = 989, // unused - actual 2 parts of DNA
kModelAnimationDNAEvidence03OutOf6 = 990, // used for two parts found
kModelAnimationDNAEvidence04OutOf6 = 991, // used for three parts found
// kModelAnimationDNAEvidence05OutOf6 = 992, // unused - actual 5 parts of DNA
kModelAnimationDNAEvidenceComplete = 993,
// kModelAnimation = 994, // unused?
kModelAnimationAmmoType01 = 995, // from Bullet Bob's
// kModelAnimationAmmoType00 = 994, // unused - simple bullet
kModelAnimationAmmoType01 = 995, // from Bullet Bob's
kModelAnimationAmmoType02 = 996 // from Izo stash (Act 4)
};

View File

@ -663,11 +663,11 @@ void KIAScript::SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int notUsed, int clueId) {
{
int dnaEvidences = Global_Variable_Query(kVariableDNAEvidence);
if (dnaEvidences == 1) {
KIA_Play_Slice_Model(kModelAnimationDNAEvidenceOnePart);
KIA_Play_Slice_Model(kModelAnimationDNAEvidence01OutOf6);
} else if (dnaEvidences == 2) {
KIA_Play_Slice_Model(kModelAnimationDNAEvidenceTwoParts);
KIA_Play_Slice_Model(kModelAnimationDNAEvidence03OutOf6);
} else if (dnaEvidences == 3) {
KIA_Play_Slice_Model(kModelAnimationDNAEvidenceThreeParts);
KIA_Play_Slice_Model(kModelAnimationDNAEvidence04OutOf6);
} else if (dnaEvidences >= 4) {
KIA_Play_Slice_Model(kModelAnimationDNAEvidenceComplete);
}