Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

WIN_QE3.CPP File Reference

#include "stdafx.h"
#include "qe3.h"
#include "mru.h"
#include "PrefsDlg.h"

Include dependency graph for WIN_QE3.CPP:

Include dependency graph

Go to the source code of this file.

Defines

#define SCROLLBACK_DEL_CHARS   500
#define SCROLLBACK_MAX_LINES   600

Functions

void AddSlash (CString &strPath)
void CheckBspProcess (void)
void * Com_Allocate (int bytes)
void Com_Dealloc (void *ptr)
void Com_DPrintf (const char *msg,...)
void Com_Error (int level, const char *error,...)
void Com_Printf (const char *msg,...)
qboolean ConfirmModified (void)
void Error (char *error,...)
bool ExtractPath_and_Filename (const char *pPath, CString &strPath, CString &strFilename)
void FillBSPMenu (void)
void FindReplace (CString &strContents, const char *pTag, const char *pValue)
void FS_FCloseFile (fileHandle_t f)
fileHandle_t FS_FOpenFileWrite (const char *filename)
void FS_FreeFile (void *buffer)
int FS_ReadFile (const char *qpath, void **buffer)
int FS_Write (const void *buffer, int len, fileHandle_t h)
void OpenDialog (void)
void PrintPixels (HDC hDC)
void ProjectDialog (void)
int WINAPI QEW_SetupPixelFormat (HDC hDC, qboolean zbuffer)
void QEW_StopGL (HWND hWnd, HGLRC hGLRC, HDC hDC)
void SaveAsDialog (bool bRegion)
void Sys_Beep (void)
void Sys_BeginWait (void)
void Sys_ClearPrintf (void)
double Sys_DoubleTime (void)
void Sys_EndWait (void)
void Sys_GetCursorPos (int *x, int *y)
void Sys_MarkMapModified (void)
void Sys_Printf (char *text,...)
void Sys_SetCursorPos (int x, int y)
void Sys_SetTitle (char *text)
char * TranslateString (char *buf)
void Warning (char *error,...)

Variables

char * bsp_commands [256]
HANDLE bsp_process
int cambuttonstate
int cbString
char chReplace
CStringArray g_BSPFrontendCommands
_QERPlugBSPFrontendTable g_BSPFrontendTable
CEdit * g_pEdit
CTime g_tBegin
qboolean have_quit
HANDLE hf
int i
OPENFILENAME ofn
int screen_height
int screen_width
char szDirName [MAX_PATH]
char szFile [260]
char szFileTitle [260]
char szFilter [260]
char szProjectFilter [260]
int update_bits
HCURSOR waitcursor


Define Documentation

#define SCROLLBACK_DEL_CHARS   500
 

Definition at line 136 of file WIN_QE3.CPP.

Referenced by Sys_Printf().

#define SCROLLBACK_MAX_LINES   600
 

Definition at line 135 of file WIN_QE3.CPP.


Function Documentation

void AddSlash CString &  strPath  ) 
 

Referenced by AssignModel(), AssignSound(), CheckBspProcess(), CMainFrame::CreateQEChildren(), DLLBuildDone(), FS_FOpenFileWrite(), FS_ReadFile(), CRadiantApp::InitInstance(), InitPakFile(), CPrefsDlg::LoadPrefs(), Map_Snapshot(), CPrefsDlg::OnBtnBrowseprefab(), CMainFrame::OnFileNewproject(), CMainFrame::OnPluginsRefresh(), CMainFrame::OnTexturesLoad(), PakLoadAnyFile(), QE_LoadProject(), RunBsp(), SaveAsDialog(), Texture_Init(), and Texture_LoadTGATexture().

void CheckBspProcess void   ) 
 

Definition at line 593 of file WIN_QE3.CPP.

References _MAX_PATH, AddSlash(), BOOL, bsp_process, currentmap, QEGlobals_t::d_pointfile_display_list, QEGlobals_t::d_project_entity, DWORD, Error(), ExtractPath_and_Filename(), FALSE, FindReplace(), free(), g_PrefsDlg, g_qeglobals, LoadFile(), CPrefsDlg::m_bRunQuake, CPrefsDlg::m_bSetGame, CPrefsDlg::m_strQuake2, Pointfile_Check(), sprintf(), Sys_Beep(), Sys_Printf(), TRUE, and ValueForKey().

Referenced by CMainFrame::RoutineProcessing().

