예제 #1
0
 private void writeGeTexture(int texture, int value)
 {
     if (ExternalGE.Active)
     {
         ExternalGE.setMatrix(sceGe_user.PSP_GE_MATRIX_TEXGEN, texture, Float.intBitsToFloat(value << 8));
     }
 }
예제 #2
0
 private void writeGeView(int view, int value)
 {
     if (ExternalGE.Active)
     {
         ExternalGE.setMatrix(sceGe_user.PSP_GE_MATRIX_VIEW, view, Float.intBitsToFloat(value << 8));
     }
 }
예제 #3
0
 private void writeGeProjection(int projection, int value)
 {
     if (ExternalGE.Active)
     {
         ExternalGE.setMatrix(sceGe_user.PSP_GE_MATRIX_PROJECTION, projection, Float.intBitsToFloat(value << 8));
     }
 }
예제 #4
0
 private void writeGeWorld(int world, int value)
 {
     if (ExternalGE.Active)
     {
         ExternalGE.setMatrix(sceGe_user.PSP_GE_MATRIX_WORLD, world, Float.intBitsToFloat(value << 8));
     }
 }
예제 #5
0
 private void writeGeBone(int bone, int value)
 {
     if (ExternalGE.Active)
     {
         ExternalGE.setMatrix(sceGe_user.PSP_GE_MATRIX_BONE0 + (bone / 12), bone % 12, Float.intBitsToFloat(value << 8));
     }
 }
예제 #6
0
 private void writeGeCmd(int cmd, int value)
 {
     if (ExternalGE.Active)
     {
         ExternalGE.setCmd(cmd, value);
         if (GeCommands.pureStateCommands[cmd])
         {
             ExternalGE.interpretCmd(cmd, value);
         }
     }
 }
예제 #7
0
        private int readGeCmd(int cmd)
        {
            int value = 0;

            if (ExternalGE.Active)
            {
                value = ExternalGE.getCmd(cmd);
            }

            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("readGeCmd({0})=0x{1:X8}", GeCommands.Instance.getCommandString(cmd), value));
            }

            return(value);
        }
예제 #8
0
        private int readMatrix(int matrixType, int matrixIndex)
        {
            float[] matrix = null;
            if (ExternalGE.Active)
            {
                matrix = ExternalGE.getMatrix(matrixType);
            }

            if (matrix == null || matrixIndex < 0 || matrixIndex >= matrix.Length)
            {
                return(0);
            }

            int value = (int)((uint)Float.floatToRawIntBits(matrix[matrixIndex]) >> 8);

            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("readMatrix(matrixType={0:D}, matrixIndex={1:D})=0x{2:X}({3:F})", matrixType, matrixIndex, value, matrix[matrixIndex]));
            }

            return(value);
        }