mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 04:16:34 +00:00
TRECISION: Clean up warnings
This commit is contained in:
parent
61f033257f
commit
b84814cd34
@ -384,7 +384,7 @@ void Actor::actorDoAction(int action) {
|
||||
int cur = 0;
|
||||
|
||||
while (cur < action)
|
||||
cfp += _vm->_defActionLen[cur++];
|
||||
cfp += defActionLen[cur++];
|
||||
v = &_characterArea[cfp * _vertexNum];
|
||||
|
||||
if (action == hWALKOUT)
|
||||
@ -392,7 +392,7 @@ void Actor::actorDoAction(int action) {
|
||||
else if (action == hLAST)
|
||||
v = _characterArea;
|
||||
|
||||
int len = _vm->_defActionLen[action];
|
||||
int len = defActionLen[action];
|
||||
|
||||
int stepIdx;
|
||||
for (stepIdx = _vm->_pathFind->_curStep; stepIdx < len + _vm->_pathFind->_curStep; ++stepIdx) {
|
||||
|
@ -42,7 +42,7 @@ private:
|
||||
void executeAtFrameDoit(ATFHandle *h, int doit, uint16 obj);
|
||||
void processAtFrame(ATFHandle *h, int type, int atf);
|
||||
|
||||
ATFHandle _animType[3]{};
|
||||
ATFHandle _animType[3];
|
||||
int _oneSpeakDialogCount;
|
||||
|
||||
public:
|
||||
|
@ -44,7 +44,7 @@ enum ObjectFlags {
|
||||
kObjFlagTake = 16,
|
||||
kObjFlagUseWith = 32,
|
||||
kObjFlagExtra = 64,
|
||||
kObjFlagDone = 128,
|
||||
kObjFlagDone = 128
|
||||
};
|
||||
|
||||
enum SoundFlags {
|
||||
@ -1617,7 +1617,7 @@ enum SentenceId {
|
||||
enum AnimationId {
|
||||
kAnim113UseVial = 77,
|
||||
kAnim121TryOpenLetterboxes = 82,
|
||||
kAnim122OpenLetterbox17 = 83,
|
||||
kAnim122OpenLetterbox17 = 83
|
||||
};
|
||||
|
||||
|
||||
|
@ -37,10 +37,11 @@ void TrecisionEngine::refreshInventory(uint8 startIcon, uint8 startLine) {
|
||||
|
||||
_graphicsMgr->clearScreenBufferInventory();
|
||||
|
||||
for (byte iconSlot = 0; iconSlot < ICONSHOWN; iconSlot++) {
|
||||
if (iconSlot + startIcon >= _inventory.size())
|
||||
for (uint8 iconSlot = 0; iconSlot < ICONSHOWN; iconSlot++) {
|
||||
uint8 i = iconSlot + startIcon;
|
||||
if (i >= _inventory.size())
|
||||
break;
|
||||
const byte iconIndex = _inventory[iconSlot + startIcon];
|
||||
const byte iconIndex = _inventory[i];
|
||||
if (iconIndex == _lightIcon)
|
||||
continue;
|
||||
|
||||
|
@ -848,14 +848,14 @@ void PathFinding3D::buildFramelist() {
|
||||
int curAction, curFrame, cfp;
|
||||
if (_vm->_actor->_curAction == hWALK) {
|
||||
// compute current frame
|
||||
cfp = _vm->_defActionLen[hSTART] + 1 + _vm->_actor->_curFrame;
|
||||
cfp = defActionLen[hSTART] + 1 + _vm->_actor->_curFrame;
|
||||
v += cfp * _vm->_actor->_vertexNum;
|
||||
|
||||
curAction = hWALK;
|
||||
curFrame = _vm->_actor->_curFrame;
|
||||
|
||||
// if it wasn't the last frame, take the next step
|
||||
if (_vm->_actor->_curFrame < _vm->_defActionLen[hWALK] - 1) {
|
||||
if (_vm->_actor->_curFrame < defActionLen[hWALK] - 1) {
|
||||
++cfp;
|
||||
++curFrame;
|
||||
v += _vm->_actor->_vertexNum;
|
||||
@ -867,7 +867,7 @@ void PathFinding3D::buildFramelist() {
|
||||
curAction = hWALK;
|
||||
curFrame = _vm->_actor->_curAction - hSTOP0;
|
||||
|
||||
cfp = _vm->_defActionLen[hSTART] + 1 + curFrame;
|
||||
cfp = defActionLen[hSTART] + 1 + curFrame;
|
||||
v += cfp * _vm->_actor->_vertexNum;
|
||||
} else {
|
||||
// if he was standing, start working or turn
|
||||
@ -898,17 +898,17 @@ void PathFinding3D::buildFramelist() {
|
||||
++curFrame;
|
||||
++cfp;
|
||||
|
||||
if (curFrame >= _vm->_defActionLen[curAction]) {
|
||||
if (curFrame >= defActionLen[curAction]) {
|
||||
if (curAction == hSTART) {
|
||||
curAction = hWALK;
|
||||
curFrame = 0;
|
||||
cfp = _vm->_defActionLen[hSTART] + 1;
|
||||
cfp = defActionLen[hSTART] + 1;
|
||||
|
||||
ox = 0.0f;
|
||||
} else if (curAction == hWALK) {
|
||||
curAction = hWALK;
|
||||
curFrame = 0;
|
||||
cfp = _vm->_defActionLen[hSTART] + 1;
|
||||
cfp = defActionLen[hSTART] + 1;
|
||||
|
||||
// end walk frame
|
||||
ox = _vm->_actor->frameCenter(v) - firstFrame;
|
||||
@ -943,11 +943,11 @@ void PathFinding3D::buildFramelist() {
|
||||
int index = 0;
|
||||
cfp = 0;
|
||||
while (index != curAction)
|
||||
cfp += _vm->_defActionLen[index++];
|
||||
cfp += defActionLen[index++];
|
||||
|
||||
v = &_vm->_actor->_characterArea[cfp * _vm->_actor->_vertexNum];
|
||||
|
||||
for (index = 0; index < _vm->_defActionLen[curAction]; ++index) {
|
||||
for (index = 0; index < defActionLen[curAction]; ++index) {
|
||||
curLen = oz + _vm->_actor->frameCenter(v) - firstFrame;
|
||||
_step[i]._pz = oz - firstFrame; // where to render
|
||||
_step[i]._dz = curLen; // where it is
|
||||
|
@ -463,7 +463,7 @@ void Renderer3D::calcCharacterPoints() {
|
||||
int cfp = 0;
|
||||
int cur = 0;
|
||||
while (cur < actor->_curAction)
|
||||
cfp += _vm->_defActionLen[cur++];
|
||||
cfp += defActionLen[cur++];
|
||||
|
||||
if (actor->_curAction == hWALKOUT)
|
||||
cfp = 1;
|
||||
@ -702,7 +702,7 @@ void Renderer3D::calcCharacterPoints() {
|
||||
}
|
||||
|
||||
if (actor->_curAction == hLAST) // exit displacer
|
||||
actor->_lim[2] = actor->_lim[3] - (((actor->_lim[3] - actor->_lim[2]) * actor->_curFrame) / _vm->_defActionLen[hLAST]);
|
||||
actor->_lim[2] = actor->_lim[3] - (((actor->_lim[3] - actor->_lim[2]) * actor->_curFrame) / defActionLen[hLAST]);
|
||||
|
||||
// set zbuffer vars
|
||||
setZBufferRegion(actor->_lim[0], actor->_lim[2], actor->_lim[1] - actor->_lim[0]);
|
||||
|
@ -29,8 +29,8 @@ Scheduler::Scheduler(TrecisionEngine *vm) : _vm(vm) {
|
||||
_token = CLASS_CHAR;
|
||||
_counter = 0;
|
||||
|
||||
_idleMsg = { MC_IDLE, 0, MP_DEFAULT, 0, 0, 0, 0 };
|
||||
_msg = {MC_IDLE, 0, MP_DEFAULT, 0, 0, 0, 0};
|
||||
Message msg = { MC_IDLE, 0, MP_DEFAULT, 0, 0, 0, 0 };
|
||||
_idleMsg = _msg = msg;
|
||||
}
|
||||
|
||||
Scheduler::~Scheduler() {
|
||||
|
@ -168,7 +168,7 @@ void SoundManager::soundStep(int midx, int midz, int act, int frame) {
|
||||
case hSTOP2:
|
||||
case hSTOP3:
|
||||
case hSTOP9:
|
||||
if (frame >= _vm->_defActionLen[act] - 1)
|
||||
if (frame >= defActionLen[act] - 1)
|
||||
stepLeft = true;
|
||||
break;
|
||||
case hSTOP4:
|
||||
@ -176,7 +176,7 @@ void SoundManager::soundStep(int midx, int midz, int act, int frame) {
|
||||
case hSTOP6:
|
||||
case hSTOP7:
|
||||
case hSTOP8:
|
||||
if (frame >= _vm->_defActionLen[act] - 1)
|
||||
if (frame >= defActionLen[act] - 1)
|
||||
stepRight = true;
|
||||
break;
|
||||
default:
|
||||
@ -280,8 +280,7 @@ void SoundManager::loadRoomSounds() {
|
||||
|
||||
void SoundManager::loadSamples(Common::SeekableReadStreamEndian *stream) {
|
||||
for (int i = 0; i < NUMSAMPLES; ++i) {
|
||||
for (int j = 0; j < 14; j++)
|
||||
_gSample[i]._name += stream->readByte();
|
||||
_gSample[i]._name = stream->readString(0, 14);
|
||||
_gSample[i]._volume = stream->readByte();
|
||||
_gSample[i]._flag = stream->readByte();
|
||||
_gSample[i]._panning = stream->readSByte();
|
||||
|
@ -48,7 +48,7 @@ struct SRoom {
|
||||
void loadRoom(Common::SeekableReadStreamEndian *stream);
|
||||
|
||||
private:
|
||||
uint8 _flag = 0; // Room visited or not, extra or not
|
||||
uint8 _flag; // Room visited or not, extra or not
|
||||
};
|
||||
|
||||
struct SObject {
|
||||
@ -97,8 +97,8 @@ struct SObject {
|
||||
void loadObj(Common::SeekableReadStreamEndian *stream);
|
||||
|
||||
private:
|
||||
uint8 _flag = 0;
|
||||
uint8 _mode = 0;
|
||||
uint8 _flag;
|
||||
uint8 _mode;
|
||||
};
|
||||
|
||||
struct SInvObject {
|
||||
@ -116,7 +116,7 @@ struct SInvObject {
|
||||
void loadObj(Common::SeekableReadStreamEndian *stream);
|
||||
|
||||
private:
|
||||
uint8 _flag = 0;
|
||||
uint8 _flag;
|
||||
};
|
||||
|
||||
struct SAtFrame {
|
||||
@ -184,7 +184,7 @@ struct STexture {
|
||||
bool isActive() { return _active; };
|
||||
|
||||
private:
|
||||
bool _active = false;
|
||||
bool _active;
|
||||
};
|
||||
|
||||
struct SVertex {
|
||||
|
@ -151,7 +151,8 @@ TrecisionEngine::TrecisionEngine(OSystem *syst, const ADGameDescription *desc) :
|
||||
_cx = _cy = 0;
|
||||
|
||||
_textArea = nullptr;
|
||||
_snake52 = {MC_IDLE, 0, MP_DEFAULT, 0, 0, 0, 0};
|
||||
Message msg = { MC_IDLE, 0, MP_DEFAULT, 0, 0, 0, 0 };
|
||||
_snake52 = msg;
|
||||
for (int i = 0; i < 50; ++i)
|
||||
_scriptFrame[i].clear();
|
||||
|
||||
|
@ -328,29 +328,29 @@ public:
|
||||
uint8 _textStatus;
|
||||
|
||||
uint32 _pauseStartTime;
|
||||
};
|
||||
|
||||
uint8 const _defActionLen[hLAST + 1] = {
|
||||
/* STAND */ 1,
|
||||
/* PARTE */ 1,
|
||||
/* WALK */ 10,
|
||||
/* END */ 1,
|
||||
/* STOP0 */ 3,
|
||||
/* STOP1 */ 4,
|
||||
/* STOP2 */ 3,
|
||||
/* STOP3 */ 2,
|
||||
/* STOP4 */ 3,
|
||||
/* STOP5 */ 4,
|
||||
/* STOP6 */ 3,
|
||||
/* STOP7 */ 3,
|
||||
/* STOP8 */ 2,
|
||||
/* STOP9 */ 3,
|
||||
/* WALKI */ 12,
|
||||
/* BOH */ 9,
|
||||
/* UGG */ 41,
|
||||
/* UTT */ 35,
|
||||
/* WALKO */ 12,
|
||||
/* LAST */ 15
|
||||
};
|
||||
uint8 static const defActionLen[hLAST + 1] = {
|
||||
/* STAND */ 1,
|
||||
/* PARTE */ 1,
|
||||
/* WALK */ 10,
|
||||
/* END */ 1,
|
||||
/* STOP0 */ 3,
|
||||
/* STOP1 */ 4,
|
||||
/* STOP2 */ 3,
|
||||
/* STOP3 */ 2,
|
||||
/* STOP4 */ 3,
|
||||
/* STOP5 */ 4,
|
||||
/* STOP6 */ 3,
|
||||
/* STOP7 */ 3,
|
||||
/* STOP8 */ 2,
|
||||
/* STOP9 */ 3,
|
||||
/* WALKI */ 12,
|
||||
/* BOH */ 9,
|
||||
/* UGG */ 41,
|
||||
/* UTT */ 35,
|
||||
/* WALKO */ 12,
|
||||
/* LAST */ 15
|
||||
};
|
||||
|
||||
} // End of namespace Trecision
|
||||
|
Loading…
x
Reference in New Issue
Block a user