00594 {
00595     char    outputpath[1024];
00596     char    temppath[512];
00597     DWORD   exitcode;
00598     char    *out;
00599     BOOL    ret;
00600 
00601     if (!bsp_process)
00602         return;
00603 
00604     ret = GetExitCodeProcess (bsp_process, &exitcode);
00605     if (!ret)
00606         Error ("GetExitCodeProcess failed");
00607     if (exitcode == STILL_ACTIVE)
00608         return;
00609 
00610     bsp_process = 0;
00611 
00612     GetTempPath(512, temppath);
00613     sprintf (outputpath, "%sjunk.txt", temppath);
00614 
00615     LoadFile (outputpath, (void **)&out);
00616     Sys_Printf ("%s", out);
00617     Sys_Printf ("\ncompleted.\n");
00618     free (out);
00619 
00620     CTime tEnd = CTime::GetCurrentTime();
00621     CTimeSpan tElapsed = tEnd - g_tBegin;
00622     CString strElapsed;
00623     strElapsed.Format("Run time was %i hours, %i minutes and %i seconds", tElapsed.GetHours(), tElapsed.GetMinutes(), tElapsed.GetSeconds());
00624     Sys_Printf(strElapsed.GetBuffer(0));
00625 
00626 
00627     Sys_Beep ();
00628     Pointfile_Check();
00629     // run game if no PointFile and pref is set
00630     //++timo needs to stop after BSP if leaked .. does run through vis and light instead ..
00631     if (g_PrefsDlg.m_bRunQuake == TRUE  && !g_qeglobals.d_pointfile_display_list)
00632     {
00633         char cCurDir[1024];
00634         GetCurrentDirectory(1024, cCurDir);
00635         CString strExePath = g_PrefsDlg.m_strQuake2;
00636         CString strOrgPath;
00637         CString strOrgFile;
00638         ExtractPath_and_Filename(currentmap, strOrgPath, strOrgFile);
00639         if (g_PrefsDlg.m_bSetGame == TRUE) // run in place with set game.. don't copy map
00640         {
00641             CString strBasePath = ValueForKey(g_qeglobals.d_project_entity, "basepath");
00642             strExePath += " +set game ";
00643             strExePath += strBasePath;
00644             WinExec(strExePath, SW_SHOW);
00645         }
00646         else
00647         {
00648             CString strCopyPath = strExePath;
00649             char* pBuffer = strCopyPath.GetBufferSetLength(_MAX_PATH + 1);
00650             pBuffer[strCopyPath.ReverseFind('\\') + 1] = '\0';
00651             strCopyPath.ReleaseBuffer();
00652             SetCurrentDirectory(strCopyPath);
00653             CString strOrgPath;
00654             CString strOrgFile;
00655             ExtractPath_and_Filename(currentmap, strOrgPath, strOrgFile);
00656             AddSlash(strCopyPath);
00657             FindReplace(strOrgFile, ".map", ".bsp");
00658             //++timo modified for Quake3 !!
00659             strCopyPath += "baseq3\\maps\\";
00660             strCopyPath += strOrgFile;
00661             AddSlash(strOrgPath);
00662             strOrgPath += strOrgFile;
00663             bool bRun = (strOrgPath.CompareNoCase(strCopyPath) == 0);
00664             if (!bRun)
00665                 bRun = (CopyFile(strOrgPath, strCopyPath, FALSE) == TRUE);
00666             if (bRun)
00667             {
00668                 FindReplace(strOrgFile, ".bsp", "");
00669                 strExePath += " +map ";
00670                 strExePath += strOrgFile;
00671                 WinExec(strExePath, SW_SHOW);
00672             }
00673         }
00674         SetCurrentDirectory(cCurDir);
00675     }
00676 }

Here is the call graph for this function:

void* Com_Allocate int  bytes  ) 
 

Definition at line 681 of file WIN_QE3.CPP.

References malloc().

Referenced by Com_AddToGrowList(), and Com_InitGrowList().

00681                                 {
00682     return malloc(bytes);
00683 }

Here is the call graph for this function:

void Com_Dealloc void *  ptr  ) 
 

Definition at line 685 of file WIN_QE3.CPP.

References free(), and ptr().

Referenced by Com_AddToGrowList(), and FS_FreeFile().

00685                               {
00686     free(ptr);
00687 }

Here is the call graph for this function:

void Com_DPrintf const char *  msg,
  ...
 

Definition at line 718 of file WIN_QE3.CPP.

References com_developer, Com_Printf(), cvar_s::integer, Q_vsnprintf, QDECL, va_end, va_list, and va_start.

