Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Effect.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_EFFECT_H)
#define TGS_EFFECT_H
#pragma once

#define TGS_PLATFORM_EFFECT_H

#include "TgS EFFECT/TgS Effect - Constants.h"
#include "TgS EFFECT/TgS Effect - Type.h"
#include "TgS EFFECT/TgS Effect - Data.h"


/* == Effect ============================================================================================================================================================ */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Module Functions                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

TgEXTN TgRESULT                             tgFX_Module_Init( TgVOID );
TgEXTN TgRESULT                             tgFX_Module_Boot( TgVOID );
TgEXTN TgVOID                               tgFX_Module_Stop( TgVOID );
TgEXTN TgVOID                               tgFX_Module_Free( TgVOID );
TgEXTN TgRESULT                             tgFX_Module_Update( C_TgFLOAT32 ); /* Client Only */

TgEXTN TgRESULT                             tgFX_Load_Config( TgVOID );
TgEXTN TgRESULT                             tgFX_Save_Config( TgVOID );

TgEXTN TgBOOL                               tgFX_Query_Init( TgVOID );
TgEXTN TgBOOL                               tgFX_Query_Boot( TgVOID );
TgEXTN TgSIZE                               tgFX_Query_Fixed_Memory( TgVOID );


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Effect Functions                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

/* -- Effect - Management ----------------------------------------------------------------------------------------------------------------------------------------------- */
TgEXTN TgRESULT                             tgFX__Client__Is_Loaded( C_TgFX_EFFECT_ID );
TgEXTN TgRESULT                             tgFX__Client__PreLoad( C_TgFX_EFFECT_ID ); /* Pre-load any external resources needed by the effect */

TgEXTN TgFX_EFFECT_ID                       tgFX__Client__Query_Id( C_TgUINTXX );

/* -- Effect - Instance Management -------------------------------------------------------------------------------------------------------------------------------------- */

                                            /* 1: Effect Type - Effect type that matches the following data blob */
                                            /* 2: Data0 - Memory data blob for the required file data.  Pointer data must be valid for lifetime of all instances */
                                            /* 3: Data1 - Memory data blob for the optional file data.  Pointer data must be valid for lifetime of all instances */
                                            /* 4: Instance */
                                            /* 5: Use Error - if true, will use the default error effect if the effect fails to load */
TgEXTN TgFX_CLIENT_INST_ID                  tgFX__Client__Inst_FX_RAW( C_ETgFX__EFFECT, CP_TgVOID, CPCU_STg2_FX_Instance, C_TgBOOL );

                                            /* 1: Hash of the unique name (key) for this effect */
                                            /* 2: Instance */
                                            /* 3: Use Error - if true, will use the default error effect if the effect fails to load */
TgEXTN TgFX_CLIENT_INST_ID                  tgFX__Client__Inst_FX_Hash( C_TgUINTXX, CPCU_STg2_FX_Instance, C_TgBOOL );

                                            /* 1: Direct reference to loaded effect */
                                            /* 2: Instance */
                                            /* 3: Use Error - if true, will use the default error effect if the effect fails to load */
TgEXTN TgFX_CLIENT_INST_ID                  tgFX__Client__Inst_FX( C_TgFX_EFFECT_ID, CPCU_STg2_FX_Instance, C_TgBOOL );

TgEXTN TgVOID                               tgFX__Client__Stop( C_TgFX_CLIENT_INST_ID ); /* Gracefully stop the effect (fade out etc.) */
TgEXTN TgVOID                               tgFX__Client__Kill( C_TgFX_CLIENT_INST_ID ); /* Removes the effect from the system immediately */
TgEXTN TgVOID                               tgFX__Client__Kill_All( P_TgUINT32 ); /* Removes all effect instances from the system immediately */

/* -- Effect Instance - Accessors --------------------------------------------------------------------------------------------------------------------------------------- */

TgEXTN TgVOID                               tgFX__Client__Set_Callback_Terminate( C_TgFX_CLIENT_INST_ID, TgFCN_CB_ON_TERMINATE, C_TgUINTPTR );
TgEXTN TgVOID                               tgFX__Client__Set_Callback_Contact( C_TgFX_CLIENT_INST_ID, TgFCN_CB_ON_CONTACT, C_TgUINTPTR );
TgEXTN TgVOID                               tgFX__Client__Set_Visible( C_TgFX_CLIENT_INST_ID, C_TgBOOL );

TgEXTN TgBOOL                               tgFX__Client__Is_Attached( C_TgFX_CLIENT_INST_ID );
TgEXTN TgRESULT                             tgFX__Client__Is_Valid( C_TgFX_CLIENT_INST_ID );

/* -- System ------------------------------------------------------------------------------------------------------------------------------------------------------------ */

TgEXTN TgVOID                               tgFX__Client__Update_1( C_TgFLOAT32 );
TgEXTN TgVOID                               tgFX__Client__Update_2( C_TgFLOAT32 );
TgEXTN TgVOID                               tgFX__Client__Update_Finish( TgVOID );

TgEXTN TgVOID                               tgFX__Client__Scene_Cull( PC_STg2_SE_Context, C_TgSINT32 );

TgEXTN TgVOID                               tgFX__Render__Update( PC_STg2_FX_Rnd_Output );


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Debug and Tools                                                                                                                                                       */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
#if TgS_DEBUG_EFFECT
TgEXTN TgRESULT                             tgFX_Debug__Client__Reload_Effect( C_TgFX_EFFECT_ID, CPC_STg2_Input, C_TgUINTPTR, TgVOID( *)(C_TgUINTPTR, C_TgFX_EFFECT_ID) );
TgEXTN CP_TgCHAR                            tgFX_Debug__Client__Query_FX_Name( C_TgFX_EFFECT_ID );
TgEXTN TgBOOL                               tgFX_Debug__Is_Valid( C_TgFX_CLIENT_INST_ID, C_TgFX_DATA_INST_ID );
/*# TgS_DEBUG_EFFECT */
#endif


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