Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Effect - Effect - Type.h_inc
    »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".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/* == Effects =========================================================================================================================================================== */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Error Checking */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

#if !defined(T_NAME) || !defined(T_TYPE) || !defined(T_TEXT)
#error Source Include file (template file) missing necessary definitions
/*# !defined(T_NAME) || !defined(T_TYPE) || !defined(T_TEXT) */
#endif

#if !defined(T_EFFECT_UPDATE)
#define T_EFFECT_UPDATE 1
/*# !defined(T_EFFECT_UPDATE) */
#endif

#if !defined(T_EFFECT_SCENE)
#define T_EFFECT_SCENE 1
/*# !defined(T_EFFECT_SCENE) */
#endif

#if !defined(T_EFFECT_RENDER)
#define T_EFFECT_RENDER 1
/*# !defined(T_EFFECT_RENDER) */
#endif

#if !defined(T_EFFECT_RENDER_PRIMITIVE_TYPE)
#define T_EFFECT_RENDER_PRIMITIVE_TYPE ETgRN_PRIMITIVE__QUAD_LIST
/*# !defined(T_EFFECT_RENDER_PRIMITIVE_TYPE) */
#endif

#if !defined(T_EFFECT_RENDER_BATCH)
#define T_EFFECT_RENDER_BATCH 0
/*# !defined(T_EFFECT_RENDER_BATCH) */
#endif

#if !defined(T_EFFECT_GROUP)
#define T_EFFECT_GROUP 0
/*# !defined(T_EFFECT_GROUP) */
#endif

#if !defined(T_EFFECT_NOTIFY)
#define T_EFFECT_NOTIFY 0
/*# !defined(T_EFFECT_NOTIFY) */
#endif

#if !defined(T_EFFECT_TIME)
#define T_EFFECT_TIME (T_EFFECT_UPDATE && 1)
/*# !defined(T_EFFECT_TIME) */
#endif

#if !defined(T_EFFECT_TIME_DEFAULT)
#define T_EFFECT_TIME_DEFAULT (T_EFFECT_TIME && 1)
/*# !defined(T_EFFECT_TIME_DEFAULT) */
#endif

#if !defined(T_EFFECT_FRAME)
#define T_EFFECT_FRAME 1
/*# !defined(T_EFFECT_FRAME) */
#endif

#if !defined(T_EFFECT_PROCESS_COMMMAND)
#define T_EFFECT_PROCESS_COMMMAND 1
/*# !defined(T_EFFECT_PROCESS_COMMMAND) */
#endif

#if !defined(T_EFFECT_PROCESS_COMMMAND_DEFAULT)
#define T_EFFECT_PROCESS_COMMMAND_DEFAULT (T_EFFECT_PROCESS_COMMMAND && 1)
/*# !defined(T_EFFECT_PROCESS_COMMMAND_DEFAULT) */
#endif


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Public Data                                                                                                                                                           */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

PROFILE_EXTERN( T_TYPE(FX_, _COMMANDS__UPDATE) );

#if T_EFFECT_UPDATE
PROFILE_EXTERN( T_TYPE(FX_, _UPDATE__DATA) );
PROFILE_EXTERN( T_TYPE(FX_, _UPDATE_EXTERNAL__DATA) );
/*# T_EFFECT_UPDATE */
#endif

#if T_EFFECT_RENDER
PROFILE_EXTERN( T_TYPE(FX_, _RENDER_PATCH_CONTEXT) );
PROFILE_EXTERN( T_TYPE(FX_, _RENDER_UPDATE) );
PROFILE_EXTERN( T_TYPE(FX_, _RENDER_GENERATE) );
/*# T_EFFECT_RENDER */
#endif