Referenced by CIN_PlayCinematic(), CIN_StopCinematic(), CL_BeginDownload(), CL_ConnectionlessPacket(), CL_GetServerCommand(), CL_GetSnapshot(), CL_NextDemo(), CL_PacketEvent(), CL_ParseDownload(), CL_PlayCinematic_f(), CL_RefPrintf(), CL_ServerInfoPacket(), CL_ServersResponsePacket(), CL_UISystemCalls(), CL_WritePacket(), CM_AddFacetBevels(), CM_LoadMap(), CM_SetBorderInward(), Cmd_TokenizeString(), Com_AddToGrowList(), Cvar_Get(), Cvar_Set2(), FS_FOpenFileRead(), FS_PureServerSetLoadedPaks(), FS_ReadFile(), FS_SV_FOpenFileWrite(), GLimp_SetGamma(), MainWndProc(), RoQInterrupt(), RoQShutdown(), S_ChannelSetup(), S_FreeOldestSound(), S_GetSoundtime(), S_LoadSound(), S_RawSamples(), S_StartBackgroundTrack(), S_Update(), SCR_DrawScreenField(), SNDDMA_Init(), SNDDMA_InitDS(), SNDDMA_Shutdown(), SV_AddEntitiesVisibleFromPoint(), SV_CheckTimeouts(), SV_ClientCommand(), SV_ClientEnterWorld(), SV_ConnectionlessPacket(), SV_DirectConnect(), SV_DoneDownload_f(), SV_DropClient(), SV_ExecuteClientCommand(), SV_ExecuteClientMessage(), SV_GetChallenge(), SV_LinkEntity(), SV_Netchan_Transmit(), SV_Netchan_TransmitNextFragment(), SV_NextDownload_f(), SV_RankBegin(), SV_RankCleanupCBF(), SV_RankCloseContext(), SV_RankDecodePlayerID(), SV_RankDecodePlayerKey(), SV_RankEncodeGameID(), SV_RankEnd(), SV_RankError(), SV_RankJoinGameCBF(), SV_RankNewGameCBF(), SV_RankQuit(), SV_RankReportInt(), SV_RankReportStr(), SV_RankSendReportsCBF(), SV_RankUserCBF(), SV_RankUserCreate(), SV_RankUserLogin(), SV_RankUserLogout(), SV_RankUserValidate(), SV_SendClientGameState(), SV_StopDownload_f(), SV_UserMove(), SV_VerifyPaks_f(), SV_WriteDownloadToClient(), SV_WriteSnapshotToClient(), Sys_ConsoleInput(), and VID_AppActivate().

00718                                          {
00719     return;
00720 }

Here is the call graph for this function:

void Com_Error int  level,
const char *  error,
  ...
 

Definition at line 704 of file WIN_QE3.CPP.

References CG_Error(), error(), QDECL, Sys_Printf(), TranslateString(), va_end, va_list, va_start, and vsprintf().

Referenced by BaseWindingForPlane(), BG_CanItemBeGrabbed(), BG_EvaluateTrajectory(), BG_EvaluateTrajectoryDelta(), BG_FindItemForHoldable(), BG_FindItemForWeapon(), BotImport_HunkAlloc(), BotImport_Print(), Cbuf_ExecuteText(), CheckWinding(), ChopWindingInPlace(), CIN_HandleForVideo(), CL_AddReliableCommand(), CL_CgameError(), CL_CgameSystemCalls(), CL_CheckForResend(), CL_ConfigstringModified(), CL_Disconnect_f(), CL_GetParseEntityState(), CL_GetServerCommand(), CL_GetSnapshot(), CL_GetUserCmd(), CL_InitCGame(), CL_InitRef(), CL_InitUI(), CL_JoystickEvent(), CL_ParseDownload(), CL_ParseGamestate(), CL_ParsePacketEntities(), CL_ParseServerMessage(), CL_PlayDemo_f(), CL_ReadDemoMessage(), CL_SetCGameTime(), CL_UISystemCalls(), ClipWindingEpsilon(), CM_AdjustAreaPortalState(), CM_AreasConnected(), CM_ClipHandleToModel(), CM_EdgePlaneNum(), CM_FindPlane(), CM_FindPlane2(), CM_FloodArea_r(), CM_GeneratePatchCollide(), CM_InlineModel(), CM_LeafArea(), CM_LeafCluster(), CM_LoadMap(), CM_PatchCollideFromGrid(), CM_SetBorderInward(), CMod_LoadBrushes(), CMod_LoadBrushSides(), CMod_LoadLeafBrushes(), CMod_LoadLeafs(), CMod_LoadLeafSurfaces(), CMod_LoadNodes(), CMod_LoadPatches(), CMod_LoadPlanes(), CMod_LoadShaders(), CMod_LoadSubmodels(), Com_AddToGrowList(), Com_BeginParseSession(), Com_EndParseSession(), Com_Error_f(), Com_EventLoop(), Com_GetRealEvent(), Com_GrowListElement(), Com_InitHunkMemory(), Com_InitSmallZoneMemory(), Com_InitZoneMemory(), COM_MatchToken(), Com_ParseExt(), Com_ScriptError(), Com_sprintf(), Cvar_Get(), Cvar_Update(), Field_VariableSizeDraw(), FreeWinding(), FS_CopyFile(), FS_FCloseFile(), FS_FileForHandle(), FS_FileIsInPAK(), FS_FOpenFileAppend(), FS_FOpenFileByMode(), FS_FOpenFileRead(), FS_FOpenFileWrite(), FS_FreeFile(), FS_FreeFileList(), FS_HandleForFile(), FS_InitFilesystem(), FS_ListFilteredFiles(), FS_Read(), FS_Read2(), FS_ReadFile(), FS_Rename(), FS_Restart(), FS_Seek(), FS_SetRestrictions(), FS_SV_FOpenFileRead(), FS_SV_FOpenFileWrite(), FS_SV_Rename(), FS_Write(), FS_WriteFile(), Hex(), Hunk_Alloc(), Hunk_AllocateTempMemory(), Hunk_FreeTempMemory(), Hunk_Trash(), Info_RemoveKey(), Info_RemoveKey_Big(), Info_SetValueForKey(), Info_SetValueForKey_Big(), Info_ValueForKey(), InstImm(), InstImmU(), MSG_Copy(), MSG_ReadBits(), MSG_ReadDeltaEntity(), MSG_WriteBits(), MSG_WriteByte(), MSG_WriteChar(), MSG_WriteDeltaEntity(), MSG_WriteShort(), NET_OpenIP(), Netchan_Transmit(), PC_CopyToken(), Q_strcat(), Q_strncpyz(), S_AddLoopingSound(), S_AddRealLoopingSound(), S_FindName(), S_StartSound(), S_UpdateEntityPosition(), SCR_DrawScreenField(), SCR_UpdateScreen(), SV_AddEntitiesVisibleFromPoint(), SV_BotFreeClient(), SV_BotInitBotLib(), SV_BuildClientSnapshot(), SV_DirectConnect(), SV_GameError(), SV_GameSystemCalls(), SV_GetConfigstring(), SV_GetServerinfo(), SV_GetUsercmd(), SV_GetUserinfo(), SV_InitGameProgs(), SV_Netchan_TransmitNextFragment(), SV_QsortEntityNumbers(), SV_RestartGameProgs(), SV_SetBrushModel(), SV_SetConfigstring(), SV_SetUserinfo(), SV_Startup(), SV_SvEntityForGentity(), Sys_Init(), Sys_LoadDll(), Sys_SendPacket(), Sys_UnloadDll(), VM_Call(), VM_CallCompiled(), VM_CallInterpreted(), VM_Compile(), VM_Create(), VM_PrepareInterpreter(), VM_Restart(), Z_CheckHeap(), Z_Free(), and Z_TagMalloc().

