Path: blob/master/libmupen64plus/mupen64plus-video-rice/src/CNvTNTCombiner.h
2 views
/*1Copyright (C) 2003 Rice196423This program is free software; you can redistribute it and/or4modify it under the terms of the GNU General Public License5as published by the Free Software Foundation; either version 26of the License, or (at your option) any later version.78This program is distributed in the hope that it will be useful,9but WITHOUT ANY WARRANTY; without even the implied warranty of10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11GNU General Public License for more details.1213You should have received a copy of the GNU General Public License14along with this program; if not, write to the Free Software15Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.16*/1718#ifndef _NVIDIA_TNT_COMBINER_H_19#define _NVIDIA_TNT_COMBINER_H_2021#include <vector>2223#include "Combiner.h"2425typedef struct26{27uint8 arg0;28uint8 arg1;29uint8 arg2;30uint8 arg3;31} TNT2CombType;3233typedef struct {34union {35struct {36unsigned int rgbOp;37unsigned int alphaOp;38};39unsigned int ops[2];40};4142union {43struct {44uint8 rgbArg0;45uint8 rgbArg1;46uint8 rgbArg2;47uint8 rgbArg3;48uint8 alphaArg0;49uint8 alphaArg1;50uint8 alphaArg2;51uint8 alphaArg3;52};53TNT2CombType Combs[2];54uint8 args[2][4];55};5657int constant;58} TNT2CombinerType;5960typedef struct {61uint32 dwMux0;62uint32 dwMux1;63union {64struct {65TNT2CombinerType unit1;66TNT2CombinerType unit2;67};68TNT2CombinerType units[2];69};70int numOfUnits;71} TNT2CombinerSaveType;7273class CNvTNTCombiner74{75protected:76CNvTNTCombiner();77virtual ~CNvTNTCombiner();7879int FindCompiledMux();80int ParseDecodedMux(); // Compile the decodedMux into NV register combiner setting81virtual void ParseDecodedMuxForConstants(TNT2CombinerSaveType &res);82int SaveParserResult(TNT2CombinerSaveType &result);8384#ifdef DEBUGGER85void DisplaySimpleMuxString();86#endif87std::vector<TNT2CombinerSaveType> m_vCompiledTNTSettings;88int m_lastIndexTNT;89DecodedMux **m_ppDecodedMux;90};9192#endif93949596