[mupen64plus-video-arachnoid] 07/147: Imported Upstream version 1.99.4~hg20100403

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:09:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch master
in repository mupen64plus-video-arachnoid.

commit 930d6a542fa9a2b2dd11ba2d0b4fac0bcf851f16
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date:   Sun Apr 4 21:44:12 2010 +0200

    Imported Upstream version 1.99.4~hg20100403
---
 projects/msvc9/GraphicsPlugin.vcproj |   7 +-
 projects/unix/Makefile               |  37 ++++-
 src/Assembler/assembler.h            | 270 +----------------------------------
 src/GraphicsPlugin.cpp               |  27 +++-
 src/GraphicsPlugin.h                 |   2 +-
 src/RSP/RSPVertexManager.cpp         |  20 +--
 src/config/Config.cpp                |   6 +
 src/config/ConfigMap.h               |   1 +
 src/main.cpp                         |  11 +-
 src/ucodes/UCodeSelector.cpp         |   2 +-
 src/video_api_export.ver             |  21 +++
 11 files changed, 95 insertions(+), 309 deletions(-)

diff --git a/projects/msvc9/GraphicsPlugin.vcproj b/projects/msvc9/GraphicsPlugin.vcproj
index 15f9b1f..55420cf 100644
--- a/projects/msvc9/GraphicsPlugin.vcproj
+++ b/projects/msvc9/GraphicsPlugin.vcproj
@@ -29,6 +29,7 @@
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
+				CommandLine=""
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -46,7 +47,7 @@
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GRAPHICSPLUGIN_EXPORTS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
+				RuntimeLibrary="3"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
@@ -93,7 +94,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				CommandLine=""
+				CommandLine="copy "$(TargetPath)" "$(SolutionDir)..\..\..\mupen64plus-ui-console\projects\msvc8\$(ConfigurationName)""
 			/>
 		</Configuration>
 		<Configuration
@@ -109,6 +110,7 @@
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
+				CommandLine="copy "$(TargetPath)" "$(SolutionDir)..\..\..\mupen64plus-ui-console\projects\msvc8\$(ConfigurationName)"&#x0D;&#x0A;"
 			/>
 			<Tool
 				Name="VCXMLDataGeneratorTool"
@@ -171,6 +173,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine="copy "$(TargetPath)" "$(SolutionDir)..\..\..\mupen64plus-ui-console\projects\msvc8\$(ConfigurationName)""
 			/>
 		</Configuration>
 	</Configurations>
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index 60332be..f452fd6 100644
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -43,6 +43,11 @@ ifeq ("$(UNAME)","FreeBSD")
   SO_EXTENSION = so
   SHARED = -shared
 endif
+ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
+  OS = LINUX
+  SO_EXTENSION = so
+  SHARED = -shared
+endif
 
 # detect system architecture
 HOST_CPU ?= $(shell uname -m)
@@ -69,13 +74,14 @@ ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
 endif
 
 # base CFLAGS, LIBS, and LDFLAGS
-CFLAGS = -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src \
+CFLAGS += -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -fvisibility=hidden -I../../src \
 		 -I../../src/hash -I../../src/ucodes -I../../src/GBI -I../../src/RDP -I../../src/utils \
 		 -I../../src/log -I../../src/RSP -I../../src/framebuffer -I../../src/math -I../../src/renderer \
 		 -I../../src/Assembler -I../../src/texture -I../../src/config -I../../src/Combiner 
 ifneq ($(OS), FREEBSD)
   CFLAGS += -pipe -O3
 endif
+CXXFLAGS += -fvisibility-inlines-hidden
 
 # On OS X, add a few extra flags to elegantly support cross-compilation and backward
 # compatibility (and also the flags to link against OpenGL)
@@ -120,6 +126,10 @@ else
 endif
 
 # set special flags per-system
+ifeq ($(OS), LINUX)
+  # only export api symbols
+  LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
+endif
 ifneq ($(OS), FREEBSD)
   ifeq ($(CPU), X86)
     ifeq ($(ARCH_DETECTED), 64BITS)
@@ -146,7 +156,6 @@ endif
 # set shell function names
 CC      ?= gcc
 CXX     ?= g++
-LD      ?= g++
 INSTALL ?= install
 ifeq ($(OS),LINUX)
   STRIP	= strip -s
