Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Base - Define - Platform.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_BASE_DEFINE_PLATFORM_H)
#define TGS_COMMON_BASE_DEFINE_PLATFORM_H
#pragma once


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

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Configuration                                                                                                                                                         */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#define TgCOMPILE_LITTLE_ENDIAN             1
#define TgCOMPILE_SYSTEM_INFORMATION        0

#define TgCOMPILE_BASE_API_PLATFORM         1

#define TgCOMPILE_THREAD_LOCAL              0
#define TgCOMPILE_THREAD                    0
#define TgCOMPILE_FLOAT64                   0
#define TgCOMPILE_64BIT_POINTER             1
#define TgCOMPILE_64BIT_ATOMIC              1
#define TgCOMPILE_32BIT_POINTER             0

#define TgCOMPILE_16BIT_ATOMIC              0
#define TgCOMPILE_CACHE_LINE_SIZE           16

#define TgATOMIC_SINT16                     int16_t
#define TgATOMIC_SINT32                     int32_t
#define TgATOMIC_SINT64                     int64_t
#define TgATOMIC_UINTXX                     TgUINTXX
#define TgATOMIC_PVOID                      P_TgVOID
#define TgATOMIC_SIZE                       TgSIZE
#define TgCHAR_PATH_SEPERATOR               '\\'
#define TgSTRING_PATH_SEPERATOR             "/"

/*
#define TgPASSINREG
#define TgALIAS                             
#define TgEXPECT_TRUE(...)                  (__VA_ARGS__)
#define TgEXPECT_FALSE(...)                 (__VA_ARGS__)
*/


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Code Macros                                                                                                                                                           */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#if defined(TgCOMPILE_WINDOWS_CONSOLE) || !defined(TgCOMPILE_SUPPORT_MSFT_SYSTEM_INCLUDE) || defined(TgCOMPILE_FORCE_ANSI)
    #define TgMAIN_FUNCTION                     int CDECL main(int UNUSED_PARAM argc, char UNUSED_PARAM *argv[], char UNUSED_PARAM *envp[])
    #define TgMAIN_PLATFORM_GLOBAL_INIT         
    #define TgMAIN_PLATFORM_GLOBAL_FREE         
#else
    #if defined(TgCOMPILE_WIDE_CHAR)
        #define TgMAIN_FUNCTION                     int STDCALL wWinMain( TgMS_HINSTANCE hInstance, TgMS_HINSTANCE hPrevInstance, char* lpCmdLine, int nCmdShow )
    #else
        #define TgMAIN_FUNCTION                     int STDCALL WinMain( TgMS_HINSTANCE hInstance, TgMS_HINSTANCE hPrevInstance, char* lpCmdLine, int nCmdShow )
    #endif
    #define TgMAIN_PLATFORM_GLOBAL_INIT         g_hInstance = hInstance
    #define TgMAIN_PLATFORM_GLOBAL_FREE         g_hInstance = 0
#endif


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