00704                                                     {
00705     va_list argptr;
00706     char    buf[32768];
00707     char    *out;
00708 
00709     va_start (argptr,error);
00710     vsprintf (buf, error,argptr);
00711     va_end (argptr);
00712 
00713     out = TranslateString (buf);
00714 
00715     Sys_Printf(buf);
00716 }

Here is the call graph for this function:

void Com_Printf const char *  msg,
  ...
 

Definition at line 690 of file WIN_QE3.CPP.

References Log_Print(), Sys_Printf(), TranslateString(), va_end, va_list, va_start, and vsprintf().

Referenced by Alias_Parse(), BG_AddPredictableEventToPlayerstate(), BG_CanItemBeGrabbed(), BotImport_Print(), Cbuf_AddText(), Cbuf_InsertText(), CG_DrawClientScore(), CG_ParseAnimationFile(), CG_RegisterClientModelname(), CG_RegisterClientSkin(), Character_Parse(), CL_AdjustTimeDelta(), CL_CgameSystemCalls(), CL_CheckTimeout(), CL_Clientinfo_f(), CL_Configstrings_f(), CL_Connect_f(), CL_ConnectionlessPacket(), CL_DemoCompleted(), CL_DisconnectPacket(), CL_ForwardCommandToServer(), CL_ForwardToServer_f(), CL_GlobalServers_f(), CL_Init(), CL_InitCGame(), CL_InitDownloads(), CL_InitRef(), CL_KeyEvent(), CL_KeyState(), CL_LocalServers_f(), CL_MouseMove(), CL_OpenedPK3List_f(), CL_PacketEvent(), CL_ParseDownload(), CL_ParsePacketEntities(), CL_ParseServerMessage(), CL_ParseSnapshot(), CL_Ping_f(), CL_PlayDemo_f(), CL_Rcon_f(), CL_ReadDemoMessage(), CL_Reconnect_f(), CL_Record_f(), CL_ReferencedPK3List_f(), CL_RefPrintf(), CL_RequestAuthorization(), CL_RequestMotd(), CL_SendCmd(), CL_ServerInfoPacket(), CL_ServersResponsePacket(), CL_ServerStatus_f(), CL_ServerStatusResponse(), CL_Setenv_f(), CL_SetModel_f(), CL_Shutdown(), CL_StopRecord_f(), CL_UISystemCalls(), CL_WalkDemoExt(), CL_WritePacket(), ClientForString(), CM_AddFacetBevels(), CM_DrawDebugSurface(), CM_GridPlane(), Cmd_AddCommand(), Cmd_Echo_f(), Cmd_Exec_f(), Cmd_List_f(), Cmd_Vstr_f(), Com_DPrintf(), Com_Error(), Com_EventLoop(), Com_Frame(), Com_Freeze_f(), Com_Init(), Com_InitHunkMemory(), Com_InitJournaling(), Com_Meminfo_f(), Com_ModifyMsec(), COM_ParseError(), Com_ParseInfos(), COM_ParseWarning(), Com_Printf(), Com_PushEvent(), Com_RunAndTimeServerPacket(), Com_ScriptWarning(), Com_sprintf(), Com_TouchMemory(), Com_WriteCDKey(), Com_WriteConfig_f(), Com_WriteConfigToFile(), Con_Dump_f(), Console_Key(), CreateGameWindow(), Cvar_Command(), Cvar_Get(), Cvar_List_f(), Cvar_Reset_f(), Cvar_Set2(), Cvar_Set_f(), Cvar_SetA_f(), Cvar_SetS_f(), Cvar_SetU_f(), Cvar_Toggle_f(), Field_CompleteCommand(), Font_Report(), FS_CopyFile(), FS_CreatePath(), FS_Dir_f(), FS_FOpenFileAppend(), FS_FOpenFileRead(), FS_FOpenFileWrite(), FS_NewDir_f(), FS_Path_f(), FS_Rename(), FS_SetRestrictions(), FS_Startup(), FS_SV_FOpenFileRead(), FS_SV_FOpenFileWrite(), FS_SV_Rename(), FS_TouchFile_f(), FS_Write(), FS_WriteFile(), G_ParseInfos(), GameType_Parse(), idSplineList::getPosition(), GetWavinfo(), GLimp_ChangeMode(), GLimp_EndFrame(), GLimp_FrontEndSleep(), GLimp_Init(), GLimp_RenderThreadWrapper(), GLimp_SetGamma(), GLimp_Shutdown(), Hunk_Clear(), Hunk_FreeTempMemory(), IN_ActivateDIMouse(), IN_Frame(), IN_Init(), IN_InitDIMouse(), IN_JoyMove(), IN_KeyDown(), IN_Startup(), IN_StartupJoystick(), IN_StartupMIDI(), IN_StartupMouse(), Info_Print(), Info_SetValueForKey(), Info_SetValueForKey_Big(), Key_Bind_f(), Key_Bindlist_f(), Key_Unbind_f(), MapList_Parse(), MidiInfo_f(), MSG_ReadDeltaEntity(), MSG_ReadDeltaPlayerstate(), MSG_ReportChangeVectors_f(), MSG_WriteBigString(), MSG_WriteString(), NET_CompareAdr(), NET_CompareBaseAdr(), NET_GetLocalAddress(), NET_Init(), NET_IPSocket(), NET_IPXSocket(), NET_OpenIP(), NET_OpenSocks(), NET_SendPacket(), Netchan_Process(), Netchan_Transmit(), Netchan_TransmitNextFragment(), PC_SourceError(), PC_SourceWarning(), PM_CorrectAllSolid(), PM_GroundTrace(), PM_GroundTraceMissed(), PM_StepSlideMove(), PrintMatches(), processSystemDefinedEvent(), R_Init(), RE_RegisterModel(), RE_RegisterShader(), RE_RegisterShaderLightMap(), RE_RegisterShaderNoMip(), RE_RegisterSkin(), readQuadInfo(), ReleaseAllDisplays(), S_AddLoopingSound(), S_AddRealLoopingSound(), S_DisplayFreeMemory(), S_Init(), S_LoadSound(), S_Music_f(), S_RegisterSound(), S_SoundInfo_f(), S_SoundList_f(), S_StartBackgroundTrack(), S_StartLocalSound(), S_StartSound(), S_Update(), S_UpdateBackgroundTrack(), sendEventForCharacter(), SHOWNET(), SND_setup(), SNDDMA_Activate(), SNDDMA_BeginPainting(), SNDDMA_GetDMAPos(), SNDDMA_Init(), SNDDMA_InitDS(), SNDDMA_Shutdown(), String_Report(), SV_AddServerCommand(), SV_AreaEntities_r(), SV_AuthorizeIpPacket(), SV_Ban_f(), SV_BanNum_f(), SV_BotLibSetup(), SV_ClientCommand(), SV_ConSay_f(), SV_DirectConnect(), SV_DumpUser_f(), SV_ExecuteClientMessage(), SV_GamePrint(), SV_GameSystemCalls(), SV_GetChallenge(), SV_GetPlayerByName(), SV_GetPlayerByNum(), SV_Kick_f(), SV_KickNum_f(), SV_Map_f(), SV_MapRestart_f(), SV_MasterHeartbeat(), SV_NextDownload_f(), SV_PacketEvent(), SV_SectorList_f(), SV_SendClientSnapshot(), SV_SendServerCommand(), SV_Serverinfo_f(), SV_Shutdown(), SV_SpawnServer(), SV_Status_f(), SV_Systeminfo_f(), SV_UnlinkEntity(), SV_UserMove(), SV_WriteDownloadToClient(), SVC_RemoteCommand(), Sys_ConfigureFPU(), Sys_ConsoleInputInit(), Sys_ConsoleInputShutdown(), Sys_FadeScreen(), Sys_FadeScreens(), Sys_GetGammaTable(), Sys_GetPacket(), Sys_Init(), Sys_InitInput(), Sys_LoadDll(), Sys_ProcessMouseMovedEvent(), Sys_ProcessorCount(), Sys_QueEvent(), Sys_QueryVideoMemory(), Sys_ResumeGL(), Sys_SendPacket(), Sys_ShowIP(), Sys_Shutdown(), Sys_ShutdownInput(), Sys_StartMouseInput(), Sys_StopMouseInput(), Sys_UnfadeScreen(), Sys_UnfadeScreens(), Sys_UnloadDll(), Team_Parse(), UI_LoadMenus(), UI_ParseAnimationFile(), UI_ParseInfos(), UI_ParseMenu(), UI_RegisterClientModelname(), UI_RunMenuScript(), UI_SetActiveMenu(), UI_StopServerRefresh(), UpdateIPBans(), VM_Call(), VM_CallInterpreted(), VM_Compile(), VM_Create(), VM_LoadSymbols(), VM_Restart(), VM_StackTrace(), VM_VmInfo_f(), VM_VmProfile_f(), and WinMain().