@@ -257,6 +266,7 @@ targets:
 	@echo "    DESTDIR=path  == path to prepend to all installation paths (only for packagers)"
 	@echo "  Debugging Options:"
 	@echo "    DEBUG=1       == add debugging symbols"
+	@echo "    V=1           == show verbose compiler output"
 
 all: $(TARGET)
 
@@ -271,15 +281,28 @@ uninstall:
 clean:
 	rm -rf ./_obj mupen64plus-video-arachnoid.$(SO_EXTENSION)
 
-# build rules
+# build dependency files
+CFLAGS += -MD
+-include $(OBJECTS:.o=.d)
 
+CXXFLAGS += $(CFLAGS)
+
+# reduced compile output when running make without V=1
+ifneq ($(findstring $(MAKEFLAGS),s),s)
+ifndef V
+	Q_CC  = @echo '    CC  '$@;
+	Q_CXX = @echo '    CXX '$@;
+	Q_LD  = @echo '    LD  '$@;
+endif
+endif
+
+# build rules
 $(TARGET): $(OBJECTS)
-	$(CXX) $(SHARED) $^ $(LDFLAGS) -o $@
+	$(Q_LD)$(CXX) $(SHARED) $^ $(LDFLAGS) -o $@
 	$(STRIP) $@
 
 $(OBJDIR)/%.o: $(SRCDIR)/%.c
-	$(CC) -o $@ $(CFLAGS) -c $<
+	$(Q_CC)$(CC) -o $@ $(CFLAGS) -c $<
 
 $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
-	$(CXX) -o $@ $(CFLAGS) -c $<
-
+	$(Q_CXX)$(CXX) -o $@ $(CXXFLAGS) -c $<
diff --git a/src/Assembler/assembler.h b/src/Assembler/assembler.h
index 2999d33..60f7741 100644
--- a/src/Assembler/assembler.h
+++ b/src/Assembler/assembler.h
@@ -26,37 +26,11 @@
 #ifndef WIN32
 #include <cstring>
 #endif
-
 // Swap bytes from 80 37 12 40
 // to              40 12 37 80
 // dwLen must be a multiple of 4
 inline void swapRomHeaderBytes(void *v, unsigned int dwLen)
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        esi, v
-        mov        edi, v
-        mov        ecx, dwLen
-
-        add        edi, ecx
-
-top:
-        mov        al, byte ptr [esi + 0]
-        mov        bl, byte ptr [esi + 1]
-        mov        cl, byte ptr [esi + 2]
-        mov        dl, byte ptr [esi + 3]
-
-        mov        byte ptr [esi + 0], dl        //3
-        mov        byte ptr [esi + 1], cl        //2
-        mov        byte ptr [esi + 2], bl        //1
-        mov        byte ptr [esi + 3], al        //0
-
-        add        esi, 4
-        cmp        esi, edi
-        jne        top
-    }
-#else
     int *b = (int*)v;
     dwLen /= 4;
     for (int i = 0; i < dwLen; ++i)
@@ -65,26 +39,17 @@ top:
         b[i] = ((tmp & 0xff000000) >> 24) | ((tmp & 0x00ff0000) >>  8) |               \
                ((tmp & 0x0000ff00) <<  8) | ((tmp & 0x000000ff) << 24);
     }
-#endif
 }
 
 
 inline unsigned short swapword( unsigned short value )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ax, word ptr [value]
-        xchg       ah, al
-    }
-#else
     return (value >> 8) | (value << 8);
