Fix diff in doom.cpp
This commit is contained in:
parent
5125bfd4fa
commit
f02c03152c
2 changed files with 34 additions and 33 deletions
|
|
@ -39,37 +39,6 @@ int doom_get_frame_from_time()
|
|||
return DoomQuestState / 1200;
|
||||
}
|
||||
|
||||
void doom_cleanup()
|
||||
{
|
||||
#ifdef HELLFIRE
|
||||
if (pDoomCel) {
|
||||
MemFreeDbg(pDoomCel);
|
||||
pDoomCel = NULL;
|
||||
}
|
||||
#else
|
||||
MemFreeDbg(pDoomCel);
|
||||
#endif
|
||||
}
|
||||
|
||||
void doom_init()
|
||||
{
|
||||
#ifdef HELLFIRE
|
||||
if (doom_alloc_cel()) {
|
||||
doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0;
|
||||
if (doom_load_graphics()) {
|
||||
doomflag = TRUE;
|
||||
} else {
|
||||
doom_close();
|
||||
}
|
||||
}
|
||||
#else
|
||||
doomflag = TRUE;
|
||||
doom_alloc_cel();
|
||||
doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0;
|
||||
doom_load_graphics();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
BOOLEAN doom_alloc_cel()
|
||||
#else
|
||||
|
|
@ -85,6 +54,18 @@ void doom_alloc_cel()
|
|||
#endif
|
||||
}
|
||||
|
||||
void doom_cleanup()
|
||||
{
|
||||
#ifdef HELLFIRE
|
||||
if (pDoomCel) {
|
||||
MemFreeDbg(pDoomCel);
|
||||
pDoomCel = NULL;
|
||||
}
|
||||
#else
|
||||
MemFreeDbg(pDoomCel);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
BOOLEAN doom_load_graphics()
|
||||
#else
|
||||
|
|
@ -111,6 +92,25 @@ void doom_load_graphics()
|
|||
#endif
|
||||
}
|
||||
|
||||
void doom_init()
|
||||
{
|
||||
#ifdef HELLFIRE
|
||||
if (doom_alloc_cel()) {
|
||||
doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0;
|
||||
if (doom_load_graphics()) {
|
||||
doomflag = TRUE;
|
||||
} else {
|
||||
doom_close();
|
||||
}
|
||||
}
|
||||
#else
|
||||
doomflag = TRUE;
|
||||
doom_alloc_cel();
|
||||
doom_quest_time = doom_get_frame_from_time() == 31 ? 31 : 0;
|
||||
doom_load_graphics();
|
||||
#endif
|
||||
}
|
||||
|
||||
void doom_close()
|
||||
{
|
||||
#ifndef HELLFIRE
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@ void doom_reset_state();
|
|||
void doom_play_movie();
|
||||
*/
|
||||
int doom_get_frame_from_time();
|
||||
void doom_cleanup();
|
||||
void doom_init();
|
||||
#ifdef HELLFIRE
|
||||
BOOLEAN doom_alloc_cel();
|
||||
void doom_cleanup();
|
||||
BOOLEAN doom_load_graphics();
|
||||
#else
|
||||
void doom_alloc_cel();
|
||||
void doom_cleanup();
|
||||
void doom_load_graphics();
|
||||
#endif
|
||||
void doom_init();
|
||||
void doom_close();
|
||||
void doom_draw();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue