Added initial CMake configuration.

This commit is contained in:
Robert Beckebans 2012-11-27 23:23:32 +01:00
parent c2f45c550c
commit 683861eb45
30 changed files with 1082 additions and 4529 deletions

View file

@ -1 +1,76 @@
# empty file
//
// KEY BINDINGS
//
unbindall
//
// weapons
//
bind 1 "_impulse0" // weap
bind 2 "_impulse2" // weap
bind 3 "_impulse3" // weap
bind 4 "_impulse5" // weap
bind 5 "_impulse6" // weap
bind 6 "_impulse7" // weap
bind 7 "_impulse8" // weap
bind 8 "_impulse9" // weap
bind 9 "_impulse10" // weap
//bind 0 "_impulse11" // weap
bind q "_impulse12" // weap
bind TAB "_impulse19" // PDA in SP, scoreboard in MP
bind r "_impulse13" // reload
bind f "_impulse16" // Flash Light
bind [ "_impulse15"
bind ] "_impulse14"
bind / "_impulse14"
bind ENTER _button2
bind mwheelup "_impulse15"
bind mwheeldown "_impulse14"
//
// CHARACTER CONTROLS
//
bind CTRL _attack
bind SHIFT _speed
bind DEL _lookdown
bind PGDN _lookup
bind c _movedown
bind SPACE _moveup
bind UPARROW _forward
bind DOWNARROW _back
bind LEFTARROW _left
bind RIGHTARROW _right
bind w _forward
bind a _moveleft
bind s _back
bind d _moveright
bind e _use
//
// CLIENT ENVIRONMENT COMMANDS
//
bind F5 "savegame quick"
bind F9 "loadgame quick"
bind F12 screenshot
bind t clientMessageMode
bind y "clientMessageMode 1"
//
// MOUSE BUTTONS
//
bind MOUSE1 _attack
bind MOUSE2 _moveup

View file

@ -1,147 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "DoomLeaderboards.h"
#include "tech5/engine/framework/precompiled.h"
#include "tech5\engine\sys\sys_stats.h"
#include "../doomengine/source/doomdef.h"
#include <map>
static columnDef_t columnDefTime[] = {
{ "Time", 64, AGGREGATE_MIN, STATS_COLUMN_DISPLAY_TIME_MILLISECONDS }
};
const static int NUMLEVELS_ULTIMATE_DOOM = 36;
const static int NUMLEVELS_DOOM2_HELL_ON_EARTH = 32;
const static int NUMLEVELS_FINALDOOM_TNT = 32;
const static int NUMLEVELS_FINALDOOM_PLUTONIA = 32;
const static int NUMLEVELS_DOOM2_MASTER_LEVELS = 21;
const static int NUMLEVELS_DOOM2_NERVE = 9;
const static int NUM_LEVEL_LIST[] = {
NUMLEVELS_ULTIMATE_DOOM,
NUMLEVELS_DOOM2_HELL_ON_EARTH,
NUMLEVELS_FINALDOOM_TNT,
NUMLEVELS_FINALDOOM_PLUTONIA,
NUMLEVELS_DOOM2_MASTER_LEVELS,
NUMLEVELS_DOOM2_NERVE
};
/*
========================
GenerateLeaderboard ID
Generates a Leaderboard ID based on current Expansion + episode + map + skill + Type
Expansion is the base value that the leaderboard ID comes from
========================
*/
const int GenerateLeaderboardID( int expansion, int episode, int map, int skill ) {
int realMapNumber = ( episode * map - 1 );
if( common->GetGameSKU() == GAME_SKU_DOOM1_BFG ) {
// Doom levels start at 620 .. yeah.. hack.
int block = 615;
int mapAndSkill = ( realMapNumber * ( (int)sk_nightmare + 1 ) ) + skill ;
return block + mapAndSkill;
} else if( common->GetGameSKU() == GAME_SKU_DOOM2_BFG ) {
if( expansion == 1 ) {
// Doom 2 Levels start at 800.. Yep.. another hack.
int block = 795;
int mapAndSkill = ( realMapNumber * ( (int)sk_nightmare + 1 ) ) + skill ;
return block + mapAndSkill;
} else {
// Nerve Levels start at 960... another hack!
int block = 955;
int mapAndSkill = ( realMapNumber * ( (int)sk_nightmare + 1 ) ) + skill ;
return block + mapAndSkill;
}
} else {
// DCC Content
int block = 0;
if( expansion > 0 ){
for( int expi = 0; expi < expansion; expi++ ) {
block += NUM_LEVEL_LIST[ expi ] * ( (int)sk_nightmare + 1);
}
}
int mapAndSkill = ( realMapNumber * ( (int)sk_nightmare + 1 ) ) + skill ;
return block + mapAndSkill;
}
}
/*
========================
InitLeaderboards
Generates all the possible leaderboard definitions
and stores into an STL Map, with leaderboard ID as the Hash/key value.
========================
*/
void InitLeaderboards() {
for( int expi = 0; expi < ARRAY_COUNT( NUM_LEVEL_LIST ); expi++ ) {
for( int udi = 1; udi <= NUM_LEVEL_LIST[expi] ; udi++ ) {
for( int skilli = 0; skilli <= sk_nightmare; skilli++ ) {
// Create the Time Trial leaderboard for each level.
int timeTrial_leaderboardID = GenerateLeaderboardID( expi, 1, udi, skilli );
leaderboardDefinition_t * timeTrial_Leaderboard = new leaderboardDefinition_t( timeTrial_leaderboardID, ARRAY_COUNT( columnDefTime ), columnDefTime, RANK_LEAST_FIRST, false, true );
}
}
}
}
/*
========================
GenerateLeaderboard
Generates a Leaderboard based on current Expansion + episode + map + skill + Type
Expansion is the base value that the leaderboard ID comes from
========================
*/
const leaderboardDefinition_t * GetLeaderboard( int expansion, int episode, int map, int skill ) {
int leaderboardID = GenerateLeaderboardID( expansion, episode, map, skill );
return Sys_FindLeaderboardDef( leaderboardID );;
}

View file

@ -1,45 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#ifndef __DOOM_LEADERBOARDS_H__
#define __DOOM_LEADERBOARDS_H__
#include "sys\sys_stats_misc.h"
enum Leaderboard_type_t {
LEADERBOARD_TYPE_TIME_TRIAL,
LEADERBOARD_TYPE_FRAGS,
LEADERBOARD_MAX_TYPES
};
void InitLeaderboards();
const leaderboardDefinition_t * GetLeaderboard( int expansion, int episode, int map, int skill );
#endif // __DOOM_LEADERBOARDS_H__

View file

@ -1,166 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "Precompiled.h"
#include "../Main/Main.h"
#include <sys/types.h>
#include <sys/socket.h>
#include "tech5/engine/sys/sys_lobby.h"
bool useTech5Packets = true;
#if 1
struct networkitem
{
int source;
int size;
char buffer[256*64];
};
std::queue< networkitem > networkstacks[4];
//sockaddr_in sockaddrs[4];
int DoomLibRecv( char* buff, DWORD *numRecv )
{
//int player = DoomInterface::CurrentPlayer();
int player = ::g->consoleplayer;
if (networkstacks[player].empty())
return -1;
networkitem item = networkstacks[player].front();
memcpy( buff, item.buffer, item.size );
*numRecv = item.size;
//*source = sockaddrs[item.source];
networkstacks[player].pop();
return 1;
}
void I_Printf(char *error, ...);
int DoomLibSend( const char* buff, DWORD size, sockaddr_in *target, int toNode )
{
int i;
i = DoomLib::RemoteNodeToPlayerIndex( toNode );
//I_Printf( "DoomLibSend %d --> %d: %d\n", ::g->consoleplayer, i, size );
networkitem item;
item.source = DoomInterface::CurrentPlayer();
item.size = size;
memcpy( item.buffer, buff, size );
networkstacks[i].push( item );
return 1;
}
int DoomLibSendRemote()
{
if ( gameLocal == NULL ) {
return 0;
}
int curPlayer = DoomLib::GetPlayer();
for (int player = 0; player < gameLocal->Interface.GetNumPlayers(); ++player)
{
DoomLib::SetPlayer( player );
for( int i = 0; i < 4; i++ ) {
//Check if it is remote
int node = DoomLib::PlayerIndexToRemoteNode( i );
if ( ::g->sendaddress[node].sin_addr.s_addr == ::g->sendaddress[0].sin_addr.s_addr ) {
continue;
}
while(!networkstacks[i].empty()) {
networkitem item = networkstacks[i].front();
int c;
//WSABUF buffer;
//DWORD num_sent;
//buffer.buf = (char*)&item.buffer;
//buffer.len = item.size;
if ( useTech5Packets ) {
idLobby & lobby = static_cast< idLobby & >( session->GetGameLobbyBase() );
lobbyUser_t * user = lobby.GetLobbyUser( i );
if ( user != NULL ) {
lobby.SendConnectionLess( user->address, idLobby::OOB_GENERIC_GAME_DATA, (const byte *)(&item.buffer[0] ), item.size );
}
} else {
c = sendto( ::g->sendsocket, &item.buffer, item.size, MSG_DONTWAIT, (sockaddr*)&::g->sendaddress[node], sizeof(::g->sendaddress[node]) );
//c = WSASendTo(::g->sendsocket, &buffer, 1, &num_sent, 0, (sockaddr*)&::g->sendaddress[node], sizeof(::g->sendaddress[node]), 0, 0);
}
networkstacks[i].pop();
}
}
}
DoomLib::SetPlayer(curPlayer);
return 1;
}
void DL_InitNetworking( DoomInterface *pdi )
{
// DHM - Nerve :: Clear out any old splitscreen packets that may be lingering.
for ( int i = 0; i<4; i++ ) {
while ( !networkstacks[i].empty() ) {
networkstacks[i].pop();
}
}
/*sockaddrs[0].sin_addr.s_addr = inet_addr("0.0.0.1" );
sockaddrs[1].sin_addr.s_addr = inet_addr("0.0.0.2" );
sockaddrs[2].sin_addr.s_addr = inet_addr("0.0.0.3" );
sockaddrs[3].sin_addr.s_addr = inet_addr("0.0.0.4" );*/
pdi->SetNetworking( DoomLibRecv, DoomLibSend, DoomLibSendRemote );
}
#else
void DL_InitNetworking( DoomInterface *pdi ) {
}
#endif

View file

@ -1,649 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "PlayerProfile.h"
#include "PS3_Includes.h"
#include "PSN/PS3_Session.h"
const int32 FRAMEWORK_PROFILE_VER = 1;
// Store master volume settings in archived cvars, becausue we want them to apply
// even if a user isn't signed in.
// The range is from 0 to 15, which matches the setting in vanilla DOOM.
idCVar s_volume_sound( "s_volume_sound", "8", CVAR_ARCHIVE | CVAR_INTEGER, "sound volume", 0, 15 );
idCVar s_volume_midi( "s_volume_midi", "8", CVAR_ARCHIVE | CVAR_INTEGER, "music volume", 0, 15 );
/*
================================================
idProfileMgr
================================================
*/
/*
========================
idProfileMgr
========================
*/
idProfileMgr::idProfileMgr() :
profileSaveProcessor( new (TAG_SAVEGAMES) idSaveGameProcessorSaveProfile ),
profileLoadProcessor( new (TAG_SAVEGAMES) idSaveGameProcessorLoadProfile ),
profile( NULL ),
handle( 0 ) {
}
/*
================================================
~idProfileMgr
================================================
*/
idProfileMgr::~idProfileMgr() {
delete profileSaveProcessor;
profileSaveProcessor = NULL;
delete profileLoadProcessor;
profileLoadProcessor = NULL;
}
/*
========================
idProfileMgr::Init
========================
*/
void idProfileMgr::Init( idPlayerProfile * profile_ ) {
profile = profile_;
handle = 0;
}
/*
========================
idProfileMgr::Pump
========================
*/
void idProfileMgr::Pump() {
// profile can be NULL if we forced the user to register as in the case of map-ing into a level from the press start screen
if ( profile == NULL ) {
return;
}
// See if we are done with saving/loading the profile
bool saving = profile->GetState() == idPlayerProfile::SAVING;
bool loading = profile->GetState() == idPlayerProfile::LOADING;
if ( ( saving || loading ) && psn_session->GetSaveGameManager()->IsSaveGameCompletedFromHandle( handle ) ) {
profile->SetState( idPlayerProfile::IDLE );
if ( saving ) {
// Done saving
} else if ( loading ) {
// Done loading
const idSaveLoadParms & parms = profileLoadProcessor->GetParms();
if ( parms.GetError() == SAVEGAME_E_FOLDER_NOT_FOUND || parms.GetError() == SAVEGAME_E_FILE_NOT_FOUND ) {
profile->SaveSettings();
} else if ( parms.GetError() != SAVEGAME_E_NONE ) {
profile->SetState( idPlayerProfile::ERR );
}
}
}
// See if we need to save/load the profile
if ( profile->GetRequestedState() == idPlayerProfile::SAVE_REQUESTED ) {
SaveSettings();
profile->SetRequestedState( idPlayerProfile::IDLE );
} else if ( profile->GetRequestedState() == idPlayerProfile::LOAD_REQUESTED ) {
LoadSettings();
profile->SetRequestedState( idPlayerProfile::IDLE );
}
}
/*
========================
idProfileMgr::GetProfile
========================
*/
idPlayerProfile * idProfileMgr::GetProfile() {
if ( profile == NULL ) {
return NULL;
}
bool loading = ( profile->GetState() == idPlayerProfile::LOADING ) || ( profile->GetRequestedState() == idPlayerProfile::LOAD_REQUESTED );
if ( loading ) {
return NULL;
}
return profile;
}
/*
========================
idProfileMgr::SaveSettings
========================
*/
void idProfileMgr::SaveSettings() {
if ( profile != NULL && saveGame_enable.GetBool() ) {
// Issue the async save...
if ( profileSaveProcessor->InitSaveProfile( profile, "" ) ) {
handle = psn_session->GetSaveGameManager()->ExecuteProcessor( profileSaveProcessor );
profile->SetState( idPlayerProfile::SAVING );
}
} else {
// If not able to save the profile, just change the state and leave
if ( profile == NULL ) {
idLib::Warning( "Not saving profile, profile is NULL." );
}
if ( !saveGame_enable.GetBool() ) {
idLib::Warning( "Skipping profile save because saveGame_enable = 0" );
}
}
}
/*
========================
idProfileMgr::LoadSettings
========================
*/
void idProfileMgr::LoadSettings() {
if ( profile != NULL && saveGame_enable.GetBool() ) {
if ( profileLoadProcessor->InitLoadProfile( profile, "" ) ) {
// Skip the not found error because this might be the first time to play the game!
profileLoadProcessor->SetSkipSystemErrorDialogMask( SAVEGAME_E_FOLDER_NOT_FOUND | SAVEGAME_E_FILE_NOT_FOUND );
handle = psn_session->GetSaveGameManager()->ExecuteProcessor( profileLoadProcessor );
profile->SetState( idPlayerProfile::LOADING );
}
} else {
// If not able to save the profile, just change the state and leave
if ( profile == NULL ) {
idLib::Warning( "Not loading profile, profile is NULL." );
}
if ( !saveGame_enable.GetBool() ) {
idLib::Warning( "Skipping profile load because saveGame_enable = 0" );
}
}
}
/*
================================================
idSaveGameProcessorSaveProfile
================================================
*/
/*
========================
idSaveGameProcessorSaveProfile::idSaveGameProcessorSaveProfile
========================
*/
idSaveGameProcessorSaveProfile::idSaveGameProcessorSaveProfile() {
profileFile = NULL;
profile = NULL;
}
/*
========================
idSaveGameProcessorSaveProfile::InitSaveProfile
========================
*/
bool idSaveGameProcessorSaveProfile::InitSaveProfile( idPlayerProfile * profile_, const char * folder ) {
// Serialize the profile and pass a file to the processor
profileFile = new (TAG_SAVEGAMES) idFile_Memory( SAVEGAME_PROFILE_FILENAME );
profileFile->MakeWritable();
profileFile->SetMaxLength( MAX_PROFILE_SIZE );
idTempArray< byte > buffer( MAX_PROFILE_SIZE );
idBitMsg msg;
msg.InitWrite( buffer.Ptr(), MAX_PROFILE_SIZE );
idSerializer ser( msg, true );
profile_->SerializeSettings( ser );
profileFile->Write( msg.GetReadData(), msg.GetSize() );
profileFile->MakeReadOnly();
idList< idSaveFileEntry > files;
files.Append( idSaveFileEntry( profileFile, SAVEGAMEFILE_BINARY | SAVEGAMEFILE_AUTO_DELETE, SAVEGAME_PROFILE_FILENAME ) );
idSaveGameDetails description;
if ( !idSaveGameProcessor::Init() ) {
return false;
}
if ( files.Num() == 0 ) {
idLib::Warning( "No files to save." );
return false;
}
// Setup save system
parms.directory = AddSaveFolderPrefix( folder, idSaveGameManager::PACKAGE_PROFILE );
parms.mode = SAVEGAME_MBF_SAVE | SAVEGAME_MBF_HIDDEN; // do NOT delete the existing files
parms.saveFileType = SAVEFILE_TYPE_AUTO;
for ( int i = 0; i < files.Num(); ++i ) {
parms.files.Append( files[i] );
}
description.title = idLocalization::GetString( "#str_savegame_title" );
description.subTitle = idLocalization::GetString( "#str_savegame_profile_heading" );
description.summary = idLocalization::GetString( "#str_savegame_profile_desc" );
// Add static image as the thumbnail
staticScreenshotFile = new (TAG_SAVEGAMES) idFile_Memory( "image" );
// Open up the Image file and Make it a memory file.
void* thumbImage = NULL;
int imagesize = fileSystem->ReadFile( "base/textures/PROFILE.PNG", &thumbImage ); // This file lives at USRData.. i think.
staticScreenshotFile->MakeWritable();
staticScreenshotFile->Write( thumbImage, imagesize );
staticScreenshotFile->MakeReadOnly();
parms.files.Append( idSaveFileEntry( staticScreenshotFile, SAVEGAMEFILE_THUMB, "image" ) );
fileSystem->FreeFile( thumbImage );
this->parms.description = description;
parms.description.slotName = folder;
// TODO:KC - what was the purpose of this?
// JAF idKeyInput::SetUserDeviceNumForBind( profile_->GetDeviceNumForProfile() );
profile = profile_;
return true;
}
/*
========================
idSaveGameProcessorSaveProfile::Process
========================
*/
bool idSaveGameProcessorSaveProfile::Process() {
// Files already setup for save, just execute as normal files
// Platform-specific implementation
// This will start a worker thread for async operation.
// It will always signal when it's completed.
Sys_ExecuteSavegameCommandAsync( &parms );
return false;
}
/*
================================================
idSaveGameProcessorLoadProfile
================================================
*/
/*
========================
idSaveGameProcessorLoadProfile::idSaveGameProcessorLoadProfile
========================
*/
idSaveGameProcessorLoadProfile::idSaveGameProcessorLoadProfile() {
profileFile = NULL;
profile = NULL;
}
/*
========================
idSaveGameProcessorLoadProfile::~idSaveGameProcessorLoadProfile
========================
*/
idSaveGameProcessorLoadProfile::~idSaveGameProcessorLoadProfile() {
}
/*
========================
idSaveGameProcessorLoadProfile::InitLoadFiles
========================
*/
bool idSaveGameProcessorLoadProfile::InitLoadProfile( idPlayerProfile * profile_, const char * folder_ ) {
if ( !idSaveGameProcessor::Init() ) {
return false;
}
parms.directory = AddSaveFolderPrefix( folder_, idSaveGameManager::PACKAGE_PROFILE );
parms.description.slotName = folder_;
parms.mode = SAVEGAME_MBF_LOAD | SAVEGAME_MBF_HIDDEN;
parms.saveFileType = SAVEFILE_TYPE_AUTO;
profileFile = new (TAG_SAVEGAMES) idFile_Memory( SAVEGAME_PROFILE_FILENAME );
parms.files.Append( idSaveFileEntry( profileFile, SAVEGAMEFILE_BINARY, SAVEGAME_PROFILE_FILENAME ) );
profile = profile_;
return true;
}
/*
========================
idSaveGameProcessorLoadProfile::Process
========================
*/
bool idSaveGameProcessorLoadProfile::Process() {
Sys_ExecuteSavegameCommandAsync( &parms );
return false;
}
/*
========================
idSaveGameProcessorLoadProfile::PostProcess
========================
*/
void idSaveGameProcessorLoadProfile::PostProcess() {
// Serialize the loaded profile
bool foundProfile = profileFile->Length() > 0;
if ( foundProfile ) {
idTempArray< byte> buffer( MAX_PROFILE_SIZE );
// Serialize settings from this buffer
profileFile->MakeReadOnly();
profileFile->ReadBigArray( buffer.Ptr(), profileFile->Length() );
idBitMsg msg;
msg.InitRead( buffer.Ptr(), (int)buffer.Size() );
idSerializer ser( msg, false );
profile->SerializeSettings( ser );
// JAF idKeyInput::SetUserDeviceNumForBind( profile->GetDeviceNumForProfile() );
} else {
parms.errorCode = SAVEGAME_E_FILE_NOT_FOUND;
}
delete profileFile;
}
/*
========================
Contains data that needs to be saved out on a per player profile basis, global for the lifetime of the player so
the data can be shared across computers.
- HUD tint colors
- key bindings
- etc...
========================
*/
/*
========================
idPlayerProfile::idPlayerProfile
========================
*/
idPlayerProfile::idPlayerProfile() {
SetDefaults();
// Don't have these in SetDefaults because they're used for state management and SetDefaults is called when
// loading the profile
state = IDLE;
requestedState = IDLE;
}
/*
========================
idPlayerProfile::SetDefaults
========================
*/
void idPlayerProfile::SetDefaults() {
achievementBits = 0;
seenInstallMessage = false;
stats.SetNum( MAX_PLAYER_PROFILE_STATS );
for ( int i = 0; i < MAX_PLAYER_PROFILE_STATS; ++i ) {
stats[i].i = 0;
}
deviceNum = 0;
state = IDLE;
requestedState = IDLE;
frameScaleX = 0.85f;
frameScaleY = 0.85f;
}
/*
========================
idPlayerProfile::Init
========================
*/
void idPlayerProfile::Init() {
SetDefaults();
}
/*
========================
idPlayerProfile::~idPlayerProfile
========================
*/
idPlayerProfile::~idPlayerProfile() {
}
/*
========================
idPlayerProfile::SerializeSettings
========================
*/
bool idPlayerProfile::SerializeSettings( idSerializer & ser ) {
int flags = cvarSystem->GetModifiedFlags();
// Default to current tag/version
int32 tag = GetProfileTag();
int32 version = FRAMEWORK_PROFILE_VER;
// Serialize tag/version
ser.SerializePacked( tag );
if ( tag != GetProfileTag() ) {
idLib::Warning( "Profile tag did not match, profile will be re-initialized" );
SetDefaults();
SaveSettings(); // Flag the profile to save so we have the latest version stored
return false;
}
ser.SerializePacked( version );
if ( version != FRAMEWORK_PROFILE_VER ) {
// For now, don't allow profiles with invalid versions load
// We could easily support old version by doing a few version checks below to pick and choose what we load as well.
idLib::Warning( "Profile version did not match. Profile will be replaced" );
SetDefaults();
SaveSettings(); // Flag the profile to save so we have the latest version stored
return false;
}
// Serialize audio settings
SERIALIZE_BOOL( ser, seenInstallMessage );
// New setting to save to make sure that we have or haven't seen this achievement before used to pass TRC R149d
ser.Serialize( achievementBits );
ser.Serialize( frameScaleX );
ser.Serialize( frameScaleY );
SERIALIZE_BOOL( ser, alwaysRun );
// we save all the cvar-based settings in the profile even though some cvars are archived
// so that we are consistent and don't miss any or get affected when the archive flag is changed
SERIALIZE_CVAR_INT( ser, s_volume_sound );
SERIALIZE_CVAR_INT( ser, s_volume_midi );
// Don't trigger profile save due to modified archived cvars during profile load
cvarSystem->ClearModifiedFlags( CVAR_ARCHIVE ); // must clear because set() is an OR operation, not assignment...
cvarSystem->SetModifiedFlags( flags );
return true;
}
/*
========================
idPlayerProfile::GetLevel
========================
*/
int idPlayerProfile::GetLevel() const {
return 1;
}
/*
========================
idPlayerProfile::StatSetInt
========================
*/
void idPlayerProfile::StatSetInt( int s, int v ) {
stats[s].i = v;
}
/*
========================
idPlayerProfile::StatSetFloat
========================
*/
void idPlayerProfile::StatSetFloat( int s, float v ) {
stats[s].f = v;
}
/*
========================
idPlayerProfile::StatGetInt
========================
*/
int idPlayerProfile::StatGetInt( int s ) const {
return stats[s].i;
}
/*
========================
idPlayerProfile::StatGetFloat
========================
*/
float idPlayerProfile::StatGetFloat( int s ) const {
return stats[s].f;
}
/*
========================
idPlayerProfile::SaveSettings
========================
*/
void idPlayerProfile::SaveSettings() {
if ( state != SAVING ) {
if ( GetRequestedState() == IDLE ) {
SetRequestedState( SAVE_REQUESTED );
}
}
}
/*
========================
idPlayerProfile::SaveSettings
========================
*/
void idPlayerProfile::LoadSettings() {
if ( state != LOADING ) {
if ( verify( GetRequestedState() == IDLE ) ) {
SetRequestedState( LOAD_REQUESTED );
}
}
}
/*
========================
idPlayerProfile::SetAchievementBit
========================
*/
void idPlayerProfile::SetAchievementBit( const int id ) {
if ( id > 63 ) {
assert( false ); // FIXME: add another set of achievement bit flags
return;
}
achievementBits |= (int64)1 << id;
}
/*
========================
idPlayerProfile::ClearAchievementBit
========================
*/
void idPlayerProfile::ClearAchievementBit( const int id ) {
if ( id > 63 ) {
assert( false ); // FIXME: add another set of achievement bit flags
return;
}
achievementBits &= ~( (int64)1 << id );
}
/*
========================
idPlayerProfile::GetAchievementBit
========================
*/
bool idPlayerProfile::GetAchievementBit( const int id ) const {
if ( id > 63 ) {
assert( false ); // FIXME: add another set of achievement bit flags
return false;
}
return ( achievementBits & (int64)1 << id ) != 0;
}
/*
========================
Returns the value stored in the music volume cvar.
========================
*/
int idPlayerProfile::GetMusicVolume() const {
return s_volume_midi.GetInteger();
}
/*
========================
Returns the value stored in the sound volume cvar.
========================
*/
int idPlayerProfile::GetSoundVolume() const {
return s_volume_sound.GetInteger();
}
/*
========================
Sets the music volume cvar.
========================
*/
void idPlayerProfile::SetMusicVolume( int volume ) {
s_volume_midi.SetInteger( volume );
}
/*
========================
Sets the sound volume cvar.
========================
*/
void idPlayerProfile::SetSoundVolume( int volume ) {
s_volume_sound.SetInteger( volume );
}

View file

@ -1,267 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#ifndef __PLAYERPROFILE_H__
#define __PLAYERPROFILE_H__
#include "Precompiled.h"
#include "Serializer.h"
//#include "SaveGameManager.h"
#define MAX_PROFILE_SIZE ( 1024 * 1000 ) // High number for the key bindings
#define SAVEGAME_PROFILE_FILENAME "_PROF"
extern idCVar s_volume_sound;
extern idCVar s_volume_midi;
class idSaveGameProcessorSaveProfile;
class idSaveGameProcessorLoadProfile;
class idPlayerProfile;
/*
================================================
idProfileMgr
================================================
*/
class idProfileMgr {
public:
idProfileMgr();
~idProfileMgr();
// Called the first time it's asked to load
void Init( idPlayerProfile * profile );
void Pump();
idPlayerProfile * GetProfile();
private:
void LoadSettings();
void SaveSettings();
private:
idSaveGameProcessorSaveProfile * profileSaveProcessor;
idSaveGameProcessorLoadProfile * profileLoadProcessor;
idPlayerProfile * profile;
saveGameHandle_t handle;
};
/*
================================================
idSaveGameProcessorSaveProfile
================================================
*/
class idSaveGameProcessorSaveProfile : public idSaveGameProcessor {
public:
DEFINE_CLASS( idSaveGameProcessorSaveProfile );
idSaveGameProcessorSaveProfile();
bool InitSaveProfile( idPlayerProfile * profile, const char * folder );
virtual bool Process();
private:
idFile_Memory * profileFile;
idFile_Memory * staticScreenshotFile;
idPlayerProfile * profile;
};
/*
================================================
idSaveGameProcessorLoadProfile
================================================
*/
class idSaveGameProcessorLoadProfile: public idSaveGameProcessor {
public:
DEFINE_CLASS( idSaveGameProcessorLoadProfile );
idSaveGameProcessorLoadProfile();
~idSaveGameProcessorLoadProfile();
bool InitLoadProfile( idPlayerProfile * profile, const char * folder );
virtual bool Process();
virtual void PostProcess();
private:
idFile_Memory * profileFile;
idPlayerProfile * profile;
};
/*
================================================
profileStatValue_t
================================================
*/
union profileStatValue_t {
int i;
float f;
};
/*
================================================
idPlayerProfile
The general rule for using cvars for settings is that if you want the player's profile settings to affect the startup
of the game before there is a player associated with the game, use cvars. Example: video & volume settings.
================================================
*/
class idPlayerProfile {
public:
static const int MAX_PLAYER_PROFILE_STATS = 500;
enum state_t {
IDLE = 0,
SAVING,
LOADING,
SAVE_REQUESTED,
LOAD_REQUESTED,
ERR
};
enum displayMode_t {
DISPLAY_INVALID = -1,
DISPLAY_WINDOWED,
DISPLAY_FULLSCREEN,
MAX_DISPLAY_MODES
};
enum syncTypes_t {
SYNC_INVALID = -1,
SYNC_TEAR,
SYNC_ON,
SYNC_SMART,
MAX_SYNC_COUNT,
};
public:
idPlayerProfile(); // don't instantiate. we static_cast the child all over the place
virtual ~idPlayerProfile();
//------------------------
// each game can override but call the parent serialize first
//------------------------
virtual void SetDefaults();
virtual void Init();
virtual bool SerializeSettings( idSerializer & ser );
//------------------------
// each game must override, not an abstract method because we have a static object as a hack... ugh.
//------------------------
virtual int32 GetProfileTag() { return -1; }
int GetDeviceNumForProfile() { return deviceNum; }
void SetDeviceNumForProfile( int num ) { deviceNum = num; }
//------------------------
void SaveSettings();
void LoadSettings();
state_t GetState() const { return state; }
state_t GetRequestedState() const { return requestedState; }
//------------------------
// settings
//------------------------
float GetFrameScaleX() const { return frameScaleX; }
float GetFrameScaleY() const { return frameScaleY; }
void SetFrameScaleX( float scale ) { frameScaleX = scale; }
void SetFrameScaleY( float scale ) { frameScaleY = scale; }
int GetMusicVolume() const;
int GetSoundVolume() const;
void SetMusicVolume( int volume );
void SetSoundVolume( int volume );
bool GetAlwaysRun() const { return alwaysRun; }
void SetAlwaysRun( bool set ) { alwaysRun = set; }
//------------------------
// misc
//------------------------
virtual int GetLevel() const;
void ClearAchievementBit( const int id ); // Should only be called by idLocalUser
bool GetAchievementBit( const int id ) const;
void SetAchievementBit( const int id ); // Should only be called by idLocalUser
bool GetSeenInstallMessage() const { return seenInstallMessage; }
void SetSeenInstallMessage( bool seen ) { seenInstallMessage = seen; }
bool HasSavedGame() const { return hasSavedGame; }
void SetHasSavedGame() { hasSavedGame = true; }
protected:
friend class idLocalUser;
friend class idProfileMgr;
// used by idLocalUser and internally
void StatSetInt( int s, int v );
void StatSetFloat( int s, float v );
int StatGetInt( int s ) const;
float StatGetFloat( int s ) const;
private:
void SetState( state_t value ) { state = value; }
void SetRequestedState( state_t value ) { requestedState = value; }
protected:
//------------------------
// settings
//------------------------
bool alwaysRun;
int musicVolume;
int soundVolume;
//------------------------
// video settings
//------------------------
float frameScaleX;
float frameScaleY;
//------------------------
// state management
//------------------------
state_t state;
state_t requestedState;
//------------------------
// stats are stored in the profile
//------------------------
idStaticList< profileStatValue_t, MAX_PLAYER_PROFILE_STATS > stats;
//------------------------
// misc
//------------------------
int deviceNum;
bool seenInstallMessage;
uint64 achievementBits;
bool hasSavedGame;
};
#endif

View file

@ -1,423 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "Precompiled.h"
#include "globaldata.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <string>
#include <errno.h>
// Sockets
#include <sys/socket.h>
#include <sys/types.h>
#include <netex/errno.h>
#include <netex/net.h>
#include <arpa/inet.h>
#include "i_system.h"
#include "d_event.h"
#include "d_net.h"
#include "m_argv.h"
#include "doomstat.h"
#include "i_net.h"
#include "doomlib.h"
#include "../Main/Main.h"
void NetSend (void);
qboolean NetListen (void);
namespace {
bool IsValidSocket( int socketDescriptor );
int GetLastSocketError();
/*
========================
Returns true if the socket is valid. I made this function to help abstract the differences
between WinSock (used on Xbox) and BSD sockets, which the PS3 follows more closely.
========================
*/
bool IsValidSocket( int socketDescriptor ) {
return socketDescriptor >= 0;
}
/*
========================
Returns the last error reported by the platform's socket library.
========================
*/
int GetLastSocketError() {
return sys_net_errno;
}
}
//
// NETWORKING
//
int DOOMPORT = 1002; // DHM - Nerve :: On original XBox, ports 1000 - 1255 saved you a byte on every packet. 360 too?
unsigned long GetServerIP() {
return ::g->sendaddress[::g->doomcom.consoleplayer].sin_addr.s_addr;
}
void (*netget) (void);
void (*netsend) (void);
//
// UDPsocket
//
int UDPsocket (void)
{
int s;
// allocate a socket
s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if ( !IsValidSocket( s ) ) {
int err = GetLastSocketError();
I_Error( "can't create socket, error %d", err );
}
return s;
}
//
// BindToLocalPort
//
void BindToLocalPort( int s, int port )
{
int v;
struct sockaddr_in address;
memset (&address, 0, sizeof(address));
address.sin_family = AF_INET;
address.sin_addr.s_addr = INADDR_ANY;
address.sin_port = port;
v = bind (s, (sockaddr*)&address, sizeof(address));
//if (v == -1)
//I_Error ("BindToPort: bind: %s", strerror(errno));
}
//
// PacketSend
//
void PacketSend (void)
{
int c;
doomdata_t sw;
// byte swap
sw.checksum = htonl(::g->netbuffer->checksum);
sw.sourceDest = DoomLib::BuildSourceDest(::g->doomcom.remotenode);
sw.player = ::g->netbuffer->player;
sw.retransmitfrom = ::g->netbuffer->retransmitfrom;
sw.starttic = ::g->netbuffer->starttic;
sw.numtics = ::g->netbuffer->numtics;
for (c=0 ; c< ::g->netbuffer->numtics ; c++)
{
sw.cmds[c].forwardmove = ::g->netbuffer->cmds[c].forwardmove;
sw.cmds[c].sidemove = ::g->netbuffer->cmds[c].sidemove;
sw.cmds[c].angleturn = htons(::g->netbuffer->cmds[c].angleturn);
sw.cmds[c].consistancy = htons(::g->netbuffer->cmds[c].consistancy);
sw.cmds[c].buttons = ::g->netbuffer->cmds[c].buttons;
}
// Send Socket
{
//DWORD num_sent;
//if ( globalNetworking ) {
// c = WSASendTo(::g->sendsocket, &buffer, 1, &num_sent, 0, (sockaddr*)&::g->sendaddress[::g->doomcom.remotenode],
// sizeof(::g->sendaddress[::g->doomcom.remotenode]), 0, 0);
//} else {
c = DoomLib::Send( (char*)&sw, ::g->doomcom.datalength, (sockaddr_in*)&::g->sendaddress[::g->doomcom.remotenode], ::g->doomcom.remotenode );
//}
}
}
//
// PacketGet
//
void PacketGet (void)
{
int i;
int c;
struct sockaddr_in fromaddress;
int fromlen;
doomdata_t sw;
DWORD num_recieved; //, flags = 0;
// Try and read a socket
//buffer.buf = (char*)&sw;
//buffer.len = sizeof(sw);
fromlen = sizeof(fromaddress);
//if ( globalNetworking ) {
// c = WSARecvFrom(::g->insocket, &buffer, 1, &num_recieved, &flags, (struct sockaddr*)&fromaddress, &fromlen, 0, 0);
//} else {
c = DoomLib::Recv( (char*)&sw, &num_recieved );
//}
if ( c < 0 )
{
/*if ( globalNetworking ) {
int err = WSAGetLastError();
if (err != WSAEWOULDBLOCK)
I_Error ("GetPacket: %s",strerror(errno));
}*/
::g->doomcom.remotenode = -1; // no packet
return;
}
// find remote node number
/*for (i=0 ; i<::g->doomcom.numnodes ; i++)
if ( fromaddress.sin_addr.s_addr == ::g->sendaddress[i].sin_addr.s_addr )
break;
if (i == ::g->doomcom.numnodes)
{
// packet is not from one of the ::g->players (new game broadcast)
::g->doomcom.remotenode = -1; // no packet
return;
}*/
//if ( ::g->consoleplayer == 1 ) {
//int x = 0;
//}
int source;
int dest;
DoomLib::GetSourceDest( sw.sourceDest, &source, &dest );
i = source;
//if ( ::g->consoleplayer == 1 ) {
//if ( i == 2 ) {
//int suck = 0;
//}
//}
::g->doomcom.remotenode = i; // good packet from a game player
::g->doomcom.datalength = (short)num_recieved;
// byte swap
::g->netbuffer->checksum = ntohl(sw.checksum);
::g->netbuffer->player = sw.player;
::g->netbuffer->retransmitfrom = sw.retransmitfrom;
::g->netbuffer->starttic = sw.starttic;
::g->netbuffer->numtics = sw.numtics;
for ( c = 0; c < ::g->netbuffer->numtics; c++ )
{
::g->netbuffer->cmds[c].forwardmove = sw.cmds[c].forwardmove;
::g->netbuffer->cmds[c].sidemove = sw.cmds[c].sidemove;
::g->netbuffer->cmds[c].angleturn = ntohs(sw.cmds[c].angleturn);
::g->netbuffer->cmds[c].consistancy = ntohs(sw.cmds[c].consistancy);
::g->netbuffer->cmds[c].buttons = sw.cmds[c].buttons;
}
}
static int I_TrySetupNetwork(void)
{
// DHM - Moved to Session
return 1;
}
//
// I_InitNetwork
//
void I_InitNetwork (void)
{
//qboolean trueval = true;
int i;
int p;
//int a = 0;
// struct hostent* hostentry; // host information entry
memset (&::g->doomcom, 0, sizeof(::g->doomcom) );
// set up for network
i = M_CheckParm ("-dup");
if (i && i< ::g->myargc-1)
{
::g->doomcom.ticdup = ::g->myargv[i+1][0]-'0';
if (::g->doomcom.ticdup < 1)
::g->doomcom.ticdup = 1;
if (::g->doomcom.ticdup > 9)
::g->doomcom.ticdup = 9;
}
else
::g->doomcom.ticdup = 1;
if (M_CheckParm ("-extratic"))
::g->doomcom.extratics = 1;
else
::g->doomcom.extratics = 0;
p = M_CheckParm ("-port");
if (p && p < ::g->myargc-1)
{
DOOMPORT = atoi (::g->myargv[p+1]);
I_Printf ("using alternate port %i\n",DOOMPORT);
}
// parse network game options,
// -net <::g->consoleplayer> <host> <host> ...
i = M_CheckParm ("-net");
if (!i || !I_TrySetupNetwork())
{
// single player game
::g->netgame = false;
::g->doomcom.id = DOOMCOM_ID;
::g->doomcom.numplayers = ::g->doomcom.numnodes = 1;
::g->doomcom.deathmatch = false;
::g->doomcom.consoleplayer = 0;
return;
}
netsend = PacketSend;
netget = PacketGet;
::g->netgame = true;
{
++i; // skip the '-net'
::g->doomcom.numnodes = 0;
::g->doomcom.consoleplayer = atoi( ::g->myargv[i] );
// skip the console number
++i;
::g->doomcom.numnodes = 0;
for (; i < ::g->myargc; ++i)
{
::g->sendaddress[::g->doomcom.numnodes].sin_family = AF_INET;
::g->sendaddress[::g->doomcom.numnodes].sin_port = htons(DOOMPORT);
// Pull out the port number.
const std::string ipAddressWithPort( ::g->myargv[i] );
const std::size_t colonPosition = ipAddressWithPort.find_last_of(':');
std::string ipOnly;
if( colonPosition != std::string::npos && colonPosition + 1 < ipAddressWithPort.size() ) {
const std::string portOnly( ipAddressWithPort.substr( colonPosition + 1 ) );
::g->sendaddress[::g->doomcom.numnodes].sin_port = htons( atoi( portOnly.c_str() ) );
ipOnly = ipAddressWithPort.substr( 0, colonPosition );
} else {
// Assume the address doesn't include a port.
ipOnly = ipAddressWithPort;
}
in_addr_t ipAddress = inet_addr( ipOnly.c_str() );
if ( ipAddress == INADDR_NONE ) {
I_Error( "Invalid IP Address: %s\n", ipOnly.c_str() );
session->QuitMatch();
common->AddDialog( GDM_OPPONENT_CONNECTION_LOST, DIALOG_ACCEPT, NULL, NULL, false );
}
::g->sendaddress[::g->doomcom.numnodes].sin_addr.s_addr = ipAddress;
::g->doomcom.numnodes++;
}
::g->doomcom.id = DOOMCOM_ID;
::g->doomcom.numplayers = ::g->doomcom.numnodes;
}
if ( globalNetworking ) {
// Setup sockets
::g->insocket = UDPsocket ();
BindToLocalPort (::g->insocket,htons(DOOMPORT));
// PS3 call to enable non-blocking mode
int nonblocking = 1; // Non-zero is nonblocking mode.
setsockopt( ::g->insocket, SOL_SOCKET, SO_NBIO, &nonblocking, sizeof(nonblocking));
::g->sendsocket = UDPsocket ();
I_Printf( "[+] Setting up sockets for player %d\n", DoomLib::GetPlayer() );
}
}
// DHM - Nerve
void I_ShutdownNetwork( void ) {
if ( globalNetworking && gameLocal != NULL ) {
int curPlayer = DoomLib::GetPlayer();
for (int player = 0; player < gameLocal->Interface.GetNumPlayers(); ++player)
{
DoomLib::SetPlayer( player );
if ( IsValidSocket( ::g->insocket ) ) {
I_Printf( "[-] Shut down insocket for player %d\n", DoomLib::GetPlayer() );
shutdown( ::g->insocket, SHUT_RDWR );
socketclose( ::g->insocket );
}
if ( IsValidSocket( ::g->sendsocket ) ) {
I_Printf( "[-] Shut down sendsocket for player %d\n", DoomLib::GetPlayer() );
shutdown( ::g->sendsocket, SHUT_RDWR );
socketclose( ::g->sendsocket );
}
}
DoomLib::SetPlayer(curPlayer);
globalNetworking = false;
}
}
void I_NetCmd (void)
{
if (::g->doomcom.command == CMD_SEND)
{
netsend ();
}
else if (::g->doomcom.command == CMD_GET)
{
netget ();
}
else
I_Error ("Bad net cmd: %i\n",::g->doomcom.command);
}

View file

@ -1,365 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "Precompiled.h"
#include "globaldata.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include "i_system.h"
#include "d_event.h"
#include "d_net.h"
#include "m_argv.h"
#include "doomstat.h"
#include "i_net.h"
#include "doomlib.h"
#include "../Main/Main.h"
void NetSend (void);
qboolean NetListen (void);
//
// NETWORKING
//
int DOOMPORT = 1002; // DHM - Nerve :: On original XBox, ports 1000 - 1255 saved you a byte on every packet. 360 too?
unsigned long GetServerIP() { return ::g->sendaddress[::g->doomcom.consoleplayer].sin_addr.s_addr; }
void (*netget) (void);
void (*netsend) (void);
//
// UDPsocket
//
int UDPsocket (void)
{
int s;
// allocate a socket
s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (s == INVALID_SOCKET) {
int err = WSAGetLastError ();
I_Error ("can't create socket: %s",strerror(errno));
}
return s;
}
//
// BindToLocalPort
//
void BindToLocalPort( int s, int port )
{
int v;
struct sockaddr_in address;
memset (&address, 0, sizeof(address));
address.sin_family = AF_INET;
address.sin_addr.s_addr = INADDR_ANY;
address.sin_port = port;
v = bind (s, (sockaddr*)&address, sizeof(address));
//if (v == -1)
//I_Error ("BindToPort: bind: %s", strerror(errno));
}
//
// PacketSend
//
void PacketSend (void)
{
int c;
doomdata_t sw;
// byte swap
sw.checksum = htonl(::g->netbuffer->checksum);
sw.sourceDest = DoomLib::BuildSourceDest(::g->doomcom.remotenode);
sw.player = ::g->netbuffer->player;
sw.retransmitfrom = ::g->netbuffer->retransmitfrom;
sw.starttic = ::g->netbuffer->starttic;
sw.numtics = ::g->netbuffer->numtics;
for (c=0 ; c< ::g->netbuffer->numtics ; c++)
{
sw.cmds[c].forwardmove = ::g->netbuffer->cmds[c].forwardmove;
sw.cmds[c].sidemove = ::g->netbuffer->cmds[c].sidemove;
sw.cmds[c].angleturn = htons(::g->netbuffer->cmds[c].angleturn);
//sw.cmds[c].consistancy = htons(::g->netbuffer->cmds[c].consistancy);
sw.cmds[c].buttons = ::g->netbuffer->cmds[c].buttons;
}
// Send Socket
{
//DWORD num_sent;
WSABUF buffer;
buffer.buf = (char*)&sw;
buffer.len = ::g->doomcom.datalength;
//if ( globalNetworking ) {
// c = WSASendTo(::g->sendsocket, &buffer, 1, &num_sent, 0, (sockaddr*)&::g->sendaddress[::g->doomcom.remotenode],
// sizeof(::g->sendaddress[::g->doomcom.remotenode]), 0, 0);
//} else {
c = DoomLib::Send( buffer.buf, buffer.len, (sockaddr_in*)&::g->sendaddress[::g->doomcom.remotenode], ::g->doomcom.remotenode );
//}
}
}
//
// PacketGet
//
void PacketGet (void)
{
int i;
int c;
struct sockaddr_in fromaddress;
int fromlen;
doomdata_t sw;
WSABUF buffer;
DWORD num_recieved, flags = 0;
// Try and read a socket
buffer.buf = (char*)&sw;
buffer.len = sizeof(sw);
fromlen = sizeof(fromaddress);
//if ( globalNetworking ) {
// c = WSARecvFrom(::g->insocket, &buffer, 1, &num_recieved, &flags, (struct sockaddr*)&fromaddress, &fromlen, 0, 0);
//} else {
c = DoomLib::Recv( (char*)&sw, &num_recieved );
//}
if (c == SOCKET_ERROR )
{
/*if ( globalNetworking ) {
int err = WSAGetLastError();
if (err != WSAEWOULDBLOCK)
I_Error ("GetPacket: %s",strerror(errno));
}*/
::g->doomcom.remotenode = -1; // no packet
return;
}
// find remote node number
/*for (i=0 ; i<::g->doomcom.numnodes ; i++)
if ( fromaddress.sin_addr.s_addr == ::g->sendaddress[i].sin_addr.s_addr )
break;
if (i == ::g->doomcom.numnodes)
{
// packet is not from one of the ::g->players (new game broadcast)
::g->doomcom.remotenode = -1; // no packet
return;
}*/
//if ( ::g->consoleplayer == 1 ) {
//int x = 0;
//}
int source;
int dest;
DoomLib::GetSourceDest( sw.sourceDest, &source, &dest );
i = source;
//if ( ::g->consoleplayer == 1 ) {
//if ( i == 2 ) {
//int suck = 0;
//}
//}
::g->doomcom.remotenode = i; // good packet from a game player
::g->doomcom.datalength = (short)num_recieved;
// byte swap
::g->netbuffer->checksum = ntohl(sw.checksum);
::g->netbuffer->player = sw.player;
::g->netbuffer->retransmitfrom = sw.retransmitfrom;
::g->netbuffer->starttic = sw.starttic;
::g->netbuffer->numtics = sw.numtics;
for (c=0 ; c< ::g->netbuffer->numtics ; c++)
{
::g->netbuffer->cmds[c].forwardmove = sw.cmds[c].forwardmove;
::g->netbuffer->cmds[c].sidemove = sw.cmds[c].sidemove;
::g->netbuffer->cmds[c].angleturn = ntohs(sw.cmds[c].angleturn);
//::g->netbuffer->cmds[c].consistancy = ntohs(sw.cmds[c].consistancy);
::g->netbuffer->cmds[c].buttons = sw.cmds[c].buttons;
}
}
static int I_TrySetupNetwork(void)
{
// DHM - Moved to Session
return 1;
}
//
// I_InitNetwork
//
void I_InitNetwork (void)
{
qboolean trueval = true;
int i;
int p;
int a = 0;
// struct hostent* hostentry; // host information entry
memset (&::g->doomcom, 0, sizeof(::g->doomcom) );
// set up for network
i = M_CheckParm ("-dup");
if (i && i< ::g->myargc-1)
{
::g->doomcom.ticdup = ::g->myargv[i+1][0]-'0';
if (::g->doomcom.ticdup < 1)
::g->doomcom.ticdup = 1;
if (::g->doomcom.ticdup > 9)
::g->doomcom.ticdup = 9;
}
else
::g->doomcom.ticdup = 1;
if (M_CheckParm ("-extratic"))
::g->doomcom.extratics = 1;
else
::g->doomcom.extratics = 0;
p = M_CheckParm ("-port");
if (p && p<::g->myargc-1)
{
DOOMPORT = atoi (::g->myargv[p+1]);
I_Printf ("using alternate port %i\n",DOOMPORT);
}
// parse network game options,
// -net <::g->consoleplayer> <host> <host> ...
i = M_CheckParm ("-net");
if (!i || !I_TrySetupNetwork())
{
// single player game
::g->netgame = false;
::g->doomcom.id = DOOMCOM_ID;
::g->doomcom.numplayers = ::g->doomcom.numnodes = 1;
::g->doomcom.deathmatch = false;
::g->doomcom.consoleplayer = 0;
return;
}
netsend = PacketSend;
netget = PacketGet;
::g->netgame = true;
{
++i; // skip the '-net'
::g->doomcom.numnodes = 0;
::g->doomcom.consoleplayer = atoi( ::g->myargv[i] );
// skip the console number
++i;
::g->doomcom.numnodes = 0;
for (; i < ::g->myargc; ++i)
{
::g->sendaddress[::g->doomcom.numnodes].sin_family = AF_INET;
::g->sendaddress[::g->doomcom.numnodes].sin_port = htons(DOOMPORT);
::g->sendaddress[::g->doomcom.numnodes].sin_addr.s_addr = inet_addr (::g->myargv[i]);//39, 17
::g->doomcom.numnodes++;
}
::g->doomcom.id = DOOMCOM_ID;
::g->doomcom.numplayers = ::g->doomcom.numnodes;
}
if ( globalNetworking ) {
// Setup sockets
::g->insocket = UDPsocket ();
BindToLocalPort (::g->insocket,htons(DOOMPORT));
ioctlsocket (::g->insocket, FIONBIO, (u_long*)&trueval);
::g->sendsocket = UDPsocket ();
I_Printf( "[+] Setting up sockets for player %d\n", DoomLib::GetPlayer() );
}
}
// DHM - Nerve
void I_ShutdownNetwork( void ) {
if ( globalNetworking ) {
int curPlayer = DoomLib::GetPlayer();
for (int player = 0; player < App->Game->Interface.GetNumPlayers(); ++player)
{
DoomLib::SetPlayer( player );
if ( ::g->insocket != INVALID_SOCKET ) {
I_Printf( "[-] Shut down insocket for player %d\n", DoomLib::GetPlayer() );
shutdown( ::g->insocket, SD_BOTH );
closesocket( ::g->insocket );
}
if ( ::g->sendsocket != INVALID_SOCKET ) {
I_Printf( "[-] Shut down sendsocket for player %d\n", DoomLib::GetPlayer() );
shutdown( ::g->sendsocket, SD_BOTH );
closesocket( ::g->sendsocket );
}
}
DoomLib::SetPlayer(curPlayer);
globalNetworking = false;
}
}
void I_NetCmd (void)
{
if (::g->doomcom.command == CMD_SEND)
{
netsend ();
}
else if (::g->doomcom.command == CMD_GET)
{
netget ();
}
else
I_Error ("Bad net cmd: %i\n",::g->doomcom.command);
}

View file

@ -1,174 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "Precompiled.h"
#include "globaldata.h"
#include <stdlib.h>
#include <stdarg.h>
#include <sys/types.h>
#include <signal.h>
#include "i_video.h"
#include "i_system.h"
#include "doomstat.h"
#include "v_video.h"
#include "m_argv.h"
#include "d_main.h"
#include "doomdef.h"
//#include <d3d8.h> // SMF
//#include <xgraphics.h> // SMF
void I_ShutdownGraphics(void)
{
// VVTODO: Shutdown Graphics
}
//
// I_StartFrame
//
void I_StartFrame (void)
{
// er?
}
static void I_CombineMouseEvent(const event_t* in, event_t* out)
{
if (fabs((float)in->data1) > fabs((float)out->data1))
out->data1 = in->data1;
if (fabs((float)in->data2) > fabs((float)out->data2))
out->data2 = in->data2;
if (fabs((float)in->data3) > fabs((float)out->data3))
out->data3 = in->data3;
}
void I_GetEvents( controller_t *controller )
{
event_t e_mouse, e_joystick;
int numEvents;
e_mouse.type = ev_mouse;
e_mouse.data1 = e_mouse.data2 = e_mouse.data3 = 0;
e_joystick.type = ev_joystick;
e_joystick.data1 = e_joystick.data2 = e_joystick.data3 = 0;
numEvents = I_PollMouseInputEvents( controller );
if (numEvents)
{
int i;
event_t e;
// right thumb stick
for (i = 0; i < numEvents; ++i)
{
I_ReturnMouseInputEvent(i, &e);
if (e.type == ev_mouse)
I_CombineMouseEvent(&e, &e_mouse);
else if (e.type == ev_joystick)
I_CombineMouseEvent(&e, &e_joystick);
}
}
numEvents = I_PollJoystickInputEvents( controller );
if (numEvents)
{
int i;
event_t e;
for (i = 0; i < numEvents; ++i)
{
I_ReturnJoystickInputEvent(i, &e);
if (e.type == ev_keydown || e.type == ev_keyup) {
D_PostEvent(&e);
} else if (e.type == ev_joystick) {
I_CombineMouseEvent(&e, &e_joystick);
} else if (e.type == ev_mouse) {
I_CombineMouseEvent(&e, &e_mouse);
}
}
}
D_PostEvent(&e_mouse);
D_PostEvent(&e_joystick);
}
//
// I_UpdateNoBlit
//
void I_UpdateNoBlit (void)
{
// what is this?
}
//
// I_FinishUpdate
//
void I_FinishUpdate (void)
{
// DHM - These buffers are not used
}
//
// I_ReadScreen
//
void I_ReadScreen (byte* scr)
{
XMemCpy(scr, ::g->screens[0], SCREENWIDTH*SCREENHEIGHT);
}
//
// I_SetPalette
//
void I_SetPalette (byte* palette)
{
int i;
// set the X colormap entries
for (i=0 ; i<256 ; i++)
{
int r,b,g;
r = gammatable[::g->usegamma][*palette++];
g = gammatable[::g->usegamma][*palette++];
b = gammatable[::g->usegamma][*palette++];
::g->XColorMap[i] = D3DCOLOR_ARGB(0xff, r, g, b);
}
}
void I_InitGraphics()
{
}

View file

@ -31,7 +31,7 @@ If you have questions concerning this license or the applicable additional terms
#include "Main.h"
#include "sys/sys_session.h"
#include "sys/sys_signin.h"
#include "DoomLeaderboards.h"
//#include "DoomLeaderboards.h"
#include "d3xp/Game_Local.h"

962
neo/CMakeLists.txt Normal file
View file

