mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
PRINCE: Fix Memset on Non-Trivial Structure GCC Compiler Warnings
This commit is contained in:
parent
61b31bbcc6
commit
cf3d419119
@ -88,7 +88,16 @@ struct Text {
|
||||
uint16 _time;
|
||||
uint32 _color;
|
||||
|
||||
Text() : _str(nullptr), _x(0), _y(0), _time(0), _color(255){
|
||||
Text() {
|
||||
clear();
|
||||
}
|
||||
|
||||
void clear() {
|
||||
_str = nullptr;
|
||||
_x = 0;
|
||||
_y = 0;
|
||||
_time = 0;
|
||||
_color = 255;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -93,7 +93,10 @@ bool PrinceEngine::loadLocation(uint16 locationNr) {
|
||||
|
||||
_flicPlayer.close();
|
||||
|
||||
memset(_textSlots, 0, sizeof(_textSlots));
|
||||
for (uint i = 0; i < ARRAYSIZE(_textSlots); i++) {
|
||||
_textSlots[i].clear();
|
||||
_textSlots[i]._color = 0; // FIXME: Can be left at default of 255?
|
||||
}
|
||||
freeAllSamples();
|
||||
|
||||
debugEngine("PrinceEngine::loadLocation %d", locationNr);
|
||||
|
Loading…
Reference in New Issue
Block a user