Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Global.h
    »Author«    Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com)
    »Version«   4.51 / »GUID« A9981407-3EC9-42AF-8B6F-8BE6DD919615                                                                                                        */
/*   -------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/*  Copyright: © 2002-2017, 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:
        Redistribution of source code must retain this copyright notice, this list of conditions and the following disclaimers.
        Redistribution 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.
    The name of the author may not 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


/* == Common ============================================================================================================================================================ */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Public Constants                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

enum { TGS_GLOBAL_VERSION                   = 0x311 };
enum { KTgMAX_CMD_LINE_COUNT                = 64 };
enum { KTgMAX_CMD_LINE_SIZE                 = 512 };


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Public Functions                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

TgEXTN TgRESULT                             tgGB_Init( TgVOID );
TgEXTN TgRESULT                             tgGB_Boot( TgVOID );
TgEXTN TgVOID                               tgGB_Stop( TgVOID );
TgEXTN TgVOID                               tgGB_Free( TgVOID );
TgEXTN TgRESULT                             tgGB_Update( C_TgFLOAT32 );

TgEXTN TgBOOL                               tgGB_Query_Init( TgVOID );
TgEXTN TgBOOL                               tgGB_Query_Boot( TgVOID );

TgEXTN TgSIZE                               tgGB_Query_Fixed_Memory( TgVOID );

#if !defined(TgCOMPILE_FORCE_ANSI)
TgEXTN TgRESULT                             tgGB_Init_OS( TgVOID );
TgEXTN TgRESULT                             tgGB_Boot_OS( TgVOID );
TgEXTN TgVOID                               tgGB_Stop_OS( TgVOID );
TgEXTN TgVOID                               tgGB_Free_OS( TgVOID );
/*# !defined(TgCOMPILE_FORCE_ANSI) */
#endif

#if TgS_STAT_COMMON
TgEXTN TgVOID                               tgGB_Stats( P_STg2_Output );
#endif

                                            /* Command line operations */
TgEXTN TgVOID                               tgGB_CMD_Set_Command_Line( CPCU_TgCHAR );
TgEXTN TgSINT32                             tgGB_CMD_Query_Argument_Count( TgVOID );
TgEXTN CP_TgCHAR                            tgGB_CMD_Query_Argument( C_TgSINT32 );
TgEXTN TgSINT32                             tgGB_CMD_Query_Argument_Index( CPC_TgCHAR );
TgEXTN TgVOID                               tgGB_CMD_Push_Argument( CPC_TgCHAR ); /* Used to add command line parameters for processing through code */

                                            /* The current frame time for the game loop */
TgEXTN TgVOID                               tgGB_Reset_Frame_Time( TgVOID );
TgEXTN TgVOID                               tgGB_Set_Frame_Time( C_TgFLOAT32 fDT );
TgEXTN TgVOID                               tgGB_Inc_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. */

TgEXTN TgVOID                               tgGB_Set_Unicode( C_TgBOOL );
TgEXTN TgVOID                               tgGB_Set_Client( C_TgBOOL );
TgEXTN TgVOID                               tgGB_Set_Server( C_TgBOOL );
TgEXTN TgVOID                               tgGB_Set_Console_HW( C_TgBOOL );
TgEXTN TgVOID                               tgGB_Set_Free_On_Quit( C_TgBOOL );

TgEXTN TgBOOL                               tgGB_Get_Unique_Name( PCU_TgCHAR, C_TgUINT32 ); /*« Generic name generator - appends an integer counter to a standard string */
TgEXTN TgUINT32                             tgGB_Parse_Command_Line( CPP_TgCHAR, C_TgSIZE, PC_TgCHAR );

TgEXTN TgBOOL                               tgGB_Verify_Version( C_TgUINT32 );

                                            /* Query accessors functions */
TgEXTN TgFLOAT32                            tgGB_Query_Frame_Time( TgVOID );
TgEXTN TgSINT32                             tgGB_Query_Total_Frame( TgVOID );
TgEXTN TgFLOAT32                            tgGB_Query_Total_Time( TgVOID );
TgEXTN TgBOOL                               tgGB_Query_Unicode( TgVOID );
TgEXTN TgBOOL                               tgGB_Query_Client( TgVOID );
TgEXTN TgBOOL                               tgGB_Query_Server( TgVOID );
TgEXTN TgBOOL                               tgGB_Query_Console_HW( TgVOID );
TgEXTN TgBOOL                               tgGB_Query_Free_On_Quit( TgVOID );

                                            /* Debug Console | TTY Functions */
TgEXTN TgSIZE                               tgPM_DBG_ERR_Write_Byte( PC_STg2_Output, C_TgSIZE, C_TgUINT08 );
TgEXTN TgSIZE                               tgPM_DBG_ERR_Write( PC_STg2_Output, C_TgSIZE, CP_TgVOID, C_TgSIZE );
TgEXTN TgSIZE                               tgPM_DBG_OUT_Write_Byte( PC_STg2_Output, C_TgSIZE, C_TgUINT08 );
TgEXTN TgSIZE                               tgPM_DBG_OUT_Write( PC_STg2_Output, C_TgSIZE, CP_TgVOID, C_TgSIZE );


/* ====================================================================================================================================================================== */
#endif