#if TgS_DEBUG_EFFECT
TgEXTN TgCN_VAR_ID                          T_NAME(g_tiFX_Debug__, __Disable_Create);
TgEXTN TgCN_VAR_ID                          T_NAME(g_tiFX_Debug__, __Disable_Update);
TgEXTN TgCN_VAR_ID                          T_NAME(g_tiFX_Debug__, __Disable_Scene_Cull);
TgEXTN TgCN_VAR_ID                          T_NAME(g_tiFX_Debug__, __Disable_Render);
TgEXTN TgCN_VAR_ID                          T_NAME(g_tiFX_Debug__, __Draw_BA);
TgEXTN TgCN_VAR_ID                          T_NAME(g_tiFX_Debug__, __Draw_Debug);
/*# TgS_DEBUG_EFFECT */
#endif


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  File Local Types                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

TgTYPE_STRUCT_ALIGN(T_NAME(STg2_FX__,),16,)
{
#if T_EFFECT_RENDER
    TgFX_DATA_INST_ID                           m_tiNext[ETgFX_NEXT__RENDER + 1];
    TgUINT64                                    m_uiPad0;
#elif T_EFFECT_SCENE
    TgFX_DATA_INST_ID                           m_tiNext[ETgFX_NEXT__SCENE + 1];
#elif T_EFFECT_UPDATE
    TgFX_DATA_INST_ID                           m_tiNext[ETgFX_NEXT__UPDATE + 1];
#endif

    T_NAME(CP_STg2_FX_, __File_Data)            m_psFile_Data;
    TgFX_CLIENT_INST_ID                         m_tiClient;
    TgFX_DATA_INST_ID                           m_tiData;

#if T_EFFECT_TIME
    TgFLOAT32                                   m_fTime_Total;
    TgFLOAT32                                   m_fTime_Start__Duration;
    TgFLOAT32                                   m_fTime_End__Start;
    TgFLOAT32                                   m_fTime_End__Duration;
    TgFLOAT32                                   m_fLive_Time;
    TgFLOAT32                                   m_fLife_Time;
    TgVEC_M_F32_04                              m_vLive_Time;
/*# T_EFFECT_TIME */
#else
/*    TgUINT32                                    m_uiPadA[2]; */
/*# T_EFFECT_TIME */
#endif

#if T_EFFECT_FRAME
    TgVEC_M_F32_04                              m_qRot_M;
    TgVEC_M_F32_04                              m_qRot_M2W;
    TgVEC_M_F32_04                              m_qRot_W;
    TgVEC_M_F32_04                              m_vPos_M;
    TgVEC_M_F32_04                              m_vPos_M2W;
    TgVEC_M_F32_04                              m_vPos_W;
    TgVEC_M_F32_04                              m_vScale;
/*# T_EFFECT_FRAME */
#endif

#if T_EFFECT_SCENE || T_EFFECT_RENDER
    TgVEC_M_F32_04                              m_vBA_Max_W;
    TgVEC_M_F32_04                              m_vBA_Min_W;
/*# T_EFFECT_SCENE || T_EFFECT_RENDER */
#endif

#if T_EFFECT_RENDER
    TgRN_MESH_SET_ID                            m_tiMesh_Set;
    TgRN_MATERIAL_ID                            m_tiMaterial;
    ETgRN_VERTEX                                m_enVertex;
    TgSINT32                                    m_iIndex_In_SE_Context;
    TgUINT32                                    m_uiPadC;
/*# T_EFFECT_RENDER */
#else
    TgUINT32                                    m_uiPadB[3];
/*# T_EFFECT_RENDER */
#endif

    TgUINT32                                    m_uiUpdate : 2; /*« Must be large enough to hold ETgFX_UPDATE__MAX - 1 */
    TgUINT32                                    m_uiScene__Cull__Insert_Frame_Mesh : 1; /*« Boolean value */
    TgUINT32                                    m_uiRender__Visible : 1; /*« Boolean value */
    TgUINT32                                    m_uiRender__ScreenSpace : 1; /*« Boolean value */
    TgUINT32                                    m_uiFlagPad: 27;

    T_NAME(STg2_FX__, __Extend_Data)          m_sExtend;
};