mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
BBVS: Fix Memset on Non-Trivial Structure GCC Compiler Warnings
This commit is contained in:
parent
d74b2e09b3
commit
312770c972
@ -172,7 +172,27 @@ struct SceneObject {
|
||||
int xIncr, yIncr;
|
||||
int turnValue, turnCount, turnTicks;
|
||||
Common::Point walkDestPt;
|
||||
SceneObject() : sceneObjectDef(0), anim(0) {
|
||||
|
||||
SceneObject() {
|
||||
clear();
|
||||
}
|
||||
|
||||
void clear() {
|
||||
x = 0;
|
||||
y = 0;
|
||||
sceneObjectDef = nullptr;
|
||||
anim = nullptr;
|
||||
animIndex = 0;
|
||||
frameIndex = 0;
|
||||
frameTicks = 0;
|
||||
walkCount = 0;
|
||||
xIncr = 0;
|
||||
yIncr = 0;
|
||||
turnValue = 0;
|
||||
turnCount = 0;
|
||||
turnTicks = 0;
|
||||
walkDestPt.x = 0;
|
||||
walkDestPt.y = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -109,8 +109,8 @@ void BbvsEngine::loadgame(const char *filename) {
|
||||
|
||||
g_engine->setTotalPlayTime(header.playTime * 1000);
|
||||
|
||||
memset(_sceneObjects, 0, sizeof(_sceneObjects));
|
||||
for (int i = 0; i < kSceneObjectsCount; ++i) {
|
||||
_sceneObjects[i].clear();
|
||||
_sceneObjects[i].walkDestPt.x = -1;
|
||||
_sceneObjects[i].walkDestPt.y = -1;
|
||||
}
|
||||
|
@ -100,8 +100,8 @@ void BbvsEngine::initScene(bool sounds) {
|
||||
|
||||
memset(_backgroundSoundsActive, 0, sizeof(_backgroundSoundsActive));
|
||||
|
||||
memset(_sceneObjects, 0, sizeof(_sceneObjects));
|
||||
for (int i = 0; i < kSceneObjectsCount; ++i) {
|
||||
_sceneObjects[i].clear();
|
||||
_sceneObjects[i].walkDestPt.x = -1;
|
||||
_sceneObjects[i].walkDestPt.y = -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user