-#endif
 }
 
 inline void UnswapCopy( void *src, void *dest, unsigned int numBytes )
 {
-#ifdef WIN32
+#ifdef WIN32_ASM
     __asm
     {
         mov        ecx, 0
@@ -171,7 +136,7 @@ Done:
 
 inline void DWordInterleave( void *mem, unsigned int numDWords )
 {
-#ifdef WIN32
+#ifdef WIN32_ASM
     __asm {
         mov        esi, dword ptr [mem]
         mov        edi, dword ptr [mem]
@@ -199,7 +164,7 @@ DWordInterleaveLoop:
 
 inline void QWordInterleave( void *mem, unsigned int numDWords )
 {
-#ifdef WIN32
+#ifdef WIN32_ASM
     __asm
     {
     // Interleave the line on the qword
@@ -335,65 +300,12 @@ const unsigned char One2Eight[2] =
 
 inline unsigned short RGBA8888_RGBA4444( unsigned int color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ebx, dword ptr [color]
-        // R
-        and        bl, 0F0h
-        mov        ah, bl
-
-        // G
-        shr        bh, 4
-        or         ah, bh
-
-        bswap      ebx
-
-        // B
-        and        bh, 0F0h
-        mov        al, bh
-
-        // A
-        shr        bl, 4
-        or         al, bl
-    }
-#else
     return ((color & 0xF0000000) >> 28) | ((color & 0x00F00000) >> 16) |
            ((color & 0x0000F000) >>  4) | ((color & 0x000000F0) << 8);
-#endif
 }
 
 inline unsigned int RGBA5551_RGBA8888( unsigned short color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ebx, 00000000h
-        mov        cx, word ptr [color]
-        xchg       cl, ch
-
-        mov        bx, cx
-        and        bx, 01h
-        mov        al, byte ptr [One2Eight+ebx]
-
-        mov        bx, cx
-        shr        bx, 01h
-        and        bx, 1Fh
-        mov        ah, byte ptr [Five2Eight+ebx]
-
-        bswap      eax
-
-        mov        bx, cx
-        shr        bx, 06h
-        and        bx, 1Fh
-        mov        ah, byte ptr [Five2Eight+ebx]
-
-        mov        bx, cx
-        shr        bx, 0Bh
-        and        bx, 1Fh
-        mov        al, byte ptr [Five2Eight+ebx]
-    }
-#else
     int rgba;
     char *p = (char*)&rgba;
     color = (color >> 8) | (color << 8);
@@ -402,247 +314,71 @@ inline unsigned int RGBA5551_RGBA8888( unsigned short color )
     p[1] = Five2Eight[color >> 6 & 0x1f];
     p[0] = Five2Eight[color >> 11 & 0x1f];
     return rgba;
-
-#endif
 }
 
 // Just swaps the word
 inline unsigned short RGBA5551_RGBA5551( unsigned short color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ax, word ptr [color]
-        xchg       ah, al
-    }
-#else
     return (color >> 8) | (color << 8);
-#endif
 }
 
 inline unsigned int IA88_RGBA8888( unsigned short color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        cx, word ptr [color]
-
-        mov        al, ch
-        mov        ah, cl
-
-        bswap      eax
-
-        mov        ah, cl
-        mov        al, cl
-    }
-#else
     return (color & 0xFF) | ((color & 0xFF) << 8) | (color << 16);
-#endif
 }
 
 inline unsigned short IA88_RGBA4444( unsigned short color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        cx, word ptr [color]
-
-        shr        cl, 4
-        mov        ah, cl
-        shl        cl, 4
-        or         ah, cl
-        mov        al, cl
-
-        shr        ch, 4
-        or         al, ch
-    }
-#else
     unsigned char b = color & 0xf0;
     return (color >> 12) | b | (b << 4) | (b << 8);
-#endif
 }
 
 inline unsigned short IA44_RGBA4444( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        cl, byte ptr [color]
-        mov        al, cl
-
-        shr        cl, 4
-        mov        ah, cl
-        shl        cl, 4
-        or         ah, cl
-    }
-#else
     unsigned char b = color >> 4;
     return color | (b << 8) | (b << 12);
-#endif
 }
 
 inline unsigned int IA44_RGBA8888( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ebx, 00000000h
-        mov        cl, byte ptr [color]
-
-        mov        bl, cl
-        shr        bl, 04h
-        mov        ch, byte ptr [Four2Eight+ebx]
-
-        mov        bl, cl
-        and        bl, 0Fh
-        mov        cl, byte ptr [Four2Eight+ebx]
-
-        mov        al, cl
-        mov        ah, ch
-
-        bswap      eax
-
-        mov        ah, ch
-        mov        al, ch
-    }
-#else
     unsigned char b1 = color >> 4;
     unsigned char b2 = color & 0x0f;
     return b1 | (b1 << 4) | (b1 << 8) | (b1 << 12) | (b1 << 16) | (b1 << 20) | (b2 << 24) | (b2 << 28);
-#endif
 }
 
 inline unsigned short IA31_RGBA4444( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ebx, 00000000h
-        mov        cl, byte ptr [color]
-
-        mov        bl, cl
-        shr        bl, 01h
-        mov        ch, byte ptr [Three2Four+ebx]
-        mov        ah, ch
-        shl        ch, 4
-        or         ah, ch
-        mov        al, ch
-
-        mov        bl, cl
-        and        bl, 01h
-        mov        ch, byte ptr [One2Four+ebx]
-        or         al, ch
-    }
-#else
     unsigned char t = Three2Four[color >> 1];
     return One2Four[color & 1] | (t << 4) | (t << 8) | (t << 12); 
