mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 08:17:40 +00:00
Fix some variable may be used uninitialized warnings.
svn-id: r40528
This commit is contained in:
parent
b9ac179b2e
commit
f0182121f7
@ -141,6 +141,7 @@ bool AgiEngine::predictiveDialog(void) {
|
||||
|
||||
// show the predictive dialog.
|
||||
// if another window is already in display, save its state into tmpwindow
|
||||
memset(&tmpwindow, 0, sizeof(tmpwindow));
|
||||
tmpwindow.active = false;
|
||||
if (_game.window.active)
|
||||
memcpy(&tmpwindow, &(_game.window), sizeof(AgiBlock));
|
||||
|
@ -53,6 +53,9 @@ void decodeGfxUnified(dataFileEntry *pCurrentFileEntry, int16 format) {
|
||||
case 5:
|
||||
spriteSize = pCurrentFileEntry->height * pCurrentFileEntry->widthInColumn;
|
||||
break;
|
||||
|
||||
default:
|
||||
error("Unkown gfx format %d", format);
|
||||
}
|
||||
|
||||
uint8 *buffer = (uint8 *)malloc(spriteSize);
|
||||
@ -66,7 +69,7 @@ void decodeGfxUnified(dataFileEntry *pCurrentFileEntry, int16 format) {
|
||||
uint8 c;
|
||||
uint16 p0;
|
||||
// Format 4
|
||||
uint16 p1, p2, p3;
|
||||
uint16 p1 = 0, p2 = 0, p3 = 0;
|
||||
|
||||
p0 = (dataPtr[0] << 8) | dataPtr[1];
|
||||
|
||||
|
@ -1155,7 +1155,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size,
|
||||
int pos = 0;
|
||||
int x, y;
|
||||
int oldx, oldy;
|
||||
int pal, index;
|
||||
int pal = 0, index = 0;
|
||||
int temp;
|
||||
int line_mode = style->line_mode;
|
||||
// NOTE: here, it is assumed that the titlebar size is always 10. This may differ depending on
|
||||
|
@ -339,6 +339,7 @@ DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
|
||||
} while (textChar >= 10);
|
||||
|
||||
DisplayedText ret;
|
||||
memset(&ret, 0, sizeof(ret));
|
||||
ret.textData = dest;
|
||||
ret.textWidth = dtLastWidth;
|
||||
return ret;
|
||||
|
@ -285,6 +285,7 @@ void Screen::buildDisplay() {
|
||||
byte *file = _vm->_resman->openResource(_thisScreen.background_layer_id);
|
||||
|
||||
MultiScreenHeader screenLayerTable;
|
||||
memset(&screenLayerTable, 0, sizeof(screenLayerTable));
|
||||
|
||||
if (!Sword2Engine::isPsx()) // On PSX version, there would be nothing to read here
|
||||
screenLayerTable.read(file + ResHeader::size());
|
||||
|
Loading…
Reference in New Issue
Block a user