Path: blob/master/libmupen64plus/mupen64plus-video-glide64mk2/src/Glide64/Combine.h
2 views
/*1* Glide64 - Glide video plugin for Nintendo 64 emulators.2* Copyright (c) 2002 Dave20013* Copyright (c) 2003-2009 Sergey 'Gonetz' Lipski4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/1920//****************************************************************21//22// Glide64 - Glide Plugin for Nintendo 64 emulators23// Project started on December 29th, 200124//25// Authors:26// Dave2001, original author, founded the project in 2001, left it in 200227// Gugaman, joined the project in 2002, left it in 200228// Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 200229// Hiroshi 'KoolSmoky' Morii, joined the project in 200730//31//****************************************************************32//33// To modify Glide64:34// * Write your name and (optional)email, commented by your work, so I know who did it, and so that you can find which parts you modified when it comes time to send it to me.35// * Do NOT send me the whole project or file that you modified. Take out your modified code sections, and tell me where to put them. If people sent the whole thing, I would have many different versions, but no idea how to combine them all.36//37//****************************************************************38#ifndef COMBINE_H39#define COMBINE_H4041// texture MOD types42#define TMOD_TEX_INTER_COLOR_USING_FACTOR 143#define TMOD_TEX_INTER_COL_USING_COL1 244#define TMOD_FULL_COLOR_SUB_TEX 345#define TMOD_COL_INTER_COL1_USING_TEX 446#define TMOD_COL_INTER_COL1_USING_TEXA 547#define TMOD_COL_INTER_COL1_USING_TEXA__MUL_TEX 648#define TMOD_COL_INTER_TEX_USING_TEXA 749#define TMOD_COL2_INTER__COL_INTER_COL1_USING_TEX__USING_TEXA 850#define TMOD_TEX_SCALE_FAC_ADD_FAC 951#define TMOD_TEX_SUB_COL_MUL_FAC_ADD_TEX 1052#define TMOD_TEX_SCALE_COL_ADD_COL 1153#define TMOD_TEX_ADD_COL 1254#define TMOD_TEX_SUB_COL 1355#define TMOD_TEX_SUB_COL_MUL_FAC 1456#define TMOD_COL_INTER_TEX_USING_COL1 1557#define TMOD_COL_MUL_TEXA_ADD_TEX 1658#define TMOD_COL_INTER_TEX_USING_TEX 1759#define TMOD_TEX_INTER_NOISE_USING_COL 1860#define TMOD_TEX_INTER_COL_USING_TEXA 1961#define TMOD_TEX_MUL_COL 2062#define TMOD_TEX_SCALE_FAC_ADD_COL 216364#define COMBINE_EXT_COLOR 165#define COMBINE_EXT_ALPHA 266#define TEX_COMBINE_EXT_COLOR 167#define TEX_COMBINE_EXT_ALPHA 26869typedef struct70{71wxUint32 ccolor; // constant color to set at the end, color and alpha72wxUint32 c_fnc, c_fac, c_loc, c_oth; // grColorCombine flags73wxUint32 a_fnc, a_fac, a_loc, a_oth; // grAlphaCombine flags74wxUint32 tex, tmu0_func, tmu0_fac, tmu0_invert, tmu1_func, tmu1_fac, tmu1_invert;75wxUint32 tmu0_a_func, tmu0_a_fac, tmu0_a_invert, tmu1_a_func, tmu1_a_fac, tmu1_a_invert;76int dc0_lodbias, dc1_lodbias;77wxUint8 dc0_detailscale, dc1_detailscale;78float dc0_detailmax, dc1_detailmax;79float lodbias0, lodbias1;80wxUint32 abf1, abf2;81wxUint32 mod_0, modcolor_0, modcolor1_0, modcolor2_0, modfactor_0;82wxUint32 mod_1, modcolor_1, modcolor1_1, modcolor2_1, modfactor_1;83//combine extensions84wxUint32 c_ext_a, c_ext_a_mode, c_ext_b, c_ext_b_mode, c_ext_c, c_ext_d;85int c_ext_c_invert, c_ext_d_invert;86wxUint32 a_ext_a, a_ext_a_mode, a_ext_b, a_ext_b_mode, a_ext_c, a_ext_d;87int a_ext_c_invert, a_ext_d_invert;88wxUint32 t0c_ext_a, t0c_ext_a_mode, t0c_ext_b, t0c_ext_b_mode, t0c_ext_c, t0c_ext_d;89int t0c_ext_c_invert, t0c_ext_d_invert;90wxUint32 t0a_ext_a, t0a_ext_a_mode, t0a_ext_b, t0a_ext_b_mode, t0a_ext_c, t0a_ext_d;91int t0a_ext_c_invert, t0a_ext_d_invert;92wxUint32 t1c_ext_a, t1c_ext_a_mode, t1c_ext_b, t1c_ext_b_mode, t1c_ext_c, t1c_ext_d;93int t1c_ext_c_invert, t1c_ext_d_invert;94wxUint32 t1a_ext_a, t1a_ext_a_mode, t1a_ext_b, t1a_ext_b_mode, t1a_ext_c, t1a_ext_d;95int t1a_ext_c_invert, t1a_ext_d_invert;96GRCOLORCOMBINEEXT grColorCombineExt;97GRCOLORCOMBINEEXT grAlphaCombineExt;98GRTEXCOLORCOMBINEEXT grTexColorCombineExt;99GRTEXCOLORCOMBINEEXT grTexAlphaCombineExt;100GRCONSTANTCOLORVALUEEXT grConstantColorValueExt;101wxUint32 tex_ccolor;102int combine_ext;103wxUint8 cmb_ext_use;104wxUint8 tex_cmb_ext_use;105wxUint32 shade_mod_hash;106} COMBINE;107108extern COMBINE cmb;109110void Combine ();111void CombineBlender ();112void CountCombine ();113void InitCombine ();114void ColorCombinerToExtension ();115void AlphaCombinerToExtension ();116void TexColorCombinerToExtension (GrChipID_t tmu);117void TexAlphaCombinerToExtension (GrChipID_t tmu);118119#endif //COMBINE _H120121122