@ -0,0 +1,962 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
project(RBDoom3)
option(USE_MFC_TOOLS
"Compile the built-in MFC based tools" OFF)
option(MONOLITH
"Embed game logic into main executable" ON)
#option(STANDALONE
# "Skip Doom 3 base/ folder" ON)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions(-pipe)
add_definitions(-Wall)
#set(CMAKE_C_FLAGS_DEBUG "-D_DEBUG")
elseif(MSVC)
# Multiprocessor support for compiling
# /MP
# Inline Function Expansion: Any Suitable (/Ob2)
# "/Ob2",
# enable Intrinsic Functions
# "/Oi",
# Omit Frame Pointers
# "/Oy",
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /D _DEBUG /MP")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MP /Oi /Oy")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MP /Oi")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MP /Oi /Oy")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP /Oi /Oy")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MP /Oi /Oy")
add_definitions(-DWIN32
-D_WINDOWS
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_WARNINGS
-D_USE_32BIT_TIME_T
-D_MBCS
#-DUSE_OPENAL
-DUSE_EXCEPTIONS)
if(USE_MFC_TOOLS)
add_definitions(-D_AFXDLL)
# 0: Use Standard Windows Libraries
# 1: Use MFC in a Static Library
# 2: Use MFC in a Shared DLL
set(CMAKE_MFC_FLAG 2)
endif()
endif()
#if(STANDALONE)
# add_definitions(-DSTANDALONE)
#endif()
add_subdirectory(idlib)
file(GLOB AAS_INCLUDES aas/*.h)
file(GLOB AAS_SOURCES aas/*.cpp)
file(GLOB_RECURSE CM_INCLUDES cm/*.h)
file(GLOB_RECURSE CM_SOURCES cm/*.cpp)
file(GLOB FRAMEWORK_INCLUDES framework/*.h)
file(GLOB FRAMEWORK_SOURCES framework/*.cpp)
file(GLOB FRAMEWORK_ASYNC_INCLUDES framework/async/*.h)
file(GLOB FRAMEWORK_ASYNC_SOURCES framework/async/*.cpp)
file(GLOB_RECURSE RENDERER_INCLUDES renderer/*.h)
# renderer/AutoRender.h
# renderer/AutoRenderBink.h
# renderer/BinaryImage.h
# renderer/BinaryImageData.h
# renderer/BoundsTrack.h
# renderer/BufferObject.h
# renderer/Cinematic.h
# renderer/Font.h
# renderer/GLMatrix.h
# renderer/GLState.h
# renderer/GuiModel.h
# renderer/Image.h
# renderer/ImageOpts.h
# renderer/Interaction.h
# renderer/Material.h
# renderer/Model.h
# renderer/ModelDecal.h
# renderer/ModelManager.h
# renderer/ModelOverlay.h
# renderer/Model_ase.h
# #renderer/Model_ColladaHelper.h
# #renderer/Model_ColladaParser.h
# renderer/Model_local.h
# renderer/Model_lwo.h
# renderer/Model_ma.h
# renderer/Model_md3.h
# renderer/RenderLog.h
# renderer/RenderProgs.h
# renderer/RenderSystem.h
# renderer/RenderTexture.h
# renderer/RenderWorld.h
# renderer/RenderWorld_local.h
# renderer/ResolutionScale.h
# renderer/ScreenRect.h
# renderer/simplex.h
# renderer/tr_local.h
# renderer/VertexCache.h)
file(GLOB_RECURSE RENDERER_SOURCES renderer/*.cpp)
# renderer/AutoRender.cpp
# renderer/Cinematic.cpp
# renderer/Framebuffer.cpp
# renderer/GLShader.cpp
# renderer/GuiModel.cpp
# renderer/Image_files.cpp
# renderer/Image_init.cpp
# renderer/Image_load.cpp
# renderer/Image_process.cpp
# renderer/Image_program.cpp
# renderer/Interaction.cpp
# renderer/Material.cpp
# renderer/Model.cpp
# renderer/ModelDecal.cpp
# renderer/ModelManager.cpp
# renderer/ModelOverlay.cpp
# renderer/Model_ase.cpp
# renderer/Model_beam.cpp
# #renderer/Model_ColladaParser.cpp
# renderer/Model_liquid.cpp
# renderer/Model_lwo.cpp
# renderer/Model_ma.cpp
# renderer/Model_md3.cpp
# renderer/Model_md5.cpp
# renderer/Model_prt.cpp
# renderer/Model_sprite.cpp
# renderer/RenderEntity.cpp
# renderer/RenderSystem.cpp
# renderer/RenderSystem_init.cpp
# renderer/RenderWorld.cpp
# renderer/RenderWorld_demo.cpp
# renderer/RenderWorld_load.cpp
# renderer/RenderWorld_portals.cpp
# renderer/VertexCache.cpp
# renderer/draw_arb.cpp
# renderer/draw_arb2.cpp
# renderer/draw_glsl.cpp
# renderer/draw_common.cpp
# renderer/draw_exp.cpp
# renderer/draw_nv10.cpp
# renderer/draw_nv20.cpp
# renderer/draw_r200.cpp
# renderer/tr_backend.cpp
# renderer/tr_deform.cpp
# renderer/tr_font.cpp
# renderer/tr_guisurf.cpp
# renderer/tr_light.cpp
# renderer/tr_lightrun.cpp
# renderer/tr_main.cpp
# renderer/tr_math.cpp
# renderer/tr_orderIndexes.cpp
# renderer/tr_polytope.cpp
# renderer/tr_render.cpp
# renderer/tr_rendertools.cpp
# renderer/tr_shadowbounds.cpp
# renderer/tr_stencilshadow.cpp
# renderer/tr_subview.cpp
# renderer/tr_trace.cpp
# renderer/tr_trisurf.cpp
# renderer/tr_turboshadow.cpp)
file(GLOB IRRXML_INCLUDES libs/irrxml/src/*.h)
file(GLOB IRRXML_SOURCES libs/irrxml/src/*.cpp)
set(JPEG_INCLUDES
libs/jpeg-6/jchuff.h
libs/jpeg-6/jconfig.h
libs/jpeg-6/jdct.h
libs/jpeg-6/jdhuff.h
libs/jpeg-6/jerror.h
libs/jpeg-6/jinclude.h
libs/jpeg-6/jmemsys.h
libs/jpeg-6/jmorecfg.h
libs/jpeg-6/jpegint.h
libs/jpeg-6/jpeglib.h
libs/jpeg-6/jversion.h)
set(JPEG_SOURCES
libs/jpeg-6/jcapimin.cpp
libs/jpeg-6/jcapistd.cpp
libs/jpeg-6/jccoefct.cpp
libs/jpeg-6/jccolor.cpp
libs/jpeg-6/jcdctmgr.cpp
libs/jpeg-6/jchuff.cpp
libs/jpeg-6/jcinit.cpp
libs/jpeg-6/jcmainct.cpp
libs/jpeg-6/jcmarker.cpp
libs/jpeg-6/jcmaster.cpp
libs/jpeg-6/jcomapi.cpp
libs/jpeg-6/jcparam.cpp
libs/jpeg-6/jcphuff.cpp
libs/jpeg-6/jcprepct.cpp
libs/jpeg-6/jcsample.cpp
libs/jpeg-6/jctrans.cpp
libs/jpeg-6/jdapimin.cpp
libs/jpeg-6/jdapistd.cpp
libs/jpeg-6/jdatadst.cpp
libs/jpeg-6/jdatasrc.cpp
libs/jpeg-6/jdcoefct.cpp
libs/jpeg-6/jdcolor.cpp
libs/jpeg-6/jddctmgr.cpp
libs/jpeg-6/jdhuff.cpp
libs/jpeg-6/jdinput.cpp
libs/jpeg-6/jdmainct.cpp
libs/jpeg-6/jdmarker.cpp
libs/jpeg-6/jdmaster.cpp
libs/jpeg-6/jdmerge.cpp
libs/jpeg-6/jdphuff.cpp
libs/jpeg-6/jdpostct.cpp
libs/jpeg-6/jdsample.cpp
libs/jpeg-6/jdtrans.cpp
libs/jpeg-6/jerror.cpp
libs/jpeg-6/jfdctflt.cpp
libs/jpeg-6/jfdctfst.cpp
libs/jpeg-6/jfdctint.cpp
libs/jpeg-6/jidctflt.cpp
libs/jpeg-6/jidctfst.cpp
libs/jpeg-6/jidctint.cpp
libs/jpeg-6/jidctred.cpp
#libs/jpeg-6/jload.cpp
libs/jpeg-6/jmemmgr.cpp
libs/jpeg-6/jmemnobs.cpp
#libs/jpeg-6/jpegtran.cpp
libs/jpeg-6/jquant1.cpp
libs/jpeg-6/jquant2.cpp
libs/jpeg-6/jutils.cpp)
file(GLOB PNG_INCLUDES libs/png/*.h)
file(GLOB PNG_SOURCES libs/png/*.c)
file(GLOB ZLIB_INCLUDES libs/zlib/*.h)
file(GLOB ZLIB_SOURCES libs/zlib/*.c)
set(GLEW_INCLUDES
libs/glew/include/GL/glew.h)
if(WIN32)
set(GLEW_INCLUDES ${GLEW_INCLUDES} libs/glew/include/GL/wglew.h)
else()
set(GLEW_INCLUDES ${GLEW_INCLUDES} libs/glew/include/GL/glxew.h)
endif()
set(GLEW_SOURCES
libs/glew/src/glew.c)
set(FREETYPE_SOURCES
libs/freetype/src/autofit/autofit.c
libs/freetype/src/bdf/bdf.c
libs/freetype/src/cff/cff.c
libs/freetype/src/base/ftbase.c
libs/freetype/src/base/ftbitmap.c
libs/freetype/src/cache/ftcache.c
libs/freetype/src/base/ftdebug.c
libs/freetype/src/base/ftgasp.c
libs/freetype/src/base/ftglyph.c
libs/freetype/src/gzip/ftgzip.c
libs/freetype/src/base/ftinit.c
libs/freetype/src/lzw/ftlzw.c
libs/freetype/src/base/ftstroke.c
libs/freetype/src/base/ftsystem.c
libs/freetype/src/smooth/smooth.c
libs/freetype/src/base/ftbbox.c
libs/freetype/src/base/ftmm.c
libs/freetype/src/base/ftpfr.c
libs/freetype/src/base/ftsynth.c
libs/freetype/src/base/fttype1.c
libs/freetype/src/base/ftwinfnt.c
libs/freetype/src/pcf/pcf.c
libs/freetype/src/pfr/pfr.c
libs/freetype/src/psaux/psaux.c
libs/freetype/src/pshinter/pshinter.c
libs/freetype/src/psnames/psmodule.c
libs/freetype/src/raster/raster.c
libs/freetype/src/sfnt/sfnt.c
libs/freetype/src/truetype/truetype.c
libs/freetype/src/type1/type1.c
libs/freetype/src/cid/type1cid.c
libs/freetype/src/type42/type42.c
libs/freetype/src/winfonts/winfnt.c)
set(SOUND_INCLUDES
sound/snd_local.h
sound/sound.h
sound/SoundVoice.h
sound/WaveFile.h)
set(SOUND_SOURCES
#sound/snd_cache.cpp
#sound/snd_decoder.cpp
#sound/snd_efxfile.cpp
sound/snd_emitter.cpp
sound/snd_shader.cpp
sound/snd_system.cpp
sound/snd_world.cpp
sound/SoundVoice.cpp
sound/WaveFile.cpp
)
set(XAUDIO2_INCLUDES
sound/XAudio2/XA2_SoundHardware.h
sound/XAudio2/XA2_SoundSample.h
sound/XAudio2/XA2_SoundVoice.h)
set(XAUDIO2_SOURCES
sound/XAudio2/XA2_SoundHardware.cpp
sound/XAudio2/XA2_SoundSample.cpp
sound/XAudio2/XA2_SoundVoice.cpp)
set(OGGVORBIS_INCLUDES
libs/oggvorbis/ogg/ogg.h
libs/oggvorbis/ogg/os_types.h)
set(OGGVORBIS_SOURCES
libs/oggvorbis/oggsrc/bitwise.c
libs/oggvorbis/oggsrc/framing.c
libs/oggvorbis/vorbissrc/mdct.c
libs/oggvorbis/vorbissrc/smallft.c
libs/oggvorbis/vorbissrc/block.c
libs/oggvorbis/vorbissrc/envelope.c
libs/oggvorbis/vorbissrc/windowvb.c
libs/oggvorbis/vorbissrc/lsp.c
libs/oggvorbis/vorbissrc/lpc.c
libs/oggvorbis/vorbissrc/analysis.c
libs/oggvorbis/vorbissrc/synthesis.c
libs/oggvorbis/vorbissrc/psy.c
libs/oggvorbis/vorbissrc/info.c
libs/oggvorbis/vorbissrc/floor1.c
libs/oggvorbis/vorbissrc/floor0.c
libs/oggvorbis/vorbissrc/res0.c
libs/oggvorbis/vorbissrc/mapping0.c
libs/oggvorbis/vorbissrc/registry.c
libs/oggvorbis/vorbissrc/codebook.c
libs/oggvorbis/vorbissrc/sharedbook.c
libs/oggvorbis/vorbissrc/lookup.c
libs/oggvorbis/vorbissrc/bitrate.c
libs/oggvorbis/vorbissrc/vorbisfile.c)
file(GLOB SYS_INCLUDES sys/*.h)
file(GLOB SYS_SOURCES sys/*.cpp)
file(GLOB UI_INCLUDES ui/*.h)
file(GLOB UI_SOURCES ui/*.cpp)
file(GLOB SWF_INCLUDES swf/*.h)
file(GLOB SWF_SOURCES swf/*.cpp)
set(GAMED3XP_INCLUDES
d3xp/Achievements.h
d3xp/Actor.h
d3xp/AF.h
d3xp/AFEntity.h
d3xp/AimAssist.h
d3xp/BrittleFracture.h
d3xp/Camera.h
#d3xp/EndLevel.h
d3xp/Entity.h
d3xp/Fx.h
d3xp/Game.h
d3xp/GameEdit.h
d3xp/Game_local.h
d3xp/Grabber.h
d3xp/IK.h
d3xp/Item.h
d3xp/Leaderboards.h
d3xp/Light.h
d3xp/Misc.h
d3xp/Moveable.h
d3xp/Mover.h
d3xp/MultiplayerGame.h
d3xp/Player.h
d3xp/PlayerIcon.h
d3xp/PlayerView.h
d3xp/PredictedValue.h
d3xp/Projectile.h
d3xp/Pvs.h
d3xp/SecurityCamera.h
d3xp/SmokeParticles.h
d3xp/Sound.h
d3xp/Target.h
d3xp/Trigger.h
d3xp/Weapon.h
d3xp/WorldSpawn.h)
set(GAMED3XP_SOURCES
d3xp/Achievements.cpp
d3xp/Actor.cpp
d3xp/AF.cpp
d3xp/AFEntity.cpp
d3xp/AimAssist.cpp
d3xp/BrittleFracture.cpp
d3xp/Camera.cpp
#d3xp/EndLevel.cpp
d3xp/Entity.cpp
d3xp/Fx.cpp
d3xp/GameEdit.cpp
d3xp/Game_local.cpp
d3xp/Game_network.cpp
d3xp/Grabber.cpp
d3xp/IK.cpp
d3xp/Item.cpp
d3xp/Leaderboards.cpp
d3xp/Light.cpp
d3xp/Misc.cpp
d3xp/Moveable.cpp
d3xp/Mover.cpp
d3xp/MultiplayerGame.cpp
d3xp/Player.cpp
d3xp/PlayerIcon.cpp
d3xp/PlayerView.cpp
d3xp/precompiled.cpp
d3xp/Projectile.cpp
d3xp/Pvs.cpp
d3xp/SecurityCamera.cpp
d3xp/SmokeParticles.cpp
d3xp/Sound.cpp
d3xp/Target.cpp
d3xp/Trigger.cpp
d3xp/Weapon.cpp
d3xp/WorldSpawn.cpp)
file(GLOB GAMED3XP_AI_INCLUDES d3xp/ai/*.h)
file(GLOB GAMED3XP_AI_SOURCES d3xp/ai/*.cpp)
file(GLOB GAMED3XP_ANIM_INCLUDES d3xp/anim/*.h)
file(GLOB GAMED3XP_ANIM_SOURCES d3xp/anim/*.cpp)
file(GLOB GAMED3XP_GAMESYS_INCLUDES d3xp/gamesys/*.h)
set(GAMED3XP_GAMESYS_SOURCES
#d3xp/gamesys/Callbacks.cpp
d3xp/gamesys/Class.cpp
#d3xp/gamesys/DebugGraph.cpp
d3xp/gamesys/Event.cpp
d3xp/gamesys/SaveGame.cpp
d3xp/gamesys/SysCmds.cpp
d3xp/gamesys/SysCvar.cpp
#d3xp/gamesys/TypeInfo.cpp
)
file(GLOB GAMED3XP_MENUS_INCLUDES d3xp/menus/*.h)
file(GLOB GAMED3XP_MENUS_SOURCES d3xp/menus/*.cpp)
file(GLOB GAMED3XP_PHYSICS_INCLUDES d3xp/physics/*.h)
file(GLOB GAMED3XP_PHYSICS_SOURCES d3xp/physics/*.cpp)
file(GLOB GAMED3XP_SCRIPT_INCLUDES d3xp/script/*.h)
file(GLOB GAMED3XP_SCRIPT_SOURCES d3xp/script/*.cpp)
file(GLOB COMPILER_INCLUDES tools/compilers/*.h)
file(GLOB COMPILER_AAS_INCLUDES tools/compilers/aas/*.h)
file(GLOB COMPILER_AAS_SOURCES tools/compilers/aas/*.cpp)
file(GLOB COMPILER_DMAP_INCLUDES tools/compilers/dmap/*.h)
file(GLOB COMPILER_DMAP_SOURCES tools/compilers/dmap/*.cpp)
file(GLOB COMPILER_RENDERBUMP_INCLUDES tools/compilers/renderbump/*.h)
file(GLOB COMPILER_RENDERBUMP_SOURCES tools/compilers/renderbump/*.cpp)
file(GLOB COMPILER_ROQVQ_INCLUDES tools/compilers/roqvq/*.h)
file(GLOB COMPILER_ROQVQ_SOURCES tools/compilers/roqvq/*.cpp)
set(TOOLS_INCLUDES tools/edit_public.h)
file(GLOB TOOLS_COMAFX_INCLUDES tools/comafx/*.h)
file(GLOB TOOLS_COMAFX_SOURCES tools/comafx/*.cpp)
set(TOOLS_COMMON_INCLUDES
tools/common/ColorButton.h
tools/common/DialogHelpers.h
tools/common/MaskEdit.h
tools/common/OpenFileDialog.h
tools/common/PropertyGrid.h
tools/common/RegistryOptions.h
#tools/common/RenderBumpFlatDialog.h
tools/common/RollupPanel.h
tools/common/SpinButton.h)
set(TOOLS_COMMON_SOURCES
tools/common/AlphaPopup.cpp
tools/common/ColorButton.cpp
tools/common/MaskEdit.cpp
tools/common/OpenFileDialog.cpp
tools/common/PropertyGrid.cpp
tools/common/RegistryOptions.cpp
#tools/common/RenderBumpFlatDialog.cpp
tools/common/RollupPanel.cpp
tools/common/SpinButton.cpp)
file(GLOB TOOLS_COMMON_PROPTREE_INCLUDES tools/common/PropTree/*.h)
file(GLOB TOOLS_COMMON_PROPTREE_SOURCES tools/common/PropTree/*.cpp)
file(GLOB EDITOR_AF_INCLUDES tools/af/*.h)
file(GLOB EDITOR_AF_SOURCES tools/af/*.cpp)
set(EDITOR_DECL_INCLUDES
tools/decl/DialogDeclBrowser.h
tools/decl/DialogDeclEditor.h
tools/decl/DialogDeclNew.h)
set(EDITOR_DECL_SOURCES
tools/decl/DialogDeclBrowser.cpp
tools/decl/DialogDeclEditor.cpp
tools/decl/DialogDeclNew.cpp)
file(GLOB EDITOR_DEBUGGER_INCLUDES tools/debugger/*.h)
file(GLOB EDITOR_DEBUGGER_SOURCES tools/debugger/*.cpp)
file(GLOB EDITOR_GUIED_INCLUDES tools/guied/*.h)
set(EDITOR_GUIED_SOURCES
tools/guied/GEApp.cpp
tools/guied/GECheckInDlg.cpp
tools/guied/GEDeleteModifier.cpp
tools/guied/GEHideModifier.cpp
tools/guied/GEInsertModifier.cpp
tools/guied/GEItemPropsDlg.cpp
tools/guied/GEItemScriptsDlg.cpp
tools/guied/GEKeyValueModifier.cpp
tools/guied/GEModifier.cpp
tools/guied/GEModifierGroup.cpp
tools/guied/GEModifierStack.cpp
tools/guied/GEMoveModifier.cpp
tools/guied/GENavigator.cpp
tools/guied/GEOptions.cpp
tools/guied/GEOptionsDlg.cpp
tools/guied/GEProperties.cpp
tools/guied/GEPropertyPage.cpp
tools/guied/GESelectionMgr.cpp
tools/guied/GESizeModifier.cpp
tools/guied/GEStateModifier.cpp
tools/guied/GEStatusBar.cpp
tools/guied/GETransformer.cpp
tools/guied/GEViewer.cpp
tools/guied/GEWindowWrapper.cpp
#tools/guied/GEWindowWrapper_stub.cpp
tools/guied/GEWorkspace.cpp
tools/guied/GEWorkspaceFile.cpp
tools/guied/GEZOrderModifier.cpp
tools/guied/guied.cpp)
file(GLOB EDITOR_MATERIALEDITOR_INCLUDES tools/materialeditor/*.h)
file(GLOB EDITOR_MATERIALEDITOR_SOURCES tools/materialeditor/*.cpp)
file(GLOB EDITOR_PARTICLE_INCLUDES tools/particle/*.h)
file(GLOB EDITOR_PARTICLE_SOURCES tools/particle/*.cpp)
file(GLOB EDITOR_PDA_INCLUDES tools/pda/*.h)
file(GLOB EDITOR_PDA_SOURCES tools/pda/*.cpp)
file(GLOB EDITOR_RADIANT_INCLUDES tools/radiant/*.h)
file(GLOB EDITOR_RADIANT_SOURCES tools/radiant/*.cpp)
file(GLOB EDITOR_SCRIPT_INCLUDES tools/script/*.h)
file(GLOB EDITOR_SCRIPT_SOURCES tools/script/*.cpp)
file(GLOB EDITOR_SOUND_INCLUDES tools/sound/*.h)
file(GLOB EDITOR_SOUND_SOURCES tools/sound/*.cpp)
file(GLOB DOOMCLASSIC_INCLUDES ../doomclassic/doom/*.h)
file(GLOB DOOMCLASSIC_SOURCES ../doomclassic/doom/*.cpp)
list(REMOVE_ITEM DOOMCLASSIC_SOURCES ../doomclassic/doom/i_net_ps3.cpp)
list(REMOVE_ITEM DOOMCLASSIC_SOURCES ../doomclassic/doom/i_net_xbox.cpp)
list(REMOVE_ITEM DOOMCLASSIC_SOURCES ../doomclassic/doom/i_video_ps3.cpp)
list(REMOVE_ITEM DOOMCLASSIC_SOURCES ../doomclassic/doom/i_video_xbox.cpp)
file(GLOB TIMIDITY_INCLUDES ../doomclassic/timidity/*.h)
file(GLOB TIMIDITY_SOURCES ../doomclassic/timidity/*.cpp)
file(GLOB_RECURSE WIN32_INCLUDES sys/win32/*.h)
file(GLOB_RECURSE WIN32_SOURCES sys/win32/*.cpp)
set(WIN32_RESOURCES
# sys/win32/rc/res/BEVEL.BMP
# sys/win32/rc/res/BITMAP2.BMP
# sys/win32/rc/res/BMP00001.BMP
# sys/win32/rc/res/BMP0002.BMP
# sys/win32/rc/res/DEFTEX.WAL
# sys/win32/rc/res/ENDCAP.BMP
# sys/win32/rc/res/GetString.htm
# sys/win32/rc/res/IBEVEL.BMP
# sys/win32/rc/res/IENDCAP.BMP
# sys/win32/rc/res/MEFileToolbar.bmp
# sys/win32/rc/res/MEtoolbar.bmp
# sys/win32/rc/res/MaterialEditor.ico
# sys/win32/rc/res/PropTree.rc2
# sys/win32/rc/res/Q.BMP
# sys/win32/rc/res/RADIANT3.GIF
# sys/win32/rc/res/Radiant.ico
# sys/win32/rc/res/RadiantDoc.ico
# sys/win32/rc/res/TOOLBAR1.BMP
# sys/win32/rc/res/TOOLBAR2.BMP
# sys/win32/rc/res/Toolbar.bmp
# sys/win32/rc/res/VIEWDEFA.BMP
# sys/win32/rc/res/VIEWOPPO.BMP
# sys/win32/rc/res/bmp00002.bmp
# sys/win32/rc/res/bmp00003.bmp
# sys/win32/rc/res/bmp00004.bmp
# sys/win32/rc/res/bmp00005.bmp
# sys/win32/rc/res/cchsb.bmp
# sys/win32/rc/res/ccrgb.bmp
# sys/win32/rc/res/dbg_back.bmp
# sys/win32/rc/res/dbg_breakpoint.ico
# sys/win32/rc/res/dbg_current.ico
# sys/win32/rc/res/dbg_currentline.ico
# sys/win32/rc/res/dbg_empty.ico
# sys/win32/rc/res/dbg_open.bmp
# sys/win32/rc/res/dbg_toolbar.bmp
sys/win32/rc/res/doom.ico
# sys/win32/rc/res/fpoint.cur
# sys/win32/rc/res/fxed_link.ico
# sys/win32/rc/res/fxed_toolbar.bmp
# sys/win32/rc/res/fxeditor.ico
# sys/win32/rc/res/guied.ico
# sys/win32/rc/res/guied_collapse.ico
# sys/win32/rc/res/guied_expand.ico
# sys/win32/rc/res/guied_hand.cur
# sys/win32/rc/res/guied_nav_visible.ico
# sys/win32/rc/res/guied_nav_visibledisabled.ico
# sys/win32/rc/res/guied_scripts.ico
# sys/win32/rc/res/guied_scripts_white.ico
# sys/win32/rc/res/guied_viewer_toolbar.bmp
# sys/win32/rc/res/icon2.ico
# sys/win32/rc/res/logo_sm3dfx.bmp
# sys/win32/rc/res/matedtree.bmp
# sys/win32/rc/res/me_disabled_icon.ico
# sys/win32/rc/res/me_enabled.ico
# sys/win32/rc/res/me_off_icon.ico
# sys/win32/rc/res/me_on_icon.ico
# sys/win32/rc/res/qe3.ico
# sys/win32/rc/res/shaderbar.bmp
# sys/win32/rc/res/shaderdoc.ico
# sys/win32/rc/res/shaderframe.ico
# sys/win32/rc/res/spliter.cur
)
#if(USE_MFC_TOOLS)
list(APPEND WIN32_RESOURCES sys/win32/rc/doom.rc)
#else()
# list(APPEND WIN32_RESOURCES sys/win32/rc/doom_nomfc.rc)
#endif()
source_group("aas" FILES ${AAS_INCLUDES})
source_group("aas" FILES ${AAS_SOURCES})
source_group("cm" FILES ${CM_INCLUDES})
source_group("cm" FILES ${CM_SOURCES})
source_group("framework" FILES ${FRAMEWORK_INCLUDES})
source_group("framework" FILES ${FRAMEWORK_SOURCES})
source_group("framework\\async" FILES ${FRAMEWORK_ASYNC_INCLUDES})
source_group("framework\\async" FILES ${FRAMEWORK_ASYNC_SOURCES})
source_group("renderer" FILES ${RENDERER_INCLUDES})
source_group("renderer" FILES ${RENDERER_SOURCES})
source_group("libs\\irrxml" FILES ${IRRXML_INCLUDES})
source_group("libs\\irrxml" FILES ${IRRXML_SOURCES})
source_group("libs\\jpeg-6" FILES ${JPEG_INCLUDES})
source_group("libs\\jpeg-6" FILES ${JPEG_SOURCES})
source_group("libs\\png" FILES ${PNG_INCLUDES})
source_group("libs\\png" FILES ${PNG_SOURCES})
source_group("libs\\zlib" FILES ${ZLIB_INCLUDES})
source_group("libs\\zlib" FILES ${ZLIB_SOURCES})
source_group("libs\\glew" FILES ${GLEW_INCLUDES})
source_group("libs\\glew" FILES ${GLEW_SOURCES})
source_group("libs\\freetype" FILES ${FREETYPE_SOURCES})
source_group("sound" FILES ${SOUND_INCLUDES})
source_group("sound" FILES ${SOUND_SOURCES})
source_group("sound\\XAudio2" FILES ${XAUDIO2_INCLUDES})
source_group("sound\\XAudio2" FILES ${XAUDIO2_SOURCES})
source_group("libs\\oggvorbis" FILES ${OGGVORBIS_INCLUDES})
source_group("libs\\oggvorbis" FILES ${OGGVORBIS_SOURCES})
source_group("ui" FILES ${UI_INCLUDES})
source_group("ui" FILES ${UI_SOURCES})
source_group("swf" FILES ${SWF_INCLUDES})
source_group("swf" FILES ${SWF_SOURCES})
source_group("sys" FILES ${SYS_INCLUDES})
source_group("sys" FILES ${SYS_SOURCES})
source_group("doomclassic" FILES ${DOOMCLASSIC_INCLUDES})
source_group("doomclassic" FILES ${DOOMCLASSIC_SOURCES})
source_group("timidity" FILES ${TIMIDITY_INCLUDES})
source_group("timidity" FILES ${TIMIDITY_SOURCES})
source_group("game-d3xp" FILES ${GAMED3XP_INCLUDES})
source_group("game-d3xp" FILES ${GAMED3XP_SOURCES})
source_group("game-d3xp\\ai" FILES ${GAMED3XP_AI_INCLUDES})
source_group("game-d3xp\\ai" FILES ${GAMED3XP_AI_SOURCES})
source_group("game-d3xp\\anim" FILES ${GAMED3XP_ANIM_INCLUDES})
source_group("game-d3xp\\anim" FILES ${GAMED3XP_ANIM_SOURCES})
source_group("game-d3xp\\gamesys" FILES ${GAMED3XP_GAMESYS_INCLUDES})
source_group("game-d3xp\\gamesys" FILES ${GAMED3XP_GAMESYS_SOURCES})
source_group("game-d3xp\\menus" FILES ${GAMED3XP_MENUS_INCLUDES})
source_group("game-d3xp\\menus" FILES ${GAMED3XP_MENUS_SOURCES})
source_group("game-d3xp\\physics" FILES ${GAMED3XP_PHYSICS_INCLUDES})
source_group("game-d3xp\\physics" FILES ${GAMED3XP_PHYSICS_SOURCES})
source_group("game-d3xp\\script" FILES ${GAMED3XP_SCRIPT_INCLUDES})
source_group("game-d3xp\\script" FILES ${GAMED3XP_SCRIPT_SOURCES})
source_group("sys\\win32" FILES ${WIN32_INCLUDES})
source_group("sys\\win32" FILES ${WIN32_SOURCES})
source_group("sys\\win32\\Resources" FILES ${WIN32_RESOURCES})
source_group("tools\\compilers" FILES ${COMPILER_INCLUDES})
source_group("tools\\compilers\\aas" FILES ${COMPILER_AAS_INCLUDES})
source_group("tools\\compilers\\aas" FILES ${COMPILER_AAS_SOURCES})
source_group("tools\\compilers\\dmap" FILES ${COMPILER_DMAP_INCLUDES})
source_group("tools\\compilers\\dmap" FILES ${COMPILER_DMAP_SOURCES})
source_group("tools\\compilers\\renderbump" FILES ${COMPILER_RENDERBUMP_INCLUDES})
source_group("tools\\compilers\\renderbump" FILES ${COMPILER_RENDERBUMP_SOURCES})
source_group("tools\\compilers\\roqvq" FILES ${COMPILER_ROQVQ_INCLUDES})
source_group("tools\\compilers\\roqvq" FILES ${COMPILER_ROQVQ_SOURCES})
source_group("tools" FILES ${TOOLS_INCLUDES})
source_group("tools\\comafx" FILES ${TOOLS_COMAFX_INCLUDES})
source_group("tools\\comafx" FILES ${TOOLS_COMAFX_SOURCES})
source_group("tools\\common" FILES ${TOOLS_COMMON_INCLUDES})
source_group("tools\\common" FILES ${TOOLS_COMMON_SOURCES})
source_group("tools\\common\\proptree" FILES ${TOOLS_COMMON_PROPTREE_INCLUDES})
source_group("tools\\common\\proptree" FILES ${TOOLS_COMMON_PROPTREE_SOURCES})
source_group("tools\\af" FILES ${EDITOR_AF_INCLUDES})
source_group("tools\\af" FILES ${EDITOR_AF_SOURCES})
source_group("tools\\debugger" FILES ${EDITOR_DEBUGGER_INCLUDES})
source_group("tools\\debugger" FILES ${EDITOR_DEBUGGER_SOURCES})
source_group("tools\\decl" FILES ${EDITOR_DECL_INCLUDES})
source_group("tools\\decl" FILES ${EDITOR_DECL_SOURCES})
source_group("tools\\guied" FILES ${EDITOR_GUIED_INCLUDES})
source_group("tools\\guied" FILES ${EDITOR_GUIED_SOURCES})
source_group("tools\\materialeditor" FILES ${EDITOR_MATERIALEDITOR_INCLUDES})
source_group("tools\\materialeditor" FILES ${EDITOR_MATERIALEDITOR_SOURCES})
source_group("tools\\particle" FILES ${EDITOR_PARTICLE_INCLUDES})
source_group("tools\\particle" FILES ${EDITOR_PARTICLE_SOURCES})
source_group("tools\\pda" FILES ${EDITOR_PDA_INCLUDES})
source_group("tools\\pda" FILES ${EDITOR_PDA_SOURCES})
source_group("tools\\radiant" FILES ${EDITOR_RADIANT_INCLUDES})
source_group("tools\\radiant" FILES ${EDITOR_RADIANT_SOURCES})
source_group("tools\\script" FILES ${EDITOR_SCRIPT_INCLUDES})
source_group("tools\\script" FILES ${EDITOR_SCRIPT_SOURCES})
source_group("tools\\sound" FILES ${EDITOR_SOUND_INCLUDES})
source_group("tools\\sound" FILES ${EDITOR_SOUND_SOURCES})
set(RBDOOM3_SOURCES
${AAS_INCLUDES} ${AAS_SOURCES}
${CM_INCLUDES} ${CM_SOURCES}
${FRAMEWORK_INCLUDES} ${FRAMEWORK_SOURCES}
${FRAMEWORK_ASYNC_INCLUDES} ${FRAMEWORK_ASYNC_SOURCES}
${RENDERER_INCLUDES} ${RENDERER_SOURCES}
#${IRRXML_INCLUDES} ${IRRXML_SOURCES}
${JPEG_INCLUDES} ${JPEG_SOURCES}
#${PNG_INCLUDES} ${PNG_SOURCES}
${ZLIB_INCLUDES} ${ZLIB_SOURCES}
#${GLEW_INCLUDES} ${GLEW_SOURCES}
#${FREETYPE_SOURCES}
${SOUND_INCLUDES} ${SOUND_SOURCES}
#${OGGVORBIS_INCLUDES} ${OGGVORBIS_SOURCES}
${UI_INCLUDES} ${UI_SOURCES}
${SWF_INCLUDES} ${SWF_SOURCES}
${DOOMCLASSIC_INCLUDES} ${DOOMCLASSIC_SOURCES}
${TIMIDITY_INCLUDES} ${TIMIDITY_SOURCES}
#${COMPILER_INCLUDES}
#${COMPILER_AAS_INCLUDES} ${COMPILER_AAS_SOURCES}
#${COMPILER_DMAP_INCLUDES} ${COMPILER_DMAP_SOURCES}
#${COMPILER_RENDERBUMP_INCLUDES} ${COMPILER_RENDERBUMP_SOURCES}
#${COMPILER_ROQVQ_INCLUDES} ${COMPILER_ROQVQ_SOURCES}
)
add_definitions(-D__DOOM__
#-DGLEW_STATIC
#-DBUILD_FREETYPE
#-DFT2_BUILD_LIBRARY
)
if(MONOLITH)
list(APPEND RBDOOM3_SOURCES
${GAMED3XP_INCLUDES} ${GAMED3XP_SOURCES}
${GAMED3XP_AI_INCLUDES} ${GAMED3XP_AI_SOURCES}
${GAMED3XP_ANIM_INCLUDES} ${GAMED3XP_ANIM_SOURCES}
${GAMED3XP_GAMESYS_INCLUDES} ${GAMED3XP_GAMESYS_SOURCES}
${GAMED3XP_MENUS_INCLUDES} ${GAMED3XP_MENUS_SOURCES}
${GAMED3XP_PHYSICS_INCLUDES} ${GAMED3XP_PHYSICS_SOURCES}
${GAMED3XP_SCRIPT_INCLUDES} ${GAMED3XP_SCRIPT_SOURCES})
else()
add_definitions(-D__DOOM_DLL__)
endif()
include_directories(
.
#libs/curl/include
#libs/openal/include
#libs/glew/include
#libs/freetype/include
libs/zlib)
#link_directories(
# ${CMAKE_CURRENT_SOURCE_DIR}/libs/curl/lib
# ${CMAKE_CURRENT_SOURCE_DIR}/libs/openal/lib)
if(MSVC)
if(MSVC_VERSION EQUAL 1700)
set(DirectX_LIBRARIES
dinput8
dsound
dxguid
#dxerr
Xinput
)
add_definitions(-DUSE_XINPUT)
else()
find_package(DirectX REQUIRED)
include_directories(${DirectX_INCLUDE_DIR})
add_definitions(-DUSE_XINPUT)
endif()
if(USE_MFC_TOOLS)
# find_package(MFC REQUIRED)
# if(MFC_FOUND)
# include_directories(${MFC_INCLUDE_DIR})
# link_directories(${MFC_LIBRARY_DIR})
# endif()
# find_package(ATL REQUIRED)
# if(ATL_FOUND)
# include_directories(${ATL_INCLUDE_DIR})
# link_directories(${ATL_LIBRARY_DIR})
# add_definitions(-DUSE_MFC6_WITH_ATL7)
# endif()
include_directories(libs/atlmfc/include)
if(CMAKE_CL_64)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/atlmfc/lib/amd64)
else(CMAKE_CL_64)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/atlmfc/lib)
endif(CMAKE_CL_64)
add_definitions(-DUSE_MFC_TOOLS)
list(APPEND RBDOOM3_SOURCES
${TOOLS_INCLUDES}
${TOOLS_COMAFX_INCLUDES} ${TOOLS_COMAFX_SOURCES}
${TOOLS_COMMON_INCLUDES} ${TOOLS_COMMON_SOURCES}
${TOOLS_COMMON_PROPTREE_INCLUDES} ${TOOLS_COMMON_PROPTREE_SOURCES}
${EDITOR_AF_INCLUDES} ${EDITOR_AF_SOURCES}
${EDITOR_DEBUGGER_INCLUDES} ${EDITOR_DEBUGGER_SOURCES}
${EDITOR_DECL_INCLUDES} ${EDITOR_DECL_SOURCES}
${EDITOR_GUIED_INCLUDES} ${EDITOR_GUIED_SOURCES}
${EDITOR_MATERIALEDITOR_INCLUDES} ${EDITOR_MATERIALEDITOR_SOURCES}
${EDITOR_PARTICLE_INCLUDES} ${EDITOR_PARTICLE_SOURCES}
${EDITOR_PDA_INCLUDES} ${EDITOR_PDA_SOURCES}
${EDITOR_RADIANT_INCLUDES} ${EDITOR_RADIANT_SOURCES}
${EDITOR_SCRIPT_INCLUDES} ${EDITOR_SCRIPT_SOURCES}
${EDITOR_SOUND_INCLUDES} ${EDITOR_SOUND_SOURCES})
endif()
list(APPEND RBDOOM3_SOURCES
${SYS_INCLUDES} ${SYS_SOURCES}
${XAUDIO2_INCLUDES} ${XAUDIO2_SOURCES}
${WIN32_INCLUDES} ${WIN32_SOURCES} ${WIN32_RESOURCES})
list(REMOVE_DUPLICATES RBDOOM3_SOURCES)
add_executable(RBDoom3 WIN32 ${RBDOOM3_SOURCES})
#add_custom_command(TARGET RBDoom3
# PRE_BUILD
# COMMAND nmake ARGS /f Makefile.vc6 CFG=release
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/libs/curl/lib
# COMMENT "Compiling libcURL")
add_dependencies(RBDoom3 idlib)
target_link_libraries(RBDoom3
idlib
${DirectX_LIBRARIES}
#libcurl
#openal32
opengl32
glu32
dbghelp
#eaxguid
iphlpapi
winmm
wsock32.lib
xaudio2.lib
)
endif()

View file

@ -0,0 +1,6 @@
cd ..
del /s /q build
mkdir build
cd build
cmake -G "Visual Studio 10" ../neo
pause

View file

@ -0,0 +1,6 @@
cd ..
del /s /q build
mkdir build
cd build
cmake -G "Visual Studio 11" ../neo
pause

View file

@ -1,219 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#pragma hdrstop
#include "../precompiled.h"
#include "../MainMenuLocal.h"
/*
================================================================================================
idMenuWidget_DevList
Extends the standard list widget to support the developer menu.
================================================================================================
*/
namespace {
/*
================================================
DevList_NavigateForward
================================================
*/
class DevList_NavigateForward : public idSWFScriptFunction_RefCounted {
public:
DevList_NavigateForward( idMenuWidget_DevList * devList_, const int optionIndex_ ) :
devList( devList_ ),
optionIndex( optionIndex_ ) {
}
idSWFScriptVar Call( idSWFScriptObject * thisObject, const idSWFParmList & parms ) {
devList->NavigateForward( optionIndex );
return idSWFScriptVar();
}
private:
idMenuWidget_DevList * devList;
int optionIndex;
};
}
/*
========================
idMenuWidget_DevList::Initialize
========================
*/
void idMenuWidget_DevList::Initialize() {
AddEventAction( WIDGET_EVENT_SCROLL_DOWN ).Set( WIDGET_ACTION_START_REPEATER, WIDGET_ACTION_SCROLL_VERTICAL, 1 );
AddEventAction( WIDGET_EVENT_SCROLL_UP ).Set( WIDGET_ACTION_START_REPEATER, WIDGET_ACTION_SCROLL_VERTICAL, -1 );
AddEventAction( WIDGET_EVENT_SCROLL_DOWN_RELEASE ).Set( WIDGET_ACTION_STOP_REPEATER );
AddEventAction( WIDGET_EVENT_SCROLL_UP_RELEASE ).Set( WIDGET_ACTION_STOP_REPEATER );
int optionIndex = 0;
while ( GetChildren().Num() < GetNumVisibleOptions() ) {
idMenuWidget_Button * const buttonWidget = new ( TAG_MENU ) idMenuWidget_Button();
buttonWidget->AddEventAction( WIDGET_EVENT_PRESS ).Set( new ( TAG_SWF ) DevList_NavigateForward( this, optionIndex++ ) );
AddChild( buttonWidget );
}
}
/*
========================
idMenuWidget_DevList::GetTotalNumberOfOptions
========================
*/
int idMenuWidget_DevList::GetTotalNumberOfOptions() const {
if ( devMenuList == NULL ) {
return 0;
}
return devMenuList->devMenuList.Num();
}
/*
========================
idMenuWidget_DevList::GoToFirstMenu
========================
*/
void idMenuWidget_DevList::GoToFirstMenu() {
devMapListInfos.Clear();
indexInfo_t & info = devMapListInfos.Alloc();
info.name = "devmenuoption/main";
devMenuList = NULL;
RecalculateDevMenu();
}
/*
========================
idMenuWidget_DevList::NavigateForward
========================
*/
void idMenuWidget_DevList::NavigateForward( const int optionIndex ) {
if ( devMenuList == NULL ) {
return;
}
const int focusedIndex = GetViewOffset() + optionIndex;
const idDeclDevMenuList::idDevMenuOption & devOption = devMenuList->devMenuList[ focusedIndex ];
if ( ( devOption.devMenuDisplayName.Length() == 0 ) || ( devOption.devMenuDisplayName.Cmp( "..." ) == 0 ) ) {
return;
}
if ( devOption.devMenuSubList != NULL ) {
indexInfo_t & indexes = devMapListInfos.Alloc();
indexes.name = devOption.devMenuSubList->GetName();
indexes.focusIndex = GetFocusIndex();
indexes.viewIndex = GetViewIndex();
indexes.viewOffset = GetViewOffset();
RecalculateDevMenu();
SetViewIndex( 0 );
SetViewOffset( 0 );
Update();
// NOTE: This must be done after the Update() because it MAY change the sprites that
// children refer to
GetChildByIndex( 0 ).SetState( WIDGET_STATE_SELECTED );
ForceFocusIndex( 0 );
SetFocusIndex( 0 );
gameLocal->GetMainMenu()->ClearWidgetActionRepeater();
} else {
cmdSystem->AppendCommandText( va( "loadDevMenuOption %s %d\n", devMapListInfos[ devMapListInfos.Num() - 1 ].name, focusedIndex ) );
}
}
/*
========================
idMenuWidget_DevList::NavigateBack
========================
*/
void idMenuWidget_DevList::NavigateBack() {
assert( devMapListInfos.Num() != 0 );
if ( devMapListInfos.Num() == 1 ) {
// Important that this goes through as a DIRECT event, since more than likely the list
// widget will have the parent's focus, so a standard ReceiveEvent() here would turn
// into an infinite recursion.
idWidgetEvent event( WIDGET_EVENT_BACK, 0, NULL, idSWFParmList() );
idWidgetAction action;
action.Set( WIDGET_ACTION_GO_BACK, MENU_ROOT );
HandleAction( action, event );
return;
}
// NOTE: we need a copy here, since it's about to be removed from the list
const indexInfo_t indexes = devMapListInfos[ devMapListInfos.Num() - 1 ];
assert( indexes.focusIndex < GetChildren().Num() );
assert( ( indexes.viewIndex - indexes.viewOffset ) < GetNumVisibleOptions() );
devMapListInfos.RemoveIndex( devMapListInfos.Num() - 1 );
RecalculateDevMenu();
SetViewIndex( indexes.viewIndex );
SetViewOffset( indexes.viewOffset );
Update();
// NOTE: This must be done AFTER Update() because so that it is sure to refer to the proper sprite
GetChildByIndex( indexes.focusIndex ).SetState( WIDGET_STATE_SELECTED );
ForceFocusIndex( indexes.focusIndex );
SetFocusIndex( indexes.focusIndex );
gameLocal->GetMainMenu()->ClearWidgetActionRepeater();
}
/*
========================
idMenuWidget_DevList::RecalculateDevMenu
========================
*/
void idMenuWidget_DevList::RecalculateDevMenu() {
if ( devMapListInfos.Num() > 0 ) {
const idDeclDevMenuList * const devMenuListDecl = idDeclDevMenuList::resourceList.Load( devMapListInfos[ devMapListInfos.Num() - 1 ].name, false );
if ( devMenuListDecl != NULL ) {
devMenuList = devMenuListDecl;
}
}
idSWFScriptObject & root = gameLocal->GetMainMenu()->GetSWF()->GetRootObject();
for ( int i = 0; i < GetChildren().Num(); ++i ) {
idMenuWidget & child = GetChildByIndex( i );
child.SetSpritePath( GetSpritePath(), va( "option%d", i ) );
if ( child.BindSprite( root ) ) {
child.SetState( WIDGET_STATE_NORMAL );
child.GetSprite()->StopFrame( 1 );
}
}
}

View file

@ -28,7 +28,7 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __FILE_SAVEGAME_H__
#define __FILE_SAVEGAME_H__
#include "zlib/zlib.h"
#include "../libs/zlib/zlib.h"
// Listing of the types of files within a savegame package
enum saveGameType_t {

File diff suppressed because it is too large Load diff

View file

@ -37,7 +37,7 @@
#ifndef __UNZIP_H__
#define __UNZIP_H__
#include "zlib/zlib.h"
#include "../libs/zlib/zlib.h"
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
/* like the STRICT of WIN32, we define a pointer that cannot be converted

View file

@ -39,7 +39,7 @@ Contains external code for building ZipFiles.
#include "Unzip.h"
#undef STDC
#include "zlib/zutil.h"
#include "../libs/zlib/zutil.h"
/* zip.c -- IO on .zip files using zlib
Version 1.01e, February 12th, 2005

View file

@ -28,7 +28,7 @@ If you have questions concerning this license or the applicable additional terms
#ifndef __ZIP_H__
#define __ZIP_H__
#include "zlib/zlib.h"
#include "../libs/zlib/zlib.h"
/*
================================================================================================

20
neo/idlib/CMakeLists.txt Normal file
View file

@ -0,0 +1,20 @@
add_definitions(-D__IDLIB__ -D__DOOM_DLL__)
file(GLOB_RECURSE ID_INCLUDES *.h)
file(GLOB_RECURSE ID_SOURCES *.cpp)
if(MSVC)
list(REMOVE_ITEM ID_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/math/Simd_AltiVec.h)
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/math/Simd_AltiVec.cpp)
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/bv/Frustum_gcc.cpp)
elseif(NOT APPLE)
list(REMOVE_ITEM ID_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/math/Simd_AltiVec.h)
list(REMOVE_ITEM ID_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/math/Simd_AltiVec.cpp)
endif()
#if(STANDALONE)
# add_definitions(-DSTANDALONE)
#endif()
add_library(idlib ${ID_SOURCES} ${ID_INCLUDES})

View file

@ -1,565 +0,0 @@
/* example.c -- usage example of the zlib compression library
* Copyright (C) 1995-2004 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include <stdio.h>
#include "zlib.h"
#ifdef STDC
# include <string.h>
# include <stdlib.h>
#endif
#if defined(VMS) || defined(RISCOS)
# define TESTFILE "foo-gz"
#else
# define TESTFILE "foo.gz"
#endif
#define CHECK_ERR(err, msg) { \
if (err != Z_OK) { \
fprintf(stderr, "%s error: %d\n", msg, err); \
exit(1); \
} \
}
const char hello[] = "hello, hello!";
/* "hello world" would be more standard, but the repeated "hello"
* stresses the compression code better, sorry...
*/
const char dictionary[] = "hello";
uLong dictId; /* Adler32 value of the dictionary */
void test_compress OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
void test_gzio OF((const char *fname,
Byte *uncompr, uLong uncomprLen));
void test_deflate OF((Byte *compr, uLong comprLen));
void test_inflate OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
void test_large_deflate OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
void test_large_inflate OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
void test_flush OF((Byte *compr, uLong *comprLen));
void test_sync OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
void test_dict_deflate OF((Byte *compr, uLong comprLen));
void test_dict_inflate OF((Byte *compr, uLong comprLen,
Byte *uncompr, uLong uncomprLen));
int main OF((int argc, char *argv[]));
/* ===========================================================================
* Test compress() and uncompress()
*/
void test_compress(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
int err;
uLong len = (uLong)strlen(hello)+1;
err = compress(compr, &comprLen, (const Bytef*)hello, len);
CHECK_ERR(err, "compress");
strcpy((char*)uncompr, "garbage");
err = uncompress(uncompr, &uncomprLen, compr, comprLen);
CHECK_ERR(err, "uncompress");
if (strcmp((char*)uncompr, hello)) {
fprintf(stderr, "bad uncompress\n");
exit(1);
} else {
printf("uncompress(): %s\n", (char *)uncompr);
}
}
/* ===========================================================================
* Test read/write of .gz files
*/
void test_gzio(fname, uncompr, uncomprLen)
const char *fname; /* compressed file name */
Byte *uncompr;
uLong uncomprLen;
{
#ifdef NO_GZCOMPRESS
fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
#else
int err;
int len = (int)strlen(hello)+1;
gzFile file;
z_off_t pos;
file = gzopen(fname, "wb");
if (file == NULL) {
fprintf(stderr, "gzopen error\n");
exit(1);
}
gzputc(file, 'h');
if (gzputs(file, "ello") != 4) {
fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
exit(1);
}
if (gzprintf(file, ", %s!", "hello") != 8) {
fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
exit(1);
}
gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
gzclose(file);
file = gzopen(fname, "rb");
if (file == NULL) {
fprintf(stderr, "gzopen error\n");
exit(1);
}
strcpy((char*)uncompr, "garbage");
if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
exit(1);
}
if (strcmp((char*)uncompr, hello)) {
fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
exit(1);
} else {
printf("gzread(): %s\n", (char*)uncompr);
}
pos = gzseek(file, -8L, SEEK_CUR);
if (pos != 6 || gztell(file) != pos) {
fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
(long)pos, (long)gztell(file));
exit(1);
}
if (gzgetc(file) != ' ') {
fprintf(stderr, "gzgetc error\n");
exit(1);
}
if (gzungetc(' ', file) != ' ') {
fprintf(stderr, "gzungetc error\n");
exit(1);
}
gzgets(file, (char*)uncompr, (int)uncomprLen);
if (strlen((char*)uncompr) != 7) { /* " hello!" */
fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
exit(1);
}
if (strcmp((char*)uncompr, hello + 6)) {
fprintf(stderr, "bad gzgets after gzseek\n");
exit(1);
} else {
printf("gzgets() after gzseek: %s\n", (char*)uncompr);
}
gzclose(file);
#endif
}
/* ===========================================================================
* Test deflate() with small buffers
*/
void test_deflate(compr, comprLen)
Byte *compr;
uLong comprLen;
{
z_stream c_stream; /* compression stream */
int err;
uLong len = (uLong)strlen(hello)+1;
c_stream.zalloc = (alloc_func)0;
c_stream.zfree = (free_func)0;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
CHECK_ERR(err, "deflateInit");
c_stream.next_in = (Bytef*)hello;
c_stream.next_out = compr;
while (c_stream.total_in != len && c_stream.total_out < comprLen) {
c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
err = deflate(&c_stream, Z_NO_FLUSH);
CHECK_ERR(err, "deflate");
}
/* Finish the stream, still forcing small buffers: */
for (;;) {
c_stream.avail_out = 1;
err = deflate(&c_stream, Z_FINISH);
if (err == Z_STREAM_END) break;
CHECK_ERR(err, "deflate");
}
err = deflateEnd(&c_stream);
CHECK_ERR(err, "deflateEnd");
}
/* ===========================================================================
* Test inflate() with small buffers
*/
void test_inflate(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
int err;
z_stream d_stream; /* decompression stream */
strcpy((char*)uncompr, "garbage");
d_stream.zalloc = (alloc_func)0;
d_stream.zfree = (free_func)0;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
d_stream.avail_in = 0;
d_stream.next_out = uncompr;
err = inflateInit(&d_stream);
CHECK_ERR(err, "inflateInit");
while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
err = inflate(&d_stream, Z_NO_FLUSH);
if (err == Z_STREAM_END) break;
CHECK_ERR(err, "inflate");
}
err = inflateEnd(&d_stream);
CHECK_ERR(err, "inflateEnd");
if (strcmp((char*)uncompr, hello)) {
fprintf(stderr, "bad inflate\n");
exit(1);
} else {
printf("inflate(): %s\n", (char *)uncompr);
}
}
/* ===========================================================================
* Test deflate() with large buffers and dynamic change of compression level
*/
void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
z_stream c_stream; /* compression stream */
int err;
c_stream.zalloc = (alloc_func)0;
c_stream.zfree = (free_func)0;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_BEST_SPEED);
CHECK_ERR(err, "deflateInit");
c_stream.next_out = compr;
c_stream.avail_out = (uInt)comprLen;
/* At this point, uncompr is still mostly zeroes, so it should compress
* very well:
*/
c_stream.next_in = uncompr;
c_stream.avail_in = (uInt)uncomprLen;
err = deflate(&c_stream, Z_NO_FLUSH);
CHECK_ERR(err, "deflate");
if (c_stream.avail_in != 0) {
fprintf(stderr, "deflate not greedy\n");
exit(1);
}
/* Feed in already compressed data and switch to no compression: */
deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
c_stream.next_in = compr;
c_stream.avail_in = (uInt)comprLen/2;
err = deflate(&c_stream, Z_NO_FLUSH);
CHECK_ERR(err, "deflate");
/* Switch back to compressing mode: */
deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
c_stream.next_in = uncompr;
c_stream.avail_in = (uInt)uncomprLen;
err = deflate(&c_stream, Z_NO_FLUSH);
CHECK_ERR(err, "deflate");
err = deflate(&c_stream, Z_FINISH);
if (err != Z_STREAM_END) {
fprintf(stderr, "deflate should report Z_STREAM_END\n");
exit(1);
}
err = deflateEnd(&c_stream);
CHECK_ERR(err, "deflateEnd");
}
/* ===========================================================================
* Test inflate() with large buffers
*/
void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
int err;
z_stream d_stream; /* decompression stream */
strcpy((char*)uncompr, "garbage");
d_stream.zalloc = (alloc_func)0;
d_stream.zfree = (free_func)0;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
d_stream.avail_in = (uInt)comprLen;
err = inflateInit(&d_stream);
CHECK_ERR(err, "inflateInit");
for (;;) {
d_stream.next_out = uncompr; /* discard the output */
d_stream.avail_out = (uInt)uncomprLen;
err = inflate(&d_stream, Z_NO_FLUSH);
if (err == Z_STREAM_END) break;
CHECK_ERR(err, "large inflate");
}
err = inflateEnd(&d_stream);
CHECK_ERR(err, "inflateEnd");
if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
exit(1);
} else {
printf("large_inflate(): OK\n");
}
}
/* ===========================================================================
* Test deflate() with full flush
*/
void test_flush(compr, comprLen)
Byte *compr;
uLong *comprLen;
{
z_stream c_stream; /* compression stream */
int err;
uInt len = (uInt)strlen(hello)+1;
c_stream.zalloc = (alloc_func)0;
c_stream.zfree = (free_func)0;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
CHECK_ERR(err, "deflateInit");
c_stream.next_in = (Bytef*)hello;
c_stream.next_out = compr;
c_stream.avail_in = 3;
c_stream.avail_out = (uInt)*comprLen;
err = deflate(&c_stream, Z_FULL_FLUSH);
CHECK_ERR(err, "deflate");
compr[3]++; /* force an error in first compressed block */
c_stream.avail_in = len - 3;
err = deflate(&c_stream, Z_FINISH);
if (err != Z_STREAM_END) {
CHECK_ERR(err, "deflate");
}
err = deflateEnd(&c_stream);
CHECK_ERR(err, "deflateEnd");
*comprLen = c_stream.total_out;
}
/* ===========================================================================
* Test inflateSync()
*/
void test_sync(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
int err;
z_stream d_stream; /* decompression stream */
strcpy((char*)uncompr, "garbage");
d_stream.zalloc = (alloc_func)0;
d_stream.zfree = (free_func)0;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
d_stream.avail_in = 2; /* just read the zlib header */
err = inflateInit(&d_stream);
CHECK_ERR(err, "inflateInit");
d_stream.next_out = uncompr;
d_stream.avail_out = (uInt)uncomprLen;
inflate(&d_stream, Z_NO_FLUSH);
CHECK_ERR(err, "inflate");
d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */
err = inflateSync(&d_stream); /* but skip the damaged part */
CHECK_ERR(err, "inflateSync");
err = inflate(&d_stream, Z_FINISH);
if (err != Z_DATA_ERROR) {
fprintf(stderr, "inflate should report DATA_ERROR\n");
/* Because of incorrect adler32 */
exit(1);
}
err = inflateEnd(&d_stream);
CHECK_ERR(err, "inflateEnd");
printf("after inflateSync(): hel%s\n", (char *)uncompr);
}
/* ===========================================================================
* Test deflate() with preset dictionary
*/
void test_dict_deflate(compr, comprLen)
Byte *compr;
uLong comprLen;
{
z_stream c_stream; /* compression stream */
int err;
c_stream.zalloc = (alloc_func)0;
c_stream.zfree = (free_func)0;
c_stream.opaque = (voidpf)0;
err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
CHECK_ERR(err, "deflateInit");
err = deflateSetDictionary(&c_stream,
(const Bytef*)dictionary, sizeof(dictionary));
CHECK_ERR(err, "deflateSetDictionary");
dictId = c_stream.adler;
c_stream.next_out = compr;
c_stream.avail_out = (uInt)comprLen;
c_stream.next_in = (Bytef*)hello;
c_stream.avail_in = (uInt)strlen(hello)+1;
err = deflate(&c_stream, Z_FINISH);
if (err != Z_STREAM_END) {
fprintf(stderr, "deflate should report Z_STREAM_END\n");
exit(1);
}
err = deflateEnd(&c_stream);
CHECK_ERR(err, "deflateEnd");
}
/* ===========================================================================
* Test inflate() with a preset dictionary
*/
void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
Byte *compr, *uncompr;
uLong comprLen, uncomprLen;
{
int err;
z_stream d_stream; /* decompression stream */
strcpy((char*)uncompr, "garbage");
d_stream.zalloc = (alloc_func)0;
d_stream.zfree = (free_func)0;
d_stream.opaque = (voidpf)0;
d_stream.next_in = compr;
d_stream.avail_in = (uInt)comprLen;
err = inflateInit(&d_stream);
CHECK_ERR(err, "inflateInit");
d_stream.next_out = uncompr;
d_stream.avail_out = (uInt)uncomprLen;
for (;;) {
err = inflate(&d_stream, Z_NO_FLUSH);
if (err == Z_STREAM_END) break;
if (err == Z_NEED_DICT) {
if (d_stream.adler != dictId) {
fprintf(stderr, "unexpected dictionary");
exit(1);
}
err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
sizeof(dictionary));
}
CHECK_ERR(err, "inflate with dict");
}
err = inflateEnd(&d_stream);
CHECK_ERR(err, "inflateEnd");
if (strcmp((char*)uncompr, hello)) {
fprintf(stderr, "bad inflate with dict\n");
exit(1);
} else {
printf("inflate with dictionary: %s\n", (char *)uncompr);
}
}
/* ===========================================================================
* Usage: example [output.gz [input.gz]]
*/
int main(argc, argv)
int argc;
char *argv[];
{
Byte *compr, *uncompr;
uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
uLong uncomprLen = comprLen;
static const char* myVersion = ZLIB_VERSION;
if (zlibVersion()[0] != myVersion[0]) {
fprintf(stderr, "incompatible zlib version\n");
exit(1);
} else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
fprintf(stderr, "warning: different zlib version\n");
}
printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
compr = (Byte*)calloc((uInt)comprLen, 1);
uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
/* compr and uncompr are cleared to avoid reading uninitialized
* data and to ensure that uncompr compresses well.
*/
if (compr == Z_NULL || uncompr == Z_NULL) {
printf("out of memory\n");
exit(1);
}
test_compress(compr, comprLen, uncompr, uncomprLen);
test_gzio((argc > 1 ? argv[1] : TESTFILE),
uncompr, uncomprLen);
test_deflate(compr, comprLen);
test_inflate(compr, comprLen, uncompr, uncomprLen);
test_large_deflate(compr, comprLen, uncompr, uncomprLen);
test_large_inflate(compr, comprLen, uncompr, uncomprLen);
test_flush(compr, &comprLen);
test_sync(compr, comprLen, uncompr, uncomprLen);
comprLen = uncomprLen;
test_dict_deflate(compr, comprLen);
test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
free(compr);
free(uncompr);
return 0;
}