00690                                         {
00691     va_list argptr;
00692     char    buf[32768];
00693     char    *out;
00694 
00695     va_start (argptr,msg);
00696     vsprintf (buf, msg,argptr);
00697     va_end (argptr);
00698 
00699     out = TranslateString (buf);
00700 
00701     Sys_Printf(buf);
00702 }

Here is the call graph for this function:

qboolean ConfirmModified void   ) 
 

Definition at line 324 of file WIN_QE3.CPP.

References QEGlobals_t::d_hwndMain, g_qeglobals, and qboolean.

00325 {
00326     if (!modified)
00327         return true;
00328 
00329     if (MessageBox (g_qeglobals.d_hwndMain, "This will lose changes to the map"
00330         , "warning", MB_OKCANCEL) == IDCANCEL)
00331         return false;
00332     return true;
00333 }

void Error char *  error,
  ...
 

Definition at line 273 of file WIN_QE3.CPP.

References QEGlobals_t::d_hwndMain, err(), error(), exit(), g_PrefsDlg, g_qeglobals, i, CPrefsDlg::LoadPrefs(), Log_Close(), Log_Write(), printf(), qglGetError, sprintf(), va_end, va_list, va_start, and vsprintf().

Referenced by AAS_AddFaceSideToArea(), AAS_AddMapBrushSide(), AAS_CopyMapBrush(), AAS_Create(), AAS_CreateCurveBrushes(), AAS_Error(), AAS_FlipAreaFaces(), AAS_GetEdge(), AAS_GetFace(), AAS_GetPlane(), AAS_GetVertex(), AAS_MeltFaceWinding(), AAS_RemoveFaceFromArea(), AAS_SplitArea(), AAS_StoreArea(), AAS_StoreBoundingBoxes(), AAS_StoreTree_r(), AAS_TryMergeFaceAreas(), AAS_TryMergeFaces(), AddBrushBevels(), AddEdge(), AddPortalToNodes(), AddScriptToStack(), AddSeperators(), AddSideRef(), AddWindingPoint(), AllocateLightmapForPatch(), AllocateLightmapForSurface(), AllocateLightmaps(), AllocDrawSurf(), AllocShaderInfo(), AllocStackWinding(), ASE_GetCurrentMesh(), ASE_KeyGEOMOBJECT(), ASE_KeyMATERIAL_LIST(), ASE_KeyMESH(), ASE_KeyMESH_ANIMATION(), ASE_KeyMESH_FACE_LIST(), ASE_KeyMESH_TVERTLIST(), ASE_KeyMESH_VERTEX_LIST(), ASE_KeyTFACE_LIST(), ASE_Load(), ASE_ParseBracedBlock(), ASE_Process(), ASE_SkipEnclosingBraces(), BaseWindingForPlane(), BEGIN_MESSAGE_MAP(), BeginModel(), CCamWnd::BenchMark(), BMPEncodeLine(), BMPLine(), BMPLineNone(), BMPLineRLE4(), BMPLineRLE8(), Brush_AddToList(), Brush_Create(), Brush_CreatePyramid(), Brush_RebuildBrush(), Brush_RemoveFromList(), BuildTreeThread(), CalcPHS(), CalcTerrainSize(), CheckBspProcess(), CheckPlaneAgainstParents(), CheckStack(), CheckWinding(), ChopFaceByBrush(), ChopPatchByBrush(), ChopWindingInPlace(), ClipSidesIntoTree(), ClipToSeperators(), ClipWindingEpsilon(), ClusterMerge(), Com_Error(), CopyLump(), CountLightmaps(), CreateEntityWindow(), CreateFilters(), CreateNewFloatPlane(), CMainFrame::CreateQEChildren(), DrawSurfaceForSide(), EmitBrushes(), EmitDrawNode_r(), EmitFace(), EmitFaceVertexes(), EmitFlareSurf(), EmitLeaf(), EmitMarkFace(), EmitModelSurf(), EmitPatchSurf(), EmitPlanarSurf(), EmitPlanes(), EmitShader(), EndOfScript(), Entity_AddToList(), Entity_LinkBrush(), Entity_Parse(), Entity_RemoveFromList(), Entity_UnlinkBrush(), ExpandGamePath(), ExpandPath(), FindMiptex(), FindQuakeFilesInPak(), FindQuakeFilesInZip(), FindQuakeFilesWithPakFilter(), FixSurfaceJunctions(), FloodPortals_r(), FogDrawSurfs(), FreeStackWinding(), FreeWinding(), GetClearedMemory(), GetEdge2(), GetEntityControls(), GetMemory(), GetToken(), GetVertexnum(), GLS_BeginScene(), HashVec(), HL_BSPBrushToMapBrush(), HL_CopyLump(), HL_CreateBrushes_r(), HL_LoadBSPFile(), HL_UnparseEntities(), LBMRLEDecompress(), LeakFile(), Load256Image(), Load3DSTriangleList(), LoadAlphaMap(), LoadBMP(), LoadBSPFile(), LoadLBM(), LoadMapFromBSP(), LoadModel(), LoadPCX(), LoadPortals(), LoadTGA(), LoadTGABuffer(), main(), MakeHeadnodePortals(), MakeNodePortal(), MatchToken(), NewBMP(), NewWinding(), CXYWnd::OnCreate(), CCamWnd::OnCreate(), OnlyTextures(), ParseChunk(), ParseEntity(), ParseEpair(), ParseFaceL1(), ParseFromMemory(), ParseHex(), ParseMapEntity(), ParsePatch(), ParseRawBrush(), ParseTerrain(), ParseVertexL(), PC_CopyToken(), PlaceOccupant(), Portal_EntityFlood(), Portal_Passable(), CZWnd::PreCreateWindow(), CXYWnd::PreCreateWindow(), ProjectDialog(), Q1_BSPBrushToMapBrush(), Q1_CopyLump(), Q1_CreateBrushes_r(), Q1_LoadBSPFile(), Q1_UnparseEntities(), Q2_BSPBrushToMapBrush(), Q2_CopyLump(), Q2_DecompressVis(), Q2_LoadBSPFile(), Q2_LoadBSPFileTexinfo(), Q2_ParseBrush(), Q2_ParseBSPEntity(), Q2_ParseMapEntity(), Q2_PushNodeStack(), Q2_UnparseEntities(), Q3_BSPBrushToMapBrush(), Q3_CopyLump(), Q3_LoadBSPFile(), Q3_UnparseEntities(), Q_mkdir(), QE_LoadProject(), QE_SaveProject(), QERApp_ErrorMsg(), QEW_SetupPixelFormat(), QuickTestBrushToPlanenum(), R_LoadMD3(), ReadPolysetGeometry(), CCamWnd::ReInitGL(), RemoveColinearPoints(), RemoveEqualPoints(), RemovePortalFromNode(), RunBsp(), SafeOpenRead(), SafeOpenWrite(), SafeRead(), SafeWrite(), Save256Image(), SetLightStyles(), SetQdirFromPath(), SetTerrainTextures(), SetupGrid(), SideAsTristrip(), Sin_AddLump(), Sin_BSPBrushToMapBrush(), Sin_CopyLump(), Sin_DecompressVis(), Sin_LoadBSPFile(), Sin_LoadBSPFileTexinfo(), Sin_PushNodeStack(), Sin_UnparseEntities(), SplitMeshByPlane(), SplitNodePortals(), StoreAliasTriangles(), SubdivideDrawSurf(), SubdivideFace(), SubdivideMeshQuads(), SurfaceAsTriFan(), SurfaceAsTristrip(), Terrain_AddTexture(), TestBrushToPlanenum(), TestEdge(), TestExpandBrushes(), Texture_LoadSkin(), Texture_LoadTexture(), Texture_LoadTGATexture(), Texture_MakeDefault(), Texture_SetMode(), TH_AASToTetrahedrons(), TH_CreateEdge(), TH_CreateFloatPlane(), TH_CreateTetrahedron(), TH_CreateTriangle(), TH_CreateVertex(), TH_HashVec(), TraceLtm(), Tree_PruneNodes_r(), TRI_LoadPolysets(), UnparseEntities(), VisMain(), VL_AllocWinding(), VL_FacetsForPatch(), VL_InitSurfacesForTesting(), VL_LinkSurfaceIntoCluster(), VL_LoadPortals(), VL_R_CastLightAtSurface(), VS_AllocWinding(), VS_FacetsForPatch(), VS_InitSurfacesForTesting(), VS_LinkSurfaceIntoCluster(), VS_LoadPortals(), VS_R_CastLightAtSurface(), WCam_Create(), WCam_WndProc(), WEnt_Create(), Winding_Alloc(), Winding_BaseForPlane(), Winding_Clip(), Winding_InsertPoint(), Winding_RemovePoint(), Winding_SplitEpsilon(), WriteBMP(), WriteBspBrushMap(), WriteGLView(), WriteMapFile(), WritePortalFile(), WritePortals(), WXY_Create(), WZ_Create(), WZ_WndProc(), and XYWndProc().

