Home

Resume

Blog

Teikitu


// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
//  »Project«   Teikitu Gaming System (TgS) (∂)
//  »File«      TgS (WIN) Common - Base - Type.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_WIN_COMMON_BASE_TYPE_H_)
#define _TGS_WIN_COMMON_BASE_TYPE_H_
#pragma once


// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. //
//  Constants
// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. //

enum { ETgFILE_BLOCK_SIZE                   =  4096 };
enum { ETgFILE_BLOCK_MASK                   =  4095 };
enum { ETgFILE_BLOCK_READ_SIZE              = 16384 };
enum { ETgFILE_BLOCK_READ_MASK              = 16383 };
enum { ETgINVALID_FILE_HANDLE               = -1 };


// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. //
//  Type Definitions
// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. //

typedef unsigned int                        TgUINTEGER;
typedef unsigned int                        TgUINT;
typedef unsigned char                       TgUINT08;
typedef unsigned short                      TgUINT16;
typedef unsigned long                       TgUINT32;
typedef unsigned long long                  TgUINT64;
typedef signed int                          TgSINTEGER;
typedef signed int                          TgSINT;
typedef signed char                         TgSINT08;
typedef signed short                        TgSINT16;
typedef signed long                         TgSINT32;
typedef signed long long                    TgSINT64;
typedef float                               TgFLOAT32;
typedef double                              TgFLOAT64;
typedef signed int                          TgBOOL;
typedef char                                TgANSICHAR;
typedef wchar_t                             TgUNICHAR;

#include "TgS COMMON/TgS Common - Base - Type.h"

typedef union
{
    TgUINT32                                    m_uiColour;
    struct { TgUINT08                           uiRed,uiGreen,uiBlue,uiAlpha; } m;
} TgCOLOUR32;
TgTYPE_PREFIX(TgCOLOUR32);

typedef struct HINSTANCE__                  *TgMS_HINSTANCE;
typedef struct HWND__                       *TgMS_HWND;
typedef struct HMENU__                      *TgMS_HMENU;
typedef struct HDC__                        *TgMS_HDC;
typedef struct HMONITOR__                   *TgMS_HMONITOR;

TgTYPE_PREFIX(TgMS_HMONITOR);

#if TgCOMPILE_64BIT_POINTER 
typedef TgSINT64                            (__stdcall* TgMS_WNDPROC)(TgMS_HWND, TgUINT, TgUINT64, TgSINT64);
#else
typedef TgSINT32                            (__stdcall* TgMS_WNDPROC)(TgMS_HWND, TgUINT, TgUINT, TgSINT32);
#endif

typedef union {
    struct {
        TgUINT32                            LowPart;
        TgSINT32                            HighPart;
    }                                   DUMMYSTRUCTNAME;
    struct {
        TgUINT32                            LowPart;
        TgSINT32                            HighPart;
    }                                   u;
    TgSINT64                            QuadPart;
} TgMS_LARGE_INTEGER;
TgTYPE_PREFIX(TgMS_LARGE_INTEGER);

typedef struct {
    TgSINT32                            left, top, right, bottom;
} TgMS_RECT;
TgTYPE_PREFIX(TgMS_RECT);

#endif //  END  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////