Mercurial > hg > dmlib
comparison tools/64vw.c @ 2199:f331cc750b37
Rename variable.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 13 Jun 2019 23:59:05 +0300 |
parents | 5dc1e323d3d4 |
children | dcd26cdc395e |
comparison
equal
deleted
inserted
replaced
2198:c26a51ea70be | 2199:f331cc750b37 |
---|---|
265 SDL_Renderer *renderer = NULL; | 265 SDL_Renderer *renderer = NULL; |
266 SDL_Texture *texture = NULL; | 266 SDL_Texture *texture = NULL; |
267 SDL_Surface *surf = NULL; | 267 SDL_Surface *surf = NULL; |
268 BOOL initSDL = FALSE, exitFlag, needRedraw; | 268 BOOL initSDL = FALSE, exitFlag, needRedraw; |
269 size_t currIndex, prevIndex; | 269 size_t currIndex, prevIndex; |
270 int ret; | 270 int res; |
271 | 271 |
272 dmC64InitializeFormats(); | 272 dmC64InitializeFormats(); |
273 dmSetScaleFactor(2.0); | 273 dmSetScaleFactor(2.0); |
274 memset(&spec, 0, sizeof(spec)); | 274 memset(&spec, 0, sizeof(spec)); |
275 memset(&setCharROM, 0, sizeof(setCharROM)); | 275 memset(&setCharROM, 0, sizeof(setCharROM)); |
316 { | 316 { |
317 char *filename = optFilenames[n]; | 317 char *filename = optFilenames[n]; |
318 const DMC64ImageFormat *fmt = NULL; | 318 const DMC64ImageFormat *fmt = NULL; |
319 DMC64Image *cimage = NULL; | 319 DMC64Image *cimage = NULL; |
320 | 320 |
321 if ((ret = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK) | 321 if ((res = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK) |
322 { | 322 { |
323 if (!optListOnly && ret != DMERR_NOT_SUPPORTED) | 323 if (!optListOnly && res != DMERR_NOT_SUPPORTED) |
324 { | 324 { |
325 dmErrorMsg("Could not decode file '%s': %s\n", | 325 dmErrorMsg("Could not decode file '%s': %s\n", |
326 filename, dmErrorStr(ret)); | 326 filename, dmErrorStr(res)); |
327 } | 327 } |
328 } | 328 } |
329 else | 329 else |
330 if (optListOnly) | 330 if (optListOnly) |
331 { | 331 { |
348 | 348 |
349 // Attempt to read character ROM | 349 // Attempt to read character ROM |
350 dmMsg(1, "Using character ROM file '%s'.\n", | 350 dmMsg(1, "Using character ROM file '%s'.\n", |
351 optCharROMFilename); | 351 optCharROMFilename); |
352 | 352 |
353 if ((ret = dmReadDataFile(NULL, optCharROMFilename, | 353 if ((res = dmReadDataFile(NULL, optCharROMFilename, |
354 &setCharROM.data, &setCharROM.size)) != DMERR_OK) | 354 &setCharROM.data, &setCharROM.size)) != DMERR_OK) |
355 { | 355 { |
356 dmErrorMsg("Could not read character ROM from '%s'.\n", | 356 dmErrorMsg("Could not read character ROM from '%s'.\n", |
357 optCharROMFilename); | 357 optCharROMFilename); |
358 } | 358 } |
487 { | 487 { |
488 SDL_FreeSurface(surf); | 488 SDL_FreeSurface(surf); |
489 surf = NULL; | 489 surf = NULL; |
490 } | 490 } |
491 | 491 |
492 if ((ret = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK) | 492 if ((res = dmReadC64Image(filename, forced, &fmt, &cimage)) != DMERR_OK) |
493 { | 493 { |
494 if (ret != DMERR_NOT_SUPPORTED) | 494 if (res != DMERR_NOT_SUPPORTED) |
495 { | 495 { |
496 dmErrorMsg("Could not decode file '%s': %s\n", | 496 dmErrorMsg("Could not decode file '%s': %s\n", |
497 filename, dmErrorStr(ret)); | 497 filename, dmErrorStr(res)); |
498 } | 498 } |
499 goto fail; | 499 goto fail; |
500 } | 500 } |
501 | 501 |
502 if (fmt == NULL || cimage == NULL) | 502 if (fmt == NULL || cimage == NULL) |