// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // »Project« Talina Gaming System (TgS) (∂) // »File« TgS Common - Global.h // »Author« Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com) // »Version« 4.0 // // ------------------------------------------------------------------------------------------------------------------------------ // // // Copyright: © 2002-2010, Andrew Aye. All Rights Reserved. // // This software is free for non-commercial use. Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // Redistributions of source code must retain this copyright notice, this list of conditions and the following disclaimers. // Redistributions in binary form must reproduce this copyright notice, this list of conditions and the following // disclaimers in the documentation and other materials provided with the distribution. // // Neither the names of the copyright owner nor the names of its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // The intellectual property rights of the algorithms used reside with Andrew Aye. You may not use this software, in whole or // in part, in support of any commercial product without the express written consent of the author. // // There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is". // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // #if !defined(_TGS_COMMON_GLOBAL_H_) #define _TGS_COMMON_GLOBAL_H_ #pragma once // START TGS - GLOBAL ////////////////////////////////////////////////////////////////////////////////////////////////////////////// // -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. // // Constants // -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. // enum { TGS_GLOBAL_VERSION = 0x311 }; enum { KTgMAX_CMD_LINE_COUNT = 64 }; enum { KTgMAX_CMD_LINE_SIZE = 512 }; // -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. // // Public Interface // -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. // TgRESULT tgGB_Init(); TgRESULT tgGB_Boot(); TgRESULT tgGB_Stop(); TgRESULT tgGB_Free(); TgRESULT tgGB_Update( C_TgFLOAT32 fdT ); TgRESULT tgGB_Init_OS(); TgRESULT tgGB_Boot_OS(); TgRESULT tgGB_Stop_OS(); TgRESULT tgGB_Free_OS(); // Command line operations TgVOID tgGB_CMD_Set_Command_Line( CPCU_TgCHAR pszCmdLN ); TgSINT32 tgGB_CMD_Query_Argument_Count(); CP_TgCHAR tgGB_CMD_Query_Argument( C_TgSINT32 nuiArg ); TgSINT32 tgGB_CMD_Query_Argument_Index( CPC_TgCHAR pszArgument ); // The current frame time for the game loop TgVOID tgGB_Set_Frame_Time( C_TgFLOAT32 fdT ); // Flag functions - the set version should only be used by the internal engine code. Calling these within the game code // will most likely break the engine processes and cause catastrophic failure. TgVOID tgGB_Set_Unicode( C_TgBOOL ); TgVOID tgGB_Set_Client( C_TgBOOL ); TgVOID tgGB_Set_Server( C_TgBOOL ); TgVOID tgGB_Set_Console_HW( C_TgBOOL ); TgVOID tgGB_Set_Free_On_Quit( C_TgBOOL ); // Generic name generator - simply appends an integer counter to a standard string TgBOOL tgGB_Get_Unique_Name( PCU_TgCHAR szDest, C_TgUINT32 nuiDest ); TgUINT32 tgGB_Parse_Command_Line( PCU_TgCHAR pszCmdLN, CP_TgCHAR aszCmd[KTgMAX_CMD_LINE_COUNT] ); // Query accessor functions TgFLOAT32 tgGB_Query_Frame_Time(); TgUINT32 tgGB_Query_Total_Frame(); TgFLOAT32 tgGB_Query_Total_Time(); TgBOOL tgGB_Query_Unicode(); TgBOOL tgGB_Query_Client(); TgBOOL tgGB_Query_Server(); TgBOOL tgGB_Query_Console_HW(); TgBOOL tgGB_Query_Free_On_Quit(); // DEVELOPMENT NOTES // Unicode builds are no longer really supported. Back in the day (2002-2004) I was doing the windows thing where I would support // both wide character and single character builds. Sounds good, but I found in professional experience that this creates a problem // with string bloat (always annoying) and strings tend to be either hashed out or accessed through a indirection to allow for // localization. More so, by using the codec system you can take a unicode stream and output it in what ever manner needed. Unicode // parsing functions are provided for this reason (and so you don't need to look up the standard yourself!) // The Client, Server functions will currently always return false. Network programming is one of my weakest areas of knowledge and // until I have 3-4 months to concentrate on it, I don't want to put in a half ass implementation into the code base. #endif // END ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////