View file

@ -48,7 +48,7 @@ void R_LoadImage( const char *name, byte **pic, int *width, int *height, bool ma
* You may also wish to include "jerror.h".
*/
#include "jpeg-6/jpeglib.h"
#include "../libs/jpeg-6/jpeglib.h"
// hooks from jpeg lib to our system

View file

@ -29,7 +29,7 @@ If you have questions concerning this license or the applicable additional terms
#include "../idlib/precompiled.h"
#include "../renderer/Image.h"
//#include "../../renderer/ImageTools/ImageProcess.h"
#include "../renderer/jpeg-6/jpeglib.h"
#include "../libs/jpeg-6/jpeglib.h"
/*
========================

View file

@ -27,7 +27,7 @@ If you have questions concerning this license or the applicable additional terms
*/
#pragma hdrstop
#include "../idlib/precompiled.h"
#include "../framework/zlib/zlib.h"
#include "../libs/zlib/zlib.h"
/*
========================

View file

@ -7,7 +7,11 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#if defined(USE_MFC_TOOLS)
#include "afxres.h"
#else
#include <winresrc.h>
#endif
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

View file

@ -1,93 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
/*
** WIN_GAMMA.C
*/
#include <assert.h>
#include "win_local.h"
#include "../../renderer/tr_local.h"
static unsigned short s_oldHardwareGamma[3][256];
/*
** WG_GetOldGammaRamp
**
*/
void WG_GetOldGammaRamp( void )
{
HDC hDC;
hDC = GetDC( GetDesktopWindow() );
GetDeviceGammaRamp( hDC, s_oldHardwareGamma );
ReleaseDC( GetDesktopWindow(), hDC );
/*
** GLimp_SetGamma
**
*/
void GLimp_SetGamma( unsigned char red[256], unsigned char green[256], unsigned char blue[256] )
{
unsigned short table[3][256];
int i;
if ( !glw_state.hDC )
{
return;
}
for ( i = 0; i < 256; i++ )
{
table[0][i] = ( ( ( unsigned short ) red[i] ) << 8 ) | red[i];
table[1][i] = ( ( ( unsigned short ) green[i] ) << 8 ) | green[i];
table[2][i] = ( ( ( unsigned short ) blue[i] ) << 8 ) | blue[i];
}
if ( !SetDeviceGammaRamp( glw_state.hDC, table ) ) {
common->Printf( "WARNING: SetDeviceGammaRamp failed.\n" );
}
}
/*
** WG_RestoreGamma
*/
void WG_RestoreGamma( void )
{
HDC hDC;
// if we never read in a reasonable looking
// table, don't write it out
if ( s_oldHardwareGamma[0][255] == 0 ) {
return;
}
hDC = GetDC( GetDesktopWindow() );
SetDeviceGammaRamp( hDC, s_oldHardwareGamma );
ReleaseDC( GetDesktopWindow(), hDC );
}

View file

@ -1,29 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#pragma hdrstop
#include "../../framework/precompiled.h"

View file

@ -1,32 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#ifndef __WIN_STATS_H__
#define __WIN_STATS_H__
#endif // !__WIN_STATS_H__

View file

@ -1,52 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#include "../idlib/precompiled.h"
#pragma hdrstop
#include "DeviceContext.h"
#include "Window.h"
#include "UserInterfaceLocal.h"
#include "GameWindow.h"
/*
================
idGameWindowProxy::idGameWindowProxy
================
*/
idGameWindowProxy::idGameWindowProxy( idDeviceContext *d, idUserInterfaceLocal *g ) : idWindow( d, g ) { }
/*
================
idGameWindowProxy::Draw
================
*/
void idGameWindowProxy::Draw( int time, float x, float y ) {
common->Printf( "TODO: idGameWindowProxy::Draw\n" );
}

View file

@ -1,38 +0,0 @@
/*
===========================================================================
Doom 3 BFG Edition GPL Source Code
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
#ifndef __GAMEWINDOW_H__
#define __GAMEWINDOW_H__
class idGameWindowProxy : public idWindow {
public:
idGameWindowProxy( idDeviceContext *d, idUserInterfaceLocal *gui );
void Draw( int time, float x, float y );
};
#endif