HDB: Further Fixes for GCC Compiler Warnings

This commit is contained in:
D G Turner 2019-09-13 23:05:22 +01:00
parent bc7d30fb07
commit c0d6a8fc7a
3 changed files with 16 additions and 3 deletions

View File

@ -1246,7 +1246,9 @@ void AI::restartSystem() {
_hereList->clear();
// Clear Bridges
memset(&_bridges[0], 0, sizeof(_bridges));
for (uint8 i = 0; i < ARRAYSIZE(_bridges); i++) {
_bridges[i].reset();
}
_numBridges = 0;
// Clear waypoints

View File

@ -634,6 +634,7 @@ struct DlvEnt {
destTextName[0] = 0;
destGfxName[0] = 0;
}
~DlvEnt() {
itemGfx = NULL;
destGfx = NULL;
@ -765,7 +766,17 @@ struct Bridge {
uint16 delay;
uint16 anim;
Bridge() : x(0), y(0), dir(DIR_NONE), delay(0), anim(0) {}
void reset() {
x = 0;
y = 0;
dir = DIR_NONE;
delay = 0;
anim = 0;
}
Bridge() {
reset();
}
};
struct CineCommand {

View File

@ -574,7 +574,7 @@ void HDBGame::useEntity(AIEntity *e) {
AIEntity temp;
if (_ai->getTableEnt(e->type)) {
memcpy(&temp, e, sizeof(AIEntity));
temp = *e;
_ai->getItemSound(e->type);