00274 {
00275     va_list argptr;
00276     char    text[1024];
00277     char    text2[1024];
00278     int     err;
00279     
00280     err = GetLastError ();
00281     int i = qglGetError();
00282     
00283     va_start (argptr,error);
00284     vsprintf (text, error,argptr);
00285     va_end (argptr);
00286     
00287     sprintf (text2, "%s\nGetLastError() = %i - %i\nAn unrecoverable error has occured. Would you like to edit Preferences before exiting Q3Radiant?", text, err, i);
00288     
00289     if (MessageBox(g_qeglobals.d_hwndMain, text2, "Error", MB_YESNO) == IDYES)
00290     {
00291         g_PrefsDlg.LoadPrefs();
00292         g_PrefsDlg.DoModal();
00293     }
00294     
00295     exit (1);
00296 }

Here is the call graph for this function:

bool ExtractPath_and_Filename const char *  pPath,
CString &  strPath,
CString &  strFilename
 

Definition at line 569 of file WIN_QE3.CPP.

Referenced by CheckBspProcess(), DLLBuildDone(), Map_Snapshot(), CMainFrame::OnFileNewproject(), QE_LoadProject(), RunBsp(), and Texture_LoadTGATexture().

00570 {
00571   CString strPathName = pPath;
00572   int nSlash = strPathName.ReverseFind('\\');
00573   if (nSlash >= 0)
00574   {
00575     strPath = strPathName.Left(nSlash+1);
00576     strFilename = strPathName.Right(strPathName.GetLength() - nSlash - 1);
00577   }
00578   else strFilename = pPath;
00579   return true;
00580 }

