Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

HOST.H

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  Host.h                                                                              */
00003 /*                                                                                      */
00004 /*  Author: John Pollard                                                                */
00005 /*  Description:                                                                        */
00006 /*                                                                                      */
00007 /*  Copyright (c) 1997, 1999, Eclipse Entertainment; All rights reserved.               */
00008 /*                                                                                      */
00009 /*  See the accompanying file LICENSE.TXT for terms on the use of this library.         */
00010 /*  This library is distributed in the hope that it will be useful but WITHOUT          */
00011 /*  ANY WARRANTY OF ANY KIND and without any implied warranty of MERCHANTABILITY        */
00012 /*  or FITNESS FOR ANY PURPOSE.  Refer to LICENSE.TXT for more details.                 */
00013 /*                                                                                      */
00014 /****************************************************************************************/
00015 #ifndef __HOST_H__
00016 #define __HOST_H__
00017 
00018 #include <Windows.h>
00019 #include <stdio.h>
00020 
00021 #include "Genesis.h"
00022 #include "Errorlog.h"
00023 #include "Ram.h"
00024 
00025 #include "GameMgr.h"
00026 #include "NetMgr.h"
00027 #include "Buffer.h"
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 
00034 typedef struct Server_Server    Server_Server;
00035 typedef struct Client_Client    Client_Client;
00036 
00037 //===========================================================================
00038 //      Struct defs
00039 //===========================================================================
00040 #define HOST_DEMO_NONE                          0
00041 #define HOST_DEMO_PLAY                          1
00042 #define HOST_DEMO_RECORD                        2
00043 
00044 #define HOST_MODE_SINGLE_PLAYER         1               // Single player
00045 #define HOST_MODE_SERVER_CLIENT         2               // Server with local client
00046 #define HOST_MODE_SERVER_DEDICATED      3               // Server dedicated (no client)
00047 #define HOST_MODE_CLIENT                        4               // Client only...
00048 
00049 #define HOST_MAX_DEMOS                  10
00050 #define MAX_DEMO_NAME_SIZE              64
00051 
00052 typedef struct
00053 {
00054         HWND                            hWnd;
00055 
00056         int32                           Mode;                                   // Server/Client, Server/Dedicated, Client, Single...
00057 
00058         geEngine                        *Engine;
00059         VidMode                         VidMode;
00060         GameMgr                         *GMgr;
00061         NetMgr                          *NMgr;
00062 
00063         geCSNetMgr                      *CSNetMgr;
00064         UINT                            CdID;
00065 
00066         Server_Server           *Server;
00067         Client_Client           *Client;
00068 
00069         geBoolean                       Debug;
00070 
00071         geBoolean                       WorldGammaHack;
00072 } Host_Host;
00073 
00074 typedef struct
00075 {
00076         HWND                            hWnd;
00077         char                            ClientName[128];
00078         char                            LevelHack[128];
00079         char                            UserLevel[128]; // Frank
00080         char                            IPAddress[NETMGR_MAX_IP_ADDRESS];
00081         int32                           Mode;
00082         int32                           DemoMode;
00083         char                            DemoFile[64];
00084 } Host_Init;
00085 
00086 //===========================================================================
00087 //      Function prototypes
00088 //===========================================================================
00089 Host_Host       *Host_Create(geEngine *Engine, Host_Init *InitData, GameMgr *GMgr, VidMode VidMode);
00090 void            Host_Destroy(Host_Host *Host);
00091 void            Host_DestroyAllObjects(Host_Host *Host);
00092 
00093 geBoolean       Host_Frame(Host_Host *Host, float Time);
00094 geBoolean       Host_RenderFrame(Host_Host *Host, float Time);
00095 void            Host_ClientRefreshStatusBar(int32 NumPages);
00096 
00097 #ifdef __cplusplus
00098 }
00099 #endif
00100 
00101 #endif

Generated on Tue Sep 30 12:35:55 2003 for GTestAndEngine by doxygen 1.3.2