| 1 | /****************************************************************************** |
| 2 | * Arachnoid Graphics Plugin for Mupen64Plus |
| 3 | * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/ |
| 4 | * |
| 5 | * Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation; either version 2 |
| 10 | * of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 20 | *****************************************************************************/ |
| 21 | |
| 22 | #ifndef RDP_INSTRUCTIONS_H_ |
| 23 | #define RDP_INSTRUCTIONS_H_ |
| 24 | |
| 25 | #include "UCodeDefs.h" |
| 26 | |
| 27 | //Forward declarations |
| 28 | class RDP; |
| 29 | class DisplayListParser; |
| 30 | |
| 31 | //***************************************************************************** |
| 32 | //* RDP Instructions |
| 33 | //! Class for reciveing RDP instructions, and forward them to the RDP |
| 34 | //***************************************************************************** |
| 35 | class RDPInstructions |
| 36 | { |
| 37 | public: |
| 38 | |
| 39 | //Constructor / Destructor |
| 40 | RDPInstructions(); |
| 41 | ~RDPInstructions(); |
| 42 | |
| 43 | //Initialize |
| 44 | bool initialize(RDP* rdp, DisplayListParser* displayListParser); |
| 45 | |
| 46 | //Texturing |
| 47 | static void RDP_SetCImg(MicrocodeArgument* ucode); |
| 48 | static void RDP_SetZImg(MicrocodeArgument* ucode); |
| 49 | static void RDP_SetTImg(MicrocodeArgument* ucode); |
| 50 | static void RDP_SetTile(MicrocodeArgument* ucode); |
| 51 | static void RDP_SetTileSize(MicrocodeArgument* ucode); |
| 52 | static void RDP_LoadTile(MicrocodeArgument* ucode); |
| 53 | static void RDP_LoadBlock(MicrocodeArgument* ucode); |
| 54 | static void RDP_LoadTLUT(MicrocodeArgument* ucode); |
| 55 | |
| 56 | //Rendering |
| 57 | static void RDP_TexRectFlip(MicrocodeArgument* ucode); |
| 58 | static void RDP_TexRect(MicrocodeArgument* ucode); |
| 59 | static void RDP_FillRect(MicrocodeArgument* ucode); |
| 60 | |
| 61 | //Colors |
| 62 | static void RDP_SetEnvColor(MicrocodeArgument* ucode); |
| 63 | static void RDP_SetPrimColor(MicrocodeArgument* ucode); |
| 64 | static void RDP_SetBlendColor(MicrocodeArgument* ucode); |
| 65 | static void RDP_SetFogColor(MicrocodeArgument* ucode); |
| 66 | static void RDP_SetFillColor(MicrocodeArgument* ucode); |
| 67 | |
| 68 | //Combiner |
| 69 | static void RDP_SetCombine(MicrocodeArgument* ucode); |
| 70 | |
| 71 | //Misc |
| 72 | static void RDP_SetOtherMode(MicrocodeArgument* ucode); |
| 73 | static void RDP_SetPrimDepth(MicrocodeArgument* ucode); |
| 74 | static void RDP_SetScissor(MicrocodeArgument* ucode); |
| 75 | |
| 76 | //Sync |
| 77 | static void RDP_FullSync(MicrocodeArgument* ucode); |
| 78 | |
| 79 | //Unimportant |
| 80 | static void RDP_TileSync(MicrocodeArgument* ucode); |
| 81 | static void RDP_PipeSync(MicrocodeArgument* ucode); |
| 82 | static void RDP_LoadSync(MicrocodeArgument* ucode); |
| 83 | static void RDP_SetConvert(MicrocodeArgument* ucode); |
| 84 | static void RDP_SetKeyR(MicrocodeArgument* ucode); |
| 85 | static void RDP_SetKeyGB(MicrocodeArgument* ucode); |
| 86 | static void RDP_Unknown(MicrocodeArgument* ucode); |
| 87 | static void RDP_NoOp(MicrocodeArgument* ucode); |
| 88 | |
| 89 | private: |
| 90 | |
| 91 | static RDP* m_rdp; //!< Pointer to Reality Drawing Processor |
| 92 | static DisplayListParser* m_displayListParser; //!< Pointer to displaylist parser |
| 93 | |
| 94 | }; |
| 95 | |
| 96 | #endif |