示例#1
0
        public F3DEX2Interpreter(ROMHandler.ROMHandler rom)
        {
            ROM = rom;
            ActiveGLDL = new Stack<OpenGLHelpers.DisplayListEx>();

            InitializeParser();
            InitializeMacros();

            LastTriList = new List<SimpleTriangle>();

            VertexBuffer = new Vertex[32];
            rdphalf1 = GeometryMode = OtherModeH = LastComb0 = LastComb1 = 0;
            OtherModeL = SimpleF3DEX2.OtherModeL.Empty;
            mtxstack = new Stack<Matrix4d>();
            mtxstack.Push(Matrix4d.Identity);

            Textures = new Texture[2];
            Textures[0] = new Texture();
            Textures[1] = new Texture();
            palette = new Color4[256];
            texcache = new List<TextureCache>();
            activetex = 0;
            multitex = false;
            ScaleS = new float[2];
            ScaleT = new float[2];

            InitCombiner();
        }
示例#2
0
 public TextureCache(object tag, Texture tex, int glid)
 {
     Tag = tag;
     Format = tex.Format;
     Address = tex.Address;
     RealWidth = tex.RealWidth;
     RealHeight = tex.RealHeight;
     GLID = glid;
 }
示例#3
0
        private void CommandTexture(uint w0, uint w1)
        {
            /* Texture */
            activetex = 0;
            multitex = false;

            Textures[0] = new Texture();
            Textures[1] = new Texture();

            int s = General.ShiftR(w1, 16, 16);
            int t = General.ShiftR(w1, 0, 16);

            ScaleS[0] = ScaleS[1] = ((float)(s + 1) / 65536.0f);
            ScaleT[0] = ScaleT[1] = ((float)(t + 1) / 65536.0f);
        }