-#endif
 }
 
 inline unsigned int IA31_RGBA8888( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ebx, 00000000h
-        mov        cl, byte ptr [color]
-
-        mov        bl, cl
-        shr        bl, 01h
-        mov        ch, byte ptr [Three2Eight+ebx]
-
-        mov        bl, cl
-        and        bl, 01h
-        mov        cl, byte ptr [One2Eight+ebx]
-
-        mov        al, cl
-        mov        ah, ch
-
-        bswap      eax
-
-        mov        ah, ch
-        mov        al, ch
-    }
-#else
     unsigned char t = Three2Eight[color >> 1];
     return t | (t << 8) | (t << 16) | (One2Eight[color & 1] << 24);
-#endif
 }
 
 inline unsigned short I8_RGBA4444( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        cl, byte ptr [color]
-
-        shr        cl, 4
-        mov        al, cl
-        shl        cl, 4
-        or         al, cl
-        mov        ah, al
-    }
-#else
     color &= 0xf0;
     return (color >> 4) | color | (color << 4) | (color << 8);
-#endif
 }
 
 inline unsigned int I8_RGBA8888( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        cl, byte ptr [color]
-
-        mov        al, cl
-        mov        ah, cl
-        bswap      eax
-        mov        ah, cl
-        mov        al, cl
-    }
-#else
     return color | (color << 8) | (color << 16) | (color << 24);
-#endif
 }
 
 inline unsigned short I4_RGBA4444( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        cl, byte ptr [color]
-        mov        al, cl
-        shl        cl, 4
-        or         al, cl
-        mov        ah, al
-    }
-#else
     color &= 0x0f;
     return color | (color << 4) | (color << 8) | (color << 12);
-#endif
 }
 
 inline unsigned int I4_RGBA8888( unsigned char color )
 {
-#ifdef WIN32
-    __asm
-    {
-        mov        ebx, 00000000h
-
-        mov        bl, byte ptr [color]
-        mov        cl, byte ptr [Four2Eight+ebx]
-
-        mov        al, cl
-        mov        ah, cl
-        bswap      eax
-        mov        ah, cl
-        mov        al, cl
-    }
-#else
     unsigned char b = Four2Eight[color];
     return b | (b << 8) | (b << 16) | (b << 24);
-#endif
 }
 
 #endif
diff --git a/src/GraphicsPlugin.cpp b/src/GraphicsPlugin.cpp
index 4754a4a..c0641b8 100644
--- a/src/GraphicsPlugin.cpp
+++ b/src/GraphicsPlugin.cpp
@@ -72,6 +72,19 @@ bool GraphicsPlugin::initialize(GFX_INFO* graphicsInfo)
     m_romDetector = &ROMDetector::getSingleton();        
     m_romDetector->initialize( m_graphicsInfo->HEADER );
 
+    if (m_config->multiSampling > 0)
+    {
+        CoreVideo_GL_SetAttribute(M64P_GL_MULTISAMPLEBUFFERS, 1);
+        if (m_config->multiSampling <= 2)
+            CoreVideo_GL_SetAttribute(M64P_GL_MULTISAMPLESAMPLES, 2);
+        else if (m_config->multiSampling <= 4)
+            CoreVideo_GL_SetAttribute(M64P_GL_MULTISAMPLESAMPLES, 4);
+        else if (m_config->multiSampling <= 8)
+            CoreVideo_GL_SetAttribute(M64P_GL_MULTISAMPLESAMPLES, 8);
+        else
+            CoreVideo_GL_SetAttribute(M64P_GL_MULTISAMPLESAMPLES, 16);
+    }
+
     if (CoreVideo_GL_SetAttribute(M64P_GL_DOUBLEBUFFER, 1) != M64ERR_SUCCESS ||
         CoreVideo_GL_SetAttribute(M64P_GL_BUFFER_SIZE, 32) != M64ERR_SUCCESS ||
         CoreVideo_GL_SetAttribute(M64P_GL_DEPTH_SIZE, 24)  != M64ERR_SUCCESS)
@@ -490,14 +503,18 @@ void GraphicsPlugin::toggleFullscreen()
 //-----------------------------------------------------------------------------
 // Take Screenshot
 //-----------------------------------------------------------------------------