void FillBSPMenu void   ) 
 

Definition at line 502 of file WIN_QE3.CPP.

References QEGlobals_t::bBSPFrontendPlugin, bsp_commands, CMD_BSPCOMMAND, count, QEGlobals_t::d_hwndMain, QEGlobals_t::d_project_entity, epair_t, entity_t::epairs, g_BSPFrontendCommands, g_BSPFrontendTable, g_qeglobals, i, epair_s::key, _QERPlugBSPFrontendTable::m_pfnGetBSPMenu, MENU_BSP, epair_s::next, NULL, strcpy(), strtok(), and token.

Referenced by AddCommandDlgProc(), EditCommandDlgProc(), QE_LoadProject(), and CMainFrame::SetButtonMenuStates().

00503 {
00504     HMENU   hmenu;
00505     epair_t *ep;
00506     int     i;
00507     static int count;
00508 
00509     hmenu = GetSubMenu (GetMenu(g_qeglobals.d_hwndMain), MENU_BSP);
00510 
00511     for (i=0 ; i<count ; i++)
00512         DeleteMenu (hmenu, CMD_BSPCOMMAND+i, MF_BYCOMMAND);
00513     count = 0;
00514 
00515     if ( g_qeglobals.bBSPFrontendPlugin )
00516     {
00517         CString str = g_BSPFrontendTable.m_pfnGetBSPMenu();
00518         char cTemp[1024];
00519         strcpy(cTemp, str);
00520         char* token = strtok(cTemp, ",;");
00521         if (token && *token == ' ')
00522         {
00523             while (*token == ' ')
00524                 token++;
00525         }
00526         i = 0;
00527         // first token is menu name
00528         ModifyMenu( GetMenu(g_qeglobals.d_hwndMain), MENU_BSP, MF_BYPOSITION, MENU_BSP, (LPCTSTR)token );
00529         // redraw the menu bar
00530         DrawMenuBar( g_qeglobals.d_hwndMain );
00531         token = strtok(NULL, ",;");
00532         while (token != NULL)
00533         {
00534             g_BSPFrontendCommands.Add(token);
00535             AppendMenu (hmenu, MF_ENABLED|MF_STRING, CMD_BSPCOMMAND+i, (LPCTSTR)token );
00536             token = strtok(NULL, ",;");
00537             i++;
00538         }
00539         count = i;
00540     }
00541     else
00542     {
00543         i = 0;
00544         for (ep = g_qeglobals.d_project_entity->epairs ; ep ; ep=ep->next)
00545         {
00546             if (ep->key[0] == 'b' && ep->key[1] == 's' && ep->key[2] == 'p')
00547             {
00548                 bsp_commands[i] = ep->key;
00549                 AppendMenu (hmenu, MF_ENABLED|MF_STRING,
00550                     CMD_BSPCOMMAND+i, (LPCTSTR)ep->key);
00551                 i++;
00552             }
00553         }
00554         count = i;
00555     }
00556 }

