mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
TINSEL: Fix GCC Compilation Warnings
These are also associated with memset on non-trivial structures.
This commit is contained in:
parent
5022d87956
commit
0c479251c7
@ -114,7 +114,7 @@ OBJECT *AllocObject() {
|
||||
pFreeObjects = pObj->pNext;
|
||||
|
||||
// clear out object
|
||||
memset(pObj, 0, sizeof(OBJECT));
|
||||
pObj->reset();
|
||||
|
||||
// set default drawing mode and set changed bit
|
||||
pObj->flags = DMA_WNZ | DMA_CHANGED;
|
||||
|
@ -92,6 +92,33 @@ struct OBJECT {
|
||||
SCNHANDLE hShape; ///< objects current animation frame
|
||||
SCNHANDLE hMirror; ///< objects previous animation frame
|
||||
int oid; ///< object identifier
|
||||
|
||||
void reset() {
|
||||
pNext = nullptr;
|
||||
pSlave = nullptr;
|
||||
//pOnDispList = nullptr;
|
||||
//xVel = 0;
|
||||
//yVel = 0;
|
||||
xPos = 0;
|
||||
yPos = 0;
|
||||
zPos = 0;
|
||||
rcPrev.top = 0;
|
||||
rcPrev.left = 0;
|
||||
rcPrev.bottom = 0;
|
||||
rcPrev.right = 0;
|
||||
flags = 0;
|
||||
pPal = nullptr;
|
||||
constant = 0;
|
||||
width = 0;
|
||||
height = 0;
|
||||
hBits = 0;
|
||||
hImg = 0;
|
||||
hShape = 0;
|
||||
hMirror = 0;
|
||||
oid = 0;
|
||||
}
|
||||
|
||||
OBJECT() { reset(); }
|
||||
};
|
||||
typedef OBJECT *POBJECT;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user