-void GraphicsPlugin::takeScreenshot(void **dest, int *width, int *height)
+void GraphicsPlugin::takeScreenshot(void *dest, int *width, int *height, int front)
 {
     *width = m_config->windowWidth;
     *height = m_config->windowHeight;
-    //TODO: why does this crash?
-    //*dest = malloc(*width * *height * 3);
-    //glReadBuffer(GL_FRONT);
-    //glReadPixels(0, 0, *width, *height, GL_RGB, GL_UNSIGNED_BYTE, *dest);
+    if (dest)
+    {
+        if (front)
+            glReadBuffer(GL_FRONT);
+        else
+            glReadBuffer(GL_BACK);
+        glReadPixels(0, 0, *width, *height, GL_RGB, GL_UNSIGNED_BYTE, dest);
+    }
 }
 
 //-----------------------------------------------------------------------------
diff --git a/src/GraphicsPlugin.h b/src/GraphicsPlugin.h
index 3792056..ba2ddf0 100644
--- a/src/GraphicsPlugin.h
+++ b/src/GraphicsPlugin.h
@@ -65,7 +65,7 @@ public:
     void toggleFullscreen();
 
     //Take Screenshot
-    void takeScreenshot(void **dest, int *width, int *height);
+    void takeScreenshot(void *dest, int *width, int *height, int front);
 
     //Called when the video interface has been changed
     void viStatusChanged();
diff --git a/src/RSP/RSPVertexManager.cpp b/src/RSP/RSPVertexManager.cpp
index 4505aec..5d449cb 100644
--- a/src/RSP/RSPVertexManager.cpp
+++ b/src/RSP/RSPVertexManager.cpp
@@ -261,7 +261,7 @@ void RSPVertexManager::DMAVertex( unsigned int v, unsigned int numVertices, unsi
 
     if ((numVertices + firstVertexIndex) < (80))
     {
-        for (int i = firstVertexIndex; i < numVertices + firstVertexIndex; i++)
+        for (unsigned int i = firstVertexIndex; i < numVertices + firstVertexIndex; i++)
         {
             m_vertices[i].x = *(short*)&RDRAM[address ^ 2];
             m_vertices[i].y = *(short*)&RDRAM[(address + 2) ^ 2];
@@ -424,25 +424,7 @@ void RSPVertexManager::add1Quadrangle( int v0, int v1, int v2, int v4 )
 inline float DotProduct( float* v0, float* v1 )
 {
     float    dot;
-#ifdef WIN32
-    __asm {
-        mov        esi, dword ptr [v0]
-        mov        edi, dword ptr [v1]
-        lea        ebx, [dot]
-
-        fld        dword ptr [esi]
-        fmul    dword ptr [edi]
-        fld        dword ptr [esi+04h]
-        fmul    dword ptr [edi+04h]
-        fld        dword ptr [esi+08h]
-        fmul    dword ptr [edi+08h]
-        fadd
-        fadd
-        fstp    dword ptr [ebx]
-    }
-#else
     dot = v0[0] * v1[0] + v0[1] * v1[1] + v0[2] * v1[2];
-#endif
     return dot;
 }
 
diff --git a/src/config/Config.cpp b/src/config/Config.cpp
index f2d23b3..d35aae6 100644
--- a/src/config/Config.cpp
+++ b/src/config/Config.cpp
@@ -57,7 +57,12 @@ bool Config::initialize()
     ConfigSetDefaultInt(m_videoArachnoidSection, "TextureCacheSize", 15 * (1024 * 1024), "Size of texture cache used to store textures");
     ConfigSetDefaultBool(m_videoArachnoidSection, "Wireframe", false, "Render in wireframe?");
     ConfigSetDefaultBool(m_videoArachnoidSection, "Fog", false, "Render fog?");
+    ConfigSetDefaultInt(m_videoArachnoidSection, "MultiSampling", 0, "Use MultiSampling? 0=no 2,4,8,16=quality");
+#ifdef WIN32
+    ConfigSetDefaultInt(m_videoArachnoidSection, "ScreenUpdateSetting", SCREEN_UPDATE_CI, "When to update the screen: 1 - on VI, 2 - on first CI");
+#else
     ConfigSetDefaultInt(m_videoArachnoidSection, "ScreenUpdateSetting", SCREEN_UPDATE_VI, "When to update the screen: 1 - on VI, 2 - on first CI");
+#endif
     return true;
 }
 
@@ -73,5 +78,6 @@ void Config::load()
     m_cfg.textureCacheSize      = ConfigGetParamInt(m_videoArachnoidSection, "TextureCacheSize");
     m_cfg.wireframe             = ConfigGetParamBool(m_videoArachnoidSection, "Wireframe");
     m_cfg.fog                   = ConfigGetParamBool(m_videoArachnoidSection, "Fog");
+    m_cfg.multiSampling         = ConfigGetParamBool(m_videoArachnoidSection, "MultiSampling");
     m_cfg.screenUpdateSetting   = ConfigGetParamInt(m_videoArachnoidSection, "ScreenUpdateSetting");
 }
diff --git a/src/config/ConfigMap.h b/src/config/ConfigMap.h
index 99f00f5..e975ff5 100644
--- a/src/config/ConfigMap.h
+++ b/src/config/ConfigMap.h
@@ -38,6 +38,7 @@ struct ConfigMap
     int  textureCacheSize;       //!< Size of texture cache used to store textures, default = 15 MB
     bool wireframe;              //!< Render in wireframe?                          defualt = false
     bool fog;                    //!< Render fog?                                   default = true
+    int  multiSampling;          //!< Use MultiSampling? 0=no 2,4,8,16=quality      default = 0
     int  screenUpdateSetting;    //!< When to redraw the screen                     default = SCREEN_UPDATE_VI
 };
 
