Path: blob/master/libmupen64plus/mupen64plus-video-glide64/src/Combine.h
2 views
/*1* Glide64 - Glide video plugin for Nintendo 64 emulators.2* Copyright (c) 2002 Dave20013*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12* GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public15* Licence along with this program; if not, write to the Free16* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,17* Boston, MA 02110-1301, USA18*/1920//****************************************************************21//22// Glide64 - Glide Plugin for Nintendo 64 emulators (tested mostly with Project64)23// Project started on December 29th, 200124//25// To modify Glide64:26// * 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.27// * 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.28//29// Official Glide64 development channel: #Glide64 on EFnet30//31// Original author: Dave2001 ([email protected])32// Other authors: Gonetz, Gugaman33//34//****************************************************************35#ifndef COMBINE_H36#define COMBINE_H37#include "Gfx1.3.h"3839// texture MOD types40#define TMOD_TEX_INTER_COLOR_USING_FACTOR 141#define TMOD_TEX_INTER_COL_USING_COL1 242#define TMOD_FULL_COLOR_SUB_TEX 343#define TMOD_COL_INTER_COL1_USING_TEX 444#define TMOD_COL_INTER_COL1_USING_TEXA 545#define TMOD_COL_INTER_COL1_USING_TEXA__MUL_TEX 646#define TMOD_COL_INTER_TEX_USING_TEXA 747#define TMOD_COL2_INTER__COL_INTER_COL1_USING_TEX__USING_TEXA 848#define TMOD_TEX_SCALE_FAC_ADD_FAC 949#define TMOD_TEX_SUB_COL_MUL_FAC_ADD_TEX 1050#define TMOD_TEX_SCALE_COL_ADD_COL 1151#define TMOD_TEX_ADD_COL 1252#define TMOD_TEX_SUB_COL 1353#define TMOD_TEX_SUB_COL_MUL_FAC 1454#define TMOD_COL_INTER_TEX_USING_COL1 1555#define TMOD_COL_MUL_TEXA_ADD_TEX 1656#define TMOD_COL_INTER_TEX_USING_TEX 1757#define TMOD_TEX_INTER_NOISE_USING_COL 1858#define TMOD_TEX_INTER_COL_USING_TEXA 1959#define TMOD_TEX_MUL_COL 2060#define TMOD_TEX_SCALE_FAC_ADD_COL 216162#define COMBINE_EXT_COLOR 163#define COMBINE_EXT_ALPHA 264#define TEX_COMBINE_EXT_COLOR 165#define TEX_COMBINE_EXT_ALPHA 26667typedef struct68{69DWORD ccolor; // constant color to set at the end, color and alpha70DWORD c_fnc, c_fac, c_loc, c_oth; // grColorCombine flags71DWORD a_fnc, a_fac, a_loc, a_oth; // grAlphaCombine flags72DWORD tex, tmu0_func, tmu0_fac, tmu0_invert, tmu1_func, tmu1_fac, tmu1_invert;73DWORD tmu0_a_func, tmu0_a_fac, tmu0_a_invert, tmu1_a_func, tmu1_a_fac, tmu1_a_invert;74int dc0_lodbias, dc1_lodbias;75BYTE dc0_detailscale, dc1_detailscale;76float dc0_detailmax, dc1_detailmax;77float lodbias0, lodbias1;78DWORD abf1, abf2;79DWORD mod_0, modcolor_0, modcolor1_0, modcolor2_0, modfactor_0;80DWORD mod_1, modcolor_1, modcolor1_1, modcolor2_1, modfactor_1;81//combine extensions82DWORD c_ext_a, c_ext_a_mode, c_ext_b, c_ext_b_mode, c_ext_c, c_ext_d;83BOOL c_ext_c_invert, c_ext_d_invert;84DWORD a_ext_a, a_ext_a_mode, a_ext_b, a_ext_b_mode, a_ext_c, a_ext_d;85BOOL a_ext_c_invert, a_ext_d_invert;86DWORD t0c_ext_a, t0c_ext_a_mode, t0c_ext_b, t0c_ext_b_mode, t0c_ext_c, t0c_ext_d;87BOOL t0c_ext_c_invert, t0c_ext_d_invert;88DWORD t0a_ext_a, t0a_ext_a_mode, t0a_ext_b, t0a_ext_b_mode, t0a_ext_c, t0a_ext_d;89BOOL t0a_ext_c_invert, t0a_ext_d_invert;90DWORD t1c_ext_a, t1c_ext_a_mode, t1c_ext_b, t1c_ext_b_mode, t1c_ext_c, t1c_ext_d;91BOOL t1c_ext_c_invert, t1c_ext_d_invert;92DWORD t1a_ext_a, t1a_ext_a_mode, t1a_ext_b, t1a_ext_b_mode, t1a_ext_c, t1a_ext_d;93BOOL t1a_ext_c_invert, t1a_ext_d_invert;94GRCOLORCOMBINEEXT grColorCombineExt;95GRCOLORCOMBINEEXT grAlphaCombineExt;96GRTEXCOLORCOMBINEEXT grTexColorCombineExt;97GRTEXCOLORCOMBINEEXT grTexAlphaCombineExt;98GRCONSTANTCOLORVALUEEXT grConstantColorValueExt;99DWORD tex_ccolor;100BOOL combine_ext;101BYTE cmb_ext_use;102BYTE tex_cmb_ext_use;103} COMBINE;104105extern COMBINE cmb;106107void Combine ();108void CombineBlender ();109void CountCombine ();110void InitCombine ();111void ColorCombinerToExtension ();112void AlphaCombinerToExtension ();113void TexColorCombinerToExtension (GrChipID_t tmu);114void TexAlphaCombinerToExtension (GrChipID_t tmu);115116#endif //COMBINE _H117118119120