2006-02-24 04:48:15 +00:00
|
|
|
// Emacs style mode select -*- C++ -*-
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Id:$
|
|
|
|
//
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
//
|
|
|
|
// This source is available for distribution and/or modification
|
|
|
|
// only under the terms of the DOOM Source Code License as
|
|
|
|
// published by id Software. All rights reserved.
|
|
|
|
//
|
|
|
|
// The source is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
// $Log:$
|
|
|
|
//
|
|
|
|
// DESCRIPTION:
|
|
|
|
// System specific interface stuff.
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __D_MAIN__
|
|
|
|
#define __D_MAIN__
|
|
|
|
|
2008-09-14 23:54:38 +00:00
|
|
|
#include "doomtype.h"
|
2009-03-22 11:37:56 +00:00
|
|
|
#include "gametype.h"
|
2008-09-14 23:54:38 +00:00
|
|
|
|
|
|
|
struct event_t;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// D_DoomMain()
|
|
|
|
// Not a globally visible function, just included for source reference,
|
|
|
|
// calls all startup code, parses command line options.
|
|
|
|
// If not overrided by user input, calls N_AdvanceDemo.
|
|
|
|
//
|
|
|
|
void D_DoomMain (void);
|
|
|
|
|
|
|
|
|
2008-01-01 03:07:05 +00:00
|
|
|
void D_Display ();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// BASE LEVEL
|
|
|
|
//
|
|
|
|
void D_PageTicker (void);
|
|
|
|
void D_PageDrawer (void);
|
|
|
|
void D_AdvanceDemo (void);
|
|
|
|
void D_StartTitle (void);
|
2010-01-01 15:31:00 +00:00
|
|
|
bool D_AddFile (TArray<FString> &wadfiles, const char *file, bool check = true, int position = -1);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
// [RH] Set this to something to draw an icon during the next screen refresh.
|
2006-12-29 03:38:37 +00:00
|
|
|
extern const char *D_DrawIcon;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
enum EIWADType
|
|
|
|
{
|
|
|
|
IWAD_Doom2TNT,
|
|
|
|
IWAD_Doom2Plutonia,
|
|
|
|
IWAD_Hexen,
|
|
|
|
IWAD_HexenDK,
|
2008-09-06 03:39:36 +00:00
|
|
|
IWAD_HexenDemo,
|
2006-02-24 04:48:15 +00:00
|
|
|
IWAD_Doom2,
|
|
|
|
IWAD_HereticShareware,
|
|
|
|
IWAD_HereticExtended,
|
|
|
|
IWAD_Heretic,
|
|
|
|
IWAD_DoomShareware,
|
|
|
|
IWAD_UltimateDoom,
|
|
|
|
IWAD_DoomRegistered,
|
|
|
|
IWAD_Strife,
|
|
|
|
IWAD_StrifeTeaser,
|
|
|
|
IWAD_StrifeTeaser2,
|
2008-08-09 04:32:56 +00:00
|
|
|
IWAD_FreeDoom,
|
2009-05-30 08:56:40 +00:00
|
|
|
IWAD_FreeDoomU,
|
2008-09-06 03:39:36 +00:00
|
|
|
IWAD_FreeDoom1,
|
|
|
|
IWAD_FreeDM,
|
2009-10-29 05:51:20 +00:00
|
|
|
IWAD_Blasphemer,
|
2008-08-26 18:32:17 +00:00
|
|
|
IWAD_ChexQuest,
|
2008-09-13 19:19:53 +00:00
|
|
|
IWAD_ChexQuest3,
|
2009-10-29 05:51:20 +00:00
|
|
|
IWAD_ActionDoom2,
|
2009-12-11 09:21:08 +00:00
|
|
|
IWAD_Harmony,
|
2009-03-22 11:37:56 +00:00
|
|
|
IWAD_Custom,
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
NUM_IWAD_TYPES
|
|
|
|
};
|
|
|
|
|
|
|
|
struct WadStuff
|
|
|
|
{
|
2006-05-16 02:50:18 +00:00
|
|
|
WadStuff() : Type(IWAD_Doom2TNT) {}
|
|
|
|
|
2006-05-06 23:43:44 +00:00
|
|
|
FString Path;
|
2006-02-24 04:48:15 +00:00
|
|
|
EIWADType Type;
|
|
|
|
};
|
|
|
|
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
struct IWADInfo
|
|
|
|
{
|
2007-12-06 22:38:45 +00:00
|
|
|
const char *Name; // Title banner text for this IWAD
|
|
|
|
const char *Autoname; // Name of autoload ini section for this IWAD
|
|
|
|
DWORD FgColor; // Foreground color for title banner
|
|
|
|
DWORD BkColor; // Background color for title banner
|
2009-03-22 11:37:56 +00:00
|
|
|
EGameType gametype; // which game are we playing?
|
|
|
|
const char *MapInfo; // Base mapinfo to load
|
|
|
|
int flags;
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
};
|
|
|
|
|
2010-09-24 14:27:52 +00:00
|
|
|
struct FStartupInfo
|
|
|
|
{
|
|
|
|
FString Name;
|
|
|
|
DWORD FgColor; // Foreground color for title banner
|
|
|
|
DWORD BkColor; // Background color for title banner
|
|
|
|
};
|
|
|
|
|
|
|
|
extern FStartupInfo DoomStartupInfo;
|
|
|
|
|
Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.
- Reorganized the network startup loops so now they are event driven. There is
a single function that gets called to drive it, and it uses callbacks to
perform the different stages of the synchronization. This lets me have a nice,
responsive abort button instead of the previous unannounced hit-escape-to-
abort behavior, and I think the rearranged code is slightly easier to
understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
releasing a DirectDraw or Direct3D interface, the DWM can still use the
last image drawn using them when it composites the window. It doesn't always
do it but it does often enough that it is a real problem. At this point, I
don't know if it's a problem with the release version of Vista or not.
After messing around, I discovered the problem was caused by ~Win32Video()
hiding the window and then having it immediately shown soon after. The DWM
kept an image of the window to do the transition effect with, and then when
it didn't get a chance to do the transition, it didn't properly forget about
its saved image and kept plastering it on top of everything else
underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
sound if initialization failed, so this only applies when snd_output is set
to "alternate" which now also falls back to no sound. In addition, it wasn't
working right, and I didn't feel like fixing it for the probably 0% of users
it affected.
- Fixed: The edit control used for logging output added text in reverse order
on Win9x.
- Went back to the roots and made graphics initialization one of the last
things to happen during setup. Now the startup text is visible again. More
importantly, the main window is no longer created invisible, which seems
to cause trouble with it not always appearing in the taskbar. The fatal
error dialog is now also embedded in the main window instead of being a
separate modal dialog, so you can play with the log window to see any
problems that might be reported there.
Rather than completely restoring the original startup order, I tried to
keep things as close to the way they were with early graphics startup. In
particular, V_Init() now creates a dummy screen so that things that need
screen dimensions can get them. It gets replaced by the real screen later
in I_InitGraphics(). Will need to check this under Linux to make sure it
didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
- I_StartModeIterator()
- I_NextMode()
- I_DisplayType()
I_FullscreenChanged() was also removed, and a new fullscreen parameter
was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
initialized post-1.22.
SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
|
|
|
extern const IWADInfo IWADInfos[NUM_IWAD_TYPES];
|
2009-04-04 09:28:10 +00:00
|
|
|
extern EIWADType gameiwad;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
#endif
|