Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Input - Data.c
    »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".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/* == Input ============================================================================================================================================================= */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Private Data                                                                                                                                                          */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

STg2_Input_Producer                         g_asController_Active[ETgCONTROLLER_MAX];
STg2_Input_Rumble                           g_asController_Rumble[ETgCONTROLLER_MAX];
TgBOOL                                      g_abController_Paused[ETgCONTROLLER_MAX];
STg2_Input_Consumer                         g_asConsumer[KTgMAX_CONSUMER];
STg2_UTM_AM_ST                              g_sConsumer_Insert;

TgFLOAT32                                   g_fDefault_Mouse_X_Dead_Zone;
TgFLOAT32                                   g_fDefault_Mouse_Y_Dead_Zone;
TgFLOAT32                                   g_fDefault_Mouse_Z_Dead_Zone;

TgFLOAT32                                   g_fDefault_GamePad_Stick_0_X_Dead_Zone;
TgFLOAT32                                   g_fDefault_GamePad_Stick_0_Y_Dead_Zone;
TgFLOAT32                                   g_fDefault_GamePad_Stick_1_X_Dead_Zone;
TgFLOAT32                                   g_fDefault_GamePad_Stick_1_Y_Dead_Zone;

TgFLOAT32                                   g_fGamePad_Stick_Dead_Zone[4][4];
TgFLOAT32                                   g_fMouse_Dead_Zone[2][3];

#if TgS_STAT_INPUT
TgUINT32                                    g_nuiStat_Insert[ETgCONTROLLER_MAX + 1], g_nuiStat_Remove[ETgCONTROLLER_MAX + 1];
#endif

TgKI_DEFINE( IN_CONSUMER_ID );




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

/* ---- tgIN_Query_Fixed_Memory ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgSIZE tgIN_Query_Fixed_Memory( TgVOID )
{
    return (0
        #if !defined(TgCOMPILE_FORCE_ANSI)
             +tgIN_PM_Query_Fixed_Memory()
         #endif
        + sizeof( g_asController_Active )
        + sizeof( g_abController_Paused )
        + sizeof( g_asConsumer )
        + sizeof( g_asController_Active )
        + sizeof( g_asConsumer )
        + sizeof( g_sConsumer_Insert )
        + sizeof( g_fDefault_Mouse_X_Dead_Zone )
        + sizeof( g_fDefault_Mouse_Y_Dead_Zone )
        + sizeof( g_fDefault_Mouse_Z_Dead_Zone )
        + sizeof( g_fDefault_GamePad_Stick_0_X_Dead_Zone )
        + sizeof( g_fDefault_GamePad_Stick_0_Y_Dead_Zone )
        + sizeof( g_fDefault_GamePad_Stick_1_X_Dead_Zone )
        + sizeof( g_fDefault_GamePad_Stick_1_Y_Dead_Zone )
        + sizeof( g_fGamePad_Stick_Dead_Zone )
        + sizeof( g_fMouse_Dead_Zone )
        + sizeof( TgIN_CONSUMER_ID )
#if TgS_STAT_INPUT
        + sizeof( g_nuiStat_Insert )
        + sizeof( g_nuiStat_Remove )
#endif
    );
}