Here is the call graph for this function:

void FindReplace CString &  strContents,
const char *  pTag,
const char *  pValue
 

Definition at line 129 of file Win_main.cpp.

References strcmp(), and strlen().

Referenced by CheckBspProcess(), DLLBuildDone(), CMainFrame::LoadCommandMap(), LoadShader(), PakLoadAnyFile(), QE_LoadProject(), and RunBsp().

00130 {
00131   if (strcmp(pTag, pValue) == 0)
00132     return;
00133   for (int nPos = strContents.Find(pTag); nPos >= 0; nPos = strContents.Find(pTag))
00134   {
00135     int nRightLen = strContents.GetLength() - strlen(pTag) - nPos;
00136     CString strLeft = strContents.Left(nPos);
00137     CString strRight = strContents.Right(nRightLen);
00138     strLeft += pValue;
00139     strLeft += strRight;
00140     strContents = strLeft;
00141   }
00142 }

Here is the call graph for this function:

void FS_FCloseFile fileHandle_t  f  ) 
 

Definition at line 746 of file WIN_QE3.CPP.

References Com_Error(), Com_Memset(), ERR_FATAL, f, fclose(), qfile_us::file, fsh, fileHandleData_t::handleFiles, qfile_gus::o, fileHandleData_t::streamed, Sys_EndStreamedFile(), qfile_us::unique, unzClose(), unzCloseCurrentFile(), and fileHandleData_t::zipFile.

Referenced by CL_CgameSystemCalls(), CL_Disconnect(),