diff --git a/src/main.cpp b/src/main.cpp
index b3eb71a..a408ba3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -36,7 +36,7 @@
 
 //Definitions
 #define PLUGIN_NAME "Arachnoid Video Plugin"
-#define PLUGIN_VERSION 0x016302
+#define PLUGIN_VERSION 0x016303
 
 #define MI_INTR_DP 0x00000020      //!< RDP Interrupt signal
 #define MI_INTR_SP 0x00000001      //!< RSP Interrupt signal
@@ -220,9 +220,6 @@ EXPORT BOOL CALL InitiateGFX(GFX_INFO Gfx_Info)
 //-----------------------------------------------------------------------------
 EXPORT int CALL RomOpen()
 {    
-    //TODO: RomOpen seems to be the proper place to initialize everything
-    //(instead of InitiateGFX), but some light refactoring will be necessary
-    //in order to do this
     Logger::getSingleton().printMsg("RomOpen\n");
     return g_graphicsPlugin.initialize(&g_graphicsInfo);
 }
@@ -361,12 +358,12 @@ EXPORT void CALL ChangeWindow()
 }
 
 //-----------------------------------------------------------------------------
-//* ReadScreen
+//* ReadScreen2
 //! This function reads the pixels of the currently displayed screen
 //-----------------------------------------------------------------------------
-EXPORT void CALL ReadScreen(void **dest, int *width, int *height)
+EXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int front)
 {
-    g_graphicsPlugin.takeScreenshot(dest, width, height);
+    g_graphicsPlugin.takeScreenshot(dest, width, height, front);
 }
 
 //-----------------------------------------------------------------------------
diff --git a/src/ucodes/UCodeSelector.cpp b/src/ucodes/UCodeSelector.cpp
index ad60dc2..13478b3 100644
--- a/src/ucodes/UCodeSelector.cpp
+++ b/src/ucodes/UCodeSelector.cpp
@@ -205,7 +205,7 @@ int UCodeSelector::_detectUCodeFromString(const char ucodeStr[500])
         //If v2.x
         else if( strstr(ucodeStr,"2.") != 0 )
         {
-            (!strstr(ucodeStr,"S2DEX")) ? 3 : 5;
+            return (!strstr(ucodeStr,"S2DEX")) ? 3 : 5;
         }
     }
 
diff --git a/src/video_api_export.ver b/src/video_api_export.ver
new file mode 100644
index 0000000..557b009
--- /dev/null
+++ b/src/video_api_export.ver
@@ -0,0 +1,21 @@
+{ global:
+PluginStartup;
+PluginShutdown;
+PluginGetVersion;
+ChangeWindow;
+InitiateGFX;
+MoveScreen;
+ProcessDList;
+ProcessRDPList;
+RomClosed;
+RomOpen;
+ShowCFB;
+UpdateScreen;
+ViStatusChanged;
+ViWidthChanged;
+ReadScreen2;
+SetRenderingCallback;
+FBRead;
+FBWrite;
+FBGetFrameBufferInfo;
+local: *; };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-arachnoid.git



More information about the Pkg-games-commits mailing list