mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-15 02:26:44 -04:00
Rewrote hitdump to use a parser and Shutdown_M
This commit is contained in:
parent
6dddbd2efa
commit
5488883991
8 changed files with 311 additions and 323 deletions
|
@ -29,11 +29,12 @@ static IFFFile IFFFileInfo;
|
|||
static int iffcreated = 0;
|
||||
|
||||
static void Shutdown_M(const char * Message){
|
||||
fprintf(stderr, "iffexport: error: %s.", Message);
|
||||
fprintf(stderr, "iffexport: error: %s.\n", Message);
|
||||
if(iffcreated)
|
||||
iff_delete(&IFFFileInfo);
|
||||
free(IFFData);
|
||||
fclose(hFile);
|
||||
if(hFile)
|
||||
fclose(hFile);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,11 @@ static uint8_t * UTKData = NULL;
|
|||
static uint8_t * WaveData = NULL;
|
||||
|
||||
static void Shutdown_M(const char * Message){
|
||||
fprintf(stderr, "utkdecode: error: %s.", Message);
|
||||
fprintf(stderr, "utkdecode: error: %s.\n", Message);
|
||||
free(WaveData);
|
||||
free(UTKData);
|
||||
fclose(hFile);
|
||||
if(hFile)
|
||||
fclose(hFile);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,11 @@ static uint8_t * XAData = NULL;
|
|||
static uint8_t * WaveData = NULL;
|
||||
|
||||
static void Shutdown_M(const char * Message){
|
||||
fprintf(stderr, "xadecode: error: %s.", Message);
|
||||
fprintf(stderr, "xadecode: error: %s.\n", Message);
|
||||
free(WaveData);
|
||||
free(XAData);
|
||||
fclose(hFile);
|
||||
if(hFile)
|
||||
fclose(hFile);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static void KillGLWindow()
|
|||
|
||||
static int CreateGLWindow(const char *__restrict title, uint16_t width, uint16_t height)
|
||||
{
|
||||
PIXELFORMATDESCRIPTOR pfd = {
|
||||
const PIXELFORMATDESCRIPTOR pfd = {
|
||||
sizeof(PIXELFORMATDESCRIPTOR), 1, /* Size and version */
|
||||
PFD_DRAW_TO_WINDOW | /* dwFlags */
|
||||
PFD_SUPPORT_OPENGL |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue