mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
TWINE: renamed flags to match the original sources
This commit is contained in:
1 parent
6a66b4bbdd
commit
cd03d7e8b6
6 files changed
+20
-10
No files matched your search
@@ -52,9 +52,9 @@ void Actor::restartHeroScene() {
|
||||
|
||||
sceneHero->_staticFlags.bComputeCollisionWithObj = 1;
|
||||
sceneHero->_staticFlags.bComputeCollisionWithBricks = 1;
|
||||
sceneHero->_staticFlags.bIsZonable = 1;
|
||||
sceneHero->_staticFlags.bCheckZone = 1;
|
||||
sceneHero->_staticFlags.bCanDrown = 1;
|
||||
sceneHero->_staticFlags.bCanFall = 1;
|
||||
sceneHero->_staticFlags.bObjFallable = 1;
|
||||
|
||||
sceneHero->_armor = 1;
|
||||
sceneHero->_offsetTrack = -1;
|
||||
|
||||
@@ -61,7 +61,7 @@ struct AnimTimerDataStruct {
|
||||
struct StaticFlagsStruct {
|
||||
uint32 bComputeCollisionWithObj : 1; // 0x000001 CHECK_OBJ_COL
|
||||
uint32 bComputeCollisionWithBricks : 1; // 0x000002 CHECK_BRICK_COL
|
||||
uint32 bIsZonable : 1; // 0x000004 CHECK_ZONE - testing of scenaric areas
|
||||
uint32 bCheckZone : 1; // 0x000004 CHECK_ZONE - testing of scenaric areas
|
||||
uint32 bSpriteClip : 1; // 0x000008 SPRITE_CLIP - (doors) fixed clip area
|
||||
uint32 bCanBePushed : 1; // 0x000010 PUSHABLE
|
||||
uint32 bComputeLowCollision : 1; // 0x000020 COL_BASSE
|
||||
@@ -70,7 +70,7 @@ struct StaticFlagsStruct {
|
||||
uint32 bUnk0100 : 1; // 0x000100
|
||||
uint32 bIsInvisible : 1; // 0x000200 INVISIBLE - not drawn but all computed
|
||||
uint32 bSprite3D : 1; // 0x000400 SPRITE_3D - a sprite not a 3D object
|
||||
uint32 bCanFall : 1; // 0x000800 OBJ_FALLABLE
|
||||
uint32 bObjFallable : 1; // 0x000800 OBJ_FALLABLE
|
||||
uint32 bNoShadow : 1; // 0x001000 NO_SHADOW - no auto shadow
|
||||
uint32 bIsBackgrounded : 1; // 0x002000 OBJ_BACKGROUND - is embedded in the decor the 1st time
|
||||
uint32 bIsCarrierActor : 1; // 0x004000 OBJ_CARRIER - can carry and move an obj
|
||||
|
||||
@@ -742,7 +742,7 @@ void Animations::doAnim(int32 actorIdx) {
|
||||
|
||||
actor->_workFlags.bIsFalling = 0;
|
||||
} else {
|
||||
if (actor->_staticFlags.bCanFall && actor->_carryBy == -1) {
|
||||
if (actor->_staticFlags.bObjFallable && actor->_carryBy == -1) {
|
||||
col = _engine->_grid->worldColBrick(processActor.x, processActor.y - 1, processActor.z);
|
||||
|
||||
if (col != ShapeType::kNone) {
|
||||
|
||||
@@ -55,7 +55,7 @@ void Scene::setActorStaticFlags(ActorStruct *act, uint32 staticFlags) {
|
||||
act->_staticFlags.bComputeCollisionWithBricks = 1;
|
||||
}
|
||||
if (staticFlags & 0x4) {
|
||||
act->_staticFlags.bIsZonable = 1;
|
||||
act->_staticFlags.bCheckZone = 1;
|
||||
}
|
||||
if (staticFlags & 0x8) {
|
||||
act->_staticFlags.bSpriteClip = 1;
|
||||
@@ -83,7 +83,7 @@ void Scene::setActorStaticFlags(ActorStruct *act, uint32 staticFlags) {
|
||||
act->_staticFlags.bSprite3D = 1;
|
||||
}
|
||||
if (staticFlags & 0x800) {
|
||||
act->_staticFlags.bCanFall = 1;
|
||||
act->_staticFlags.bObjFallable = 1;
|
||||
}
|
||||
if (staticFlags & 0x1000) {
|
||||
act->_staticFlags.bNoShadow = 1;
|
||||
|
||||
@@ -937,7 +937,7 @@ int32 ScriptLife::lMESSAGE(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||
*/
|
||||
int32 ScriptLife::lFALLABLE(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||
const int32 flag = ctx.stream.readByte();
|
||||
ctx.actor->_staticFlags.bCanFall = flag & 1;
|
||||
ctx.actor->_staticFlags.bObjFallable = flag & 1;
|
||||
debugC(3, kDebugLevels::kDebugScripts, "LIFE::FALLABLE(%i)", (int)flag);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+12
-2
@@ -1045,10 +1045,20 @@ bool TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||
continue;
|
||||
}
|
||||
|
||||
if (actor->_lifePoint == 0) {
|
||||
if (actor->_lifePoint <= 0) {
|
||||
if (IS_HERO(a)) {
|
||||
_animations->initAnim(AnimationTypes::kLandDeath, AnimType::kAnimationSet, AnimationTypes::kStanding, OWN_ACTOR_SCENE_INDEX);
|
||||
actor->_controlMode = ControlMode::kNoMove;
|
||||
#if 0 // TODO: enable me - found in the lba1 community release source code
|
||||
// Disable collisions on Twinsen to allow other objects to continue their tracks
|
||||
// while the death animation is playing
|
||||
actor->_staticFlags.bObjFallable = 1;
|
||||
actor->_staticFlags.bCheckZone = 0;
|
||||
actor->_staticFlags.bComputeCollisionWithObj = 0;
|
||||
actor->_staticFlags.bComputeCollisionWithBricks = 0;
|
||||
actor->_staticFlags.bCanDrown = 1;
|
||||
actor->_workFlags.bIsHitting = 0;
|
||||
#endif
|
||||
} else {
|
||||
_sound->playSample(Samples::Explode, 1, actor->posObj(), a);
|
||||
|
||||
@@ -1072,7 +1082,7 @@ bool TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||
|
||||
_animations->doAnim(a);
|
||||
|
||||
if (actor->_staticFlags.bIsZonable) {
|
||||
if (actor->_staticFlags.bCheckZone) {
|
||||
_scene->checkZoneSce(a);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user