mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
TRECISION: Move the camera and light loading code to Actor, some polishing
This commit is contained in:
parent
29e4d40ca3
commit
e8dc735181
@ -436,4 +436,39 @@ void Actor::actorStop() {
|
||||
_lastStep = 0;
|
||||
}
|
||||
|
||||
void Actor::read3D(Common::SeekableReadStream *ff) {
|
||||
// read rooms and lights
|
||||
SCamera *cam = _camera;
|
||||
cam->_ex = ff->readFloatLE();
|
||||
cam->_ey = ff->readFloatLE();
|
||||
cam->_ez = ff->readFloatLE();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
cam->_e1[i] = ff->readFloatLE();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
cam->_e2[i] = ff->readFloatLE();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
cam->_e3[i] = ff->readFloatLE();
|
||||
cam->_fovX = ff->readFloatLE();
|
||||
cam->_fovY = ff->readFloatLE();
|
||||
|
||||
_lightNum = ff->readUint32LE();
|
||||
if (_lightNum > MAXLIGHT)
|
||||
error("read3D(): Too many lights");
|
||||
|
||||
for (uint32 i = 0; i < g_vm->_actor->_lightNum; ++i) {
|
||||
_light[i]._x = ff->readFloatLE();
|
||||
_light[i]._y = ff->readFloatLE();
|
||||
_light[i]._z = ff->readFloatLE();
|
||||
_light[i]._dx = ff->readFloatLE();
|
||||
_light[i]._dy = ff->readFloatLE();
|
||||
_light[i]._dz = ff->readFloatLE();
|
||||
_light[i]._inr = ff->readFloatLE();
|
||||
_light[i]._outr = ff->readFloatLE();
|
||||
_light[i]._hotspot = ff->readByte();
|
||||
_light[i]._fallOff = ff->readByte();
|
||||
_light[i]._inten = ff->readSByte();
|
||||
_light[i]._position = ff->readSByte();
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Trecision
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
|
||||
uint32 _vertexNum;
|
||||
uint32 _faceNum;
|
||||
int32 _lightNum;
|
||||
uint32 _lightNum;
|
||||
int _matNum;
|
||||
|
||||
float _px, _py, _pz;
|
||||
@ -62,6 +62,7 @@ public:
|
||||
void syncGameStream(Common::Serializer &ser);
|
||||
void actorDoAction(int action);
|
||||
void actorStop();
|
||||
void read3D(Common::SeekableReadStream *ff);
|
||||
};
|
||||
|
||||
|
||||
|
@ -31,8 +31,9 @@
|
||||
#define OBJMODE_HIDDEN 16
|
||||
|
||||
// DEF PER _obj._nbox
|
||||
#define FOREGROUND 255
|
||||
#define BACKGROUND 254
|
||||
#define BOX_FOREGROUND 255
|
||||
#define BOX_BACKGROUND 254
|
||||
#define BOX_NORMAL 0
|
||||
|
||||
enum ObjectFlags {
|
||||
kObjFlagUse = 0,
|
||||
|
@ -373,7 +373,7 @@ void LogicManager::setupAltRoom(uint16 room, bool altRoomFl) {
|
||||
break;
|
||||
case kRoom2E:
|
||||
if (!altRoomFl) {
|
||||
_vm->_obj[oCATWALKA2E]._nbox = BACKGROUND;
|
||||
_vm->_obj[oCATWALKA2E]._nbox = BOX_BACKGROUND;
|
||||
_vm->_obj[oCATWALKA2E]._position = 2;
|
||||
_vm->_obj[oCATWALKA2E]._anim = a2E2PRIMAPALLONTANANDO;
|
||||
read3D("2E.3d");
|
||||
@ -396,7 +396,7 @@ void LogicManager::setupAltRoom(uint16 room, bool altRoomFl) {
|
||||
_vm->_obj[oCRATERE2E]._mode |= OBJMODE_OBJSTATUS;
|
||||
_vm->_obj[oARBUSTI2E]._mode |= OBJMODE_OBJSTATUS;
|
||||
_vm->_obj[oCREPACCIO2E]._position = 7;
|
||||
_vm->_obj[oCATWALKA2E]._nbox = FOREGROUND;
|
||||
_vm->_obj[oCATWALKA2E]._nbox = BOX_FOREGROUND;
|
||||
}
|
||||
break;
|
||||
case kRoom2GV:
|
||||
|
@ -33,7 +33,7 @@ namespace Trecision {
|
||||
void setPosition(int num) {
|
||||
SLight *curLight = g_vm->_actor->_light;
|
||||
|
||||
for (int a = 0; a < g_vm->_actor->_lightNum; a++) {
|
||||
for (uint32 a = 0; a < g_vm->_actor->_lightNum; a++) {
|
||||
// If it's off
|
||||
if (curLight->_inten == 0) {
|
||||
// If it's the required position
|
||||
@ -91,7 +91,7 @@ void goToPosition(int num) {
|
||||
|
||||
SLight *_curLight = g_vm->_actor->_light;
|
||||
|
||||
for (int a = 0; a < g_vm->_actor->_lightNum; a++) {
|
||||
for (uint32 a = 0; a < g_vm->_actor->_lightNum; a++) {
|
||||
// If it's off and if it's a position
|
||||
if (_curLight->_inten == 0) {
|
||||
// If it's the right position
|
||||
|
@ -526,7 +526,7 @@ void drawCharacter(uint8 flag) {
|
||||
float tz = 0;
|
||||
float pa0, pa1, pa2;
|
||||
|
||||
for (int b = 0; b < g_vm->_actor->_lightNum; b++) {
|
||||
for (uint32 b = 0; b < g_vm->_actor->_lightNum; b++) {
|
||||
// if off lint == 0
|
||||
// if it has a shadow lint & 0x80
|
||||
|
||||
@ -669,9 +669,9 @@ void drawCharacter(uint8 flag) {
|
||||
_x2d = _cx + (int)((l0 * _curCamera->_fovX) / l2);
|
||||
_y2d = _cy + (int)((l1 * _curCamera->_fovY) / l2);
|
||||
|
||||
_vVertex[a]._x = (short)_x2d;
|
||||
_vVertex[a]._y = (short)_y2d;
|
||||
_vVertex[a]._z = (short)((dist - l2) * 128.0);
|
||||
_vVertex[a]._x = _x2d;
|
||||
_vVertex[a]._y = _y2d;
|
||||
_vVertex[a]._z = (int32)((dist - l2) * 128.0);
|
||||
|
||||
g_vm->_actor->_lim[0] = MIN(_x2d, g_vm->_actor->_lim[0]);
|
||||
g_vm->_actor->_lim[1] = MAX(_x2d, g_vm->_actor->_lim[1]);
|
||||
@ -683,8 +683,8 @@ void drawCharacter(uint8 flag) {
|
||||
|
||||
_curVertex++;
|
||||
}
|
||||
g_vm->_actor->_lim[4] = (short)dist;
|
||||
g_vm->_actor->_lim[5] = (short)dist;
|
||||
g_vm->_actor->_lim[4] = (int)dist;
|
||||
g_vm->_actor->_lim[5] = (int)dist;
|
||||
|
||||
// vertex clipping
|
||||
g_vm->_actor->_lim[0] = (g_vm->_actor->_lim[0] <= _minXClip + 1) ? _minXClip : g_vm->_actor->_lim[0]--;
|
||||
|
@ -43,39 +43,8 @@ int read3D(Common::String filename) {
|
||||
if (ff == nullptr)
|
||||
error("read3D: Can't open 3D file %s", filename.c_str());
|
||||
|
||||
// read rooms and lights
|
||||
SCamera *cam = g_vm->_actor->_camera;
|
||||
cam->_ex = ff->readFloatLE();
|
||||
cam->_ey = ff->readFloatLE();
|
||||
cam->_ez = ff->readFloatLE();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
cam->_e1[i] = ff->readFloatLE();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
cam->_e2[i] = ff->readFloatLE();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
cam->_e3[i] = ff->readFloatLE();
|
||||
cam->_fovX = ff->readFloatLE();
|
||||
cam->_fovY = ff->readFloatLE();
|
||||
|
||||
g_vm->_actor->_lightNum = ff->readSint32LE();
|
||||
if (g_vm->_actor->_lightNum > MAXLIGHT)
|
||||
error("read3D(): Too many lights");
|
||||
|
||||
for (int i = 0; i < g_vm->_actor->_lightNum; ++i) {
|
||||
g_vm->_actor->_light[i]._x = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._y = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._z = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._dx = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._dy = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._dz = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._inr = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._outr = ff->readFloatLE();
|
||||
g_vm->_actor->_light[i]._hotspot = ff->readByte();
|
||||
g_vm->_actor->_light[i]._fallOff = ff->readByte();
|
||||
g_vm->_actor->_light[i]._inten = ff->readSByte();
|
||||
g_vm->_actor->_light[i]._position = ff->readSByte();
|
||||
}
|
||||
|
||||
g_vm->_actor->read3D(ff);
|
||||
|
||||
// read panels
|
||||
_panelNum = ff->readSint32LE();
|
||||
if (_panelNum > MAXPANELSINROOM)
|
||||
@ -150,8 +119,9 @@ int read3D(Common::String filename) {
|
||||
void findPath() {
|
||||
int b;
|
||||
|
||||
g_vm->_actor->_px += g_vm->_actor->_dx;
|
||||
g_vm->_actor->_pz += g_vm->_actor->_dz;
|
||||
Actor *actor = g_vm->_actor;
|
||||
actor->_px += actor->_dx;
|
||||
actor->_pz += actor->_dz;
|
||||
|
||||
int inters = 0;
|
||||
_numPathNodes = 0;
|
||||
@ -159,37 +129,37 @@ void findPath() {
|
||||
// if you have clicked behind the starting panel or the corner it's not possible to walk
|
||||
if ((_curPanel < 0) && (_oldPanel >= 0) &&
|
||||
// behind the starting panel
|
||||
((pointInside(b = _oldPanel, (double)_curX, (double)_curZ)) ||
|
||||
(pointInside(b = _oldPanel, _curX, _curZ) ||
|
||||
// behind the panel corner1
|
||||
((distF(_panel[_oldPanel]._x1, _panel[_oldPanel]._z1, g_vm->_actor->_px, g_vm->_actor->_pz) < EPSILON) &&
|
||||
(pointInside(b = _panel[_oldPanel]._near1, (double)_curX, (double)_curZ) ||
|
||||
pointInside(b = _panel[_oldPanel]._near2, (double)_curX, (double)_curZ))) ||
|
||||
((distF(_panel[_oldPanel]._x1, _panel[_oldPanel]._z1, actor->_px, actor->_pz) < EPSILON) &&
|
||||
(pointInside(b = _panel[_oldPanel]._near1, _curX, _curZ) ||
|
||||
pointInside(b = _panel[_oldPanel]._near2, _curX, _curZ))) ||
|
||||
// behind the panel corner2
|
||||
((distF(_panel[_oldPanel]._x2, _panel[_oldPanel]._z2, g_vm->_actor->_px, g_vm->_actor->_pz) < EPSILON) &&
|
||||
(pointInside(b = _panel[_oldPanel]._near2, (double)_curX, (double)_curZ) ||
|
||||
pointInside(b = _panel[_oldPanel]._near1, (double)_curX, (double)_curZ))))) {
|
||||
_curX = g_vm->_actor->_px;
|
||||
_curZ = g_vm->_actor->_pz;
|
||||
g_vm->_actor->_px -= g_vm->_actor->_dx;
|
||||
g_vm->_actor->_pz -= g_vm->_actor->_dz;
|
||||
((distF(_panel[_oldPanel]._x2, _panel[_oldPanel]._z2, actor->_px, actor->_pz) < EPSILON) &&
|
||||
(pointInside(b = _panel[_oldPanel]._near2, _curX, _curZ) ||
|
||||
pointInside(b = _panel[_oldPanel]._near1, _curX, _curZ))))) {
|
||||
_curX = actor->_px;
|
||||
_curZ = actor->_pz;
|
||||
actor->_px -= actor->_dx;
|
||||
actor->_pz -= actor->_dz;
|
||||
_curPanel = b;
|
||||
_numPathNodes = 0;
|
||||
lookAt(_lookX, _lookZ);
|
||||
return;
|
||||
}
|
||||
|
||||
float dist = distF(g_vm->_actor->_px, g_vm->_actor->_pz, _curX, _curZ);
|
||||
float dist = distF(actor->_px, actor->_pz, _curX, _curZ);
|
||||
|
||||
for (b = 0; b < _panelNum; b++) {
|
||||
if (_panel[b]._flags & 0x80000000) { // it must be a wide panel
|
||||
if (intersectLineLine(_panel[b]._x1, _panel[b]._z1,
|
||||
_panel[b]._x2, _panel[b]._z2,
|
||||
g_vm->_actor->_px, g_vm->_actor->_pz, _curX, _curZ)) {
|
||||
actor->_px, actor->_pz, _curX, _curZ)) {
|
||||
inters++;
|
||||
|
||||
_pathNode[_numPathNodes]._x = _x3d;
|
||||
_pathNode[_numPathNodes]._z = _z3d;
|
||||
_pathNode[_numPathNodes]._dist = distF(g_vm->_actor->_px, g_vm->_actor->_pz, _x3d, _z3d);
|
||||
_pathNode[_numPathNodes]._dist = distF(actor->_px, actor->_pz, _x3d, _z3d);
|
||||
_pathNode[_numPathNodes]._oldp = b;
|
||||
_pathNode[_numPathNodes]._curp = b;
|
||||
_numPathNodes++;
|
||||
@ -204,11 +174,11 @@ void findPath() {
|
||||
_numPathNodes--;
|
||||
|
||||
// If the click is inside the nearby panel
|
||||
if ((_curPanel < 0) && (pointInside(b, (double)_curX, (double)_curZ))) {
|
||||
_curX = g_vm->_actor->_px;
|
||||
_curZ = g_vm->_actor->_pz;
|
||||
g_vm->_actor->_px -= g_vm->_actor->_dx;
|
||||
g_vm->_actor->_pz -= g_vm->_actor->_dz;
|
||||
if ((_curPanel < 0) && (pointInside(b, _curX, _curZ))) {
|
||||
_curX = actor->_px;
|
||||
_curZ = actor->_pz;
|
||||
actor->_px -= actor->_dx;
|
||||
actor->_pz -= actor->_dz;
|
||||
|
||||
_curPanel = b;
|
||||
lookAt(_lookX, _lookZ);
|
||||
@ -229,8 +199,8 @@ void findPath() {
|
||||
// always adds start and finish node only in on a panel
|
||||
inters++;
|
||||
|
||||
_pathNode[_numPathNodes]._x = g_vm->_actor->_px;
|
||||
_pathNode[_numPathNodes]._z = g_vm->_actor->_pz;
|
||||
_pathNode[_numPathNodes]._x = actor->_px;
|
||||
_pathNode[_numPathNodes]._z = actor->_pz;
|
||||
_pathNode[_numPathNodes]._dist = 0.0;
|
||||
_pathNode[_numPathNodes]._oldp = _oldPanel;
|
||||
_pathNode[_numPathNodes]._curp = _oldPanel;
|
||||
@ -264,7 +234,7 @@ void findPath() {
|
||||
if (((inters & 1) && (_curPanel < 0) && (_oldPanel < 0)) ||
|
||||
((inters - 1 & 1) && (_curPanel < 0) &&
|
||||
(!findAttachedPanel(_pathNode[_numPathNodes - 2]._curp, _pathNode[_numPathNodes - 1]._curp) ||
|
||||
pointInside(_pathNode[_numPathNodes - 1]._curp, (double)_curX, (double)_curZ)))) {
|
||||
pointInside(_pathNode[_numPathNodes - 1]._curp, _curX, _curZ)))) {
|
||||
|
||||
_curPanel = _pathNode[_numPathNodes - 1]._curp;
|
||||
|
||||
@ -348,7 +318,7 @@ void findPath() {
|
||||
|
||||
_pathNode[_numPathNodes]._x = _curX;
|
||||
_pathNode[_numPathNodes]._z = _curZ;
|
||||
_pathNode[_numPathNodes]._dist = distF(g_vm->_actor->_px, g_vm->_actor->_pz, _curX, _curZ);
|
||||
_pathNode[_numPathNodes]._dist = distF(actor->_px, actor->_pz, _curX, _curZ);
|
||||
_pathNode[_numPathNodes]._oldp = _curPanel;
|
||||
_pathNode[_numPathNodes]._curp = _curPanel;
|
||||
_numPathNodes ++;
|
||||
@ -356,8 +326,8 @@ void findPath() {
|
||||
findShortPath();
|
||||
displayPath();
|
||||
} else { // otherwise if it's direct
|
||||
_pathNode[_numPathNodes]._x = g_vm->_actor->_px;
|
||||
_pathNode[_numPathNodes]._z = g_vm->_actor->_pz;
|
||||
_pathNode[_numPathNodes]._x = actor->_px;
|
||||
_pathNode[_numPathNodes]._z = actor->_pz;
|
||||
_pathNode[_numPathNodes]._dist = 0.0;
|
||||
_pathNode[_numPathNodes]._oldp = _oldPanel;
|
||||
_pathNode[_numPathNodes]._curp = _oldPanel;
|
||||
@ -365,7 +335,7 @@ void findPath() {
|
||||
|
||||
_pathNode[_numPathNodes]._x = _curX;
|
||||
_pathNode[_numPathNodes]._z = _curZ;
|
||||
_pathNode[_numPathNodes]._dist = distF(g_vm->_actor->_px, g_vm->_actor->_pz, _curX, _curZ);
|
||||
_pathNode[_numPathNodes]._dist = distF(actor->_px, actor->_pz, _curX, _curZ);
|
||||
_pathNode[_numPathNodes]._oldp = _curPanel;
|
||||
_pathNode[_numPathNodes]._curp = _curPanel;
|
||||
_numPathNodes++;
|
||||
@ -373,8 +343,8 @@ void findPath() {
|
||||
displayPath();
|
||||
}
|
||||
|
||||
g_vm->_actor->_px -= g_vm->_actor->_dx;
|
||||
g_vm->_actor->_pz -= g_vm->_actor->_dz;
|
||||
actor->_px -= actor->_dx;
|
||||
actor->_pz -= actor->_dz;
|
||||
}
|
||||
/*------------------------------------------------
|
||||
Look for the shorter route avoiding obstacle
|
||||
@ -1579,11 +1549,11 @@ void initSortPan() {
|
||||
|
||||
// First panel is behind everything and is not sorted
|
||||
_sortPan[0]._min = 30000.0;
|
||||
_sortPan[0]._num = BACKGROUND;
|
||||
_sortPan[0]._num = BOX_BACKGROUND;
|
||||
|
||||
// Last panel is in front of everything and is not sorted
|
||||
_sortPan[30]._min = 0.0;
|
||||
_sortPan[30]._num = FOREGROUND;
|
||||
_sortPan[30]._num = BOX_FOREGROUND;
|
||||
|
||||
// Sort panel blocks by increasing distance from the camera
|
||||
for (b = 0; b < _panelNum; b++) {
|
||||
@ -1605,7 +1575,7 @@ void initSortPan() {
|
||||
sortPanel();
|
||||
|
||||
for (b = 0; b < _numSortPan; b++) {
|
||||
if (_sortPan[b]._num == BACKGROUND) {
|
||||
if (_sortPan[b]._num == BOX_BACKGROUND) {
|
||||
// now the panels go from 0 (foreground) to _numSortPan (background)
|
||||
_numSortPan = b;
|
||||
break;
|
||||
@ -1640,20 +1610,21 @@ void sortPanel() {
|
||||
--------------------------------------------------*/
|
||||
void actorOrder() {
|
||||
#define LARGEVAL 15.0 // 30 cm (max)
|
||||
|
||||
if (_forcedActorPos) {
|
||||
if (_forcedActorPos != BOX_NORMAL) {
|
||||
_actorPos = _forcedActorPos;
|
||||
return;
|
||||
}
|
||||
|
||||
float ox = g_vm->_actor->_px + g_vm->_actor->_dx - g_vm->_actor->_camera->_ex;
|
||||
float oz = g_vm->_actor->_pz + g_vm->_actor->_dz - g_vm->_actor->_camera->_ez;
|
||||
Actor *actor = g_vm->_actor;
|
||||
|
||||
float ox = actor->_px + actor->_dx - actor->_camera->_ex;
|
||||
float oz = actor->_pz + actor->_dz - actor->_camera->_ez;
|
||||
float dist = sqrt(ox * ox + oz * oz);
|
||||
float lx = (-oz / dist) * LARGEVAL;
|
||||
float lz = (ox / dist) * LARGEVAL;
|
||||
|
||||
ox = g_vm->_actor->_px + g_vm->_actor->_dx;
|
||||
oz = g_vm->_actor->_pz + g_vm->_actor->_dz;
|
||||
ox = actor->_px + actor->_dx;
|
||||
oz = actor->_pz + actor->_dz;
|
||||
|
||||
// It must be copied in front of the nearest box
|
||||
_actorPos = _sortPan[1]._num;
|
||||
@ -1663,9 +1634,7 @@ void actorOrder() {
|
||||
// If it's not wide and belongs to this level
|
||||
if (!(_panel[a]._flags & 0x80000000) && (_panel[a]._flags & (1 << (_sortPan[b]._num - 1)))) {
|
||||
// If it intersects the center of the character camera
|
||||
if (intersectLineLine(_panel[a]._x1, _panel[a]._z1, _panel[a]._x2, _panel[a]._z2, g_vm->_actor->_camera->_ex, g_vm->_actor->_camera->_ez, ox, oz)
|
||||
|| intersectLineLine(_panel[a]._x1, _panel[a]._z1, _panel[a]._x2, _panel[a]._z2, g_vm->_actor->_camera->_ex, g_vm->_actor->_camera->_ez, ox + lx, oz + lz)
|
||||
|| intersectLineLine(_panel[a]._x1, _panel[a]._z1, _panel[a]._x2, _panel[a]._z2, g_vm->_actor->_camera->_ex, g_vm->_actor->_camera->_ez, ox - lx, oz - lz)) {
|
||||
if (intersectLineLine(_panel[a]._x1, _panel[a]._z1, _panel[a]._x2, _panel[a]._z2, actor->_camera->_ex, actor->_camera->_ez, ox, oz) || intersectLineLine(_panel[a]._x1, _panel[a]._z1, _panel[a]._x2, _panel[a]._z2, actor->_camera->_ex, actor->_camera->_ez, ox + lx, oz + lz) || intersectLineLine(_panel[a]._x1, _panel[a]._z1, _panel[a]._x2, _panel[a]._z2, actor->_camera->_ex, actor->_camera->_ez, ox - lx, oz - lz)) {
|
||||
// If it intersects it must be copied after the next box
|
||||
_actorPos = _sortPan[b + 1]._num;
|
||||
}
|
||||
|
@ -106,13 +106,13 @@ void ExecuteAtFrameDoit(ATFHandle *h, int doit, int obj) {
|
||||
g_vm->_flagCharacterExists = true;
|
||||
break;
|
||||
case fCHARACTERFOREGROUND:
|
||||
_forcedActorPos = FOREGROUND;
|
||||
_forcedActorPos = BOX_FOREGROUND;
|
||||
break;
|
||||
case fCHARACTERBACKGROUND:
|
||||
_forcedActorPos = BACKGROUND;
|
||||
_forcedActorPos = BOX_BACKGROUND;
|
||||
break;
|
||||
case fCHARACTERNORM:
|
||||
_forcedActorPos = 0;
|
||||
_forcedActorPos = BOX_NORMAL;
|
||||
break;
|
||||
case fSETEXTRA:
|
||||
g_vm->_obj[obj]._flag |= kObjFlagExtra;
|
||||
@ -232,11 +232,11 @@ void ProcessAtFrame(ATFHandle *h, int type, int atf) {
|
||||
RegenRoom();
|
||||
break;
|
||||
case ATFSETFORE:
|
||||
g_vm->_obj[h->_curAnim->_atFrame[atf]._index]._nbox = FOREGROUND;
|
||||
g_vm->_obj[h->_curAnim->_atFrame[atf]._index]._nbox = BOX_FOREGROUND;
|
||||
RegenRoom();
|
||||
break;
|
||||
case ATFSETBACK:
|
||||
g_vm->_obj[h->_curAnim->_atFrame[atf]._index]._nbox = BACKGROUND;
|
||||
g_vm->_obj[h->_curAnim->_atFrame[atf]._index]._nbox = BOX_BACKGROUND;
|
||||
RegenRoom();
|
||||
break;
|
||||
case ATFSWITCH:
|
||||
|
@ -415,7 +415,7 @@ void AnimManager::stopFullMotion() {
|
||||
|
||||
void AnimManager::refreshAnim(int box) {
|
||||
for (int a = 0; a < MAXSMACK; a++) {
|
||||
if ((_playingAnims[a] != 0) && (box == BACKGROUND)) {
|
||||
if ((_playingAnims[a] != 0) && (box == BOX_BACKGROUND)) {
|
||||
if (a != 1) {
|
||||
refreshSmkAnim(_playingAnims[a]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user