Recompile mupen dlls against VS2022
this also needed mupen deps updated, and SDL2 compat needed to be fixed. SDL doesnt need to be used anymore, so that's nice also deleted mupen projects which we don't use anymore
This commit is contained in:
parent
c85aee928f
commit
5a8ce91d95
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -1,364 +0,0 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3d8caps.h
|
||||
* Content: Direct3D capabilities include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _D3D8CAPS_H
|
||||
#define _D3D8CAPS_H
|
||||
|
||||
#ifndef DIRECT3D_VERSION
|
||||
#define DIRECT3D_VERSION 0x0800
|
||||
#endif //DIRECT3D_VERSION
|
||||
|
||||
// include this file content only if compiling for DX8 interfaces
|
||||
#if(DIRECT3D_VERSION >= 0x0800)
|
||||
|
||||
#if defined(_X86_) || defined(_IA64_)
|
||||
#pragma pack(4)
|
||||
#endif
|
||||
|
||||
typedef struct _D3DCAPS8
|
||||
{
|
||||
/* Device Info */
|
||||
D3DDEVTYPE DeviceType;
|
||||
UINT AdapterOrdinal;
|
||||
|
||||
/* Caps from DX7 Draw */
|
||||
DWORD Caps;
|
||||
DWORD Caps2;
|
||||
DWORD Caps3;
|
||||
DWORD PresentationIntervals;
|
||||
|
||||
/* Cursor Caps */
|
||||
DWORD CursorCaps;
|
||||
|
||||
/* 3D Device Caps */
|
||||
DWORD DevCaps;
|
||||
|
||||
DWORD PrimitiveMiscCaps;
|
||||
DWORD RasterCaps;
|
||||
DWORD ZCmpCaps;
|
||||
DWORD SrcBlendCaps;
|
||||
DWORD DestBlendCaps;
|
||||
DWORD AlphaCmpCaps;
|
||||
DWORD ShadeCaps;
|
||||
DWORD TextureCaps;
|
||||
DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture8's
|
||||
DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture8's
|
||||
DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture8's
|
||||
DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture8's
|
||||
DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture8's
|
||||
|
||||
DWORD LineCaps; // D3DLINECAPS
|
||||
|
||||
DWORD MaxTextureWidth, MaxTextureHeight;
|
||||
DWORD MaxVolumeExtent;
|
||||
|
||||
DWORD MaxTextureRepeat;
|
||||
DWORD MaxTextureAspectRatio;
|
||||
DWORD MaxAnisotropy;
|
||||
float MaxVertexW;
|
||||
|
||||
float GuardBandLeft;
|
||||
float GuardBandTop;
|
||||
float GuardBandRight;
|
||||
float GuardBandBottom;
|
||||
|
||||
float ExtentsAdjust;
|
||||
DWORD StencilCaps;
|
||||
|
||||
DWORD FVFCaps;
|
||||
DWORD TextureOpCaps;
|
||||
DWORD MaxTextureBlendStages;
|
||||
DWORD MaxSimultaneousTextures;
|
||||
|
||||
DWORD VertexProcessingCaps;
|
||||
DWORD MaxActiveLights;
|
||||
DWORD MaxUserClipPlanes;
|
||||
DWORD MaxVertexBlendMatrices;
|
||||
DWORD MaxVertexBlendMatrixIndex;
|
||||
|
||||
float MaxPointSize;
|
||||
|
||||
DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call
|
||||
DWORD MaxVertexIndex;
|
||||
DWORD MaxStreams;
|
||||
DWORD MaxStreamStride; // max stride for SetStreamSource
|
||||
|
||||
DWORD VertexShaderVersion;
|
||||
DWORD MaxVertexShaderConst; // number of vertex shader constant registers
|
||||
|
||||
DWORD PixelShaderVersion;
|
||||
float MaxPixelShaderValue; // max value of pixel shader arithmetic component
|
||||
|
||||
} D3DCAPS8;
|
||||
|
||||
//
|
||||
// BIT DEFINES FOR D3DCAPS8 DWORD MEMBERS
|
||||
//
|
||||
|
||||
//
|
||||
// Caps
|
||||
//
|
||||
#define D3DCAPS_READ_SCANLINE 0x00020000L
|
||||
|
||||
//
|
||||
// Caps2
|
||||
//
|
||||
#define D3DCAPS2_NO2DDURING3DSCENE 0x00000002L
|
||||
#define D3DCAPS2_FULLSCREENGAMMA 0x00020000L
|
||||
#define D3DCAPS2_CANRENDERWINDOWED 0x00080000L
|
||||
#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
|
||||
#define D3DCAPS2_RESERVED 0x02000000L
|
||||
#define D3DCAPS2_CANMANAGERESOURCE 0x10000000L
|
||||
#define D3DCAPS2_DYNAMICTEXTURES 0x20000000L
|
||||
|
||||
//
|
||||
// Caps3
|
||||
//
|
||||
#define D3DCAPS3_RESERVED 0x8000001fL
|
||||
|
||||
// Indicates that the device can respect the ALPHABLENDENABLE render state
|
||||
// when fullscreen while using the FLIP or DISCARD swap effect.
|
||||
// COPY and COPYVSYNC swap effects work whether or not this flag is set.
|
||||
#define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x00000020L
|
||||
|
||||
//
|
||||
// PresentationIntervals
|
||||
//
|
||||
#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L
|
||||
#define D3DPRESENT_INTERVAL_ONE 0x00000001L
|
||||
#define D3DPRESENT_INTERVAL_TWO 0x00000002L
|
||||
#define D3DPRESENT_INTERVAL_THREE 0x00000004L
|
||||
#define D3DPRESENT_INTERVAL_FOUR 0x00000008L
|
||||
#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L
|
||||
|
||||
//
|
||||
// CursorCaps
|
||||
//
|
||||
// Driver supports HW color cursor in at least hi-res modes(height >=400)
|
||||
#define D3DCURSORCAPS_COLOR 0x00000001L
|
||||
// Driver supports HW cursor also in low-res modes(height < 400)
|
||||
#define D3DCURSORCAPS_LOWRES 0x00000002L
|
||||
|
||||
//
|
||||
// DevCaps
|
||||
//
|
||||
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
|
||||
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
|
||||
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
|
||||
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
|
||||
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
|
||||
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
|
||||
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
|
||||
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
|
||||
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
|
||||
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
|
||||
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
|
||||
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
|
||||
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
|
||||
#define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */
|
||||
#define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */
|
||||
#define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */
|
||||
#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */
|
||||
#define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */
|
||||
|
||||
//
|
||||
// PrimitiveMiscCaps
|
||||
//
|
||||
#define D3DPMISCCAPS_MASKZ 0x00000002L
|
||||
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
|
||||
#define D3DPMISCCAPS_CULLNONE 0x00000010L
|
||||
#define D3DPMISCCAPS_CULLCW 0x00000020L
|
||||
#define D3DPMISCCAPS_CULLCCW 0x00000040L
|
||||
#define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L
|
||||
#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */
|
||||
#define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */
|
||||
#define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */
|
||||
#define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */
|
||||
#define D3DPMISCCAPS_NULLREFERENCE 0x00001000L /* Reference Device that doesnt render */
|
||||
|
||||
//
|
||||
// LineCaps
|
||||
//
|
||||
#define D3DLINECAPS_TEXTURE 0x00000001L
|
||||
#define D3DLINECAPS_ZTEST 0x00000002L
|
||||
#define D3DLINECAPS_BLEND 0x00000004L
|
||||
#define D3DLINECAPS_ALPHACMP 0x00000008L
|
||||
#define D3DLINECAPS_FOG 0x00000010L
|
||||
|
||||
//
|
||||
// RasterCaps
|
||||
//
|
||||
#define D3DPRASTERCAPS_DITHER 0x00000001L
|
||||
#define D3DPRASTERCAPS_PAT 0x00000008L
|
||||
#define D3DPRASTERCAPS_ZTEST 0x00000010L
|
||||
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
|
||||
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
|
||||
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
|
||||
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
|
||||
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
|
||||
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
|
||||
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
|
||||
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
|
||||
#define D3DPRASTERCAPS_WBUFFER 0x00040000L
|
||||
#define D3DPRASTERCAPS_WFOG 0x00100000L
|
||||
#define D3DPRASTERCAPS_ZFOG 0x00200000L
|
||||
#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */
|
||||
#define D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE 0x00800000L
|
||||
|
||||
//
|
||||
// ZCmpCaps, AlphaCmpCaps
|
||||
//
|
||||
#define D3DPCMPCAPS_NEVER 0x00000001L
|
||||
#define D3DPCMPCAPS_LESS 0x00000002L
|
||||
#define D3DPCMPCAPS_EQUAL 0x00000004L
|
||||
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
|
||||
#define D3DPCMPCAPS_GREATER 0x00000010L
|
||||
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
|
||||
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
|
||||
#define D3DPCMPCAPS_ALWAYS 0x00000080L
|
||||
|
||||
//
|
||||
// SourceBlendCaps, DestBlendCaps
|
||||
//
|
||||
#define D3DPBLENDCAPS_ZERO 0x00000001L
|
||||
#define D3DPBLENDCAPS_ONE 0x00000002L
|
||||
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
|
||||
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
|
||||
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
|
||||
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
|
||||
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
|
||||
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
|
||||
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
|
||||
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
|
||||
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
|
||||
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
|
||||
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
|
||||
|
||||
//
|
||||
// ShadeCaps
|
||||
//
|
||||
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
|
||||
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
|
||||
|
||||
//
|
||||
// TextureCaps
|
||||
//
|
||||
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */
|
||||
#define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */
|
||||
#define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */
|
||||
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */
|
||||
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */
|
||||
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */
|
||||
// Device can use non-POW2 textures if:
|
||||
// 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
|
||||
// 2) D3DRS_WRAP(N) is zero for this texture's coordinates
|
||||
// 3) mip mapping is not enabled (use magnification filter only)
|
||||
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
|
||||
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */
|
||||
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */
|
||||
#define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */
|
||||
#define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */
|
||||
#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */
|
||||
#define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */
|
||||
#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */
|
||||
#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */
|
||||
|
||||
//
|
||||
// TextureFilterCaps
|
||||
//
|
||||
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */
|
||||
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
|
||||
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
|
||||
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */
|
||||
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
|
||||
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */
|
||||
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
|
||||
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
|
||||
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
|
||||
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
|
||||
|
||||
//
|
||||
// TextureAddressCaps
|
||||
//
|
||||
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
|
||||
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
|
||||
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
|
||||
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
|
||||
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
|
||||
#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L
|
||||
|
||||
//
|
||||
// StencilCaps
|
||||
//
|
||||
#define D3DSTENCILCAPS_KEEP 0x00000001L
|
||||
#define D3DSTENCILCAPS_ZERO 0x00000002L
|
||||
#define D3DSTENCILCAPS_REPLACE 0x00000004L
|
||||
#define D3DSTENCILCAPS_INCRSAT 0x00000008L
|
||||
#define D3DSTENCILCAPS_DECRSAT 0x00000010L
|
||||
#define D3DSTENCILCAPS_INVERT 0x00000020L
|
||||
#define D3DSTENCILCAPS_INCR 0x00000040L
|
||||
#define D3DSTENCILCAPS_DECR 0x00000080L
|
||||
|
||||
//
|
||||
// TextureOpCaps
|
||||
//
|
||||
#define D3DTEXOPCAPS_DISABLE 0x00000001L
|
||||
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
|
||||
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
|
||||
#define D3DTEXOPCAPS_MODULATE 0x00000008L
|
||||
#define D3DTEXOPCAPS_MODULATE2X 0x00000010L
|
||||
#define D3DTEXOPCAPS_MODULATE4X 0x00000020L
|
||||
#define D3DTEXOPCAPS_ADD 0x00000040L
|
||||
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
|
||||
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
|
||||
#define D3DTEXOPCAPS_SUBTRACT 0x00000200L
|
||||
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
|
||||
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
|
||||
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
|
||||
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
|
||||
#define D3DTEXOPCAPS_PREMODULATE 0x00010000L
|
||||
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
|
||||
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
|
||||
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
|
||||
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
|
||||
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
|
||||
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
|
||||
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
|
||||
#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L
|
||||
#define D3DTEXOPCAPS_LERP 0x02000000L
|
||||
|
||||
//
|
||||
// FVFCaps
|
||||
//
|
||||
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
|
||||
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
|
||||
#define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */
|
||||
|
||||
//
|
||||
// VertexProcessingCaps
|
||||
//
|
||||
#define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */
|
||||
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */
|
||||
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */
|
||||
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */
|
||||
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */
|
||||
#define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */
|
||||
#define D3DVTXPCAPS_NO_VSDT_UBYTE4 0x00000080L /* device does not support D3DVSDT_UBYTE4 */
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif /* (DIRECT3D_VERSION >= 0x0800) */
|
||||
#endif /* _D3D8CAPS_H_ */
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,203 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4CC85A3A-8E85-45DB-8941-2E2E18FC9A53}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>d3d8</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<UseOfAtl>Dynamic</UseOfAtl>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<UseOfAtl>Dynamic</UseOfAtl>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
<TargetName>d3d8</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
<TargetName>d3d8</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
<TargetName>d3d8</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
<TargetName>d3d8</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader />
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\d3d8Wrapper.h" />
|
||||
<ClInclude Include="..\d3d8Base\d3d8.h" />
|
||||
<ClInclude Include="..\d3d8Base\d3d8caps.h" />
|
||||
<ClInclude Include="..\d3d8Base\d3d8types.h" />
|
||||
<ClInclude Include="..\PointerSet.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\d3d8Wrapper.cpp" />
|
||||
<ClCompile Include="..\Direct3DDevice8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3D8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DBaseTexture8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DCubeTexture8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DIndexBuffer8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DResource8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DSurface8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DSwapChain8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DTexture8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DVertexBuffer8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DVolume8Functions.cpp" />
|
||||
<ClCompile Include="..\Direct3DVolumeTexture8Functions.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,164 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
ThreadSafePointerSet IDirect3D8::m_List;
|
||||
|
||||
D3D8Wrapper::IDirect3D8::IDirect3D8(D3D8Base::IDirect3D8* real) : D3D8Wrapper::IDirect3DUnknown((IUnknown*) real)
|
||||
{
|
||||
LOG("IDirect3D8::IDirect3D8( " << real << " )\n");
|
||||
m_pD3D = real;
|
||||
}
|
||||
|
||||
// Tries to find the real object in the pointer set, or creates a new wrapped object
|
||||
D3D8Wrapper::IDirect3D8* D3D8Wrapper::IDirect3D8::GetDirect3D(D3D8Base::IDirect3D8* pD3D)
|
||||
{
|
||||
LOG("IDirect3D8::GetDirect3D( " << pD3D << " )\n");
|
||||
D3D8Wrapper::IDirect3D8* p = (D3D8Wrapper::IDirect3D8*) m_List.GetDataPtr(pD3D);
|
||||
if( p == NULL )
|
||||
{
|
||||
p = new D3D8Wrapper::IDirect3D8(pD3D);
|
||||
m_List.AddMember(pD3D,p);
|
||||
return p;
|
||||
}
|
||||
|
||||
p->m_ulRef++;
|
||||
return p;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) D3D8Wrapper::IDirect3D8::Release(THIS)
|
||||
{
|
||||
LOG("IDirect3D8::Release() [ " << this << " ]\n");
|
||||
m_pUnk->Release();
|
||||
|
||||
ULONG ulRef = --m_ulRef;
|
||||
|
||||
if(ulRef == 0)
|
||||
{
|
||||
m_List.DeleteMember(GetDirect3D8());
|
||||
delete this;
|
||||
return 0L;
|
||||
}
|
||||
return ulRef;
|
||||
}
|
||||
|
||||
|
||||
/*** IDirect3D8 methods ***/
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::GetAdapterDisplayMode(THIS_ UINT Adapter,D3D8Base::D3DDISPLAYMODE* pMode)
|
||||
{
|
||||
LOG("IDirect3D8::GetAdapterDisplayMode( " << Adapter << " , " << pMode << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetAdapterDisplayMode(Adapter, pMode);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::RegisterSoftwareDevice(void* pInitializeFunction)
|
||||
{
|
||||
LOG("IDirect3D8::RegisterSoftwareDevice( " << pInitializeFunction << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->RegisterSoftwareDevice(pInitializeFunction);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(UINT) D3D8Wrapper::IDirect3D8::GetAdapterCount(THIS)
|
||||
{
|
||||
LOG("IDirect3D8::GetAdapterCount() [ " << this << " ]\n");
|
||||
return m_pD3D->GetAdapterCount();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::GetAdapterIdentifier(UINT Adapter,DWORD Flags,D3D8Base::D3DADAPTER_IDENTIFIER8* pIdentifier)
|
||||
{
|
||||
LOG("IDirect3D8::GetAdapterIdentifier( " << Adapter << " , " << Flags << " , " << pIdentifier << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetAdapterIdentifier(Adapter,Flags,pIdentifier);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(UINT) D3D8Wrapper::IDirect3D8::GetAdapterModeCount(UINT Adapter)
|
||||
{
|
||||
LOG("IDirect3D8::GetAdapterModeCount( " << Adapter << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetAdapterModeCount(Adapter);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::EnumAdapterModes(UINT Adapter,UINT Mode,D3D8Base::D3DDISPLAYMODE* pMode)
|
||||
{
|
||||
LOG("IDirect3D8::EnumAdapterModes( " << Adapter << " , " << Mode << " , " << pMode << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->EnumAdapterModes(Adapter,Mode,pMode);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::CheckDeviceType(UINT Adapter,D3D8Base::D3DDEVTYPE CheckType,D3D8Base::D3DFORMAT DisplayFormat,D3D8Base::D3DFORMAT BackBufferFormat,BOOL Windowed)
|
||||
{
|
||||
LOG("IDirect3D8::CheckDeviceType( " << Adapter << " , " << CheckType << " , " << DisplayFormat << " , " << BackBufferFormat << " , " << Windowed << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->CheckDeviceType(Adapter,CheckType,DisplayFormat,BackBufferFormat,Windowed);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::CheckDeviceFormat(UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DFORMAT AdapterFormat,DWORD Usage,D3D8Base::D3DRESOURCETYPE RType,D3D8Base::D3DFORMAT CheckFormat)
|
||||
{
|
||||
LOG("IDirect3D8::CheckDeviceFormat( " << Adapter << " , " << DeviceType << " , " << AdapterFormat << " , " << Usage << " , " << RType << " , " << CheckFormat << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->CheckDeviceFormat(Adapter,DeviceType,AdapterFormat,Usage,RType,CheckFormat);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::CheckDeviceMultiSampleType(UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DFORMAT SurfaceFormat,BOOL Windowed,D3D8Base::D3DMULTISAMPLE_TYPE MultiSampleType)
|
||||
{
|
||||
LOG("IDirect3D8::CheckDeviceMultiSampleType( " << Adapter << " , " << DeviceType << " , " << SurfaceFormat << " , " << Windowed << " , " << MultiSampleType << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->CheckDeviceMultiSampleType(Adapter,DeviceType,SurfaceFormat,Windowed,MultiSampleType);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::CheckDepthStencilMatch(UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DFORMAT AdapterFormat,D3D8Base::D3DFORMAT RenderTargetFormat,D3D8Base::D3DFORMAT DepthStencilFormat)
|
||||
{
|
||||
LOG("IDirect3D8::CheckDepthStencilMatch( " << Adapter << " , " << DeviceType << " , " << AdapterFormat << " , " << RenderTargetFormat << " , " << DepthStencilFormat << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->CheckDepthStencilMatch(Adapter,DeviceType,AdapterFormat,RenderTargetFormat,DepthStencilFormat);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::GetDeviceCaps(UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DCAPS8* pCaps)
|
||||
{
|
||||
LOG("IDirect3D8::GetDeviceCaps( " << Adapter << " , " << DeviceType << " , " << pCaps << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetDeviceCaps(Adapter,DeviceType,pCaps);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(HMONITOR) D3D8Wrapper::IDirect3D8::GetAdapterMonitor(UINT Adapter)
|
||||
{
|
||||
LOG("IDirect3D8::GetAdapterMonitor( " << Adapter << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetAdapterMonitor(Adapter);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3D8::CreateDevice(UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,HWND hFocusWindow,DWORD BehaviorFlags,D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters,D3D8Wrapper::IDirect3DDevice8** ppReturnedDeviceInterface)
|
||||
{
|
||||
//sometimes, Intel drivers will clear the dll path. So let's save and restore it (do their job for them)
|
||||
//it doesn't seem like this happens any time besides creating the D3D8 object and a device.
|
||||
//If it does, then this solution isn't scalable at all.
|
||||
//This is a good place to note that it appears possible that on the affected drivers, the D3D9 interface will only SetDllDirectory the first time a D3D9 object is created
|
||||
char oldDllDirectory[MAX_PATH];
|
||||
GetDllDirectory(MAX_PATH, oldDllDirectory);
|
||||
|
||||
LOG("IDirect3D8::CreateDevice( " << Adapter << " , " << DeviceType << " , " << hFocusWindow << " , " << BehaviorFlags << " , " << pPresentationParameters << " , " << ppReturnedDeviceInterface << " ) [ " << this << " ]\n");
|
||||
D3D8Base::IDirect3DDevice8* realDevice = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->CreateDevice(Adapter,DeviceType,hFocusWindow,BehaviorFlags,pPresentationParameters,&realDevice);
|
||||
|
||||
//restore old DLL directory
|
||||
SetDllDirectory(oldDllDirectory);
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
return hr;
|
||||
}
|
||||
|
||||
// Wrap the real object
|
||||
D3D8Wrapper::IDirect3DDevice8* wrappedDevice = D3D8Wrapper::IDirect3DDevice8::GetDirect3DDevice(realDevice);
|
||||
|
||||
// Store this wrapped pointer for grabbing the screen later
|
||||
last_device = wrappedDevice;
|
||||
|
||||
// Create a new render target
|
||||
D3D8Base::IDirect3DSurface8 *realSurface = NULL;
|
||||
HRESULT hr2 = realDevice->CreateRenderTarget(pPresentationParameters->BackBufferWidth,pPresentationParameters->BackBufferHeight,D3D8Base::D3DFMT_X8R8G8B8,pPresentationParameters->MultiSampleType,FALSE,&realSurface);
|
||||
|
||||
// Store a wrapped pointer to it for grabbing the screen
|
||||
render_surface = D3D8Wrapper::IDirect3DSurface8::GetSurface(realSurface);
|
||||
|
||||
// Return our wrapped object
|
||||
*ppReturnedDeviceInterface = wrappedDevice;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DBaseTexture8::IDirect3DBaseTexture8(D3D8Base::IDirect3DBaseTexture8* realBaseTexture) : IDirect3DResource8((D3D8Base::IDirect3DResource8*) realBaseTexture)
|
||||
{
|
||||
LOG("IDirect3DBaseTexture8::IDirect3DBaseTexture8( " << realBaseTexture << " )\n");
|
||||
m_pD3D = realBaseTexture;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(DWORD) D3D8Wrapper::IDirect3DBaseTexture8::SetLOD(DWORD LODNew)
|
||||
{
|
||||
LOG("IDirect3DBaseTexture8::SetLOD( " << LODNew << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->SetLOD(LODNew);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(DWORD) D3D8Wrapper::IDirect3DBaseTexture8::GetLOD()
|
||||
{
|
||||
LOG("IDirect3DBaseTexture8::GetLOD() [ " << this << " ]\n");
|
||||
return m_pD3D->GetLOD();
|
||||
}
|
||||
|
||||
STDMETHODIMP_(DWORD) D3D8Wrapper::IDirect3DBaseTexture8::GetLevelCount()
|
||||
{
|
||||
LOG("IDirect3DBaseTexture8::GetLevelCount() [ " << this << " ]\n");
|
||||
return m_pD3D->GetLevelCount();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DCubeTexture8::IDirect3DCubeTexture8(D3D8Base::IDirect3DCubeTexture8* realCubeTexture) : IDirect3DBaseTexture8((D3D8Base::IDirect3DBaseTexture8*) realCubeTexture)
|
||||
{
|
||||
LOG("IDirect3DCubeTexture8( " << realCubeTexture << " )\n");
|
||||
m_pD3D = realCubeTexture;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DCubeTexture8::GetLevelDesc(UINT Level,D3D8Base::D3DSURFACE_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DCubeTexture8::GetLevelDesc( " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetLevelDesc(Level,pDesc);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DCubeTexture8::GetCubeMapSurface(D3D8Base::D3DCUBEMAP_FACES FaceType,UINT Level,D3D8Wrapper::IDirect3DSurface8** ppCubeMapSurface)
|
||||
{
|
||||
LOG("IDirect3DCubeTexture8::GetCubeMapSurface( " << FaceType << " , " << Level << " , " << ppCubeMapSurface << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetCubeMapSurface(FaceType,Level,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppCubeMapSurface = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DCubeTexture8::LockRect(D3D8Base::D3DCUBEMAP_FACES FaceType,UINT Level,D3D8Base::D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DCubeTexture8::LockRect( " << FaceType << " , " << Level << " , " << pLockedRect << " , " << pRect << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->LockRect(FaceType,Level,pLockedRect,pRect,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DCubeTexture8::UnlockRect(D3D8Base::D3DCUBEMAP_FACES FaceType,UINT Level)
|
||||
{
|
||||
LOG("IDirect3DCubeTexture8::UnlockRect( " << FaceType << " , " << Level << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->UnlockRect(FaceType,Level);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DCubeTexture8::AddDirtyRect(D3D8Base::D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect)
|
||||
{
|
||||
LOG("IDirect3DCubeTexture8::AddDirtyRect( " << FaceType << " , " << pDirtyRect << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->AddDirtyRect(FaceType,pDirtyRect);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,891 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
ThreadSafePointerSet IDirect3DDevice8::m_List;
|
||||
|
||||
D3D8Wrapper::IDirect3DDevice8::IDirect3DDevice8(D3D8Base::IDirect3DDevice8* realDevice) : IDirect3DUnknown((IUnknown*) realDevice)
|
||||
{
|
||||
LOG("IDirect3DDevice8::IDirect3DDevice8( " << realDevice << " )\n");
|
||||
m_pDevice = realDevice;
|
||||
}
|
||||
|
||||
D3D8Wrapper::IDirect3DDevice8* D3D8Wrapper::IDirect3DDevice8::GetDirect3DDevice(D3D8Base::IDirect3DDevice8* realDevice)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetDirect3DDevice( " << realDevice << " )\n");
|
||||
D3D8Wrapper::IDirect3DDevice8* wrappedDevice = (D3D8Wrapper::IDirect3DDevice8*) m_List.GetDataPtr(realDevice);
|
||||
if(wrappedDevice == NULL)
|
||||
{
|
||||
wrappedDevice = new D3D8Wrapper::IDirect3DDevice8(realDevice);
|
||||
m_List.AddMember(realDevice, wrappedDevice);
|
||||
return wrappedDevice;
|
||||
}
|
||||
|
||||
wrappedDevice->m_ulRef++;
|
||||
return wrappedDevice;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) D3D8Wrapper::IDirect3DDevice8::Release(THIS)
|
||||
{
|
||||
LOG("IDirect3DDevice8::Release() [ " << this << " ]\n");
|
||||
m_pUnk->Release();
|
||||
|
||||
ULONG ulRef = --m_ulRef;
|
||||
|
||||
if(ulRef == 0)
|
||||
{
|
||||
m_List.DeleteMember(GetD3D8Device());
|
||||
delete this;
|
||||
return NULL;
|
||||
}
|
||||
return ulRef;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::TestCooperativeLevel()
|
||||
{
|
||||
LOG("IDirect3DDevice8::TestCooperativeLevel() [ " << this << " ]\n");
|
||||
return m_pDevice->TestCooperativeLevel();
|
||||
}
|
||||
|
||||
STDMETHODIMP_(UINT) D3D8Wrapper::IDirect3DDevice8::GetAvailableTextureMem()
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetAvailableTextureMem() [ " << this << " ]\n");
|
||||
return m_pDevice->GetAvailableTextureMem();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ResourceManagerDiscardBytes(DWORD Bytes)
|
||||
{
|
||||
LOG("IDirect3DDevice8::ResourceManagerDiscardBytes( " << Bytes << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->ResourceManagerDiscardBytes(Bytes);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDirect3D(D3D8Wrapper::IDirect3D8** ppD3D8)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetDirect3D( " << ppD3D8 << " ) [ " << this << " ]\n");
|
||||
|
||||
// Run the function and wrap the result before returning it
|
||||
D3D8Base::IDirect3D8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetDirect3D(&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3D8* wrappedD3D = D3D8Wrapper::IDirect3D8::GetDirect3D(realD3D);
|
||||
|
||||
*ppD3D8 = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDeviceCaps(D3D8Base::D3DCAPS8* pCaps)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetDeviceCaps( " << pCaps << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetDeviceCaps(pCaps);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDisplayMode(D3D8Base::D3DDISPLAYMODE* pMode)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetDisplayMode( " << pMode << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetDisplayMode(pMode);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetCreationParameters(D3D8Base::D3DDEVICE_CREATION_PARAMETERS *pParameters)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetCreationParameters( " << pParameters << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetCreationParameters(pParameters);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetCursorProperties(UINT XHotSpot,UINT YHotSpot,D3D8Wrapper::IDirect3DSurface8* pCursorBitmap)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetCursorProperties( " << XHotSpot << " , " << YHotSpot << " , " << pCursorBitmap << " ) [ " << this << " ]\n");
|
||||
if (pCursorBitmap == NULL)
|
||||
{
|
||||
return m_pDevice->SetCursorProperties(XHotSpot,YHotSpot,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_pDevice->SetCursorProperties(XHotSpot,YHotSpot,pCursorBitmap->GetSurface());
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DDevice8::SetCursorPosition(int X,int Y,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetCursorPosition( " << X << " , " << Y << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
m_pDevice->SetCursorPosition(X,Y,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(BOOL) D3D8Wrapper::IDirect3DDevice8::ShowCursor(BOOL bShow)
|
||||
{
|
||||
LOG("IDirect3DDevice8::ShowCursor( " << bShow << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->ShowCursor(bShow);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateAdditionalSwapChain(D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters,D3D8Wrapper::IDirect3DSwapChain8** pSwapChain)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateAdditionalSwapChain( " << pPresentationParameters << " , " << pSwapChain << " ) [ " << this << " ]\n");
|
||||
D3D8Base::IDirect3DSwapChain8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateAdditionalSwapChain(pPresentationParameters,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSwapChain8* wrappedD3D = new D3D8Wrapper::IDirect3DSwapChain8(realD3D);
|
||||
|
||||
*pSwapChain = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::Reset(D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters)
|
||||
{
|
||||
LOG("IDirect3DDevice8::Reset( " << pPresentationParameters << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->Reset(pPresentationParameters);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::Present(CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
|
||||
{
|
||||
#ifdef LOGGING
|
||||
LOG("IDirect3DDevice8::Present( " << pSourceRect);
|
||||
if (pSourceRect != NULL)
|
||||
{
|
||||
LOG("{ " << pSourceRect->left << " , " << pSourceRect->top << " , " << pSourceRect->right << " , " << pSourceRect->bottom << " }");
|
||||
}
|
||||
LOG(" , " << pDestRect);
|
||||
if (pSourceRect != NULL)
|
||||
{
|
||||
LOG("{ " << pDestRect->left << " , " << pDestRect->top << " , " << pDestRect->right << " , " << pDestRect->bottom << " }");
|
||||
}
|
||||
LOG(" , " << hDestWindowOverride << " , " << pDirtyRegion << " ) [ " << this << " ]\n");
|
||||
#endif
|
||||
// Force the result to OK
|
||||
HRESULT hr = D3D_OK;
|
||||
|
||||
// Don't call the real present
|
||||
//hr = m_pDevice->Present(pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion);
|
||||
|
||||
// Let bizhawk know the frame is ready
|
||||
rendering_callback(0);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetBackBuffer(UINT BackBuffer,D3D8Base::D3DBACKBUFFER_TYPE Type,D3D8Wrapper::IDirect3DSurface8** ppBackBuffer)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetBackBuffer( " << BackBuffer << " , " << Type << " , " << ppBackBuffer << " ) [ " << this << " ]\n");
|
||||
|
||||
/*
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetBackBuffer(BackBuffer,Type,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
*/
|
||||
|
||||
// Return a pointer to our render surface, not the back buffer
|
||||
*ppBackBuffer = render_surface;// wrappedD3D;
|
||||
render_surface->m_ulRef++;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetRasterStatus(D3D8Base::D3DRASTER_STATUS* pRasterStatus)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetRasterStatus( " << pRasterStatus << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetRasterStatus(pRasterStatus);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DDevice8::SetGammaRamp(DWORD Flags,CONST D3D8Base::D3DGAMMARAMP* pRamp)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetGammaRamp( " << Flags << " , " << pRamp << " ) [ " << this << " ]\n");
|
||||
m_pDevice->SetGammaRamp(Flags,pRamp);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DDevice8::GetGammaRamp(D3D8Base::D3DGAMMARAMP* pRamp)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetGammaRamp( " << pRamp << " ) [ " << this << " ]\n");
|
||||
m_pDevice->GetGammaRamp(pRamp);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateTexture(UINT Width,UINT Height,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DTexture8** ppTexture)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateTexture( " << Width << " , " << Height << " , " << Levels << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppTexture << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DTexture8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateTexture(Width,Height,Levels,Usage,Format,Pool,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DTexture8* wrappedD3D = D3D8Wrapper::IDirect3DTexture8::GetTexture(realD3D);
|
||||
|
||||
*ppTexture = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateVolumeTexture(UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DVolumeTexture8** ppVolumeTexture)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateVolumeTexture( " << Width << " , " << Height << " , " << Levels << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppVolumeTexture << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DVolumeTexture8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateVolumeTexture(Width,Height,Depth,Levels,Usage,Format,Pool,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DVolumeTexture8* wrappedD3D = new D3D8Wrapper::IDirect3DVolumeTexture8(realD3D);
|
||||
|
||||
*ppVolumeTexture = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateCubeTexture(UINT EdgeLength,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DCubeTexture8** ppCubeTexture)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateCubeTexture( " << EdgeLength << " , " << Levels << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppCubeTexture << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DCubeTexture8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateCubeTexture(EdgeLength,Levels, Usage,Format,Pool,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DCubeTexture8* wrappedD3D = new D3D8Wrapper::IDirect3DCubeTexture8(realD3D);
|
||||
|
||||
*ppCubeTexture = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateVertexBuffer(UINT Length,DWORD Usage,DWORD FVF,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DVertexBuffer8** ppVertexBuffer)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateVertexBuffer( " << Length << " , " << Usage << " , " << FVF << " , " << Pool << " , " << ppVertexBuffer << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DVertexBuffer8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateVertexBuffer(Length,Usage,FVF,Pool,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DVertexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DVertexBuffer8(realD3D);
|
||||
|
||||
*ppVertexBuffer = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateIndexBuffer(UINT Length,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DIndexBuffer8** ppIndexBuffer)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateIndexBuffer( " << Length << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppIndexBuffer << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DIndexBuffer8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateIndexBuffer(Length,Usage,Format,Pool,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DIndexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DIndexBuffer8(realD3D);
|
||||
|
||||
*ppIndexBuffer = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateRenderTarget(UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Base::D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,D3D8Wrapper::IDirect3DSurface8** ppSurface)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateRenderTarget( " << Width << " , " << Height << " , " << Format << " , " << MultiSample << " , " << Lockable << " , " << ppSurface << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateRenderTarget(Width,Height,Format,MultiSample,Lockable,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppSurface = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateDepthStencilSurface(UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Base::D3DMULTISAMPLE_TYPE MultiSample,D3D8Wrapper::IDirect3DSurface8** ppSurface)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateDepthStencilSurface( " << Width << " , " << Height << " , " << Format << " , " << MultiSample << " , " << ppSurface << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateDepthStencilSurface(Width,Height,Format,MultiSample,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppSurface = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateImageSurface(UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Wrapper::IDirect3DSurface8** ppSurface)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateImageSurface( " << Width << " , " << Height << " , " << Format << " , " << ppSurface << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->CreateImageSurface(Width,Height,Format,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppSurface = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CopyRects(D3D8Wrapper::IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,D3D8Wrapper::IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CopyRects( " << pSourceSurface << " , " << pSourceRectsArray << " , " << cRects << " , " << pDestinationSurface << " , " << pDestPointsArray << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* source;
|
||||
if (pSourceSurface == NULL)
|
||||
{
|
||||
source = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
source = pSourceSurface->GetSurface();
|
||||
}
|
||||
|
||||
D3D8Base::IDirect3DSurface8* destination;
|
||||
if (pDestinationSurface == NULL)
|
||||
{
|
||||
destination = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
destination = pDestinationSurface->GetSurface();
|
||||
}
|
||||
|
||||
if (pSourceSurface->m_ulRef == 0 || source == destination)
|
||||
{
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
return m_pDevice->CopyRects(source,pSourceRectsArray,cRects,destination,pDestPointsArray);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::UpdateTexture(D3D8Wrapper::IDirect3DBaseTexture8* pSourceTexture,D3D8Wrapper::IDirect3DBaseTexture8* pDestinationTexture)
|
||||
{
|
||||
LOG("IDirect3DDevice8::UpdateTexture( " << pSourceTexture << " , " << pDestinationTexture << " ) [ " << this << " ]\n");
|
||||
D3D8Base::IDirect3DBaseTexture8* source;
|
||||
if (pSourceTexture == NULL)
|
||||
{
|
||||
source = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
source = pSourceTexture->GetBaseTexture();
|
||||
}
|
||||
|
||||
D3D8Base::IDirect3DBaseTexture8* destination;
|
||||
if (pDestinationTexture == NULL)
|
||||
{
|
||||
destination = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
destination = pDestinationTexture->GetBaseTexture();
|
||||
}
|
||||
|
||||
return m_pDevice->UpdateTexture(source,destination);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetFrontBuffer(D3D8Wrapper::IDirect3DSurface8* pDestSurface)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetFrontBuffer( " << pDestSurface << " ) [ " << this << " ]\n");
|
||||
if (pDestSurface == NULL)
|
||||
{
|
||||
return m_pDevice->GetFrontBuffer(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_pDevice->GetFrontBuffer(pDestSurface->GetSurface());
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetRenderTarget(D3D8Wrapper::IDirect3DSurface8* pRenderTarget,D3D8Wrapper::IDirect3DSurface8* pNewZStencil)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetRenderTarget( " << pRenderTarget << " , " << pNewZStencil << " ) [ " << this << " ]\n");
|
||||
|
||||
//HRESULT hr = m_pDevice->SetRenderTarget(pRenderTarget->GetSurface(),pNewZStencil->GetSurface());
|
||||
HRESULT hr = m_pDevice->SetRenderTarget(render_surface->GetSurface(),pNewZStencil->GetSurface());
|
||||
|
||||
pRenderTarget->m_ulRef++;
|
||||
pNewZStencil->m_ulRef++;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetRenderTarget(D3D8Wrapper::IDirect3DSurface8** ppRenderTarget)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetRenderTarget( " << ppRenderTarget << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetRenderTarget(&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppRenderTarget = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDepthStencilSurface(D3D8Wrapper::IDirect3DSurface8** ppZStencilSurface)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetDepthStencilSurface( " << ppZStencilSurface << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetDepthStencilSurface(&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppZStencilSurface = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::BeginScene()
|
||||
{
|
||||
LOG("IDirect3DDevice8::BeginScene() [ " << this << " ]\n");
|
||||
return m_pDevice->BeginScene();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::EndScene()
|
||||
{
|
||||
LOG("IDirect3DDevice8::EndScene() [ " << this << " ]\n");
|
||||
return m_pDevice->EndScene();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::Clear(DWORD Count,CONST D3D8Base::D3DRECT* pRects,DWORD Flags,D3D8Base::D3DCOLOR Color,float Z,DWORD Stencil)
|
||||
{
|
||||
#ifdef LOGGING
|
||||
LOG("IDirect3DDevice8::Clear( " << Count << " , " << pRects);
|
||||
if (pRects != NULL)
|
||||
{
|
||||
LOG("{ " << pRects->x1 << " , " << pRects->y1 << " , " << pRects->x2 << " , " << pRects->y2 << " }")
|
||||
}
|
||||
LOG(" , " << Flags << " , " << Color << " , " << Z << " , " << Stencil << " ) [ " << this << " ]\n");
|
||||
#endif
|
||||
|
||||
return m_pDevice->Clear(Count,pRects,Flags,Color,Z,Stencil);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetTransform(D3D8Base::D3DTRANSFORMSTATETYPE State,CONST D3D8Base::D3DMATRIX* pMatrix)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetTransform( " << State << " , " << pMatrix << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetTransform(State,pMatrix);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetTransform(D3D8Base::D3DTRANSFORMSTATETYPE State,D3D8Base::D3DMATRIX* pMatrix)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetTransform( " << State << " , " << pMatrix << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetTransform(State,pMatrix);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::MultiplyTransform(D3D8Base::D3DTRANSFORMSTATETYPE foo,CONST D3D8Base::D3DMATRIX* bar)
|
||||
{
|
||||
LOG("IDirect3DDevice8::MultiplyTransform( " << foo << " , " << bar << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->MultiplyTransform(foo, bar);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetViewport(CONST D3D8Base::D3DVIEWPORT8* pViewport)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetViewport( " << pViewport << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetViewport(pViewport);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetViewport(D3D8Base::D3DVIEWPORT8* pViewport)
|
||||
{
|
||||
#ifdef LOGGING
|
||||
LOG("IDirect3DDevice8::GetViewport( " << pViewport);
|
||||
if (pViewport != NULL)
|
||||
{
|
||||
LOG("{ " << pViewport->X << " , " << pViewport->Y << " , " << pViewport->Width << " , " << pViewport->Height << " , " << pViewport->MinZ << " , " << pViewport->MaxZ << " }");
|
||||
}
|
||||
LOG(" ) [ " << this << " ]\n");
|
||||
#endif
|
||||
return m_pDevice->GetViewport(pViewport);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetMaterial(CONST D3D8Base::D3DMATERIAL8* pMaterial)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetMaterial( " << pMaterial << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetMaterial(pMaterial);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetMaterial(D3D8Base::D3DMATERIAL8* pMaterial)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetMaterial( " << pMaterial << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetMaterial(pMaterial);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetLight(DWORD Index,CONST D3D8Base::D3DLIGHT8* foo)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetLight( " << Index << " , " << foo << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetLight(Index,foo);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetLight(DWORD Index,D3D8Base::D3DLIGHT8* foo)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetLight( " << Index << " , " << foo << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetLight(Index,foo);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::LightEnable(DWORD Index,BOOL Enable)
|
||||
{
|
||||
LOG("IDirect3DDevice8::LightEnable( " << Index << " , " << Enable << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->LightEnable(Index,Enable);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetLightEnable(DWORD Index,BOOL* pEnable)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetLightEnable( " << Index << " , " << pEnable << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetLightEnable(Index,pEnable);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetClipPlane(DWORD Index,CONST float* pPlane)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetClipPlane( " << Index << " , " << pPlane << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetClipPlane(Index,pPlane);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetClipPlane(DWORD Index,float* pPlane)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetClipPlane( " << Index << " , " << pPlane << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetClipPlane(Index,pPlane);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetRenderState(D3D8Base::D3DRENDERSTATETYPE State,DWORD Value)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetRenderState( " << State << " , " << Value << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetRenderState(State,Value);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetRenderState(D3D8Base::D3DRENDERSTATETYPE State,DWORD* pValue)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetRenderState( " << State << " , " << pValue << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetRenderState(State,pValue);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::BeginStateBlock()
|
||||
{
|
||||
LOG("IDirect3DDevice8::BeginStateBlock() [ " << this << " ]\n");
|
||||
return m_pDevice->BeginStateBlock();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::EndStateBlock(DWORD* pToken)
|
||||
{
|
||||
LOG("IDirect3DDevice8::EndStateBlock( " << pToken << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->EndStateBlock(pToken);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ApplyStateBlock(DWORD Token)
|
||||
{
|
||||
LOG("IDirect3DDevice8::ApplyStateBlock( " << Token << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->ApplyStateBlock(Token);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CaptureStateBlock(DWORD Token)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CaptureStateBlock( " << Token << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->CaptureStateBlock(Token);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeleteStateBlock(DWORD Token)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DeleteStateBlock( " << Token << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DeleteStateBlock(Token);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateStateBlock(D3D8Base::D3DSTATEBLOCKTYPE Type,DWORD* pToken)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateStateBlock( " << Type << " , " << pToken << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->CreateStateBlock(Type,pToken);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetClipStatus(CONST D3D8Base::D3DCLIPSTATUS8* pClipStatus)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetClipStatus( " << pClipStatus << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetClipStatus(pClipStatus);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetClipStatus(D3D8Base::D3DCLIPSTATUS8* pClipStatus)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetClipStatus( " << pClipStatus << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetClipStatus(pClipStatus);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetTexture(DWORD Stage,D3D8Wrapper::IDirect3DBaseTexture8** ppTexture)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetTexture( " << Stage << " , " << ppTexture << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DBaseTexture8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetTexture(Stage,&realD3D);//ppTexture);
|
||||
|
||||
D3D8Wrapper::IDirect3DBaseTexture8* wrappedD3D = new D3D8Wrapper::IDirect3DBaseTexture8(realD3D);
|
||||
|
||||
*ppTexture = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetTexture(DWORD Stage,D3D8Wrapper::IDirect3DBaseTexture8* pTexture)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetTexture( " << Stage << " , " << pTexture << " ) [ " << this << " ]\n");
|
||||
|
||||
if (pTexture == NULL)
|
||||
{
|
||||
return m_pDevice->SetTexture(Stage,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_pDevice->SetTexture(Stage,pTexture->GetBaseTexture());
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetTextureStageState(DWORD Stage,D3D8Base::D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetTextureStageState( " << Stage << " , " << Type << " , " << pValue << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetTextureStageState(Stage,Type,pValue);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetTextureStageState(DWORD Stage,D3D8Base::D3DTEXTURESTAGESTATETYPE Type,DWORD Value)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetTextureStageState( " << Stage << " , " << Type << " , " << Value << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetTextureStageState(Stage,Type,Value);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ValidateDevice(DWORD* pNumPasses)
|
||||
{
|
||||
LOG("IDirect3DDevice8::ValidateDevice( " << pNumPasses << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->ValidateDevice(pNumPasses);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetInfo(DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetInfo( " << DevInfoID << " , " << pDevInfoStruct << " , " << DevInfoStructSize << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetInfo(DevInfoID,pDevInfoStruct,DevInfoStructSize);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetPaletteEntries(UINT PaletteNumber,CONST PALETTEENTRY* pEntries)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetPaletteEntries( " << PaletteNumber << " , " << pEntries << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetPaletteEntries(PaletteNumber,pEntries);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPaletteEntries(UINT PaletteNumber,PALETTEENTRY* pEntries)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetPaletteEntries( " << PaletteNumber << " , " << pEntries << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetPaletteEntries(PaletteNumber,pEntries);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetCurrentTexturePalette(UINT PaletteNumber)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetCurrentTexturePalette( " << PaletteNumber << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetCurrentTexturePalette(PaletteNumber);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetCurrentTexturePalette(UINT *PaletteNumber)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetCurrentTexturePalette( " << PaletteNumber << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetCurrentTexturePalette(PaletteNumber);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawPrimitive(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DrawPrimitive( " << PrimitiveType << " , " << StartVertex << " , " << PrimitiveCount << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DrawPrimitive(PrimitiveType,StartVertex,PrimitiveCount);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawIndexedPrimitive(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DrawIndexedPrimitive( " << PrimitiveType << " , " << minIndex << " , " << NumVertices << " , " << startIndex << " , " << primCount << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DrawIndexedPrimitive(PrimitiveType,minIndex,NumVertices,startIndex,primCount);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawPrimitiveUP(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DrawPrimitiveUP( " << PrimitiveType << " , " << PrimitiveCount << " , " << pVertexStreamZeroData << " , " << VertexStreamZeroStride << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DrawPrimitiveUP(PrimitiveType,PrimitiveCount,pVertexStreamZeroData,VertexStreamZeroStride);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawIndexedPrimitiveUP(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData,D3D8Base::D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DrawIndexedPrimitiveUP( " << PrimitiveType << " , " << MinVertexIndex << " , " << NumVertexIndices << " , " << PrimitiveCount << " , " << pIndexData << " , " << IndexDataFormat << " , " << pVertexStreamZeroData << " , " << VertexStreamZeroStride << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DrawIndexedPrimitiveUP(PrimitiveType,MinVertexIndex,NumVertexIndices,PrimitiveCount,pIndexData,IndexDataFormat,pVertexStreamZeroData,VertexStreamZeroStride);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ProcessVertices(UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,D3D8Wrapper::IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DDevice8::ProcessVertices( " << SrcStartIndex << " , " << DestIndex << " , " << VertexCount << " , " << pDestBuffer << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
if (pDestBuffer == NULL)
|
||||
{
|
||||
return m_pDevice->ProcessVertices(SrcStartIndex,DestIndex,VertexCount,NULL,Flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_pDevice->ProcessVertices(SrcStartIndex,DestIndex,VertexCount,pDestBuffer->GetVertexBuffer(),Flags);
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateVertexShader(CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreateVertexShader( " << pDeclaration << " , " << pFunction << " , " << pHandle << " , " << Usage << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->CreateVertexShader(pDeclaration,pFunction,pHandle,Usage);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetVertexShader(DWORD Handle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetVertexShader( " << Handle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetVertexShader(Handle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShader(DWORD* pHandle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetVertexShader( " << pHandle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetVertexShader(pHandle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeleteVertexShader(DWORD Handle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DeleteVertexShader( " << Handle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DeleteVertexShader(Handle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetVertexShaderConstant(DWORD Register,CONST void* pConstantData,DWORD ConstantCount)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetVertexShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetVertexShaderConstant(Register,pConstantData,ConstantCount);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShaderConstant(DWORD Register,void* pConstantData,DWORD ConstantCount)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetVertexShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetVertexShaderConstant(Register,pConstantData,ConstantCount);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShaderDeclaration(DWORD Handle,void* pData,DWORD* pSizeOfData)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetVertexShaderDeclaration( " << Handle << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetVertexShaderDeclaration(Handle,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShaderFunction(DWORD Handle,void* pData,DWORD* pSizeOfData)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetVertexShaderFunction( " << Handle << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetVertexShaderFunction(Handle,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetStreamSource(UINT StreamNumber,D3D8Wrapper::IDirect3DVertexBuffer8* pStreamData,UINT Stride)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetStreamSource( " << StreamNumber << " , " << pStreamData << " , " << Stride << " ) [ " << this << " ]\n");
|
||||
if (pStreamData == NULL)
|
||||
{
|
||||
return m_pDevice->SetStreamSource(StreamNumber,NULL,Stride);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_pDevice->SetStreamSource(StreamNumber,pStreamData->GetVertexBuffer(),Stride);
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetStreamSource(UINT StreamNumber,D3D8Wrapper::IDirect3DVertexBuffer8** ppStreamData,UINT* pStride)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetStreamSource( " << StreamNumber << " , " << ppStreamData << " , " << pStride << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DVertexBuffer8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetStreamSource(StreamNumber,&realD3D,pStride);
|
||||
|
||||
D3D8Wrapper::IDirect3DVertexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DVertexBuffer8(realD3D);
|
||||
|
||||
*ppStreamData = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetIndices(D3D8Wrapper::IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetIndices( " << pIndexData << " , " << BaseVertexIndex << " ) [ " << this << " ]\n");
|
||||
if (pIndexData == NULL)
|
||||
{
|
||||
return m_pDevice->SetIndices(NULL,BaseVertexIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_pDevice->SetIndices(pIndexData->GetIndexBuffer(),BaseVertexIndex);
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetIndices(D3D8Wrapper::IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetIndices( " << ppIndexData << " , " << pBaseVertexIndex << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DIndexBuffer8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pDevice->GetIndices(&realD3D,pBaseVertexIndex);// ppIndexData,pBaseVertexIndex);
|
||||
|
||||
D3D8Wrapper::IDirect3DIndexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DIndexBuffer8(realD3D);
|
||||
|
||||
*ppIndexData = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreatePixelShader(CONST DWORD* pFunction,DWORD* pHandle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::CreatePixelShader( " << pFunction << " , " << pHandle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->CreatePixelShader(pFunction,pHandle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetPixelShader(DWORD Handle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetPixelShader( " << Handle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetPixelShader(Handle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPixelShader(DWORD* pHandle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetPixelShader( " << pHandle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetPixelShader(pHandle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeletePixelShader(DWORD Handle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DeletePixelShader( " << Handle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DeletePixelShader(Handle);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetPixelShaderConstant(DWORD Register,CONST void* pConstantData,DWORD ConstantCount)
|
||||
{
|
||||
LOG("IDirect3DDevice8::SetPixelShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->SetPixelShaderConstant(Register,pConstantData,ConstantCount);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPixelShaderConstant(DWORD Register,void* pConstantData,DWORD ConstantCount)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetPixelShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetPixelShaderConstant(Register,pConstantData,ConstantCount);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPixelShaderFunction(DWORD Handle,void* pData,DWORD* pSizeOfData)
|
||||
{
|
||||
LOG("IDirect3DDevice8::GetPixelShaderFunction( " << Handle << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->GetPixelShaderFunction(Handle,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawRectPatch(UINT Handle,CONST float* pNumSegs,CONST D3D8Base::D3DRECTPATCH_INFO* pRectPatchInfo)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DrawRectPatch( " << Handle << " , " << pNumSegs << " , " << pRectPatchInfo << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DrawRectPatch(Handle,pNumSegs,pRectPatchInfo);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawTriPatch(UINT Handle,CONST float* pNumSegs,CONST D3D8Base::D3DTRIPATCH_INFO* pTriPatchInfo)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DrawTriPatch( " << Handle << " , " << pNumSegs << " , " << pTriPatchInfo << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DrawTriPatch(Handle,pNumSegs,pTriPatchInfo);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeletePatch(UINT Handle)
|
||||
{
|
||||
LOG("IDirect3DDevice8::DeletePatch( " << Handle << " ) [ " << this << " ]\n");
|
||||
return m_pDevice->DeletePatch(Handle);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DIndexBuffer8::IDirect3DIndexBuffer8(D3D8Base::IDirect3DIndexBuffer8* realIndexBuffer) : IDirect3DResource8((D3D8Base::IDirect3DResource8*) realIndexBuffer)
|
||||
{
|
||||
LOG("IDirect3DIndexBuffer8( " << realIndexBuffer << " )\n");
|
||||
m_pD3D = realIndexBuffer;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DIndexBuffer8::Lock(UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DIndexBuffer8::Lock( " << OffsetToLock << " , " << SizeToLock << " , " << ppbData << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->Lock(OffsetToLock,SizeToLock,ppbData,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DIndexBuffer8::Unlock()
|
||||
{
|
||||
LOG("IDirect3DIndexBuffer8::Unlock() [ " << this << " ]\n");
|
||||
return m_pD3D->Unlock();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DIndexBuffer8::GetDesc(D3D8Base::D3DINDEXBUFFER_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DIndexBuffer8::GetDesc( " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetDesc(pDesc);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
ThreadSafePointerSet D3D8Wrapper::IDirect3DResource8::m_List;
|
||||
|
||||
D3D8Wrapper::IDirect3DResource8::IDirect3DResource8(D3D8Base::IDirect3DResource8* realResource) : IDirect3DUnknown((IUnknown*) realResource)
|
||||
{
|
||||
LOG("IDirect3DResource8::IDirect3DResource8( " << realResource << " )\n");
|
||||
m_pD3D = realResource;
|
||||
}
|
||||
|
||||
D3D8Wrapper::IDirect3DResource8* D3D8Wrapper::IDirect3DResource8::GetResource(D3D8Base::IDirect3DResource8* realResource)
|
||||
{
|
||||
LOG("IDirect3DResource8::GetResource( " << realResource << " )\n");
|
||||
D3D8Wrapper::IDirect3DResource8* wrappedResource = (D3D8Wrapper::IDirect3DResource8*) m_List.GetDataPtr(realResource);
|
||||
if( wrappedResource == NULL )
|
||||
{
|
||||
wrappedResource = new D3D8Wrapper::IDirect3DResource8(realResource);
|
||||
m_List.AddMember(realResource, wrappedResource);
|
||||
return wrappedResource;
|
||||
}
|
||||
|
||||
wrappedResource->m_ulRef++;
|
||||
return wrappedResource;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) D3D8Wrapper::IDirect3DResource8::Release(THIS)
|
||||
{
|
||||
LOG("IDirect3DResource8::Release() [ " << this << " ]\n");
|
||||
m_pUnk->Release();
|
||||
|
||||
ULONG ulRef = --m_ulRef;
|
||||
if(ulRef == 0)
|
||||
{
|
||||
m_List.DeleteMember(GetResource());
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
return ulRef;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DResource8::GetDevice(D3D8Wrapper::IDirect3DDevice8** ppDevice)
|
||||
{
|
||||
LOG("IDirect3DResource8::GetDevice( " << ppDevice << " ) [ " << this << " ]\n");
|
||||
D3D8Base::IDirect3DDevice8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetDevice(&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DDevice8* wrappedD3D = new D3D8Wrapper::IDirect3DDevice8(realD3D);
|
||||
|
||||
*ppDevice = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DResource8::SetPrivateData(REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DResource8::SetPrivateData( " << &refguid << " , " << pData << " , " << SizeOfData << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->SetPrivateData(refguid,pData,SizeOfData,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DResource8::GetPrivateData(REFGUID refguid,void* pData,DWORD* pSizeOfData)
|
||||
{
|
||||
LOG("IDirect3DResource8::GetPrivateData( " << &refguid << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetPrivateData(refguid,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DResource8::FreePrivateData(REFGUID refguid)
|
||||
{
|
||||
LOG("IDirect3DResource8::FreePrivateData( " << &refguid << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->FreePrivateData(refguid);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(DWORD) D3D8Wrapper::IDirect3DResource8::SetPriority(DWORD PriorityNew)
|
||||
{
|
||||
LOG("IDirect3DResource8::SetPriority( " << PriorityNew << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->SetPriority(PriorityNew);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(DWORD) D3D8Wrapper::IDirect3DResource8::GetPriority()
|
||||
{
|
||||
LOG("IDirect3DResource8::GetPriority() [ " << this << " ]\n");
|
||||
return m_pD3D->GetPriority();
|
||||
}
|
||||
|
||||
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DResource8::PreLoad()
|
||||
{
|
||||
LOG("IDirect3DResource8::PreLoad() [ " << this << " ]\n");
|
||||
return m_pD3D->PreLoad();
|
||||
}
|
||||
|
||||
STDMETHODIMP_(D3D8Base::D3DRESOURCETYPE) D3D8Wrapper::IDirect3DResource8::GetType()
|
||||
{
|
||||
LOG("IDirect3DResource8::GetType() [ " << this << " ]\n");
|
||||
return m_pD3D->GetType();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,109 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
ThreadSafePointerSet IDirect3DSurface8::m_List;
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8::IDirect3DSurface8(D3D8Base::IDirect3DSurface8* realSurface) : IDirect3DUnknown((IUnknown*) realSurface)
|
||||
{
|
||||
LOG("IDirect3DSurface8::IDirect3DSurface8( " << realSurface << " )\n");
|
||||
m_pD3D = realSurface;
|
||||
}
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* D3D8Wrapper::IDirect3DSurface8::GetSurface(D3D8Base::IDirect3DSurface8* realSurface)
|
||||
{
|
||||
LOG("IDirect3DSurface8::GetSurface( " << realSurface << " )\n");
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedSurface = (D3D8Wrapper::IDirect3DSurface8*) m_List.GetDataPtr(realSurface);
|
||||
if(wrappedSurface == NULL)
|
||||
{
|
||||
wrappedSurface = new IDirect3DSurface8(realSurface);
|
||||
m_List.AddMember(realSurface, wrappedSurface);
|
||||
return wrappedSurface;
|
||||
}
|
||||
|
||||
wrappedSurface->m_ulRef++;
|
||||
return wrappedSurface;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) D3D8Wrapper::IDirect3DSurface8::Release(THIS)
|
||||
{
|
||||
LOG("IDirect3DSurface8::Release() [ " << this << " ]\n");
|
||||
m_pUnk->Release();
|
||||
|
||||
ULONG ulRef = --m_ulRef;
|
||||
if(ulRef == 0)
|
||||
{
|
||||
m_List.DeleteMember(GetSurface());
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
return ulRef;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::GetDevice(D3D8Wrapper::IDirect3DDevice8** ppDevice)
|
||||
{
|
||||
LOG("IDirect3DSurface8::GetDevice( " << ppDevice << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DDevice8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetDevice(&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DDevice8* wrappedD3D = new D3D8Wrapper::IDirect3DDevice8(realD3D);
|
||||
|
||||
*ppDevice = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::SetPrivateData(REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DSurface8::SetPrivateData( " << &refguid << " , " << pData << " , " << SizeOfData << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->SetPrivateData(refguid,pData,SizeOfData,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::GetPrivateData(REFGUID refguid,void* pData,DWORD* pSizeOfData)
|
||||
{
|
||||
LOG("IDirect3DSurface8::GetPrivateData( " << &refguid << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetPrivateData(refguid,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::FreePrivateData(REFGUID refguid)
|
||||
{
|
||||
LOG("IDirect3DSurface8::FreePrivateData( " << &refguid << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->FreePrivateData(refguid);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::GetContainer(REFIID riid,void** ppContainer)
|
||||
{
|
||||
LOG("IDirect3DSurface8::GetContainer( " << &riid << " , " << ppContainer << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetContainer(riid,ppContainer);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::GetDesc(D3D8Base::D3DSURFACE_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DSurface8::GetDesc( " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetDesc(pDesc);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::LockRect(D3D8Base::D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags)
|
||||
{
|
||||
#ifdef LOGGING
|
||||
LOG("IDirect3DSurface8::LockRect( " << pLockedRect << " , " << pRect);
|
||||
if (pRect != NULL)
|
||||
{
|
||||
LOG("{ " << pRect->left << " , " << pRect->top << " , " << pRect->right << " , " << pRect->bottom << " }");
|
||||
}
|
||||
LOG(" , " << Flags << " ) [ " << this << " ]\n");
|
||||
#endif
|
||||
return m_pD3D->LockRect(pLockedRect,pRect,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSurface8::UnlockRect()
|
||||
{
|
||||
LOG("IDirect3DSurface8::UnlockRect() [ " << this << " ]\n");
|
||||
return m_pD3D->UnlockRect();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
ThreadSafePointerSet IDirect3DSwapChain8::m_List;
|
||||
|
||||
D3D8Wrapper::IDirect3DSwapChain8::IDirect3DSwapChain8(D3D8Base::IDirect3DSwapChain8* realSwapChain) : IDirect3DUnknown((IUnknown*) realSwapChain)
|
||||
{
|
||||
LOG("IDirect3DSwapChain8::IDirect3DSwapChain8( " << realSwapChain << " )\n");
|
||||
m_pD3D = realSwapChain;
|
||||
}
|
||||
|
||||
D3D8Wrapper::IDirect3DSwapChain8* D3D8Wrapper::IDirect3DSwapChain8::GetSwapChain(D3D8Base::IDirect3DSwapChain8* realSwapChain)
|
||||
{
|
||||
LOG("IDirect3DSwapChain8::GetSwapChain( " << realSwapChain << " )\n");
|
||||
D3D8Wrapper::IDirect3DSwapChain8* wrappedSwapChain = (D3D8Wrapper::IDirect3DSwapChain8*) m_List.GetDataPtr(realSwapChain);
|
||||
if( wrappedSwapChain == NULL )
|
||||
{
|
||||
wrappedSwapChain = new D3D8Wrapper::IDirect3DSwapChain8(realSwapChain);
|
||||
m_List.AddMember(realSwapChain, wrappedSwapChain);
|
||||
return wrappedSwapChain;
|
||||
}
|
||||
|
||||
wrappedSwapChain->m_ulRef++;
|
||||
return wrappedSwapChain;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) D3D8Wrapper::IDirect3DSwapChain8::Release(THIS)
|
||||
{
|
||||
LOG("IDirect3DSwapChain8::Release()n[ " << this << " ]\n");
|
||||
m_pUnk->Release();
|
||||
|
||||
ULONG ulRef = --m_ulRef;
|
||||
if(ulRef == 0)
|
||||
{
|
||||
m_List.DeleteMember(GetSwapChain8());
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
return ulRef;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSwapChain8::Present(CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
|
||||
{
|
||||
LOG("IDirect3DSwapChain8::Present( " << pSourceRect << " , " << pDestRect << " , " << hDestWindowOverride << " , " << pDirtyRegion << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->Present(pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DSwapChain8::GetBackBuffer(UINT BackBuffer,D3D8Base::D3DBACKBUFFER_TYPE Type,D3D8Wrapper::IDirect3DSurface8** ppBackBuffer)
|
||||
{
|
||||
LOG("IDirect3DSwapChain8::GetBackBuffer( " << BackBuffer << " , " << Type << " , " << ppBackBuffer << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetBackBuffer(BackBuffer,Type,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppBackBuffer = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DTexture8::IDirect3DTexture8(D3D8Base::IDirect3DTexture8* realTexture) : IDirect3DBaseTexture8((D3D8Base::IDirect3DBaseTexture8*) realTexture)
|
||||
{
|
||||
LOG("IDirect3DTexture8::IDirect3DTexture8( " << realTexture << " )\n");
|
||||
m_pD3D = realTexture;
|
||||
}
|
||||
|
||||
D3D8Wrapper::IDirect3DTexture8* D3D8Wrapper::IDirect3DTexture8::GetTexture(D3D8Base::IDirect3DTexture8* realTexture)
|
||||
{
|
||||
LOG("IDirect3DTexture8::GetTexture( " << realTexture << " )\n");
|
||||
D3D8Wrapper::IDirect3DTexture8* wrappedTexture = (D3D8Wrapper::IDirect3DTexture8*) D3D8Wrapper::IDirect3DResource8::m_List.GetDataPtr(realTexture);
|
||||
if( wrappedTexture == NULL )
|
||||
{
|
||||
wrappedTexture = new D3D8Wrapper::IDirect3DTexture8(realTexture);
|
||||
D3D8Wrapper::IDirect3DResource8::m_List.AddMember(realTexture, wrappedTexture);
|
||||
return wrappedTexture;
|
||||
}
|
||||
|
||||
wrappedTexture->m_ulRef++;
|
||||
return wrappedTexture;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DTexture8::GetLevelDesc(UINT Level,D3D8Base::D3DSURFACE_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DTexture8::GetLevelDesc( " << Level << " , " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetLevelDesc(Level,pDesc);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DTexture8::GetSurfaceLevel(UINT Level,D3D8Wrapper::IDirect3DSurface8** ppSurfaceLevel)
|
||||
{
|
||||
LOG("IDirect3DTexture8::GetSurfaceLevel( " << Level << " , " << ppSurfaceLevel << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DSurface8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetSurfaceLevel(Level,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
|
||||
|
||||
*ppSurfaceLevel = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DTexture8::LockRect(UINT Level,D3D8Base::D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DTexture8::LockRect( " << Level << " , " << pLockedRect << " , " << pRect << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->LockRect(Level,pLockedRect,pRect,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DTexture8::UnlockRect(UINT Level)
|
||||
{
|
||||
LOG("IDirect3DTexture8::UnlockRect() [ " << this << " ]\n");
|
||||
return m_pD3D->UnlockRect(Level);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DTexture8::AddDirtyRect(CONST RECT* pDirtyRect)
|
||||
{
|
||||
LOG("IDirect3DTexture8::AddDirtyRect( " << pDirtyRect << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->AddDirtyRect(pDirtyRect);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DVertexBuffer8::IDirect3DVertexBuffer8(D3D8Base::IDirect3DVertexBuffer8* realVertexBuffer) : IDirect3DResource8((D3D8Base::IDirect3DResource8*) realVertexBuffer)
|
||||
{
|
||||
LOG("IDirect3DVertexBuffer8::IDirect3DVertexBuffer8( " << realVertexBuffer << " )\n");
|
||||
m_pD3D = realVertexBuffer;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVertexBuffer8::Lock(UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DVertexBuffer8::Lock( " << OffsetToLock << " , " << SizeToLock << " , " << ppbData << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->Lock(OffsetToLock,SizeToLock,ppbData,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVertexBuffer8::Unlock()
|
||||
{
|
||||
LOG("IDirect3DVertexBuffer8::Unlock() [ " << this << " ]\n");
|
||||
return m_pD3D->Unlock();
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVertexBuffer8::GetDesc(D3D8Base::D3DVERTEXBUFFER_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DVertexBuffer8::GetDesc( " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetDesc(pDesc);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DVolume8::IDirect3DVolume8(D3D8Base::IDirect3DVolume8* realVolume) : IDirect3DUnknown((IUnknown*) realVolume)
|
||||
{
|
||||
LOG("IDirect3DVolume8::IDirect3DVolume8( " << realVolume << " )\n");
|
||||
m_pD3D = realVolume;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::GetDevice(D3D8Wrapper::IDirect3DDevice8** ppDevice)
|
||||
{
|
||||
LOG("IDirect3DVolume8::GetDevice( " << ppDevice << " )\n");
|
||||
|
||||
D3D8Base::IDirect3DDevice8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetDevice(&realD3D);//ppDevice);
|
||||
|
||||
D3D8Wrapper::IDirect3DDevice8* wrappedD3D = new D3D8Wrapper::IDirect3DDevice8(realD3D);
|
||||
|
||||
*ppDevice = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::SetPrivateData(REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DVolume8::SetPrivateData( " << &refguid << " , " << pData << " , " << SizeOfData << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->SetPrivateData(refguid,pData,SizeOfData,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::GetPrivateData(REFGUID refguid,void* pData,DWORD* pSizeOfData)
|
||||
{
|
||||
LOG("IDirect3DVolume8::GetPrivateData( " << &refguid << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetPrivateData(refguid,pData,pSizeOfData);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::FreePrivateData(REFGUID refguid)
|
||||
{
|
||||
LOG("IDirect3DVolume8::FreePrivateData( " << &refguid << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->FreePrivateData(refguid);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::GetContainer(REFIID riid,void** ppContainer)
|
||||
{
|
||||
LOG("IDirect3DVolume8::GetContainer( " << &riid << " , " << ppContainer << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetContainer(riid,ppContainer);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::GetDesc(D3D8Base::D3DVOLUME_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DVolume8::GetDesc( " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetDesc(pDesc);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::LockBox(D3D8Base::D3DLOCKED_BOX * pLockedVolume,CONST D3D8Base::D3DBOX* pBox,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DVolume8::LockBox( " << pLockedVolume << " , " << pBox << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->LockBox(pLockedVolume,pBox,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolume8::UnlockBox()
|
||||
{
|
||||
LOG("IDirect3DVolume8::UnlockBox() [ " << this << " ]\n");
|
||||
return m_pD3D->UnlockBox();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
D3D8Wrapper::IDirect3DVolumeTexture8::IDirect3DVolumeTexture8(D3D8Base::IDirect3DVolumeTexture8* realVolumeTexture) : IDirect3DBaseTexture8((D3D8Base::IDirect3DBaseTexture8*) realVolumeTexture)
|
||||
{
|
||||
LOG("IDirect3DVolumeTexture8( " << realVolumeTexture << " )\n");
|
||||
m_pD3D = realVolumeTexture;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolumeTexture8::GetLevelDesc(UINT Level,D3D8Base::D3DVOLUME_DESC *pDesc)
|
||||
{
|
||||
LOG("IDirect3DVolumeTexture8::GetLevelDesc( " << Level << " , " << pDesc << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->GetLevelDesc(Level,pDesc);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolumeTexture8::GetVolumeLevel(UINT Level,D3D8Wrapper::IDirect3DVolume8** ppVolumeLevel)
|
||||
{
|
||||
LOG("IDirect3DVolumeTexture8::GetVolumeLevel( " << Level << " , " << ppVolumeLevel << " ) [ " << this << " ]\n");
|
||||
|
||||
D3D8Base::IDirect3DVolume8* realD3D = NULL;
|
||||
|
||||
HRESULT hr = m_pD3D->GetVolumeLevel(Level,&realD3D);
|
||||
|
||||
D3D8Wrapper::IDirect3DVolume8* wrappedD3D = new D3D8Wrapper::IDirect3DVolume8(realD3D);
|
||||
|
||||
*ppVolumeLevel = wrappedD3D;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolumeTexture8::LockBox(UINT Level,D3D8Base::D3DLOCKED_BOX* pLockedVolume,CONST D3D8Base::D3DBOX* pBox,DWORD Flags)
|
||||
{
|
||||
LOG("IDirect3DVolumeTexture8::LockBox( " << Level << " , " << pLockedVolume << " , " << pBox << " , " << Flags << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->LockBox(Level,pLockedVolume,pBox,Flags);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolumeTexture8::UnlockBox(UINT Level)
|
||||
{
|
||||
LOG("IDirect3DVolumeTexture8::UnlockBox( " << Level << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->UnlockBox(Level);
|
||||
}
|
||||
|
||||
STDMETHODIMP D3D8Wrapper::IDirect3DVolumeTexture8::AddDirtyBox(CONST D3D8Base::D3DBOX* pDirtyBox)
|
||||
{
|
||||
LOG("IDirect3DVolumeTexture8::AddDirtyBox( " << pDirtyBox << " ) [ " << this << " ]\n");
|
||||
return m_pD3D->AddDirtyBox(pDirtyBox);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <objidl.h>
|
||||
|
||||
const UINT PointerSetHashSize = 128;
|
||||
|
||||
struct PointerLinkedList
|
||||
{
|
||||
PVOID pKey;
|
||||
PVOID pData;
|
||||
PointerLinkedList* pNext;
|
||||
};
|
||||
|
||||
class PointerSet
|
||||
{
|
||||
public:
|
||||
PointerSet()
|
||||
{
|
||||
for(UINT i = 0; i < PointerSetHashSize; i++)
|
||||
{
|
||||
m_pHead[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
PVOID GetDataPtr(PVOID pKey)
|
||||
{
|
||||
PointerLinkedList* pThis = m_pHead[GetHash(pKey)];
|
||||
while(pThis)
|
||||
{
|
||||
if(pThis->pKey == pKey)
|
||||
{
|
||||
return pThis->pData;
|
||||
}
|
||||
pThis = pThis->pNext;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
bool AddMember(PVOID pKey, PVOID pData)
|
||||
{
|
||||
UINT Hash = GetHash(pKey);
|
||||
PointerLinkedList* pThis = new PointerLinkedList;
|
||||
if(pThis == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
pThis->pNext = m_pHead[Hash];
|
||||
pThis->pKey = pKey;
|
||||
pThis->pData = pData;
|
||||
m_pHead[Hash] = pThis;
|
||||
return true;
|
||||
}
|
||||
bool DeleteMember(PVOID pKey)
|
||||
{
|
||||
UINT Hash = GetHash(pKey);
|
||||
PointerLinkedList* pThis = m_pHead[Hash];
|
||||
PointerLinkedList* pLast = 0L;
|
||||
|
||||
if( m_pHead[Hash]->pKey == pKey )
|
||||
{
|
||||
m_pHead[Hash] = pThis->pNext;
|
||||
delete pThis;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pLast = pThis;
|
||||
pThis = pThis->pNext;
|
||||
}
|
||||
|
||||
while( pThis )
|
||||
{
|
||||
if( pThis->pKey == pKey )
|
||||
{
|
||||
pLast->pNext = pThis->pNext;
|
||||
delete pThis;
|
||||
return true;
|
||||
}
|
||||
pLast = pThis;
|
||||
pThis = pThis->pNext;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
__forceinline UINT GetHash(PVOID pKey)
|
||||
{
|
||||
DWORD Key = (DWORD)pKey;
|
||||
return (( Key >> 3 ^ Key >> 7 ^ Key >> 11 ^ Key >> 17 ) & (PointerSetHashSize - 1));
|
||||
}
|
||||
|
||||
private:
|
||||
PointerLinkedList* m_pHead[PointerSetHashSize];
|
||||
};
|
||||
|
||||
|
||||
class ThreadSafePointerSet : public PointerSet
|
||||
{
|
||||
public:
|
||||
ThreadSafePointerSet()
|
||||
{
|
||||
InitializeCriticalSection(&m_CritSec);
|
||||
}
|
||||
~ThreadSafePointerSet()
|
||||
{
|
||||
DeleteCriticalSection(&m_CritSec);
|
||||
}
|
||||
PVOID GetDataPtr(PVOID pKey)
|
||||
{
|
||||
EnterCriticalSection(&m_CritSec);
|
||||
PVOID p = PointerSet::GetDataPtr(pKey);
|
||||
LeaveCriticalSection(&m_CritSec);
|
||||
return p;
|
||||
}
|
||||
bool AddMember(PVOID pKey, PVOID pData)
|
||||
{
|
||||
EnterCriticalSection(&m_CritSec);
|
||||
bool Result = PointerSet::AddMember(pKey, pData);
|
||||
LeaveCriticalSection(&m_CritSec);
|
||||
return Result;
|
||||
}
|
||||
bool DeleteMember(PVOID pKey)
|
||||
{
|
||||
EnterCriticalSection(&m_CritSec);
|
||||
bool Result = PointerSet::DeleteMember(pKey);
|
||||
LeaveCriticalSection(&m_CritSec);
|
||||
return Result;
|
||||
}
|
||||
|
||||
private:
|
||||
CRITICAL_SECTION m_CritSec;
|
||||
};
|
|
@ -1,125 +0,0 @@
|
|||
#include "d3d8Wrapper.h"
|
||||
|
||||
D3D8Base::LPDIRECT3D8 g_D3D=NULL;
|
||||
|
||||
HMODULE realDLL;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
IDirect3DDevice8 *last_device = NULL;
|
||||
IDirect3DSurface8 *render_surface = NULL;
|
||||
void (*rendering_callback)( int );
|
||||
|
||||
D3D8Wrapper::IDirect3D8* WINAPI Direct3DCreate8(UINT Version)
|
||||
{
|
||||
//sometimes, Intel drivers will clear the dll path. So let's save and restore it (do their job for them)
|
||||
char oldDllDirectory[MAX_PATH];
|
||||
GetDllDirectory(MAX_PATH, oldDllDirectory);
|
||||
|
||||
// Get the real DLL path from the system directory, needs to be specific to avoid binding to the d3d8.dll we're in now!
|
||||
// Might be unsafe
|
||||
CHAR dll_path[1024];
|
||||
GetSystemDirectory(dll_path,1024);
|
||||
strcat(dll_path,"\\d3d8.dll");
|
||||
|
||||
realDLL = LoadLibrary(dll_path);
|
||||
|
||||
D3D8Wrapper::D3DCREATE realDirect3DCreate8 = (D3D8Wrapper::D3DCREATE)GetProcAddress(realDLL, "Direct3DCreate8");
|
||||
|
||||
// Use the real Direct3DCreate8 to make the base object
|
||||
D3D8Base::IDirect3D8* realD3D = realDirect3DCreate8(D3D_SDK_VERSION);
|
||||
|
||||
// Wrap the object
|
||||
D3D8Wrapper::IDirect3D8* wrappedD3D = D3D8Wrapper::IDirect3D8::GetDirect3D(realD3D);
|
||||
|
||||
//restore old DLL directory
|
||||
SetDllDirectory(oldDllDirectory);
|
||||
|
||||
return wrappedD3D;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__declspec(dllexport) void __cdecl CloseDLL()
|
||||
{
|
||||
FreeLibrary(realDLL);
|
||||
}
|
||||
|
||||
__declspec(dllexport) void __cdecl SetRenderingCallback(void (*callback)(int))
|
||||
{
|
||||
D3D8Wrapper::rendering_callback = callback;
|
||||
}
|
||||
|
||||
__declspec(dllexport) void __cdecl ReadScreen(void *dest, int *width, int *height)
|
||||
{
|
||||
if (D3D8Wrapper::last_device == NULL)
|
||||
{
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// surface...
|
||||
// make a D3DSURFACE_DESC, pass to GetDesc
|
||||
D3D8Base::D3DSURFACE_DESC desc;
|
||||
D3D8Wrapper::render_surface->GetDesc(&desc);
|
||||
|
||||
// get out height/width
|
||||
*width = desc.Width;
|
||||
*height = desc.Height;
|
||||
|
||||
// if dest isn't null
|
||||
if (dest != NULL)
|
||||
{
|
||||
// make a RECT with size of buffer
|
||||
RECT entire_buffer;
|
||||
entire_buffer.left = 0;
|
||||
entire_buffer.top = 0;
|
||||
entire_buffer.right = desc.Width;
|
||||
entire_buffer.bottom = desc.Height;
|
||||
|
||||
//resolve rendertarget to a system memory texture, for locking
|
||||
//TODO! UNACCEPTABLE CODE! THIS IS HORRIBLE!
|
||||
//X8R8G8B8 or fail -- A8R8G8B8 will malfunction (is it because the source surface format isnt matching? I think so)
|
||||
static D3D8Wrapper::IDirect3DTexture8* tex = NULL;
|
||||
static RECT texRect;
|
||||
if(!tex || (texRect.right != entire_buffer.right) || (texRect.bottom != entire_buffer.bottom))
|
||||
{
|
||||
if(tex)
|
||||
tex->Release();
|
||||
texRect = entire_buffer;
|
||||
D3D8Wrapper::last_device->CreateTexture(desc.Width, desc.Height, 1, 0, D3D8Base::D3DFMT_X8R8G8B8, D3D8Base::D3DPOOL_SYSTEMMEM, &tex);
|
||||
}
|
||||
|
||||
D3D8Wrapper::IDirect3DSurface8* surf;
|
||||
tex->GetSurfaceLevel(0,&surf);
|
||||
HRESULT hr = D3D8Wrapper::last_device->CopyRects(D3D8Wrapper::render_surface,NULL,0,surf,NULL);
|
||||
|
||||
// make a D3DLOCKED_RECT, pass to LockRect
|
||||
D3D8Base::D3DLOCKED_RECT locked;
|
||||
hr = surf->LockRect(&locked,&entire_buffer,D3DLOCK_READONLY);
|
||||
|
||||
//this loop was reversed from the original.
|
||||
//it should be faster anyway if anything since the reading can be prefetched forwardly.
|
||||
//TODO - allow bizhawk to handle flipped images.... nonetheless, it might not handle images with unusual pitches, although maybe we should consider that.
|
||||
//so this code will probably remain for quite some time
|
||||
int dest_row = desc.Height - 1;
|
||||
for (UINT from_row = 0; from_row < desc.Height; from_row++)
|
||||
{
|
||||
memcpy((char*)dest + (dest_row * desc.Width*4),(char*)locked.pBits + from_row * locked.Pitch, desc.Width*4);
|
||||
dest_row--;
|
||||
}
|
||||
|
||||
// unlock rect
|
||||
surf->UnlockRect();
|
||||
surf->Release();
|
||||
}
|
||||
|
||||
// release the surface
|
||||
//backbuffer->Release();
|
||||
|
||||
// we're done, maybe?
|
||||
}
|
||||
}
|
|
@ -1,436 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "PointerSet.h"
|
||||
|
||||
#pragma comment(linker, "/EXPORT:Direct3DCreate8=_Direct3DCreate8@4")
|
||||
|
||||
//#define LOGGING 1
|
||||
|
||||
#ifdef LOGGING
|
||||
#define LOG(x) { std::ofstream myfile; myfile.open ("d3d8_wrapper_log.txt", std::ios::app); myfile << x; myfile.close(); }
|
||||
#else
|
||||
#define LOG(x)
|
||||
#endif
|
||||
|
||||
namespace D3D8Base
|
||||
{
|
||||
#include "d3d8base/d3d8.h"
|
||||
}
|
||||
extern "C"
|
||||
{
|
||||
namespace D3D8Wrapper
|
||||
{
|
||||
class IDirect3DUnknown
|
||||
{
|
||||
|
||||
public:
|
||||
IUnknown* m_pUnk;
|
||||
ULONG m_ulRef;
|
||||
|
||||
public:
|
||||
IDirect3DUnknown(IUnknown* pUnk)
|
||||
{
|
||||
m_pUnk = pUnk;
|
||||
m_ulRef = 1;
|
||||
}
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHOD_(ULONG,AddRef)(THIS)
|
||||
{
|
||||
m_pUnk->AddRef();
|
||||
return ++m_ulRef;
|
||||
}
|
||||
|
||||
STDMETHOD_(ULONG,Release)(THIS)
|
||||
{
|
||||
m_pUnk->Release();
|
||||
|
||||
ULONG ulRef = --m_ulRef;
|
||||
if( 0 == ulRef )
|
||||
{
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
return ulRef;
|
||||
}
|
||||
};
|
||||
|
||||
class IDirect3D8;
|
||||
class IDirect3DDevice8;
|
||||
|
||||
class IDirect3DResource8;
|
||||
class IDirect3DBaseTexture8;
|
||||
class IDirect3DTexture8;
|
||||
class IDirect3DVolumeTexture8;
|
||||
class IDirect3DCubeTexture8;
|
||||
|
||||
class IDirect3DVertexBuffer8;
|
||||
class IDirect3DIndexBuffer8;
|
||||
|
||||
class IDirect3DSurface8;
|
||||
class IDirect3DVolume8;
|
||||
|
||||
class IDirect3DSwapChain8;
|
||||
|
||||
class IDirect3D8 : public IDirect3DUnknown
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3D8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
IDirect3D8(D3D8Base::IDirect3D8*);
|
||||
|
||||
inline D3D8Base::IDirect3D8* GetDirect3D8() { return m_pD3D; }
|
||||
static IDirect3D8* GetDirect3D(D3D8Base::IDirect3D8* pD3D);
|
||||
|
||||
/*** IDirect3DUnknown methods ***/
|
||||
STDMETHOD_(ULONG,Release)(THIS);
|
||||
|
||||
/*** IDirect3D8 methods ***/
|
||||
STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction);
|
||||
STDMETHOD_(UINT, GetAdapterCount)(THIS);
|
||||
STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter,DWORD Flags,D3D8Base::D3DADAPTER_IDENTIFIER8* pIdentifier);
|
||||
STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter);
|
||||
STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter,UINT Mode,D3D8Base::D3DDISPLAYMODE* pMode);
|
||||
STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter,D3D8Base::D3DDISPLAYMODE* pMode);
|
||||
STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter,D3D8Base::D3DDEVTYPE CheckType,D3D8Base::D3DFORMAT DisplayFormat,D3D8Base::D3DFORMAT BackBufferFormat,BOOL Windowed);
|
||||
STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DFORMAT AdapterFormat,DWORD Usage,D3D8Base::D3DRESOURCETYPE RType,D3D8Base::D3DFORMAT CheckFormat);
|
||||
STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DFORMAT SurfaceFormat,BOOL Windowed,D3D8Base::D3DMULTISAMPLE_TYPE MultiSampleType);
|
||||
STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DFORMAT AdapterFormat,D3D8Base::D3DFORMAT RenderTargetFormat,D3D8Base::D3DFORMAT DepthStencilFormat);
|
||||
STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,D3D8Base::D3DCAPS8* pCaps);
|
||||
STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter);
|
||||
STDMETHOD(CreateDevice)(THIS_ UINT Adapter,D3D8Base::D3DDEVTYPE DeviceType,HWND hFocusWindow,DWORD BehaviorFlags,D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters,D3D8Wrapper::IDirect3DDevice8** ppReturnedDeviceInterface);
|
||||
};
|
||||
|
||||
class IDirect3DDevice8 : public IDirect3DUnknown
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DDevice8* m_pDevice;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj)
|
||||
{
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
static IDirect3DDevice8* GetDirect3DDevice(D3D8Base::IDirect3DDevice8* pDevice);
|
||||
__forceinline D3D8Base::IDirect3DDevice8* GetD3D8Device() { return m_pDevice; }
|
||||
|
||||
/*** IDirect3DUnknown methods ***/
|
||||
STDMETHOD_(ULONG,Release)(THIS);
|
||||
|
||||
IDirect3DDevice8(D3D8Base::IDirect3DDevice8*);
|
||||
|
||||
/*** IDirect3DDevice8 methods ***/
|
||||
STDMETHOD(TestCooperativeLevel)(THIS);
|
||||
STDMETHOD_(UINT, GetAvailableTextureMem)(THIS);
|
||||
STDMETHOD(ResourceManagerDiscardBytes)(THIS_ DWORD Bytes);
|
||||
STDMETHOD(GetDirect3D)(THIS_ D3D8Wrapper::IDirect3D8** ppD3D8);
|
||||
STDMETHOD(GetDeviceCaps)(THIS_ D3D8Base::D3DCAPS8* pCaps);
|
||||
STDMETHOD(GetDisplayMode)(THIS_ D3D8Base::D3DDISPLAYMODE* pMode);
|
||||
STDMETHOD(GetCreationParameters)(THIS_ D3D8Base::D3DDEVICE_CREATION_PARAMETERS *pParameters);
|
||||
STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot,UINT YHotSpot,D3D8Wrapper::IDirect3DSurface8* pCursorBitmap);
|
||||
STDMETHOD_(void, SetCursorPosition)(THIS_ int X,int Y,DWORD Flags);
|
||||
STDMETHOD_(BOOL, ShowCursor)(THIS_ BOOL bShow);
|
||||
STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters,D3D8Wrapper::IDirect3DSwapChain8** pSwapChain);
|
||||
STDMETHOD(Reset)(THIS_ D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters);
|
||||
STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
|
||||
STDMETHOD(GetBackBuffer)(THIS_ UINT BackBuffer,D3D8Base::D3DBACKBUFFER_TYPE Type,D3D8Wrapper::IDirect3DSurface8** ppBackBuffer);
|
||||
STDMETHOD(GetRasterStatus)(THIS_ D3D8Base::D3DRASTER_STATUS* pRasterStatus);
|
||||
STDMETHOD_(void, SetGammaRamp)(THIS_ DWORD Flags,CONST D3D8Base::D3DGAMMARAMP* pRamp);
|
||||
STDMETHOD_(void, GetGammaRamp)(THIS_ D3D8Base::D3DGAMMARAMP* pRamp);
|
||||
STDMETHOD(CreateTexture)(THIS_ UINT Width,UINT Height,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DTexture8** ppTexture);
|
||||
STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DVolumeTexture8** ppVolumeTexture);
|
||||
STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DCubeTexture8** ppCubeTexture);
|
||||
STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DVertexBuffer8** ppVertexBuffer);
|
||||
STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DIndexBuffer8** ppIndexBuffer);
|
||||
STDMETHOD(CreateRenderTarget)(THIS_ UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Base::D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,D3D8Wrapper::IDirect3DSurface8** ppSurface);
|
||||
STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Base::D3DMULTISAMPLE_TYPE MultiSample,D3D8Wrapper::IDirect3DSurface8** ppSurface);
|
||||
STDMETHOD(CreateImageSurface)(THIS_ UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Wrapper::IDirect3DSurface8** ppSurface);
|
||||
STDMETHOD(CopyRects)(THIS_ D3D8Wrapper::IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,D3D8Wrapper::IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray);
|
||||
STDMETHOD(UpdateTexture)(THIS_ D3D8Wrapper::IDirect3DBaseTexture8* pSourceTexture,D3D8Wrapper::IDirect3DBaseTexture8* pDestinationTexture);
|
||||
STDMETHOD(GetFrontBuffer)(THIS_ D3D8Wrapper::IDirect3DSurface8* pDestSurface);
|
||||
STDMETHOD(SetRenderTarget)(THIS_ D3D8Wrapper::IDirect3DSurface8* pRenderTarget,D3D8Wrapper::IDirect3DSurface8* pNewZStencil);
|
||||
STDMETHOD(GetRenderTarget)(THIS_ D3D8Wrapper::IDirect3DSurface8** ppRenderTarget);
|
||||
STDMETHOD(GetDepthStencilSurface)(THIS_ D3D8Wrapper::IDirect3DSurface8** ppZStencilSurface);
|
||||
STDMETHOD(BeginScene)(THIS);
|
||||
STDMETHOD(EndScene)(THIS);
|
||||
STDMETHOD(Clear)(THIS_ DWORD Count,CONST D3D8Base::D3DRECT* pRects,DWORD Flags,D3D8Base::D3DCOLOR Color,float Z,DWORD Stencil);
|
||||
STDMETHOD(SetTransform)(THIS_ D3D8Base::D3DTRANSFORMSTATETYPE State,CONST D3D8Base::D3DMATRIX* pMatrix);
|
||||
STDMETHOD(GetTransform)(THIS_ D3D8Base::D3DTRANSFORMSTATETYPE State,D3D8Base::D3DMATRIX* pMatrix);
|
||||
STDMETHOD(MultiplyTransform)(THIS_ D3D8Base::D3DTRANSFORMSTATETYPE,CONST D3D8Base::D3DMATRIX*);
|
||||
STDMETHOD(SetViewport)(THIS_ CONST D3D8Base::D3DVIEWPORT8* pViewport);
|
||||
STDMETHOD(GetViewport)(THIS_ D3D8Base::D3DVIEWPORT8* pViewport);
|
||||
STDMETHOD(SetMaterial)(THIS_ CONST D3D8Base::D3DMATERIAL8* pMaterial);
|
||||
STDMETHOD(GetMaterial)(THIS_ D3D8Base::D3DMATERIAL8* pMaterial);
|
||||
STDMETHOD(SetLight)(THIS_ DWORD Index,CONST D3D8Base::D3DLIGHT8*);
|
||||
STDMETHOD(GetLight)(THIS_ DWORD Index,D3D8Base::D3DLIGHT8*);
|
||||
STDMETHOD(LightEnable)(THIS_ DWORD Index,BOOL Enable);
|
||||
STDMETHOD(GetLightEnable)(THIS_ DWORD Index,BOOL* pEnable);
|
||||
STDMETHOD(SetClipPlane)(THIS_ DWORD Index,CONST float* pPlane);
|
||||
STDMETHOD(GetClipPlane)(THIS_ DWORD Index,float* pPlane);
|
||||
STDMETHOD(SetRenderState)(THIS_ D3D8Base::D3DRENDERSTATETYPE State,DWORD Value);
|
||||
STDMETHOD(GetRenderState)(THIS_ D3D8Base::D3DRENDERSTATETYPE State,DWORD* pValue);
|
||||
STDMETHOD(BeginStateBlock)(THIS);
|
||||
STDMETHOD(EndStateBlock)(THIS_ DWORD* pToken);
|
||||
STDMETHOD(ApplyStateBlock)(THIS_ DWORD Token);
|
||||
STDMETHOD(CaptureStateBlock)(THIS_ DWORD Token);
|
||||
STDMETHOD(DeleteStateBlock)(THIS_ DWORD Token);
|
||||
STDMETHOD(CreateStateBlock)(THIS_ D3D8Base::D3DSTATEBLOCKTYPE Type,DWORD* pToken);
|
||||
STDMETHOD(SetClipStatus)(THIS_ CONST D3D8Base::D3DCLIPSTATUS8* pClipStatus);
|
||||
STDMETHOD(GetClipStatus)(THIS_ D3D8Base::D3DCLIPSTATUS8* pClipStatus);
|
||||
STDMETHOD(GetTexture)(THIS_ DWORD Stage,D3D8Wrapper::IDirect3DBaseTexture8** ppTexture);
|
||||
STDMETHOD(SetTexture)(THIS_ DWORD Stage,D3D8Wrapper::IDirect3DBaseTexture8* pTexture);
|
||||
STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage,D3D8Base::D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue);
|
||||
STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage,D3D8Base::D3DTEXTURESTAGESTATETYPE Type,DWORD Value);
|
||||
STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses);
|
||||
STDMETHOD(GetInfo)(THIS_ DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize);
|
||||
STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber,CONST PALETTEENTRY* pEntries);
|
||||
STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries);
|
||||
STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber);
|
||||
STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber);
|
||||
STDMETHOD(DrawPrimitive)(THIS_ D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount);
|
||||
STDMETHOD(DrawIndexedPrimitive)(THIS_ D3D8Base::D3DPRIMITIVETYPE,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount);
|
||||
STDMETHOD(DrawPrimitiveUP)(THIS_ D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride);
|
||||
STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData,D3D8Base::D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride);
|
||||
STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,D3D8Wrapper::IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags);
|
||||
STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage);
|
||||
STDMETHOD(SetVertexShader)(THIS_ DWORD Handle);
|
||||
STDMETHOD(GetVertexShader)(THIS_ DWORD* pHandle);
|
||||
STDMETHOD(DeleteVertexShader)(THIS_ DWORD Handle);
|
||||
STDMETHOD(SetVertexShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount);
|
||||
STDMETHOD(GetVertexShaderConstant)(THIS_ DWORD Register,void* pConstantData,DWORD ConstantCount);
|
||||
STDMETHOD(GetVertexShaderDeclaration)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData);
|
||||
STDMETHOD(GetVertexShaderFunction)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData);
|
||||
STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber,D3D8Wrapper::IDirect3DVertexBuffer8* pStreamData,UINT Stride);
|
||||
STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber,D3D8Wrapper::IDirect3DVertexBuffer8** ppStreamData,UINT* pStride);
|
||||
STDMETHOD(SetIndices)(THIS_ D3D8Wrapper::IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex);
|
||||
STDMETHOD(GetIndices)(THIS_ D3D8Wrapper::IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex);
|
||||
STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction,DWORD* pHandle);
|
||||
STDMETHOD(SetPixelShader)(THIS_ DWORD Handle);
|
||||
STDMETHOD(GetPixelShader)(THIS_ DWORD* pHandle);
|
||||
STDMETHOD(DeletePixelShader)(THIS_ DWORD Handle);
|
||||
STDMETHOD(SetPixelShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount);
|
||||
STDMETHOD(GetPixelShaderConstant)(THIS_ DWORD Register,void* pConstantData,DWORD ConstantCount);
|
||||
STDMETHOD(GetPixelShaderFunction)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData);
|
||||
STDMETHOD(DrawRectPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3D8Base::D3DRECTPATCH_INFO* pRectPatchInfo);
|
||||
STDMETHOD(DrawTriPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3D8Base::D3DTRIPATCH_INFO* pTriPatchInfo);
|
||||
STDMETHOD(DeletePatch)(THIS_ UINT Handle);
|
||||
};
|
||||
|
||||
class IDirect3DSwapChain8 : public IDirect3DUnknown
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DSwapChain8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD_(ULONG,Release)(THIS);
|
||||
|
||||
static IDirect3DSwapChain8* GetSwapChain(D3D8Base::IDirect3DSwapChain8* pSwapChain);
|
||||
inline D3D8Base::IDirect3DSwapChain8* GetSwapChain8() { return m_pD3D; }
|
||||
|
||||
IDirect3DSwapChain8(D3D8Base::IDirect3DSwapChain8*);
|
||||
|
||||
STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
|
||||
STDMETHOD(GetBackBuffer)(THIS_ UINT BackBuffer,D3D8Base::D3DBACKBUFFER_TYPE Type,D3D8Wrapper::IDirect3DSurface8** ppBackBuffer);
|
||||
};
|
||||
|
||||
class IDirect3DResource8 : public IDirect3DUnknown
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DResource8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD_(ULONG,Release)(THIS);
|
||||
|
||||
static IDirect3DResource8* GetResource(D3D8Base::IDirect3DResource8* pSwapChain);
|
||||
inline D3D8Base::IDirect3DResource8* GetResource() { return m_pD3D; }
|
||||
|
||||
IDirect3DResource8(D3D8Base::IDirect3DResource8*);
|
||||
|
||||
STDMETHOD(GetDevice)(THIS_ D3D8Wrapper::IDirect3DDevice8** ppDevice);
|
||||
STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags);
|
||||
STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData);
|
||||
STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid);
|
||||
STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew);
|
||||
STDMETHOD_(DWORD, GetPriority)(THIS);
|
||||
STDMETHOD_(void, PreLoad)(THIS);
|
||||
STDMETHOD_(D3D8Base::D3DRESOURCETYPE, GetType)(THIS);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class IDirect3DBaseTexture8 : public IDirect3DResource8
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DBaseTexture8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DBaseTexture8(D3D8Base::IDirect3DBaseTexture8*);
|
||||
|
||||
inline D3D8Base::IDirect3DBaseTexture8* GetBaseTexture() { return m_pD3D; }
|
||||
|
||||
STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew);
|
||||
STDMETHOD_(DWORD, GetLOD)(THIS);
|
||||
STDMETHOD_(DWORD, GetLevelCount)(THIS);
|
||||
};
|
||||
|
||||
|
||||
class IDirect3DTexture8 : public IDirect3DBaseTexture8
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DTexture8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DTexture8(D3D8Base::IDirect3DTexture8*);
|
||||
|
||||
static D3D8Wrapper::IDirect3DTexture8* GetTexture(D3D8Base::IDirect3DTexture8*);
|
||||
|
||||
STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3D8Base::D3DSURFACE_DESC *pDesc);
|
||||
STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level,D3D8Wrapper::IDirect3DSurface8** ppSurfaceLevel);
|
||||
STDMETHOD(LockRect)(THIS_ UINT Level,D3D8Base::D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
|
||||
STDMETHOD(UnlockRect)(THIS_ UINT Level);
|
||||
STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pDirtyRect);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class IDirect3DVolumeTexture8 : public IDirect3DBaseTexture8
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DVolumeTexture8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DVolumeTexture8(D3D8Base::IDirect3DVolumeTexture8*);
|
||||
|
||||
STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3D8Base::D3DVOLUME_DESC *pDesc);
|
||||
STDMETHOD(GetVolumeLevel)(THIS_ UINT Level,D3D8Wrapper::IDirect3DVolume8** ppVolumeLevel);
|
||||
STDMETHOD(LockBox)(THIS_ UINT Level,D3D8Base::D3DLOCKED_BOX* pLockedVolume,CONST D3D8Base::D3DBOX* pBox,DWORD Flags);
|
||||
STDMETHOD(UnlockBox)(THIS_ UINT Level);
|
||||
STDMETHOD(AddDirtyBox)(THIS_ CONST D3D8Base::D3DBOX* pDirtyBox);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class IDirect3DCubeTexture8 : public IDirect3DBaseTexture8
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DCubeTexture8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DCubeTexture8(D3D8Base::IDirect3DCubeTexture8*);
|
||||
|
||||
STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3D8Base::D3DSURFACE_DESC *pDesc);
|
||||
STDMETHOD(GetCubeMapSurface)(THIS_ D3D8Base::D3DCUBEMAP_FACES FaceType,UINT Level,D3D8Wrapper::IDirect3DSurface8** ppCubeMapSurface);
|
||||
STDMETHOD(LockRect)(THIS_ D3D8Base::D3DCUBEMAP_FACES FaceType,UINT Level,D3D8Base::D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
|
||||
STDMETHOD(UnlockRect)(THIS_ D3D8Base::D3DCUBEMAP_FACES FaceType,UINT Level);
|
||||
STDMETHOD(AddDirtyRect)(THIS_ D3D8Base::D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect);
|
||||
};
|
||||
|
||||
|
||||
class IDirect3DVertexBuffer8 : public IDirect3DResource8
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DVertexBuffer8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DVertexBuffer8(D3D8Base::IDirect3DVertexBuffer8*);
|
||||
|
||||
inline D3D8Base::IDirect3DVertexBuffer8* GetVertexBuffer() { return m_pD3D; }
|
||||
|
||||
STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags);
|
||||
STDMETHOD(Unlock)(THIS);
|
||||
STDMETHOD(GetDesc)(THIS_ D3D8Base::D3DVERTEXBUFFER_DESC *pDesc);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class IDirect3DIndexBuffer8 : public IDirect3DResource8
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DIndexBuffer8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DIndexBuffer8(D3D8Base::IDirect3DIndexBuffer8*);
|
||||
|
||||
inline D3D8Base::IDirect3DIndexBuffer8* GetIndexBuffer() { return m_pD3D; }
|
||||
|
||||
STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags);
|
||||
STDMETHOD(Unlock)(THIS);
|
||||
STDMETHOD(GetDesc)(THIS_ D3D8Base::D3DINDEXBUFFER_DESC *pDesc);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class IDirect3DSurface8 : public IDirect3DUnknown
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DSurface8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DSurface8(D3D8Base::IDirect3DSurface8*);
|
||||
static IDirect3DSurface8* GetSurface(D3D8Base::IDirect3DSurface8* pSurface);
|
||||
inline D3D8Base::IDirect3DSurface8* GetSurface() { return m_pD3D; }
|
||||
|
||||
/*** IDirect3DUnknown methods ***/
|
||||
STDMETHOD_(ULONG, Release)(THIS);
|
||||
|
||||
STDMETHOD(GetDevice)(THIS_ D3D8Wrapper::IDirect3DDevice8** ppDevice);
|
||||
STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags);
|
||||
STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData);
|
||||
STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid);
|
||||
STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer);
|
||||
STDMETHOD(GetDesc)(THIS_ D3D8Base::D3DSURFACE_DESC *pDesc);
|
||||
STDMETHOD(LockRect)(THIS_ D3D8Base::D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
|
||||
STDMETHOD(UnlockRect)(THIS);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class IDirect3DVolume8 : public IDirect3DUnknown
|
||||
{
|
||||
protected:
|
||||
D3D8Base::IDirect3DVolume8* m_pD3D;
|
||||
static ThreadSafePointerSet m_List;
|
||||
public:
|
||||
|
||||
IDirect3DVolume8(D3D8Base::IDirect3DVolume8*);
|
||||
|
||||
|
||||
STDMETHOD(GetDevice)(THIS_ D3D8Wrapper::IDirect3DDevice8** ppDevice);
|
||||
STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags);
|
||||
STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData);
|
||||
STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid);
|
||||
STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer);
|
||||
STDMETHOD(GetDesc)(THIS_ D3D8Base::D3DVOLUME_DESC *pDesc);
|
||||
STDMETHOD(LockBox)(THIS_ D3D8Base::D3DLOCKED_BOX * pLockedVolume,CONST D3D8Base::D3DBOX* pBox,DWORD Flags);
|
||||
STDMETHOD(UnlockBox)(THIS);
|
||||
};
|
||||
|
||||
|
||||
typedef D3D8Base::IDirect3D8* (WINAPI *D3DCREATE)(UINT);
|
||||
IDirect3D8* WINAPI Direct3DCreate8(UINT Version);
|
||||
extern IDirect3DDevice8 *last_device;
|
||||
extern IDirect3DSurface8 *render_surface;
|
||||
extern void (*rendering_callback)( int );
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -23,77 +15,35 @@
|
|||
<RootNamespace>mupen64plusaudiobkm</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -111,28 +61,6 @@
|
|||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader />
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -24,114 +16,52 @@
|
|||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>mupen64plus</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TargetName>mupen64plus</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetName>mupen64plus</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TargetName>mupen64plus</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\freetype-2.6\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DBG;WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\freetype-2.6\lib\freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)mupen64plus.dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\freetype-2.6\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\include;..\..\..\mupen64plus-win32-deps\freetype-2.13.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DBG;WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
|
@ -144,7 +74,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\x64\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\freetype-2.6\lib\x64\freetype26.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\lib\x64\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\freetype-2.13.0\lib\x64\freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)mupen64plus.dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -154,35 +84,9 @@
|
|||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\freetype-2.6\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DBG;WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\freetype-2.6\lib\freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)mupen64plus.dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalOptions>/PDBALTPATH:%_PDB%.%_EXT% %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\freetype-2.6\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\include;..\..\..\mupen64plus-win32-deps\freetype-2.13.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DBG;WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;M64P_OSD;M64P_PARALLEL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
|
@ -192,7 +96,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\x64\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\freetype-2.6\lib\x64\freetype26.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;shell32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\lib\x64\zlib.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\freetype-2.13.0\lib\x64\freetype.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)mupen64plus.dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -215,13 +119,9 @@
|
|||
<ClCompile Include="..\..\src\debugger\dbg_decoder.c" />
|
||||
<ClCompile Include="..\..\src\debugger\dbg_memory.c" />
|
||||
<ClCompile Include="..\..\src\debugger\debugger.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(Filename)1.obj</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.obj</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\api\debugger.c" />
|
|
@ -1,693 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mupen64plus-core"
|
||||
ProjectGUID="{92D3FEB9-2129-41C5-8577-BCD7D961EF41}"
|
||||
RootNamespace="mupen64pluscore"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;inline=__inline;M64P_OSD;M64P_PARALLEL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="shell32.lib opengl32.lib glu32.lib ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib ..\..\..\mupen64plus-win32-deps\zlib-1.2.3\lib\zlib.lib ..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib ..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\lib\freetype.lib"
|
||||
OutputFile="$(OutDir)\mupen64plus.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\src;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;DYNAREC;inline=__inline;M64P_OSD;M64P_PARALLEL"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="shell32.lib opengl32.lib glu32.lib ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib ..\..\..\mupen64plus-win32-deps\zlib-1.2.3\lib\zlib.lib ..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib ..\..\..\mupen64plus-win32-deps\freetype-2.3.5-1\lib\freetype.lib"
|
||||
OutputFile="$(OutDir)\mupen64plus.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\assemble.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\callbacks.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\cheat.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\config.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_breakpoints.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_decoder.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_memory.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\debugger.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\debugger.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\dma.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_audio.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_input.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_rsp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_video.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal\dynamiclib_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\eventloop.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\exception.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal\files_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\flashram.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\frontend.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gbc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gcop0.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gcop1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gcop1_d.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gcop1_l.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gcop1_s.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gcop1_w.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gr4300.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gregimm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gspecial.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\gtlb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\interupt.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\ioapi.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\lirc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\main.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\md5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\memory.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\n64_cic_nus_6105.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osd\OGLFT.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osd\osd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\pif.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\plugin.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\profile.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\pure_interp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\r4300.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\recomp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\regcache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\reset.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\rjump.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\rom.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\savestates.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\sdl_key_converter.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osd\screenshot.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\tlb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\unzip.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\util.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\vidext.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\workqueue.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\zip.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\assemble.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\callbacks.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\cheat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\crypt.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_breakpoints.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_decoder.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_memory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_opprintf.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\dbg_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\debugger\debugger.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\debugger.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\dma.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_audio.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_input.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_rsp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\dummy_video.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal\dynamiclib.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\eventloop.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\exception.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal\files.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\flashram.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\interpret.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\interupt.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\ioapi.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\lirc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_debugger.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_frontend.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_plugin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\m64p_vidext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\macros.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\main.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\md5.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\memory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\n64_cic_nus_6105.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osd\OGLFT.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\ops.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osd\osd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\pif.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin\plugin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal\preproc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\r4300.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\recomp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\recomph.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\x86\regcache.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\r4300\reset.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\rom.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\savestates.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\sdl_key_converter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osd\screenshot.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory\tlb.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\unzip.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\util.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\version.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\api\vidext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\workqueue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\main\zip\zip.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,583 +0,0 @@
|
|||
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# * Mupen64plus - Makefile *
|
||||
# * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
# * Copyright (C) 2008-2009 Richard Goedeken *
|
||||
# * Copyright (C) 2007-2008 DarkJeztr Tillin9 *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the *
|
||||
# * Free Software Foundation, Inc., *
|
||||
# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
# Makefile for Mupen64Plus Core
|
||||
|
||||
# detect operating system
|
||||
UNAME ?= $(shell uname -s)
|
||||
OS := NONE
|
||||
ifeq ("$(UNAME)","Linux")
|
||||
OS = LINUX
|
||||
endif
|
||||
ifeq ("$(UNAME)","linux")
|
||||
OS = LINUX
|
||||
endif
|
||||
ifneq ("$(filter GNU hurd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
endif
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
OS = OSX
|
||||
endif
|
||||
ifeq ("$(UNAME)","FreeBSD")
|
||||
OS = FREEBSD
|
||||
endif
|
||||
ifeq ("$(UNAME)","OpenBSD")
|
||||
OS = FREEBSD
|
||||
CFLAGS += -DIOAPI_NO_64
|
||||
$(warning OS type "$(UNAME)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
endif
|
||||
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
|
||||
OS = MINGW
|
||||
PIC = 0
|
||||
endif
|
||||
ifeq ("$(OS)","NONE")
|
||||
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# detect system architecture
|
||||
HOST_CPU ?= $(shell uname -m)
|
||||
CPU := NONE
|
||||
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ifeq ("$(BITS)", "32")
|
||||
ARCH_DETECTED := 64BITS_32
|
||||
PIC ?= 0
|
||||
else
|
||||
ARCH_DETECTED := 64BITS
|
||||
PIC ?= 1
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 0
|
||||
endif
|
||||
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 32BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 64BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter arm%,$(HOST_CPU))","")
|
||||
ifeq ("$(filter arm%b,$(HOST_CPU))","")
|
||||
CPU := ARM
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
NEW_DYNAREC := 1
|
||||
CFLAGS += -mfpu=vfp -mfloat-abi=softfp
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
endif
|
||||
ifeq ("$(CPU)","NONE")
|
||||
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# base CFLAGS, LDLIBS, and LDFLAGS
|
||||
OPTFLAGS ?= -O3 -flto
|
||||
WARNFLAGS ?= -Wall
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src -DM64P_PARALLEL
|
||||
CXXFLAGS += -fvisibility-inlines-hidden
|
||||
LDLIBS += -lm
|
||||
|
||||
# Since we are building a shared library, we must compile with -fPIC on some architectures
|
||||
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
|
||||
ifeq ($(PIC), 1)
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
CFLAGS += -fno-PIC
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN), 1)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# tweak flags for 32-bit build on 64-bit system
|
||||
ifeq ($(ARCH_DETECTED), 64BITS_32)
|
||||
ifeq ($(OS), FREEBSD)
|
||||
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
|
||||
endif
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -Wl,-m,elf_i386
|
||||
endif
|
||||
|
||||
# set special flags per-system
|
||||
ifeq ($(OS), FREEBSD)
|
||||
TARGET = libmupen64plus$(POSTFIX).so.2.0.0
|
||||
SONAME = libmupen64plus$(POSTFIX).so.2
|
||||
LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-dynamic -Wl,-soname,$(SONAME)
|
||||
LDLIBS += -L${LOCALBASE}/lib -lc
|
||||
endif
|
||||
ifeq ($(OS), LINUX)
|
||||
TARGET = libmupen64plus$(POSTFIX).so.2.0.0
|
||||
SONAME = libmupen64plus$(POSTFIX).so.2
|
||||
LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-dynamic -Wl,-soname,$(SONAME)
|
||||
LDLIBS += -ldl
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/api/api_export.ver
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
#xcode-select has been around since XCode 3.0, i.e. OS X 10.5
|
||||
OSX_SDK_ROOT = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs
|
||||
OSX_SDK_PATH = $(OSX_SDK_ROOT)/$(shell ls $(OSX_SDK_ROOT) | tail -1)
|
||||
|
||||
TARGET = libmupen64plus$(POSTFIX).dylib
|
||||
LDFLAGS += -bundle -read_only_relocs suppress
|
||||
LDLIBS += -ldl
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH)
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH)
|
||||
ifneq ($(PROFILE), 1)
|
||||
CFLAGS += -fomit-frame-pointer
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS), MINGW)
|
||||
TARGET = mupen64plus$(POSTFIX).dll
|
||||
LDFLAGS += -Wl,-Bsymbolic -shared -Wl,-export-all-symbols
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/api/api_export.ver
|
||||
LDLIBS += -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(CPU_ENDIANNESS), BIG)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# disable verbose output
|
||||
ifneq ($(findstring $(MAKEFLAGS),s),s)
|
||||
ifndef V
|
||||
Q_CC = @echo ' CC '$@;
|
||||
Q_CXX = @echo ' CXX '$@;
|
||||
Q_LD = @echo ' LD '$@;
|
||||
endif
|
||||
endif
|
||||
|
||||
# test for essential build dependencies
|
||||
ifeq ($(origin PKG_CONFIG), undefined)
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
|
||||
$(error $(PKG_CONFIG) not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS), OSX) # use system zlib on OSX
|
||||
ZLIB_LDLIBS += -lz
|
||||
endif
|
||||
|
||||
ifeq ($(origin ZLIB_CFLAGS) $(origin ZLIB_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion zlib 2>/dev/null),)
|
||||
$(error No zlib development libraries found!)
|
||||
endif
|
||||
ZLIB_CFLAGS += $(shell $(PKG_CONFIG) --cflags zlib)
|
||||
ZLIB_LDLIBS += $(shell $(PKG_CONFIG) --libs zlib)
|
||||
endif
|
||||
CFLAGS += $(ZLIB_CFLAGS)
|
||||
LDLIBS += $(ZLIB_LDLIBS)
|
||||
|
||||
ifeq ($(origin LIBPNG_CFLAGS) $(origin LIBPNG_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion libpng 2>/dev/null),)
|
||||
$(error No libpng development libraries found!)
|
||||
endif
|
||||
LIBPNG_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng)
|
||||
LIBPNG_LDLIBS += $(shell $(PKG_CONFIG) --libs libpng)
|
||||
endif
|
||||
CFLAGS += $(LIBPNG_CFLAGS)
|
||||
LDLIBS += $(LIBPNG_LDLIBS)
|
||||
|
||||
# test for presence of SDL
|
||||
ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
|
||||
SDL_CONFIG = $(CROSS_COMPILE)sdl-config
|
||||
ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
|
||||
$(error No SDL development libraries found!)
|
||||
endif
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
|
||||
endif
|
||||
CFLAGS += $(SDL_CFLAGS)
|
||||
LDLIBS += $(SDL_LDLIBS)
|
||||
|
||||
OSD ?= 1
|
||||
ifeq ($(OSD), 1)
|
||||
CFLAGS += -DM64P_OSD
|
||||
|
||||
ifeq ($(origin FREETYPE2_CFLAGS) $(origin FREETYPE2_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion freetype2 2>/dev/null),)
|
||||
$(error No freetype2 development libraries found!)
|
||||
endif
|
||||
FREETYPE2_CFLAGS += $(shell $(PKG_CONFIG) --cflags freetype2)
|
||||
FREETYPE2_LDLIBS += $(shell $(PKG_CONFIG) --libs freetype2)
|
||||
endif
|
||||
CFLAGS += $(FREETYPE2_CFLAGS)
|
||||
LDLIBS += $(FREETYPE2_LDLIBS)
|
||||
|
||||
# search for OpenGL libraries
|
||||
ifeq ($(OS), OSX)
|
||||
GL_LDLIBS = -framework OpenGL
|
||||
GLU_LDLIBS = -framework OpenGL
|
||||
endif
|
||||
ifeq ($(OS), MINGW)
|
||||
GL_LDLIBS = -lopengl32
|
||||
GLU_LDLIBS = -lglu32
|
||||
endif
|
||||
|
||||
ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
|
||||
$(error No OpenGL development libraries found!)
|
||||
endif
|
||||
GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
|
||||
GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
|
||||
endif
|
||||
CFLAGS += $(GL_CFLAGS)
|
||||
LDLIBS += $(GL_LDLIBS)
|
||||
|
||||
ifeq ($(origin GLU_CFLAGS) $(origin GLU_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion glu 2>/dev/null),)
|
||||
$(error No OpenGL utility development libraries found!)
|
||||
endif
|
||||
GLU_CFLAGS += $(shell $(PKG_CONFIG) --cflags glu)
|
||||
GLU_LDLIBS += $(shell $(PKG_CONFIG) --libs glu)
|
||||
endif
|
||||
CFLAGS += $(GLU_CFLAGS)
|
||||
LDLIBS += $(GLU_LDLIBS)
|
||||
endif
|
||||
|
||||
# set base program pointers and flags
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
RM ?= rm -f
|
||||
INSTALL ?= install
|
||||
MKDIR ?= mkdir -p
|
||||
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
|
||||
|
||||
ifeq ($(OS),OSX)
|
||||
LDCONFIG ?= true # no 'ldconfig' under OSX
|
||||
else
|
||||
ifeq ($(OS),LINUX)
|
||||
LDCONFIG ?= PATH="$$PATH:/sbin" ldconfig -n
|
||||
endif
|
||||
ifeq ($(OS),FREEBSD)
|
||||
LDCONFIG ?= PATH="$$PATH:/sbin" ldconfig -m
|
||||
endif
|
||||
endif
|
||||
|
||||
# compiler/linker flags for various compile-time options.
|
||||
# 1. macro for no assembly language
|
||||
ifeq ($(NO_ASM), 1)
|
||||
CFLAGS += -DNO_ASM
|
||||
endif
|
||||
# 2. variables for profiling and adding debugging symbols
|
||||
ifeq ($(PROFILE), 1)
|
||||
CFLAGS += -pg -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
ifneq ($(OS),OSX)
|
||||
INSTALL_STRIP_FLAG ?= -s
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# 3. other options given to the makefile on the command line
|
||||
ifeq ($(LIRC), 1)
|
||||
CFLAGS += -DWITH_LIRC
|
||||
endif
|
||||
ifeq ($(DEBUGGER), 1)
|
||||
CFLAGS += -DDBG
|
||||
endif
|
||||
ifeq ($(DBG_COMPARE), 1)
|
||||
CFLAGS += -DCOMPARE_CORE
|
||||
endif
|
||||
ifeq ($(DBG_CORE), 1)
|
||||
CFLAGS += -DCORE_DBG
|
||||
endif
|
||||
ifeq ($(DBG_COUNT), 1)
|
||||
CFLAGS += -DCOUNT_INSTR
|
||||
endif
|
||||
ifeq ($(DBG_TIMING), 1)
|
||||
CFLAGS += -DPROFILE
|
||||
LDFLAGS += -lrt
|
||||
endif
|
||||
ifeq ($(DBG_PROFILE), 1)
|
||||
CFLAGS += -DPROFILE_R4300
|
||||
endif
|
||||
# 4. compile-time directory paths for building into the library
|
||||
ifneq ($(SHAREDIR),)
|
||||
CFLAGS += -DSHAREDIR="$(SHAREDIR)"
|
||||
endif
|
||||
|
||||
# set installation options
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(SHAREDIR),)
|
||||
SHAREDIR := $(PREFIX)/share/mupen64plus
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(INCDIR),)
|
||||
INCDIR := $(PREFIX)/include/mupen64plus
|
||||
endif
|
||||
|
||||
SRCDIR = ../../src
|
||||
OBJDIR = _obj$(POSTFIX)
|
||||
|
||||
# list of required source files for compilation
|
||||
SOURCE = \
|
||||
$(SRCDIR)/api/callbacks.c \
|
||||
$(SRCDIR)/api/common.c \
|
||||
$(SRCDIR)/api/config.c \
|
||||
$(SRCDIR)/api/debugger.c \
|
||||
$(SRCDIR)/api/frontend.c \
|
||||
$(SRCDIR)/api/vidext.c \
|
||||
$(SRCDIR)/main/main.c \
|
||||
$(SRCDIR)/main/util.c \
|
||||
$(SRCDIR)/main/cheat.c \
|
||||
$(SRCDIR)/main/eventloop.c \
|
||||
$(SRCDIR)/main/md5.c \
|
||||
$(SRCDIR)/main/rom.c \
|
||||
$(SRCDIR)/main/savestates.c \
|
||||
$(SRCDIR)/main/sdl_key_converter.c \
|
||||
$(SRCDIR)/main/workqueue.c \
|
||||
$(SRCDIR)/memory/dma.c \
|
||||
$(SRCDIR)/memory/flashram.c \
|
||||
$(SRCDIR)/memory/memory.c \
|
||||
$(SRCDIR)/memory/n64_cic_nus_6105.c \
|
||||
$(SRCDIR)/memory/pif.c \
|
||||
$(SRCDIR)/memory/tlb.c \
|
||||
$(SRCDIR)/plugin/plugin.c \
|
||||
$(SRCDIR)/plugin/dummy_video.c \
|
||||
$(SRCDIR)/plugin/dummy_audio.c \
|
||||
$(SRCDIR)/plugin/dummy_input.c \
|
||||
$(SRCDIR)/plugin/dummy_rsp.c \
|
||||
$(SRCDIR)/r4300/r4300.c \
|
||||
$(SRCDIR)/r4300/exception.c \
|
||||
$(SRCDIR)/r4300/interupt.c \
|
||||
$(SRCDIR)/r4300/profile.c \
|
||||
$(SRCDIR)/r4300/pure_interp.c \
|
||||
$(SRCDIR)/r4300/recomp.c \
|
||||
$(SRCDIR)/r4300/reset.c \
|
||||
$(SRCDIR)/osd/screenshot.cpp
|
||||
ifeq ("$(OS)","MINGW")
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osal/dynamiclib_win32.c \
|
||||
$(SRCDIR)/osal/files_win32.c
|
||||
else
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osal/dynamiclib_unix.c \
|
||||
$(SRCDIR)/osal/files_unix.c
|
||||
endif
|
||||
|
||||
ifeq ($(OSD), 1)
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osd/OGLFT.cpp \
|
||||
$(SRCDIR)/osd/osd.cpp
|
||||
endif
|
||||
|
||||
# source files for optional features
|
||||
ifneq ($(NO_ASM), 1)
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
DYNAREC = x86_64
|
||||
else
|
||||
DYNAREC = x86
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CPU), ARM)
|
||||
ifeq ($(ARCH_DETECTED), 32BITS)
|
||||
DYNAREC = arm
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(DYNAREC), )
|
||||
CFLAGS += -DDYNAREC
|
||||
|
||||
ifeq ($(NEW_DYNAREC), 1)
|
||||
ifeq ($(DYNAREC), x86)
|
||||
CFLAGS += -DNEW_DYNAREC=1
|
||||
else
|
||||
ifeq ($(DYNAREC), arm)
|
||||
CFLAGS += -DNEW_DYNAREC=3
|
||||
else
|
||||
$(error NEW_DYNAREC is only supported on 32 bit x86 and 32 bit armel)
|
||||
endif
|
||||
endif
|
||||
|
||||
SOURCE += \
|
||||
$(SRCDIR)/r4300/empty_dynarec.c \
|
||||
$(SRCDIR)/r4300/new_dynarec/linkage_$(DYNAREC).S \
|
||||
$(SRCDIR)/r4300/new_dynarec/new_dynarec.c
|
||||
else
|
||||
SOURCE += \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/assemble.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gbc.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gcop0.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gcop1.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gcop1_d.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gcop1_l.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gcop1_s.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gcop1_w.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gr4300.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gregimm.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gspecial.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/gtlb.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/regcache.c \
|
||||
$(SRCDIR)/r4300/$(DYNAREC)/rjump.c
|
||||
endif
|
||||
else
|
||||
SOURCE += $(SRCDIR)/r4300/empty_dynarec.c
|
||||
endif
|
||||
|
||||
ifeq ($(LIRC), 1)
|
||||
SOURCE += $(SRCDIR)/main/lirc.c
|
||||
LDLIBS += -llirc_client
|
||||
endif
|
||||
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion minizip 2>/dev/null),)
|
||||
SOURCE += \
|
||||
$(SRCDIR)/main/zip/ioapi.c \
|
||||
$(SRCDIR)/main/zip/zip.c \
|
||||
$(SRCDIR)/main/zip/unzip.c
|
||||
|
||||
CFLAGS += -DNOCRYPT -DNOUNCRYPT
|
||||
else
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags minizip) -DLIBMINIZIP
|
||||
LDLIBS += $(shell $(PKG_CONFIG) --libs minizip)
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(DEBUGGER), 1)
|
||||
SOURCE += \
|
||||
$(SRCDIR)/debugger/debugger.c \
|
||||
$(SRCDIR)/debugger/dbg_decoder.c \
|
||||
$(SRCDIR)/debugger/dbg_memory.c \
|
||||
$(SRCDIR)/debugger/dbg_breakpoints.c
|
||||
LDLIBS += -lopcodes -lbfd
|
||||
endif
|
||||
|
||||
# generate a list of object files to build, make a temporary directory for them
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
|
||||
OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE)))
|
||||
OBJECTS += $(patsubst $(SRCDIR)/%.S, $(OBJDIR)/%.o, $(filter %.S, $(SOURCE)))
|
||||
OBJDIRS = $(dir $(OBJECTS))
|
||||
$(shell $(MKDIR) $(OBJDIRS))
|
||||
|
||||
# build targets
|
||||
targets:
|
||||
@echo "Mupen64Plus-core makefile. "
|
||||
@echo " Targets:"
|
||||
@echo " all == Build Mupen64Plus core library"
|
||||
@echo " clean == remove object files"
|
||||
@echo " install == Install Mupen64Plus core library"
|
||||
@echo " uninstall == Uninstall Mupen64Plus core library"
|
||||
@echo " Build Options:"
|
||||
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
|
||||
@echo " LIRC=1 == enable LIRC support"
|
||||
@echo " NO_ASM=1 == build without assembly (no dynamic recompiler or MMX/SSE code)"
|
||||
@echo " SHAREDIR=path == extra path to search for shared data files"
|
||||
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
|
||||
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
|
||||
@echo " PIC=(1|0) == Force enable/disable of position independent code"
|
||||
@echo " OSD=(1|0) == Enable/disable build of OpenGL On-screen display"
|
||||
@echo " NEW_DYNAREC=1 == Replace dynamic recompiler with Ari64's experimental dynarec"
|
||||
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
|
||||
@echo " Install Options:"
|
||||
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local/)"
|
||||
@echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"
|
||||
@echo " LIBDIR=path == path to install core library (default: PREFIX/lib)"
|
||||
@echo " INCDIR=path == path to install core header files (default: PREFIX/include/mupen64plus)"
|
||||
@echo " DESTDIR=path == path to prepend to all installation paths (only for packagers)"
|
||||
@echo " Debugging Options:"
|
||||
@echo " PROFILE=1 == build gprof instrumentation into binaries for profiling"
|
||||
@echo " DEBUG=1 == add debugging symbols to binaries"
|
||||
@echo " DEBUGGER=1 == build debugger API into core for front-ends. runs slower."
|
||||
@echo " DBG_CORE=1 == print debugging info in r4300 core"
|
||||
@echo " DBG_COUNT=1 == print R4300 instruction count totals (64-bit dynarec only)"
|
||||
@echo " DBG_COMPARE=1 == enable core-synchronized r4300 debugging"
|
||||
@echo " DBG_TIMING=1 == print timing data"
|
||||
@echo " DBG_PROFILE=1 == dump profiling data for r4300 dynarec to data file"
|
||||
@echo " V=1 == show verbose compiler output"
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
install: $(TARGET)
|
||||
$(INSTALL) -d "$(DESTDIR)$(LIBDIR)"
|
||||
$(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(LIBDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(SHAREDIR)"
|
||||
$(INSTALL) -m 0644 ../../data/* "$(DESTDIR)$(SHAREDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(INCDIR)"
|
||||
$(INSTALL) -m 0644 ../../src/api/m64p_*.h "$(DESTDIR)$(INCDIR)"
|
||||
-$(LDCONFIG) "$(DESTDIR)$(LIBDIR)"
|
||||
if [ ! -e "$(DESTDIR)$(LIBDIR)/$(SONAME)" ]; then ln -sf "$(TARGET)" "$(DESTDIR)$(LIBDIR)/$(SONAME)"; fi
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(LIBDIR)/$(TARGET)"
|
||||
if [ "$(SONAME)" != "" ]; then $(RM) "$(DESTDIR)$(LIBDIR)/$(SONAME)"; fi
|
||||
$(RM) $(DESTDIR)$(INCDIR)/m64p_*.h
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/mupen64plus.cht"
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/mupen64plus.ini"
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/font.ttf"
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/mupencheat.txt"
|
||||
|
||||
clean:
|
||||
$(RM) -r $(TARGET) $(SONAME) $(OBJDIR)
|
||||
|
||||
# build dependency files
|
||||
CFLAGS += -MD
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
|
||||
# standard build rules
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.S
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(COMPILE.cc) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||
if [ "$(SONAME)" != "" ]; then ln -sf $@ $(SONAME); fi
|
||||
|
||||
.PHONY: all clean install uninstall targets
|
|
@ -53,31 +53,33 @@ m64p_error SetStateCallback(ptr_StateCallback pFunc, void *Context)
|
|||
|
||||
void DebugMessage(int level, const char *message, ...)
|
||||
{
|
||||
char msgbuf[256];
|
||||
va_list args;
|
||||
extern HANDLE rompausesem;
|
||||
int new_vi();
|
||||
char msgbuf[256];
|
||||
va_list args;
|
||||
extern HANDLE rompausesem;
|
||||
int new_vi();
|
||||
|
||||
if(level == M64MSG_ERROR)
|
||||
{
|
||||
//trigger a vsync just to get out of frame advance
|
||||
new_vi();
|
||||
WaitForSingleObject(rompausesem, INFINITE);
|
||||
}
|
||||
if(level == M64MSG_ERROR)
|
||||
{
|
||||
//trigger a vsync just to get out of frame advance
|
||||
new_vi();
|
||||
WaitForSingleObject(rompausesem, INFINITE);
|
||||
}
|
||||
|
||||
if (pDebugFunc == NULL)
|
||||
{
|
||||
va_start(args, message);
|
||||
vprintf(message, args);
|
||||
return;
|
||||
}
|
||||
if (pDebugFunc == NULL)
|
||||
{
|
||||
va_start(args, message);
|
||||
vprintf(message, args);
|
||||
printf("\n");
|
||||
va_end(args);
|
||||
return;
|
||||
}
|
||||
|
||||
va_start(args, message);
|
||||
vsprintf(msgbuf, message, args);
|
||||
va_start(args, message);
|
||||
vsprintf(msgbuf, message, args);
|
||||
|
||||
(*pDebugFunc)(DebugContext, level, msgbuf);
|
||||
(*pDebugFunc)(DebugContext, level, msgbuf);
|
||||
|
||||
va_end(args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void StateChanged(m64p_core_param param_type, int new_value)
|
||||
|
|
|
@ -112,7 +112,9 @@ EXPORT m64p_error CALL CoreShutdown(void)
|
|||
savestates_deinit();
|
||||
|
||||
/* tell SDL to shut down */
|
||||
SDL_Quit();
|
||||
extern int initialized_video;
|
||||
if (initialized_video)
|
||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||
|
||||
l_CoreInit = 0;
|
||||
return M64ERR_SUCCESS;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/* This file contains the Core video extension functions which will be exported
|
||||
* outside of the core library.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <SDL.h>
|
||||
|
@ -40,7 +40,7 @@
|
|||
#endif
|
||||
|
||||
/* local variables */
|
||||
static m64p_video_extension_functions l_ExternalVideoFuncTable = {10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
static m64p_video_extension_functions l_ExternalVideoFuncTable = {11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
static int l_VideoExtensionActive = 0;
|
||||
static int l_VideoOutputActive = 0;
|
||||
static int l_Fullscreen = 0;
|
||||
|
@ -90,6 +90,8 @@ int VidExt_VideoRunning(void)
|
|||
return l_VideoOutputActive;
|
||||
}
|
||||
|
||||
size_t vidext_init = 0;
|
||||
|
||||
/* video extension functions to be called by the video plugin */
|
||||
EXPORT m64p_error CALL VidExt_Init(void)
|
||||
{
|
||||
|
@ -103,6 +105,7 @@ EXPORT m64p_error CALL VidExt_Init(void)
|
|||
return M64ERR_SYSTEM_FAIL;
|
||||
}
|
||||
|
||||
vidext_init = 1;
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -120,7 +123,7 @@ EXPORT m64p_error CALL VidExt_Quit(void)
|
|||
return rval;
|
||||
}
|
||||
|
||||
if (!SDL_WasInit(SDL_INIT_VIDEO))
|
||||
if (vidext_init == 0)
|
||||
return M64ERR_NOT_INIT;
|
||||
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
|
@ -128,6 +131,7 @@ EXPORT m64p_error CALL VidExt_Quit(void)
|
|||
l_pScreen = NULL;
|
||||
l_VideoOutputActive = 0;
|
||||
StateChanged(M64CORE_VIDEO_MODE, M64VIDEO_NONE);
|
||||
vidext_init = 0;
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
@ -186,7 +190,6 @@ EXPORT m64p_error CALL VidExt_SetVideoMode(int Width, int Height, int BitsPerPix
|
|||
{
|
||||
const SDL_VideoInfo *videoInfo;
|
||||
int videoFlags = 0;
|
||||
SDL_SysWMinfo SysInfo;
|
||||
|
||||
/* call video extension override if necessary */
|
||||
if (l_VideoExtensionActive)
|
||||
|
@ -246,13 +249,6 @@ EXPORT m64p_error CALL VidExt_SetVideoMode(int Width, int Height, int BitsPerPix
|
|||
return M64ERR_SYSTEM_FAIL;
|
||||
}
|
||||
|
||||
SDL_VERSION(&SysInfo.version);
|
||||
if (SDL_GetWMInfo(&SysInfo))
|
||||
{
|
||||
// Hide the SDL window
|
||||
ShowWindow(SysInfo.window,0);
|
||||
}
|
||||
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
l_Fullscreen = (ScreenMode == M64VIDEO_FULLSCREEN);
|
||||
|
|
|
@ -516,93 +516,6 @@ SDL_ResizeVideoMode(int width, int height, int bpp, Uint32 flags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
SDL_CompatEventFilter(void *userdata, SDL_Event * event)
|
||||
{
|
||||
SDL_Event fake;
|
||||
|
||||
switch (event->type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (event->window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
fake.type = SDL_QUIT;
|
||||
SDL_PushEvent(&fake);
|
||||
break;
|
||||
}
|
||||
case SDL_KEYDOWN:
|
||||
case SDL_KEYUP:
|
||||
{
|
||||
Uint32 unicode = 0;
|
||||
if (event->key.type == SDL_KEYDOWN && event->key.keysym.sym < 256) {
|
||||
unicode = event->key.keysym.sym;
|
||||
if (unicode >= 'a' && unicode <= 'z') {
|
||||
int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
|
||||
int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
|
||||
if ((shifted ^ capslock) != 0) {
|
||||
unicode = SDL_toupper(unicode);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (unicode) {
|
||||
event->key.keysym.unicode = unicode;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SDL_TEXTINPUT:
|
||||
{
|
||||
/* FIXME: Generate an old style key repeat event if needed */
|
||||
//printf("TEXTINPUT: '%s'\n", event->text.text);
|
||||
break;
|
||||
}
|
||||
case SDL_MOUSEMOTION:
|
||||
{
|
||||
event->motion.x -= SDL_VideoViewport.x;
|
||||
event->motion.y -= SDL_VideoViewport.y;
|
||||
break;
|
||||
}
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
{
|
||||
event->button.x -= SDL_VideoViewport.x;
|
||||
event->button.y -= SDL_VideoViewport.y;
|
||||
break;
|
||||
}
|
||||
case SDL_MOUSEWHEEL:
|
||||
{
|
||||
Uint8 button;
|
||||
int x, y;
|
||||
|
||||
if (event->wheel.y == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
SDL_GetMouseState(&x, &y);
|
||||
|
||||
if (event->wheel.y > 0) {
|
||||
button = SDL_BUTTON_WHEELUP;
|
||||
} else {
|
||||
button = SDL_BUTTON_WHEELDOWN;
|
||||
}
|
||||
|
||||
fake.button.button = button;
|
||||
fake.button.x = x;
|
||||
fake.button.y = y;
|
||||
fake.button.windowID = event->wheel.windowID;
|
||||
|
||||
fake.type = SDL_MOUSEBUTTONDOWN;
|
||||
fake.button.state = SDL_PRESSED;
|
||||
SDL_PushEvent(&fake);
|
||||
|
||||
fake.type = SDL_MOUSEBUTTONUP;
|
||||
fake.button.state = SDL_RELEASED;
|
||||
SDL_PushEvent(&fake);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
GetEnvironmentWindowPosition(int w, int h, int *x, int *y)
|
||||
{
|
||||
|
@ -636,7 +549,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
|
|||
Uint32 surface_flags;
|
||||
|
||||
if (!initialized_video) {
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
initialized_video = 1;
|
||||
|
@ -681,13 +594,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
|
|||
SDL_DestroyWindow(SDL_VideoWindow);
|
||||
}
|
||||
|
||||
/* Set up the event filter */
|
||||
if (!SDL_GetEventFilter(NULL, NULL)) {
|
||||
SDL_SetEventFilter(SDL_CompatEventFilter, NULL);
|
||||
}
|
||||
|
||||
/* Create a new window */
|
||||
window_flags = SDL_WINDOW_SHOWN;
|
||||
window_flags = SDL_WINDOW_HIDDEN;
|
||||
if (flags & SDL_FULLSCREEN) {
|
||||
window_flags |= SDL_WINDOW_FULLSCREEN;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_thread.h>
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL.h>
|
||||
#if ! SDL_VERSION_ATLEAST(1,3,0)
|
||||
|
@ -52,9 +53,6 @@
|
|||
#define SDL_SCANCODE_9 SDLK_9
|
||||
#define SDL_SCANCODE_UNKNOWN SDLK_UNKNOWN
|
||||
|
||||
#define SDL_SetEventFilter(func, data) SDL_SetEventFilter(func)
|
||||
#define event_sdl_filter(userdata, event) event_sdl_filter(const event)
|
||||
|
||||
#endif
|
||||
|
||||
#define M64P_CORE_PROTOTYPES 1
|
||||
|
@ -240,84 +238,16 @@ static int MatchJoyCommand(const SDL_Event *event, eJoyCommand cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************************************************
|
||||
* sdl event filter
|
||||
*/
|
||||
static int SDLCALL event_sdl_filter(void *userdata, SDL_Event *event)
|
||||
{
|
||||
switch(event->type)
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(2,0,0)
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (event->window.event) {
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
// call the video plugin. if the video plugin supports resizing, it will resize its viewport and call
|
||||
// VidExt_ResizeWindow to update the window manager handling our opengl output window
|
||||
gfx.resizeVideoOutput(event->window.data1, event->window.data2);
|
||||
return 0; // consumed the event
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#else
|
||||
case SDL_VIDEORESIZE:
|
||||
// call the video plugin. if the video plugin supports resizing, it will resize its viewport and call
|
||||
// VidExt_ResizeWindow to update the window manager handling our opengl output window
|
||||
gfx.resizeVideoOutput(event->resize.w, event->resize.h);
|
||||
return 0; // consumed the event
|
||||
break;
|
||||
#endif
|
||||
|
||||
// Ignore key events
|
||||
case SDL_JOYAXISMOTION:
|
||||
case SDL_JOYBUTTONDOWN:
|
||||
case SDL_JOYBUTTONUP:
|
||||
case SDL_JOYHATMOTION:
|
||||
case SDL_KEYDOWN:
|
||||
case SDL_KEYUP:
|
||||
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*********************************************************************************************************
|
||||
* global functions
|
||||
*/
|
||||
|
||||
void event_initialize(void)
|
||||
{
|
||||
const char *event_str = NULL;
|
||||
int i;
|
||||
|
||||
/* set initial state of all joystick commands to 'off' */
|
||||
for (i = 0; i < NumJoyCommands; i++)
|
||||
JoyCmdActive[i] = 0;
|
||||
|
||||
/* activate any joysticks which are referenced in the joystick event command strings */
|
||||
for (i = 0; i < NumJoyCommands; i++)
|
||||
{
|
||||
event_str = ConfigGetParamString(l_CoreEventsConfig, JoyCmdName[i]);
|
||||
if (event_str != NULL && strlen(event_str) >= 4 && event_str[0] == 'J' && event_str[1] >= '0' && event_str[1] <= '9')
|
||||
{
|
||||
int device = event_str[1] - '0';
|
||||
if (!SDL_WasInit(SDL_INIT_JOYSTICK))
|
||||
SDL_InitSubSystem(SDL_INIT_JOYSTICK);
|
||||
#if SDL_VERSION_ATLEAST(2,0,0)
|
||||
SDL_JoystickOpen(device);
|
||||
#else
|
||||
if (!SDL_JoystickOpened(device))
|
||||
SDL_JoystickOpen(device);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* set up SDL event filter and disable key repeat */
|
||||
#if !SDL_VERSION_ATLEAST(2,0,0)
|
||||
SDL_EnableKeyRepeat(0, 0);
|
||||
#endif
|
||||
SDL_SetEventFilter(event_sdl_filter, NULL);
|
||||
}
|
||||
|
||||
int event_set_core_defaults(void)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
* if you want to implement an interface, you should look here
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -842,7 +843,7 @@ void main_stop(void)
|
|||
if (!g_EmulatorRunning)
|
||||
return;
|
||||
|
||||
DebugMessage(M64MSG_STATUS, "Stopping emulation.");
|
||||
//DebugMessage(M64MSG_STATUS, "Stopping emulation.");
|
||||
if(l_msgPause)
|
||||
{
|
||||
osd_delete_message(l_msgPause);
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
#define strdup _strdup
|
||||
|
||||
// for isnan()
|
||||
#include <float.h>
|
||||
#define isnan _isnan
|
||||
//#include <float.h>
|
||||
//#define isnan _isnan
|
||||
|
||||
#else /* Not WIN32 */
|
||||
|
||||
|
|
|
@ -25,20 +25,21 @@
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#define M64P_FPU_INLINE static __inline
|
||||
#include <float.h>
|
||||
typedef enum { FE_TONEAREST = 0, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD } eRoundType;
|
||||
static void fesetround(eRoundType RoundType)
|
||||
{
|
||||
static const unsigned int msRound[4] = { _RC_NEAR, _RC_CHOP, _RC_UP, _RC_DOWN };
|
||||
unsigned int oldX87, oldSSE2;
|
||||
#include <fenv.h>
|
||||
//#include <float.h>
|
||||
//typedef enum { FE_TONEAREST = 0, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD } eRoundType;
|
||||
//static void fesetround(eRoundType RoundType)
|
||||
//{
|
||||
//static const unsigned int msRound[4] = { _RC_NEAR, _RC_CHOP, _RC_UP, _RC_DOWN };
|
||||
//unsigned int oldX87, oldSSE2;
|
||||
//__control87_2(msRound[RoundType], _MCW_RC, &oldX87, &oldSSE2); //? ? ? ?
|
||||
_control87(msRound[RoundType], _MCW_RC);
|
||||
}
|
||||
static __inline double round(double x) { return floor(x + 0.5); }
|
||||
static __inline float roundf(float x) { return (float) floor(x + 0.5); }
|
||||
static __inline double trunc(double x) { return (double) (int) x; }
|
||||
static __inline float truncf(float x) { return (float) (int) x; }
|
||||
#define isnan _isnan
|
||||
//_control87(msRound[RoundType], _MCW_RC);
|
||||
//}
|
||||
//static __inline double round(double x) { return floor(x + 0.5); }
|
||||
//static __inline float roundf(float x) { return (float) floor(x + 0.5); }
|
||||
//static __inline double trunc(double x) { return (double) (int) x; }
|
||||
//static __inline float truncf(float x) { return (float) (int) x; }
|
||||
//#define isnan _isnan
|
||||
#else
|
||||
#define M64P_FPU_INLINE static inline
|
||||
#include <fenv.h>
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -24,83 +16,38 @@
|
|||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -118,30 +65,6 @@
|
|||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader />
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -24,40 +16,23 @@
|
|||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
|
@ -65,51 +40,24 @@
|
|||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
|
@ -117,30 +65,16 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
|
@ -152,6 +86,7 @@
|
|||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -159,6 +94,10 @@
|
|||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\alist.c" />
|
|
@ -1,219 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}</ProjectGuid>
|
||||
<RootNamespace>mupen64plusrsphle</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\alist.c" />
|
||||
<ClCompile Include="..\..\src\alist_audio.c" />
|
||||
<ClCompile Include="..\..\src\alist_naudio.c" />
|
||||
<ClCompile Include="..\..\src\alist_nead.c" />
|
||||
<ClCompile Include="..\..\src\audio.c" />
|
||||
<ClCompile Include="..\..\src\cicx105.c" />
|
||||
<ClCompile Include="..\..\src\hle.c" />
|
||||
<ClCompile Include="..\..\src\jpeg.c" />
|
||||
<ClCompile Include="..\..\src\memory.c" />
|
||||
<ClCompile Include="..\..\src\mp3.c" />
|
||||
<ClCompile Include="..\..\src\musyx.c" />
|
||||
<ClCompile Include="..\..\src\osal_dynamiclib_win32.c" />
|
||||
<ClCompile Include="..\..\src\plugin.c" />
|
||||
<ClCompile Include="..\..\src\re2.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\alist.h" />
|
||||
<ClInclude Include="..\..\src\arithmetics.h" />
|
||||
<ClInclude Include="..\..\src\audio.h" />
|
||||
<ClInclude Include="..\..\src\common.h" />
|
||||
<ClInclude Include="..\..\src\hle.h" />
|
||||
<ClInclude Include="..\..\src\hle_external.h" />
|
||||
<ClInclude Include="..\..\src\hle_internal.h" />
|
||||
<ClInclude Include="..\..\src\memory.h" />
|
||||
<ClInclude Include="..\..\src\osal_dynamiclib.h" />
|
||||
<ClInclude Include="..\..\src\ucodes.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,287 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mupen64plus-rsp-hle"
|
||||
ProjectGUID="{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}"
|
||||
RootNamespace="mupen64plusrsphle"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\alist.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\alist_audio.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\alist_naudio.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\alist_nead.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\audio.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\cicx105.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\hle.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\jpeg.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\mp3.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\musyx.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_dynamiclib_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\plugin.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\re2.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\alist.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\arithmetics.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\audio.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\hle.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\hle_external.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\hle_internal.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\memory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_dynamiclib.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\ucodes.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,320 +0,0 @@
|
|||
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# * mupen64plus-rsp-hle - Makefile *
|
||||
# * Mupen64Plus homepage: https://mupen64plus.org/ *
|
||||
# * Copyright (C) 2008-2009 Richard Goedeken *
|
||||
# * Copyright (C) 2007-2008 DarkJeztr Tillin9 *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the *
|
||||
# * Free Software Foundation, Inc., *
|
||||
# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
# Makefile for Mupen64 HLE RSP plugin in Mupen64plus.
|
||||
|
||||
# detect operating system
|
||||
UNAME ?= $(shell uname -s)
|
||||
OS := NONE
|
||||
ifeq ("$(UNAME)","Linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifneq ("$(filter GNU hurd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
OS = OSX
|
||||
SO_EXTENSION = dylib
|
||||
SHARED = -bundle
|
||||
endif
|
||||
ifeq ("$(UNAME)","FreeBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","OpenBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
|
||||
OS = MINGW
|
||||
SO_EXTENSION = dll
|
||||
SHARED = -shared
|
||||
PIC = 0
|
||||
endif
|
||||
ifeq ("$(OS)","NONE")
|
||||
$(error OS type "$(UNAME)" not supported. Please file bug report at 'https://github.com/mupen64plus/mupen64plus-core/issues')
|
||||
endif
|
||||
|
||||
# detect system architecture
|
||||
HOST_CPU ?= $(shell uname -m)
|
||||
NO_ASM ?= 1
|
||||
CPU := NONE
|
||||
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ifeq ("$(BITS)", "32")
|
||||
ARCH_DETECTED := 64BITS_32
|
||||
PIC ?= 0
|
||||
else
|
||||
ARCH_DETECTED := 64BITS
|
||||
PIC ?= 1
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 0
|
||||
endif
|
||||
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 32BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 64BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter arm%,$(HOST_CPU))","")
|
||||
ifeq ("$(filter arm%b,$(HOST_CPU))","")
|
||||
CPU := ARM
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter mips,$(HOST_CPU))","")
|
||||
CPU := MIPS
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifeq ("$(CPU)","NONE")
|
||||
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'https://github.com/mupen64plus/mupen64plus-core/issues')
|
||||
endif
|
||||
|
||||
# base CFLAGS, LDLIBS, and LDFLAGS
|
||||
OPTFLAGS ?= -O3 -flto
|
||||
WARNFLAGS ?= -Wall
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src
|
||||
LDFLAGS += $(SHARED)
|
||||
|
||||
# Since we are building a shared library, we must compile with -fPIC on some architectures
|
||||
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
|
||||
ifeq ($(PIC), 1)
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
CFLAGS += -fno-PIC
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN), 1)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# tweak flags for 32-bit build on 64-bit system
|
||||
ifeq ($(ARCH_DETECTED), 64BITS_32)
|
||||
ifeq ($(OS), FREEBSD)
|
||||
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
|
||||
endif
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -Wl,-m,elf_i386
|
||||
endif
|
||||
|
||||
# set special flags per-system
|
||||
ifeq ($(OS), LINUX)
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/rsp_api_export.ver
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
OSX_SDK_PATH = $(shell xcrun --sdk macosx --show-sdk-path)
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH)
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH)
|
||||
LDFLAGS += -read_only_relocs suppress
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# set mupen64plus core API header path
|
||||
ifneq ("$(APIDIR)","")
|
||||
CFLAGS += "-I$(APIDIR)"
|
||||
else
|
||||
TRYDIR = ../../../mupen64plus-core/src/api
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/local/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
$(error Mupen64Plus API header files not found! Use makefile parameter APIDIR to force a location.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# reduced compile output when running make without V=1
|
||||
ifneq ($(findstring $(MAKEFLAGS),s),s)
|
||||
ifndef V
|
||||
Q_CC = @echo ' CC '$@;
|
||||
Q_LD = @echo ' LD '$@;
|
||||
endif
|
||||
endif
|
||||
|
||||
# set base program pointers and flags
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
RM ?= rm -f
|
||||
INSTALL ?= install
|
||||
MKDIR ?= mkdir -p
|
||||
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH)
|
||||
|
||||
# set special flags for given Makefile parameters
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
CFLAGS += -DNDEBUG
|
||||
ifneq ($(OS),OSX)
|
||||
INSTALL_STRIP_FLAG ?= -s
|
||||
endif
|
||||
endif
|
||||
|
||||
# set installation options
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(PLUGINDIR),)
|
||||
PLUGINDIR := $(LIBDIR)/mupen64plus
|
||||
endif
|
||||
|
||||
# enable/disable task dumping support
|
||||
ifeq ($(DUMP), 1)
|
||||
CFLAGS += -DENABLE_TASK_DUMP
|
||||
endif
|
||||
|
||||
|
||||
SRCDIR = ../../src
|
||||
OBJDIR = _obj$(POSTFIX)
|
||||
|
||||
# list of source files to compile
|
||||
SOURCE = \
|
||||
$(SRCDIR)/alist.c \
|
||||
$(SRCDIR)/alist_audio.c \
|
||||
$(SRCDIR)/alist_naudio.c \
|
||||
$(SRCDIR)/alist_nead.c \
|
||||
$(SRCDIR)/audio.c \
|
||||
$(SRCDIR)/cicx105.c \
|
||||
$(SRCDIR)/hle.c \
|
||||
$(SRCDIR)/jpeg.c \
|
||||
$(SRCDIR)/memory.c \
|
||||
$(SRCDIR)/mp3.c \
|
||||
$(SRCDIR)/musyx.c \
|
||||
$(SRCDIR)/re2.c \
|
||||
$(SRCDIR)/plugin.c
|
||||
|
||||
ifeq ($(OS), MINGW)
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osal_dynamiclib_win32.c
|
||||
else
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osal_dynamiclib_unix.c
|
||||
endif
|
||||
|
||||
# generate a list of object files build, make a temporary directory for them
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
|
||||
OBJDIRS = $(dir $(OBJECTS))
|
||||
$(shell $(MKDIR) $(OBJDIRS))
|
||||
|
||||
# build targets
|
||||
TARGET = mupen64plus-rsp-hle$(POSTFIX).$(SO_EXTENSION)
|
||||
|
||||
targets:
|
||||
@echo "Mupen64Plus-rsp-hle makefile. "
|
||||
@echo " Targets:"
|
||||
@echo " all == Build Mupen64Plus rsp-hle plugin"
|
||||
@echo " clean == remove object files"
|
||||
@echo " rebuild == clean and re-build all"
|
||||
@echo " install == Install Mupen64Plus rsp-hle plugin"
|
||||
@echo " uninstall == Uninstall Mupen64Plus rsp-hle plugin"
|
||||
@echo " Options:"
|
||||
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
|
||||
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
|
||||
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
|
||||
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
|
||||
@echo " PIC=(1|0) == Force enable/disable of position independent code"
|
||||
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
|
||||
@echo " DUMP=(1|0) == Enable/Disable unknown task dumping (default: 0)"
|
||||
@echo " Install Options:"
|
||||
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
|
||||
@echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
|
||||
@echo " PLUGINDIR=path == path to install plugin libraries (default: LIBDIR/mupen64plus)"
|
||||
@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)
|
||||
|
||||
install: $(TARGET)
|
||||
$(INSTALL) -d "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(PLUGINDIR)"
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
|
||||
|
||||
clean:
|
||||
$(RM) -r $(OBJDIR) $(TARGET)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
# build dependency files
|
||||
CFLAGS += -MD -MP
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
# standard build rules
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||
|
||||
.PHONY: all clean install uninstall targets
|
|
@ -1,358 +0,0 @@
|
|||
Mupen64Plus-ui-console LICENSE
|
||||
------------------------------
|
||||
|
||||
Mupen64Plus-ui-console is licensed under the GNU General Public License version 2.
|
||||
|
||||
The authors of Mupen64Plus-ui-console are:
|
||||
* Richard Goedeken (Richard42)
|
||||
|
||||
Mupen64Plus is based on GPL-licensed source code from Mupen64 v0.5, originally written by:
|
||||
* Hacktarux
|
||||
* Dave2001
|
||||
* Zilmar
|
||||
* Gregor Anich (Blight)
|
||||
* Juha Luotio (JttL)
|
||||
* and others.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30413.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-core", "..\..\..\mupen64plus-core\projects\msvc11\mupen64plus-core.vcxproj", "{92D3FEB9-2129-41C5-8577-BCD7D961EF41}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-rice", "..\..\..\mupen64plus-video-rice\projects\msvc11\mupen64plus-video-rice.vcxproj", "{7D4AFF6A-B7D9-4C25-975A-038B8079098E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64mk2", "..\..\..\mupen64plus-video-glide64mk2\projects\msvc11\mupen64plus-video-glide64mk2.vcxproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-audio-bkm", "..\..\..\mupen64plus-audio-bkm\mupen64plus-audio-bkm\mupen64plus-audio-bkm.vcxproj", "{B6F20769-1385-4C0F-91A9-26F47AD1E78F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-input-bkm", "..\..\..\mupen64plus-input-bkm\mupen64plus-input-bkm\mupen64plus-input-bkm.vcxproj", "{3D8BD211-6002-4698-B5C1-A0F3146B6ACF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-z64", "..\..\..\mupen64plus-video-z64\projects\msvc11\mupen64plus-video-z64.vcxproj", "{7708C1D2-3303-4F90-BCE8-3BCE4046BFD7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-jabo", "..\..\..\mupen64plus-video-jabo\mupen64plus-video-jabo\mupen64plus-video-jabo.vcxproj", "{0C220B26-3D4D-431D-B829-CADE6508A771}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64", "..\..\..\mupen64plus-video-glide64\projects\msvc10\mupen64plus-video-glide64.vcxproj", "{F3E6138A-C318-4020-B408-A9A24D8B3DE7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D8Interceptor", "..\..\..\D3D8Interceptor\D3D8Interceptor\D3D8Interceptor.vcxproj", "{4CC85A3A-8E85-45DB-8941-2E2E18FC9A53}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-rsp-hle", "..\..\..\mupen64plus-rsp-hle\projects\VisualStudio2013\mupen64plus-rsp-hle.vcxproj", "{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Debug|x64.Build.0 = Debug|x64
|
||||
{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release|x64.ActiveCfg = Release|x64
|
||||
{92D3FEB9-2129-41C5-8577-BCD7D961EF41}.Release|x64.Build.0 = Release|x64
|
||||
{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Debug|x64.Build.0 = Debug|x64
|
||||
{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release|x64.ActiveCfg = Release|x64
|
||||
{7D4AFF6A-B7D9-4C25-975A-038B8079098E}.Release|x64.Build.0 = Release|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.Build.0 = Debug|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|x64.ActiveCfg = Release|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|x64.Build.0 = Release|x64
|
||||
{B6F20769-1385-4C0F-91A9-26F47AD1E78F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B6F20769-1385-4C0F-91A9-26F47AD1E78F}.Debug|x64.Build.0 = Debug|x64
|
||||
{B6F20769-1385-4C0F-91A9-26F47AD1E78F}.Release|x64.ActiveCfg = Release|x64
|
||||
{B6F20769-1385-4C0F-91A9-26F47AD1E78F}.Release|x64.Build.0 = Release|x64
|
||||
{3D8BD211-6002-4698-B5C1-A0F3146B6ACF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3D8BD211-6002-4698-B5C1-A0F3146B6ACF}.Debug|x64.Build.0 = Debug|x64
|
||||
{3D8BD211-6002-4698-B5C1-A0F3146B6ACF}.Release|x64.ActiveCfg = Release|x64
|
||||
{3D8BD211-6002-4698-B5C1-A0F3146B6ACF}.Release|x64.Build.0 = Release|x64
|
||||
{7708C1D2-3303-4F90-BCE8-3BCE4046BFD7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7708C1D2-3303-4F90-BCE8-3BCE4046BFD7}.Debug|x64.Build.0 = Debug|x64
|
||||
{7708C1D2-3303-4F90-BCE8-3BCE4046BFD7}.Release|x64.ActiveCfg = Release|x64
|
||||
{7708C1D2-3303-4F90-BCE8-3BCE4046BFD7}.Release|x64.Build.0 = Release|x64
|
||||
{0C220B26-3D4D-431D-B829-CADE6508A771}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0C220B26-3D4D-431D-B829-CADE6508A771}.Debug|x64.Build.0 = Debug|x64
|
||||
{0C220B26-3D4D-431D-B829-CADE6508A771}.Release|x64.ActiveCfg = Release|x64
|
||||
{0C220B26-3D4D-431D-B829-CADE6508A771}.Release|x64.Build.0 = Release|x64
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Debug|x64.Build.0 = Debug|x64
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Release|x64.ActiveCfg = Release|x64
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Release|x64.Build.0 = Release|x64
|
||||
{4CC85A3A-8E85-45DB-8941-2E2E18FC9A53}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{4CC85A3A-8E85-45DB-8941-2E2E18FC9A53}.Debug|x64.Build.0 = Debug|Win32
|
||||
{4CC85A3A-8E85-45DB-8941-2E2E18FC9A53}.Release|x64.ActiveCfg = Release|x64
|
||||
{4CC85A3A-8E85-45DB-8941-2E2E18FC9A53}.Release|x64.Build.0 = Release|x64
|
||||
{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Debug|x64.Build.0 = Debug|x64
|
||||
{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release|x64.ActiveCfg = Release|x64
|
||||
{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {03A2A321-BAEF-449F-AAF6-82110842EDB9}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -23,83 +15,38 @@
|
|||
<RootNamespace>mupen64plusvideoglide64</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL-1.2.15/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0400;NOMINMAX;WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CallingConvention>Cdecl</CallingConvention>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL-1.2.15/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL2-2.26.3/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;_WIN32_WINNT=0x0400;NOMINMAX;WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
|
@ -110,7 +57,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
|
@ -119,35 +66,11 @@
|
|||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL-1.2.15/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NOMINMAX;WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL-1.2.15/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL2-2.26.3/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;NOMINMAX;WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
@ -155,7 +78,7 @@
|
|||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
|
@ -181,57 +104,39 @@
|
|||
<ClCompile Include="..\..\src\TexCache.cpp" />
|
||||
<ClCompile Include="..\..\src\Util.cpp" />
|
||||
<ClCompile Include="..\..\src\wrapper\2xsai.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\combiner.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\config.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\filter.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\geometry.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\hq2x.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\hq4x.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\main.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\wrapper\textures.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)wrapper\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)wrapper\</ObjectFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64", "mupen64plus-video-glide64.vcxproj", "{F3E6138A-C318-4020-B408-A9A24D8B3DE7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64", "mupen64plus-video-glide64.vcproj", "{F3E6138A-C318-4020-B408-A9A24D8B3DE7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F3E6138A-C318-4020-B408-A9A24D8B3DE7}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,453 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="mupen64plus-video-glide64"
|
||||
ProjectGUID="{F3E6138A-C318-4020-B408-A9A24D8B3DE7}"
|
||||
RootNamespace="mupen64plusvideoglide64"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL-1.2.14/include"
|
||||
PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CallingConvention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib "
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)..\..\..\mupen64plus-ui-console\projects\msvc8\$(ConfigurationName)""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="../../src;../../src/wrapper;../../../mupen64plus-core/src/api;../../../mupen64plus-win32-deps/SDL-1.2.14/include"
|
||||
PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib "
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy "$(TargetPath)" "$(SolutionDir)..\..\..\mupen64plus-ui-console\projects\msvc8\$(ConfigurationName)""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\3dmath.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Combine.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Config.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CRC.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Debugger.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DepthBufferRender.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Ini.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_dynamiclib_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\rdp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TexBuffer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TexCache.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Util.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Wrapper"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\2xsai.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\2xsai.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\3dfx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\combiner.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\config.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\filter.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\g3ext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\geometry.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\glide.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\glidesys.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\glideutl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\hq2x.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\hq4x.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\main.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\main.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\sst1vid.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\wrapper\textures.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\wrapper\"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,400 +0,0 @@
|
|||
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# * Mupen64plus-video-glide64 - Makefile *
|
||||
# * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
# * Copyright (C) 2010 Jon Ring *
|
||||
# * Copyright (C) 2007-2009 Richard Goedeken *
|
||||
# * Copyright (C) 2007-2008 DarkJeztr Tillin9 *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the *
|
||||
# * Free Software Foundation, Inc., *
|
||||
# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
# Makefile for Glide64 plugin in Mupen64Plus
|
||||
|
||||
# detect operating system
|
||||
UNAME ?= $(shell uname -s)
|
||||
OS := NONE
|
||||
ifeq ("$(UNAME)","Linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifneq ("$(filter GNU hurd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
OS = OSX
|
||||
SO_EXTENSION = dylib
|
||||
SHARED = -bundle
|
||||
endif
|
||||
ifeq ("$(UNAME)","FreeBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","OpenBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
$(warning OS type "$(UNAME)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
|
||||
OS = MINGW
|
||||
SO_EXTENSION = dll
|
||||
SHARED = -shared
|
||||
PIC = 0
|
||||
endif
|
||||
ifeq ("$(OS)","NONE")
|
||||
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# detect system architecture
|
||||
HOST_CPU ?= $(shell uname -m)
|
||||
CPU := NONE
|
||||
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ifeq ("$(BITS)", "32")
|
||||
ARCH_DETECTED := 64BITS_32
|
||||
PIC ?= 0
|
||||
else
|
||||
ARCH_DETECTED := 64BITS
|
||||
PIC ?= 1
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 0
|
||||
endif
|
||||
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 32BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 64BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter arm%,$(HOST_CPU))","")
|
||||
ifeq ("$(filter arm%b,$(HOST_CPU))","")
|
||||
CPU := ARM
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
endif
|
||||
ifeq ("$(CPU)","NONE")
|
||||
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# base CFLAGS, LDLIBS, and LDFLAGS
|
||||
OPTFLAGS ?= -O3 -flto
|
||||
WARNFLAGS ?= -Wall
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src -I../../src/wrapper -DGCC
|
||||
CXXFLAGS += -fvisibility-inlines-hidden
|
||||
LDFLAGS += $(SHARED)
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
CFLAGS += -msse
|
||||
endif
|
||||
|
||||
# Since we are building a shared library, we must compile with -fPIC on some architectures
|
||||
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
|
||||
ifeq ($(PIC), 1)
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
CFLAGS += -fno-PIC
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN), 1)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# tweak flags for 32-bit build on 64-bit system
|
||||
ifeq ($(ARCH_DETECTED), 64BITS_32)
|
||||
ifeq ($(OS), FREEBSD)
|
||||
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
|
||||
endif
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -Wl,-m,elf_i386
|
||||
endif
|
||||
|
||||
# set special flags per-system
|
||||
ifeq ($(OS), LINUX)
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
# Select the proper SDK
|
||||
# Also, SDKs are stored in a different location since XCode 4.3
|
||||
OSX_SDK ?= $(shell sw_vers -productVersion | cut -f1 -f2 -d .)
|
||||
OSX_XCODEMAJ = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f1 -d .)
|
||||
OSX_XCODEMIN = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f2 -d .)
|
||||
OSX_XCODEGE43 = $(shell echo "`expr $(OSX_XCODEMAJ) \>= 4``expr $(OSX_XCODEMIN) \>= 3`")
|
||||
ifeq ($(OSX_XCODEGE43), 11)
|
||||
OSX_SYSROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
|
||||
else
|
||||
OSX_SYSROOT := /Developer/SDKs
|
||||
endif
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
|
||||
LDFLAGS += -bundle
|
||||
LDLIBS += -ldl
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
|
||||
LDFLAGS += -bundle
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS), FREEBSD)
|
||||
LDLIBS += -lc
|
||||
endif
|
||||
|
||||
# search for OpenGL libraries
|
||||
ifeq ($(OS), OSX)
|
||||
GL_LDLIBS = -framework OpenGL
|
||||
endif
|
||||
ifeq ($(OS), MINGW)
|
||||
GL_LDLIBS = -lopengl32
|
||||
endif
|
||||
ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
|
||||
ifeq ($(origin PKG_CONFIG), undefined)
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
|
||||
$(error $(PKG_CONFIG) not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
|
||||
$(error No OpenGL development libraries found!)
|
||||
endif
|
||||
GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
|
||||
GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
|
||||
endif
|
||||
CFLAGS += $(GL_CFLAGS)
|
||||
LDLIBS += $(GL_LDLIBS)
|
||||
|
||||
# test for presence of SDL
|
||||
ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
|
||||
SDL_CONFIG = $(CROSS_COMPILE)sdl-config
|
||||
ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
|
||||
$(error No SDL development libraries found!)
|
||||
endif
|
||||
ifeq ($(OS),OSX)
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
# sdl-config on mac screws up when we're trying to build a library and not an executable
|
||||
# SDL 1.3 is supposed to fix that, if it's ever released
|
||||
SDL_LDLIBS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
|
||||
else
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
|
||||
endif
|
||||
endif
|
||||
CFLAGS += $(SDL_CFLAGS)
|
||||
LDLIBS += $(SDL_LDLIBS)
|
||||
|
||||
# set mupen64plus core API header path
|
||||
ifneq ("$(APIDIR)","")
|
||||
CFLAGS += "-I$(APIDIR)"
|
||||
else
|
||||
TRYDIR = ../../../mupen64plus-core/src/api
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/local/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
$(error Mupen64Plus API header files not found! Use makefile parameter APIDIR to force a location.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
||||
# set base program pointers and flags
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
RM ?= rm -f
|
||||
INSTALL ?= install
|
||||
MKDIR ?= mkdir -p
|
||||
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
|
||||
|
||||
# set special flags for given Makefile parameters
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
INSTALL_STRIP_FLAG ?= -s
|
||||
endif
|
||||
ifeq ($(NO_ASM), 1)
|
||||
CFLAGS += -DNO_ASM
|
||||
endif
|
||||
|
||||
# set installation options
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(SHAREDIR),)
|
||||
SHAREDIR := $(PREFIX)/share/mupen64plus
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(PLUGINDIR),)
|
||||
PLUGINDIR := $(LIBDIR)/mupen64plus
|
||||
endif
|
||||
|
||||
SRCDIR = ../../src
|
||||
OBJDIR = _obj$(POSTFIX)
|
||||
|
||||
# list of source files to compile
|
||||
SOURCE = \
|
||||
$(SRCDIR)/3dmath.cpp \
|
||||
$(SRCDIR)/CRC.cpp \
|
||||
$(SRCDIR)/Combine.cpp \
|
||||
$(SRCDIR)/Config.cpp \
|
||||
$(SRCDIR)/Debugger.cpp \
|
||||
$(SRCDIR)/DepthBufferRender.cpp \
|
||||
$(SRCDIR)/Ini.cpp \
|
||||
$(SRCDIR)/Main.cpp \
|
||||
$(SRCDIR)/TexBuffer.cpp \
|
||||
$(SRCDIR)/TexCache.cpp \
|
||||
$(SRCDIR)/Util.cpp \
|
||||
$(SRCDIR)/rdp.cpp \
|
||||
$(SRCDIR)/wrapper/2xsai.cpp \
|
||||
$(SRCDIR)/wrapper/combiner.cpp \
|
||||
$(SRCDIR)/wrapper/config.cpp \
|
||||
$(SRCDIR)/wrapper/filter.cpp \
|
||||
$(SRCDIR)/wrapper/geometry.cpp \
|
||||
$(SRCDIR)/wrapper/hq2x.cpp \
|
||||
$(SRCDIR)/wrapper/hq4x.cpp \
|
||||
$(SRCDIR)/wrapper/main.cpp \
|
||||
$(SRCDIR)/wrapper/textures.cpp
|
||||
|
||||
ifeq ($(OS),MINGW)
|
||||
SOURCE += $(SRCDIR)/osal_dynamiclib_win32.c
|
||||
else
|
||||
SOURCE += $(SRCDIR)/osal_dynamiclib_unix.c
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# generate a list of object files build, make a temporary directory for them
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
|
||||
OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE)))
|
||||
OBJDIRS = $(dir $(OBJECTS))
|
||||
$(shell $(MKDIR) $(OBJDIRS))
|
||||
|
||||
# build targets
|
||||
TARGET = mupen64plus-video-glide64$(POSTFIX).$(SO_EXTENSION)
|
||||
|
||||
targets:
|
||||
@echo "Mupen64plus-video-glide64 N64 Graphics plugin makefile. "
|
||||
@echo " Targets:"
|
||||
@echo " all == Build Mupen64plus-video-glide64 plugin"
|
||||
@echo " clean == remove object files"
|
||||
@echo " rebuild == clean and re-build all"
|
||||
@echo " install == Install Mupen64Plus-video-glide64 plugin"
|
||||
@echo " uninstall == Uninstall Mupen64Plus-video-glide64 plugin"
|
||||
@echo " Options:"
|
||||
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
|
||||
@echo " NO_ASM=1 == build without inline assembly code (x86 MMX/SSE)"
|
||||
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
|
||||
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
|
||||
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
|
||||
@echo " PIC=(1|0) == Force enable/disable of position independent code"
|
||||
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
|
||||
@echo " Install Options:"
|
||||
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
|
||||
@echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"
|
||||
@echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
|
||||
@echo " PLUGINDIR=path == path to install plugin libraries (default: LIBDIR/mupen64plus)"
|
||||
@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)
|
||||
|
||||
install: $(TARGET)
|
||||
$(INSTALL) -d "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(SHAREDIR)"
|
||||
$(INSTALL) -m 0644 "../../data/Glide64.ini" "$(DESTDIR)$(SHAREDIR)"
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/Glide64.ini"
|
||||
|
||||
clean:
|
||||
$(RM) -r $(OBJDIR) $(TARGET)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
# build dependency files
|
||||
CFLAGS += -MD
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
|
||||
# standard build rules
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(COMPILE.cc) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||
|
||||
.PHONY: all clean install uninstall targets
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#ifdef WIN32
|
||||
#include <SDL_opengl.h>
|
||||
#define glActiveTextureARB _glActiveTextureARB
|
||||
extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
|
||||
extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
|
||||
extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
|
||||
|
@ -46,6 +47,7 @@
|
|||
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
|
||||
extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
|
||||
extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
|
||||
#define glMultiTexCoord2fARB _glMultiTexCoord2fARB
|
||||
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
|
||||
extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
|
||||
extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
|
||||
|
|
|
@ -0,0 +1,208 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A4D13408-A794-4199-8FC7-4A9A32505005}</ProjectGuid>
|
||||
<RootNamespace>n64Glide</RootNamespace>
|
||||
<ProjectName>mupen64plus-video-glide64mk2</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Debug/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\boost-1.81.0\;..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\lib\x64\zlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\mupen64plus-win32-deps\boost-1.81.0\lib64-msvc;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/Glide64.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\Debug/Glide64.lib</ImportLibrary>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Message>
|
||||
</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Release/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-win32-deps\boost-1.81.0\;..\..\..\mupen64plus-core\src\api;..\..\src\Glide64;..\..\src\Glide64\inc;..\..\src\GlideHQ;..\..\src\GlideHQ\tc-1.1+;..\..\src\Glitch64;..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;__VISUALC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeaderOutputFile>.\Release/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\lib\x64\zlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\mupen64plus-win32-deps\boost-1.81.0\lib64-msvc;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>
|
||||
</ImportLibrary>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<MASM>
|
||||
<EnableMASM51Compatibility>true</EnableMASM51Compatibility>
|
||||
</MASM>
|
||||
<PostBuildEvent>
|
||||
<Message>
|
||||
</Message>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\Glide64\3dmath.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Combine.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Config.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\CRC.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Debugger.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\DepthBufferRender.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\FBtoScreen.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Ini.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Keys.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Main.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\osal_dynamiclib_win32.c" />
|
||||
<ClCompile Include="..\..\src\Glide64\rdp.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\TexBuffer.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\TexCache.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Util.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\Ext_TxFilter.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\dxtn.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\fxt1.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\texstore.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\wrapper.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_2xsai.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_hq2x.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_hq4x.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxCache.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxDbg.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxFilter.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxFilterExport.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxHiResCache.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxImage.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxQuantize.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxReSample.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxTexCache.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxUtil.cpp" />
|
||||
<ClCompile Include="..\..\src\Glitch64\combiner.cpp" />
|
||||
<ClCompile Include="..\..\src\Glitch64\geometry.cpp" />
|
||||
<ClCompile Include="..\..\src\Glitch64\glitchmain.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\Release/%(Filename)1.obj</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glitch64\textures.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupen64plus-video-glide64mk2", "mupen64plus-video-glide64mk2.vcxproj", "{A4D13408-A794-4199-8FC7-4A9A32505005}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.Build.0 = Debug|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.Build.0 = Debug|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.Build.0 = Release|Win32
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|x64.ActiveCfg = Release|x64
|
||||
{A4D13408-A794-4199-8FC7-4A9A32505005}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,460 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A4D13408-A794-4199-8FC7-4A9A32505005}</ProjectGuid>
|
||||
<RootNamespace>n64Glide</RootNamespace>
|
||||
<ProjectName>mupen64plus-video-glide64mk2</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">F:\Code\Third Party\boost;$(IncludePath)</IncludePath>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">F:\Code\Third Party\boost;$(IncludePath)</IncludePath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">F:\Code\Third Party\boost\stage\lib;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">F:\Code\Third Party\boost\stage\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\boost-1.53.0\;..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\zlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\lib;..\..\..\mupen64plus-win32-deps\boost-1.53.0\boost\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\Debug/Glide64.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Debug/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-win32-deps\boost-1.57.0\;..\..\..\mupen64plus-core\src\api;..\..\src\Glide64;..\..\src\Glide64\inc;..\..\src\GlideHQ;..\..\src\GlideHQ\tc-1.1+;..\..\src\Glitch64;..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;NO_ASM;_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>SDL.lib;zlib.lib;libpng16.lib;opengl32.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\libs;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\x64;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\Debug/Glide64.lib</ImportLibrary>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-win32-deps\boost-1.53.0\;..\..\..\mupen64plus-core\src\api;..\..\src\Glide64;..\..\src\Glide64\inc;..\..\src\GlideHQ;..\..\src\GlideHQ\tc-1.1+;..\..\src\Glitch64;..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;__VISUALC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeaderOutputFile>.\Release/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>SDL.lib;zlib.lib;libpng.lib;opengl32.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;msvcrt.lib;LIBCMT.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\mupen64plus-win32-deps\boost-1.53.0\boost\libs;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>
|
||||
</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<MASM>
|
||||
<EnableMASM51Compatibility>true</EnableMASM51Compatibility>
|
||||
</MASM>
|
||||
<PostBuildEvent>
|
||||
<Message>Copying shared data and libraries to build directory...</Message>
|
||||
<Command>copy ..\..\data\* "$(OutDir)"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Release/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-win32-deps\boost-1.57.0\;..\..\..\mupen64plus-core\src\api;..\..\src\Glide64;..\..\src\Glide64\inc;..\..\src\GlideHQ;..\..\src\GlideHQ\tc-1.1+;..\..\src\Glitch64;..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;__VISUALC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeaderOutputFile>.\Release/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>SDL.lib;zlib.lib;libpng16.lib;opengl32.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\deps\libs;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\x64;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>
|
||||
</ImportLibrary>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalOptions>/pdbaltpath:%_PDB% %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<MASM>
|
||||
<EnableMASM51Compatibility>true</EnableMASM51Compatibility>
|
||||
</MASM>
|
||||
<PostBuildEvent>
|
||||
<Message>Copying shared data and libraries to build directory...</Message>
|
||||
<Command>copy ..\..\data\* "$(OutDir)"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\Glide64\3dmath.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Combine.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Config.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\CRC.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Debugger.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\DepthBufferRender.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\FBtoScreen.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Ini.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Keys.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Main.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\osal_dynamiclib_win32.c">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\rdp.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\TexBuffer.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\TexCache.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glide64\Util.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\Ext_TxFilter.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\dxtn.c">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\fxt1.c">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\texstore.c">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\wrapper.c">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_2xsai.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_hq2x.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_hq4x.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxCache.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxDbg.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxFilter.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxFilterExport.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxHiResCache.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxImage.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxQuantize.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxReSample.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxTexCache.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxUtil.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glitch64\combiner.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glitch64\geometry.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glitch64\glitchmain.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release/%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\Release/%(Filename)1.obj</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glitch64\textures.cpp">
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
|
||||
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
|
@ -1,363 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A4D13408-A794-4199-8FC7-4A9A32505005}</ProjectGuid>
|
||||
<RootNamespace>n64Glide</RootNamespace>
|
||||
<ProjectName>mupen64plus-video-glide64mk2</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">F:\Code\Third Party\boost;$(IncludePath)</IncludePath>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">F:\Code\Third Party\boost;$(IncludePath)</IncludePath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">F:\Code\Third Party\boost\stage\lib;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">F:\Code\Third Party\boost\stage\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\boost-1.57.0\;..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\libpng.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\zlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\lib;..\..\..\mupen64plus-win32-deps\boost-1.57.0\boost\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/Glide64.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\Debug/Glide64.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Message>
|
||||
</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Debug/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\boost-1.57.0\;..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\x64\zlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\lib;..\..\..\deps\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/Glide64.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\Debug/Glide64.lib</ImportLibrary>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
<Message>
|
||||
</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-win32-deps\boost-1.57.0\;..\..\..\mupen64plus-core\src\api;..\..\src\Glide64;..\..\src\Glide64\inc;..\..\src\GlideHQ;..\..\src\GlideHQ\tc-1.1+;..\..\src\Glitch64;..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;__VISUALC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeaderOutputFile>.\Release/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>SDL.lib;zlib.lib;libpng.lib;opengl32.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;msvcrt.lib;LIBCMT.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\..\mupen64plus-win32-deps\boost-1.57.0\boost\libs;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>
|
||||
</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<MASM>
|
||||
<EnableMASM51Compatibility>true</EnableMASM51Compatibility>
|
||||
</MASM>
|
||||
<PostBuildEvent>
|
||||
<Message>
|
||||
</Message>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\Release/n64Glide.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-win32-deps\boost-1.57.0\;..\..\..\mupen64plus-core\src\api;..\..\src\Glide64;..\..\src\Glide64\inc;..\..\src\GlideHQ;..\..\src\GlideHQ\tc-1.1+;..\..\src\Glitch64;..\..\src\Glitch64\inc;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;_GLIBCXX_HAVE_BROKEN_VSWPRINTF;NO_FILTER_THREAD;_VARIADIC_MAX=10;_CRT_SECURE_NO_WARNINGS;__MSC__;WIN32;__VISUALC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<PrecompiledHeaderOutputFile>.\Release/n64Glide.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64\libpng16.lib;..\..\..\mupen64plus-win32-deps\zlib-1.2.8\lib\x64\zlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;msvcrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\lib;..\..\..\deps\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>
|
||||
</ImportLibrary>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/n64Glide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<MASM>
|
||||
<EnableMASM51Compatibility>true</EnableMASM51Compatibility>
|
||||
</MASM>
|
||||
<PostBuildEvent>
|
||||
<Message>
|
||||
</Message>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\Glide64\3dmath.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Combine.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Config.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\CRC.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Debugger.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\DepthBufferRender.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\FBtoScreen.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Ini.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Keys.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Main.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\osal_dynamiclib_win32.c" />
|
||||
<ClCompile Include="..\..\src\Glide64\rdp.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\TexBuffer.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\TexCache.cpp" />
|
||||
<ClCompile Include="..\..\src\Glide64\Util.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\Ext_TxFilter.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\dxtn.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\fxt1.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\texstore.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\tc-1.1+\wrapper.c" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_2xsai.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_hq2x.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TextureFilters_hq4x.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxCache.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxDbg.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxFilter.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxFilterExport.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxHiResCache.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxImage.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxQuantize.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxReSample.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxTexCache.cpp" />
|
||||
<ClCompile Include="..\..\src\GlideHQ\TxUtil.cpp" />
|
||||
<ClCompile Include="..\..\src\Glitch64\combiner.cpp" />
|
||||
<ClCompile Include="..\..\src\Glitch64\geometry.cpp" />
|
||||
<ClCompile Include="..\..\src\Glitch64\glitchmain.cpp">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release/%(Filename)1.obj</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\Release/%(Filename)1.obj</ObjectFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Glitch64\textures.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
|
@ -1,458 +0,0 @@
|
|||
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# * Mupen64plus-video-glide64mk2 - Makefile *
|
||||
# * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
# * Copyright (C) 2010 Jon Ring *
|
||||
# * Copyright (C) 2007-2009 Richard Goedeken *
|
||||
# * Copyright (C) 2007-2008 DarkJeztr Tillin9 *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the *
|
||||
# * Free Software Foundation, Inc., *
|
||||
# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
# Makefile for Glide64mk2 plugin in Mupen64Plus
|
||||
|
||||
# detect operating system
|
||||
UNAME ?= $(shell uname -s)
|
||||
OS := NONE
|
||||
ifeq ("$(UNAME)","Linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifneq ("$(filter GNU hurd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
OS = OSX
|
||||
SO_EXTENSION = dylib
|
||||
SHARED = -bundle
|
||||
BOOST_SUFFIX = -mt
|
||||
endif
|
||||
ifeq ("$(UNAME)","FreeBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","OpenBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
$(warning OS type "$(UNAME)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
|
||||
OS = MINGW
|
||||
SO_EXTENSION = dll
|
||||
SHARED = -shared
|
||||
PIC = 0
|
||||
BOOST_SUFFIX = -mt
|
||||
CPPFLAGS += -DNO_FILTER_THREAD
|
||||
endif
|
||||
ifeq ("$(OS)","NONE")
|
||||
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# detect system architecture
|
||||
HOST_CPU ?= $(shell uname -m)
|
||||
CPU := NONE
|
||||
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ifeq ("$(BITS)", "32")
|
||||
ARCH_DETECTED := 64BITS_32
|
||||
PIC ?= 0
|
||||
else
|
||||
ARCH_DETECTED := 64BITS
|
||||
PIC ?= 1
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 0
|
||||
endif
|
||||
ifneq ("$(filter ppc powerpc,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 32BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 64BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter arm%,$(HOST_CPU))","")
|
||||
ifeq ("$(filter arm%b,$(HOST_CPU))","")
|
||||
CPU := ARM
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
endif
|
||||
ifeq ("$(CPU)","NONE")
|
||||
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# base CFLAGS, LDLIBS, and LDFLAGS
|
||||
OPTFLAGS ?= -O3 -flto
|
||||
WARNFLAGS ?= -Wall
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src -I../../src/Glitch64/inc -DGCC
|
||||
CXXFLAGS += -fvisibility-inlines-hidden -std=gnu++0x
|
||||
LDFLAGS += $(SHARED)
|
||||
BOOST_SUFFIX ?=
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
CFLAGS += -mmmx -msse
|
||||
endif
|
||||
|
||||
# Since we are building a shared library, we must compile with -fPIC on some architectures
|
||||
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
|
||||
ifeq ($(PIC), 1)
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
CFLAGS += -fno-PIC
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN), 1)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# tweak flags for 32-bit build on 64-bit system
|
||||
ifeq ($(ARCH_DETECTED), 64BITS_32)
|
||||
ifeq ($(OS), FREEBSD)
|
||||
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
|
||||
endif
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -Wl,-m,elf_i386
|
||||
endif
|
||||
|
||||
# set special flags per-system
|
||||
ifeq ($(OS), LINUX)
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
# Select the proper SDK
|
||||
# Also, SDKs are stored in a different location since XCode 4.3
|
||||
OSX_SDK ?= $(shell sw_vers -productVersion | cut -f1 -f2 -d .)
|
||||
OSX_XCODEMAJ = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f1 -d .)
|
||||
OSX_XCODEMIN = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f2 -d .)
|
||||
OSX_XCODEGE43 = $(shell echo "`expr $(OSX_XCODEMAJ) \>= 4``expr $(OSX_XCODEMIN) \>= 3`")
|
||||
ifeq ($(OSX_XCODEGE43), 11)
|
||||
OSX_SYSROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
|
||||
else
|
||||
OSX_SYSROOT := /Developer/SDKs
|
||||
endif
|
||||
|
||||
CXXFLAGS += -std=c++11 -stdlib=libc++
|
||||
ifeq ($(CPU), X86)
|
||||
LDFLAGS += -bundle -L/opt/local/lib
|
||||
LDLIBS += -ldl
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS), FREEBSD)
|
||||
LDLIBS += -lc
|
||||
endif
|
||||
|
||||
ifeq ($(origin PKG_CONFIG), undefined)
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
|
||||
$(error $(PKG_CONFIG) not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS), OSX) # use system zlib on OSX
|
||||
ZLIB_LDLIBS += -lz
|
||||
endif
|
||||
|
||||
ifeq ($(origin ZLIB_CFLAGS) $(origin ZLIB_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion zlib 2>/dev/null),)
|
||||
$(error No zlib development libraries found!)
|
||||
endif
|
||||
ZLIB_CFLAGS += $(shell $(PKG_CONFIG) --cflags zlib)
|
||||
ZLIB_LDLIBS += $(shell $(PKG_CONFIG) --libs zlib)
|
||||
endif
|
||||
CFLAGS += $(ZLIB_CFLAGS)
|
||||
LDLIBS += $(ZLIB_LDLIBS)
|
||||
|
||||
ifeq ($(origin LIBPNG_CFLAGS) $(origin LIBPNG_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion libpng 2>/dev/null),)
|
||||
$(error No libpng development libraries found!)
|
||||
endif
|
||||
LIBPNG_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng)
|
||||
LIBPNG_LDLIBS += $(shell $(PKG_CONFIG) --libs libpng)
|
||||
endif
|
||||
CFLAGS += $(LIBPNG_CFLAGS)
|
||||
LDLIBS += $(LIBPNG_LDLIBS)
|
||||
|
||||
|
||||
# search for OpenGL libraries
|
||||
ifeq ($(OS), OSX)
|
||||
GL_LDLIBS = -framework OpenGL
|
||||
endif
|
||||
ifeq ($(OS), MINGW)
|
||||
GL_LDLIBS = -lopengl32
|
||||
endif
|
||||
ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
|
||||
$(error No OpenGL development libraries found!)
|
||||
endif
|
||||
GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
|
||||
GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
|
||||
endif
|
||||
CFLAGS += $(GL_CFLAGS)
|
||||
LDLIBS += $(GL_LDLIBS)
|
||||
|
||||
# test for presence of SDL
|
||||
ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
|
||||
SDL_CONFIG = $(CROSS_COMPILE)sdl-config
|
||||
ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
|
||||
$(error No SDL development libraries found!)
|
||||
endif
|
||||
ifeq ($(OS),OSX)
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
# sdl-config on mac screws up when we're trying to build a library and not an executable
|
||||
# SDL 1.3 is supposed to fix that, if it's ever released
|
||||
SDL_LDLIBS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
|
||||
else
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
|
||||
endif
|
||||
endif
|
||||
CFLAGS += $(SDL_CFLAGS)
|
||||
LDLIBS += $(SDL_LDLIBS)
|
||||
|
||||
ifneq ($(OS), MINGW)
|
||||
CPPFLAGS += -D__unix__
|
||||
endif
|
||||
|
||||
# set mupen64plus core API header path
|
||||
ifneq ("$(APIDIR)","")
|
||||
CFLAGS += "-I$(APIDIR)"
|
||||
else
|
||||
TRYDIR = ../../../mupen64plus-core/src/api
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/local/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
$(error Mupen64Plus API header files not found! Use makefile parameter APIDIR to force a location.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
||||
# set base program pointers and flags
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
RM ?= rm -f
|
||||
INSTALL ?= install
|
||||
MKDIR ?= mkdir -p
|
||||
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
|
||||
|
||||
# set special flags for given Makefile parameters
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
ifneq ($(OS),OSX)
|
||||
INSTALL_STRIP_FLAG ?= -s
|
||||
endif
|
||||
endif
|
||||
ifeq ($(NO_ASM), 1)
|
||||
CFLAGS += -DNO_ASM
|
||||
endif
|
||||
|
||||
# set installation options
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(SHAREDIR),)
|
||||
SHAREDIR := $(PREFIX)/share/mupen64plus
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(PLUGINDIR),)
|
||||
PLUGINDIR := $(LIBDIR)/mupen64plus
|
||||
endif
|
||||
|
||||
SRCDIR = ../../src
|
||||
OBJDIR = _obj$(POSTFIX)
|
||||
|
||||
# list of source files to compile
|
||||
SOURCE = \
|
||||
$(SRCDIR)/Glitch64/combiner.cpp \
|
||||
$(SRCDIR)/Glitch64/geometry.cpp \
|
||||
$(SRCDIR)/Glitch64/glitchmain.cpp \
|
||||
$(SRCDIR)/Glitch64/textures.cpp \
|
||||
$(SRCDIR)/Glide64/3dmath.cpp \
|
||||
$(SRCDIR)/Glide64/Combine.cpp \
|
||||
$(SRCDIR)/Glide64/Config.cpp \
|
||||
$(SRCDIR)/Glide64/CRC.cpp \
|
||||
$(SRCDIR)/Glide64/Debugger.cpp \
|
||||
$(SRCDIR)/Glide64/DepthBufferRender.cpp \
|
||||
$(SRCDIR)/Glide64/FBtoScreen.cpp \
|
||||
$(SRCDIR)/Glide64/Ini.cpp \
|
||||
$(SRCDIR)/Glide64/Keys.cpp \
|
||||
$(SRCDIR)/Glide64/Main.cpp \
|
||||
$(SRCDIR)/Glide64/rdp.cpp \
|
||||
$(SRCDIR)/Glide64/TexBuffer.cpp \
|
||||
$(SRCDIR)/Glide64/TexCache.cpp \
|
||||
$(SRCDIR)/Glide64/Util.cpp
|
||||
|
||||
ifneq ($(HIRES), 0)
|
||||
SOURCE += \
|
||||
$(SRCDIR)/GlideHQ/Ext_TxFilter.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxFilterExport.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxFilter.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxCache.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxTexCache.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxHiResCache.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxQuantize.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxUtil.cpp \
|
||||
$(SRCDIR)/GlideHQ/TextureFilters.cpp \
|
||||
$(SRCDIR)/GlideHQ/TextureFilters_2xsai.cpp \
|
||||
$(SRCDIR)/GlideHQ/TextureFilters_hq2x.cpp \
|
||||
$(SRCDIR)/GlideHQ/TextureFilters_hq4x.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxImage.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxReSample.cpp \
|
||||
$(SRCDIR)/GlideHQ/TxDbg.cpp \
|
||||
$(SRCDIR)/GlideHQ/tc-1.1+/fxt1.c \
|
||||
$(SRCDIR)/GlideHQ/tc-1.1+/dxtn.c \
|
||||
$(SRCDIR)/GlideHQ/tc-1.1+/wrapper.c \
|
||||
$(SRCDIR)/GlideHQ/tc-1.1+/texstore.c
|
||||
|
||||
CPPFLAGS += -DTEXTURE_FILTER # -DDUMP_CACHE
|
||||
LDLIBS += -lboost_filesystem$(BOOST_SUFFIX) -lboost_system$(BOOST_SUFFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(OS),MINGW)
|
||||
SOURCE += $(SRCDIR)/Glide64/osal_dynamiclib_win32.c
|
||||
else
|
||||
SOURCE += $(SRCDIR)/Glide64/osal_dynamiclib_unix.c
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# generate a list of object files build, make a temporary directory for them
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
|
||||
OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE)))
|
||||
OBJDIRS = $(dir $(OBJECTS))
|
||||
$(shell $(MKDIR) $(OBJDIRS))
|
||||
|
||||
# build targets
|
||||
TARGET = mupen64plus-video-glide64mk2$(POSTFIX).$(SO_EXTENSION)
|
||||
|
||||
targets:
|
||||
@echo "Mupen64plus-video-glide64mk2 N64 Graphics plugin makefile. "
|
||||
@echo " Targets:"
|
||||
@echo " all == Build Mupen64plus-video-glide64mk2 plugin"
|
||||
@echo " clean == remove object files"
|
||||
@echo " rebuild == clean and re-build all"
|
||||
@echo " install == Install Mupen64Plus-video-glide64mk2 plugin"
|
||||
@echo " uninstall == Uninstall Mupen64Plus-video-glide64mk2 plugin"
|
||||
@echo " Options:"
|
||||
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
|
||||
@echo " NO_ASM=1 == build without inline assembly code (x86 MMX/SSE)"
|
||||
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
|
||||
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
|
||||
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
|
||||
@echo " PIC=(1|0) == Force enable/disable of position independent code"
|
||||
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
|
||||
@echo " HIRES=(1|0) == Enables/Disables support for hires textures and texture filters (default: 1)"
|
||||
@echo " Install Options:"
|
||||
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
|
||||
@echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"
|
||||
@echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
|
||||
@echo " PLUGINDIR=path == path to install plugin libraries (default: LIBDIR/mupen64plus)"
|
||||
@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)
|
||||
|
||||
install: $(TARGET)
|
||||
$(INSTALL) -d "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(SHAREDIR)"
|
||||
$(INSTALL) -m 0644 "../../data/Glide64mk2.ini" "$(DESTDIR)$(SHAREDIR)"
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/Glide64mk2.ini"
|
||||
|
||||
clean:
|
||||
$(RM) -r $(OBJDIR) $(TARGET)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
# build dependency files
|
||||
CFLAGS += -MD
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
|
||||
# standard build rules
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(COMPILE.cc) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||
|
||||
.PHONY: all clean install uninstall targets
|
|
@ -160,16 +160,6 @@ enum {
|
|||
ZELDA
|
||||
};
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define WINPROC_OVERRIDE
|
||||
#endif
|
||||
|
||||
#ifdef WINPROC_OVERRIDE
|
||||
LRESULT CALLBACK WndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
WNDPROC oldWndProc = NULL;
|
||||
WNDPROC myWndProc = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef ALTTAB_FIX
|
||||
HHOOK hhkLowLevelKybd = NULL;
|
||||
LRESULT CALLBACK LowLevelKeyboardProc(int nCode,
|
||||
|
@ -1585,11 +1575,6 @@ void CALL CloseDLL (void)
|
|||
{
|
||||
VLOG ("CloseDLL ()\n");
|
||||
|
||||
// re-set the old window proc
|
||||
#ifdef WINPROC_OVERRIDE
|
||||
SetWindowLong (gfx.hWnd, GWL_WNDPROC, (long)oldWndProc);
|
||||
#endif
|
||||
|
||||
#ifdef ALTTAB_FIX
|
||||
if (hhkLowLevelKybd)
|
||||
{
|
||||
|
@ -1723,15 +1708,6 @@ EXPORT int CALL InitiateGFX (GFX_INFO Gfx_Info)
|
|||
|
||||
gfx = Gfx_Info;
|
||||
|
||||
#ifdef WINPROC_OVERRIDE
|
||||
// [H.Morii] inject our own winproc so that "alt-enter to fullscreen"
|
||||
// message is shown when the emulator window is activated.
|
||||
WNDPROC curWndProc = (WNDPROC)GetWindowLong(gfx.hWnd, GWL_WNDPROC);
|
||||
if (curWndProc && curWndProc != (WNDPROC)WndProc) {
|
||||
oldWndProc = (WNDPROC)SetWindowLong (gfx.hWnd, GWL_WNDPROC, (long)WndProc);
|
||||
}
|
||||
#endif
|
||||
|
||||
util_init ();
|
||||
math_init ();
|
||||
TexCacheInit ();
|
||||
|
@ -1961,14 +1937,8 @@ void drawViRegBG()
|
|||
|
||||
}
|
||||
|
||||
void drawNoFullscreenMessage();
|
||||
|
||||
void DrawFrameBuffer ()
|
||||
{
|
||||
if (!fullscreen)
|
||||
{
|
||||
drawNoFullscreenMessage();
|
||||
}
|
||||
if (to_fullscreen)
|
||||
GoToFullScreen();
|
||||
|
||||
|
@ -2505,40 +2475,10 @@ EXPORT void CALL ViWidthChanged (void)
|
|||
{
|
||||
}
|
||||
|
||||
#ifdef WINPROC_OVERRIDE
|
||||
LRESULT CALLBACK WndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
case WM_ACTIVATEAPP:
|
||||
if (wParam == TRUE && !fullscreen) rdp.window_changed = TRUE;
|
||||
break;
|
||||
case WM_PAINT:
|
||||
if (!fullscreen) rdp.window_changed = TRUE;
|
||||
break;
|
||||
|
||||
/* case WM_DESTROY:
|
||||
SetWindowLong (gfx.hWnd, GWL_WNDPROC, (long)oldWndProc);
|
||||
break;*/
|
||||
}
|
||||
|
||||
return CallWindowProc(oldWndProc, hwnd, msg, wParam, lParam);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
int CheckKeyPressed(int key, int mask)
|
||||
{
|
||||
static Glide64Keys g64Keys;
|
||||
if (settings.use_hotkeys == 0)
|
||||
return 0;
|
||||
#ifdef __WINDOWS__
|
||||
return (GetAsyncKeyState(g64Keys[key]) & mask);
|
||||
#else
|
||||
if (grKeyPressed)
|
||||
return grKeyPressed(g64Keys[key]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -523,62 +523,6 @@ void microcheck ()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
static void GetClientSize(int * width, int * height)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
RECT win_rect;
|
||||
GetClientRect (gfx.hWnd, &win_rect);
|
||||
*width = win_rect.right;
|
||||
*height = win_rect.bottom;
|
||||
#else
|
||||
GFXWindow->GetClientSize(width, height);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void drawNoFullscreenMessage()
|
||||
{
|
||||
//need to find, how to do it on non-windows OS
|
||||
//the code below will compile on any OS
|
||||
//but it works only on windows, because
|
||||
//I don't know, how to initialize GFXWindow on other OS
|
||||
#ifdef __WINDOWS__
|
||||
LOG ("drawNoFullscreenMessage ()\n");
|
||||
if (rdp.window_changed)
|
||||
{
|
||||
rdp.window_changed = FALSE;
|
||||
int width, height;
|
||||
GetClientSize(&width, &height);
|
||||
|
||||
wxClientDC dc(GFXWindow);
|
||||
dc.SetBrush(*wxMEDIUM_GREY_BRUSH);
|
||||
dc.SetTextForeground(*wxWHITE);
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.DrawRectangle(0, 0, width, height);
|
||||
|
||||
wxCoord w, h;
|
||||
wxString text = wxT("Glide64mk2");
|
||||
dc.GetTextExtent(text, &w, &h);
|
||||
wxCoord x = (width - w)/2;
|
||||
wxCoord y = height/2 - h*4;
|
||||
dc.DrawText(text, x, y);
|
||||
|
||||
text = wxT("Gfx cannot be drawn in windowed mode");
|
||||
dc.GetTextExtent(text, &w, &h);
|
||||
x = (width - w)/2;
|
||||
y = height/2 - h;
|
||||
dc.DrawText(text, x, y);
|
||||
|
||||
text = wxT("Press Alt+Enter to switch to fullscreen");
|
||||
dc.GetTextExtent(text, &w, &h);
|
||||
x = (width - w)/2;
|
||||
y = (height - h)/2 + h*2;
|
||||
dc.DrawText(text, x, y);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static wxUint32 d_ul_x, d_ul_y, d_lr_x, d_lr_y;
|
||||
|
||||
static void DrawPartFrameBufferToScreen()
|
||||
|
@ -794,8 +738,6 @@ EXPORT void CALL ProcessDList(void)
|
|||
SoftLocker lock(mutexProcessDList);
|
||||
if (!lock.IsOk()) //mutex is busy
|
||||
{
|
||||
if (!fullscreen)
|
||||
drawNoFullscreenMessage();
|
||||
// Set an interrupt to allow the game to continue
|
||||
*gfx.MI_INTR_REG |= 0x20;
|
||||
gfx.CheckInterrupts();
|
||||
|
@ -818,7 +760,6 @@ EXPORT void CALL ProcessDList(void)
|
|||
|
||||
if (!fullscreen)
|
||||
{
|
||||
drawNoFullscreenMessage();
|
||||
// Set an interrupt to allow the game to continue
|
||||
*gfx.MI_INTR_REG |= 0x20;
|
||||
gfx.CheckInterrupts();
|
||||
|
@ -4397,8 +4338,6 @@ EXPORT void CALL ProcessRDPList(void)
|
|||
SoftLocker lock(mutexProcessDList);
|
||||
if (!lock.IsOk()) //mutex is busy
|
||||
{
|
||||
if (!fullscreen)
|
||||
drawNoFullscreenMessage();
|
||||
// Set an interrupt to allow the game to continue
|
||||
*gfx.MI_INTR_REG |= 0x20;
|
||||
gfx.CheckInterrupts();
|
||||
|
|
|
@ -68,6 +68,7 @@ extern int buffer_cleared; // mark that the buffer has been cleared, used to che
|
|||
#include <windows.h>
|
||||
extern "C" {
|
||||
#include <SDL_opengl.h>
|
||||
#define glActiveTextureARB _glActiveTextureARB
|
||||
extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
|
||||
extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
|
||||
extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
|
||||
|
@ -88,6 +89,7 @@ extern "C" {
|
|||
extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
|
||||
extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
|
||||
extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
|
||||
#define glMultiTexCoord2fARB _glMultiTexCoord2fARB
|
||||
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
|
||||
extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
|
||||
extern PFNGLSECONDARYCOLOR3FPROC glSecondaryColor3f;
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "m64p.h"
|
||||
|
||||
BOOL Config_Open();
|
||||
int Config_ReadInt(const char *itemname, const char *desc, int def_value, BOOL create=TRUE, BOOL isBoolean=TRUE);
|
||||
void Config_ReadScreenResolution(int * width, int * height);
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
|
@ -1,48 +0,0 @@
|
|||
#include "Config.h"
|
||||
#include "m64p.h"
|
||||
|
||||
static m64p_handle video_general_section;
|
||||
static m64p_handle video_jabo_section;
|
||||
|
||||
|
||||
BOOL Config_Open()
|
||||
{
|
||||
if (ConfigOpenSection("Video-General", &video_general_section) != M64ERR_SUCCESS ||
|
||||
ConfigOpenSection("Video-Jabo", &video_jabo_section) != M64ERR_SUCCESS)
|
||||
{
|
||||
//ERRLOG("Could not open configuration");
|
||||
return FALSE;
|
||||
}
|
||||
ConfigSetDefaultBool(video_general_section, "Fullscreen", false, "Use fullscreen mode if True, or windowed mode if False");
|
||||
ConfigSetDefaultInt(video_general_section, "ScreenWidth", 640, "Width of output window or fullscreen width");
|
||||
ConfigSetDefaultInt(video_general_section, "ScreenHeight", 480, "Height of output window or fullscreen height");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int Config_ReadScreenInt(const char *itemname)
|
||||
{
|
||||
return ConfigGetParamInt(video_general_section, itemname);
|
||||
}
|
||||
|
||||
void Config_ReadScreenResolution(int * width, int * height)
|
||||
{
|
||||
*width = ConfigGetParamInt(video_general_section, "ScreenWidth");
|
||||
*height = ConfigGetParamInt(video_general_section, "ScreenHeight");
|
||||
}
|
||||
|
||||
BOOL Config_ReadInt(const char *itemname, const char *desc, int def_value, int create, int isBoolean)
|
||||
{
|
||||
//VLOG("Getting value %s", itemname);
|
||||
if (isBoolean)
|
||||
{
|
||||
ConfigSetDefaultBool(video_jabo_section, itemname, def_value, desc);
|
||||
return ConfigGetParamBool(video_jabo_section, itemname);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConfigSetDefaultInt(video_jabo_section, itemname, def_value, desc);
|
||||
return ConfigGetParamInt(video_jabo_section, itemname);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,301 +0,0 @@
|
|||
/**********************************************************************************
|
||||
Common gfx plugin spec, version #1.3 maintained by zilmar (zilmar@emulation64.com)
|
||||
MODIFIED: Turned function prototypes into function pointer typedefs
|
||||
|
||||
All questions or suggestions should go through the mailing list.
|
||||
http://www.egroups.com/group/Plugin64-Dev
|
||||
***********************************************************************************
|
||||
|
||||
Notes:
|
||||
------
|
||||
|
||||
Setting the approprate bits in the MI_INTR_REG and calling CheckInterrupts which
|
||||
are both passed to the DLL in InitiateGFX will generate an Interrupt from with in
|
||||
the plugin.
|
||||
|
||||
The Setting of the RSP flags and generating an SP interrupt should not be done in
|
||||
the plugin
|
||||
|
||||
**********************************************************************************/
|
||||
#ifndef _GFX_H_INCLUDED__
|
||||
#define _GFX_H_INCLUDED__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Plugin types */
|
||||
#define PLUGIN_TYPE_GFX 2
|
||||
|
||||
//#define EXPORT __declspec(dllexport)
|
||||
//#define CALL _cdecl
|
||||
|
||||
/***** Structures *****/
|
||||
typedef struct {
|
||||
WORD Version; /* Set to 0x0103 */
|
||||
WORD Type; /* Set to PLUGIN_TYPE_GFX */
|
||||
char Name[100]; /* Name of the DLL */
|
||||
|
||||
/* If DLL supports memory these memory options then set them to TRUE or FALSE
|
||||
if it does not support it */
|
||||
BOOL NormalMemory; /* a normal BYTE array */
|
||||
BOOL MemoryBswaped; /* a normal BYTE array where the memory has been pre
|
||||
bswap on a dword (32 bits) boundry */
|
||||
} PLUGIN_INFO;
|
||||
|
||||
typedef struct {
|
||||
HWND hWnd; /* Render window */
|
||||
HWND hStatusBar; /* if render window does not have a status bar then this is NULL */
|
||||
|
||||
BOOL MemoryBswaped; // If this is set to TRUE, then the memory has been pre
|
||||
// bswap on a dword (32 bits) boundry
|
||||
// eg. the first 8 bytes are stored like this:
|
||||
// 4 3 2 1 8 7 6 5
|
||||
|
||||
BYTE * HEADER; // This is the rom header (first 40h bytes of the rom
|
||||
// This will be in the same memory format as the rest of the memory.
|
||||
BYTE * RDRAM;
|
||||
BYTE * DMEM;
|
||||
BYTE * IMEM;
|
||||
|
||||
DWORD * MI_INTR_REG;
|
||||
|
||||
DWORD * DPC_START_REG;
|
||||
DWORD * DPC_END_REG;
|
||||
DWORD * DPC_CURRENT_REG;
|
||||
DWORD * DPC_STATUS_REG;
|
||||
DWORD * DPC_CLOCK_REG;
|
||||
DWORD * DPC_BUFBUSY_REG;
|
||||
DWORD * DPC_PIPEBUSY_REG;
|
||||
DWORD * DPC_TMEM_REG;
|
||||
|
||||
DWORD * VI_STATUS_REG;
|
||||
DWORD * VI_ORIGIN_REG;
|
||||
DWORD * VI_WIDTH_REG;
|
||||
DWORD * VI_INTR_REG;
|
||||
DWORD * VI_V_CURRENT_LINE_REG;
|
||||
DWORD * VI_TIMING_REG;
|
||||
DWORD * VI_V_SYNC_REG;
|
||||
DWORD * VI_H_SYNC_REG;
|
||||
DWORD * VI_LEAP_REG;
|
||||
DWORD * VI_H_START_REG;
|
||||
DWORD * VI_V_START_REG;
|
||||
DWORD * VI_V_BURST_REG;
|
||||
DWORD * VI_X_SCALE_REG;
|
||||
DWORD * VI_Y_SCALE_REG;
|
||||
|
||||
void (*CheckInterrupts)( void );
|
||||
} GFX_INFO;
|
||||
|
||||
/******************************************************************
|
||||
Function: CaptureScreen
|
||||
Purpose: This function dumps the current frame to a file
|
||||
input: pointer to the directory to save the file to
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL CaptureScreen ( char * Directory );
|
||||
typedef void (*ptr_CaptureScreen)(char *);
|
||||
|
||||
/******************************************************************
|
||||
Function: ChangeWindow
|
||||
Purpose: to change the window between fullscreen and window
|
||||
mode. If the window was in fullscreen this should
|
||||
change the screen to window mode and vice vesa.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL ChangeWindow (void);
|
||||
typedef void (*ptr_ChangeWindow)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: CloseDLL
|
||||
Purpose: This function is called when the emulator is closing
|
||||
down allowing the dll to de-initialise.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL CloseDLL (void);
|
||||
typedef void (*ptr_CloseDLL)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: DllAbout
|
||||
Purpose: This function is optional function that is provided
|
||||
to give further information about the DLL.
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL DllAbout ( HWND hParent );
|
||||
typedef void (*ptr_DllAbout)(HWND hParent);
|
||||
|
||||
/******************************************************************
|
||||
Function: DllConfig
|
||||
Purpose: This function is optional function that is provided
|
||||
to allow the user to configure the dll
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL DllConfig ( HWND hParent );
|
||||
typedef void (*ptr_DllConfig)(HWND hParent);
|
||||
|
||||
/******************************************************************
|
||||
Function: DllTest
|
||||
Purpose: This function is optional function that is provided
|
||||
to allow the user to test the dll
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
// IGNORE
|
||||
//EXPORT void CALL DllTest ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: DrawScreen
|
||||
Purpose: This function is called when the emulator receives a
|
||||
WM_PAINT message. This allows the gfx to fit in when
|
||||
it is being used in the desktop.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL DrawScreen (void);
|
||||
typedef void (*ptr_DrawScreen)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: GetDllInfo
|
||||
Purpose: This function allows the emulator to gather information
|
||||
about the dll by filling in the PluginInfo structure.
|
||||
input: a pointer to a PLUGIN_INFO stucture that needs to be
|
||||
filled by the function. (see def above)
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL GetDllInfo ( PLUGIN_INFO * PluginInfo );
|
||||
typedef void (*ptr_GetDllInfo)(PLUGIN_INFO * PluginInfo);
|
||||
|
||||
/******************************************************************
|
||||
Function: InitiateGFX
|
||||
Purpose: This function is called when the DLL is started to give
|
||||
information from the emulator that the n64 graphics
|
||||
uses. This is not called from the emulation thread.
|
||||
Input: Gfx_Info is passed to this function which is defined
|
||||
above.
|
||||
Output: TRUE on success
|
||||
FALSE on failure to initialise
|
||||
|
||||
** note on interrupts **:
|
||||
To generate an interrupt set the appropriate bit in MI_INTR_REG
|
||||
and then call the function CheckInterrupts to tell the emulator
|
||||
that there is a waiting interrupt.
|
||||
*******************************************************************/
|
||||
//EXPORT BOOL CALL InitiateGFX (GFX_INFO Gfx_Info);
|
||||
typedef void (*ptr_InitiateGFX)(GFX_INFO Gfx_Info);
|
||||
|
||||
/******************************************************************
|
||||
Function: MoveScreen
|
||||
Purpose: This function is called in response to the emulator
|
||||
receiving a WM_MOVE passing the xpos and ypos passed
|
||||
from that message.
|
||||
input: xpos - the x-coordinate of the upper-left corner of the
|
||||
client area of the window.
|
||||
ypos - y-coordinate of the upper-left corner of the
|
||||
client area of the window.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
// INGORE
|
||||
//EXPORT void CALL MoveScreen (int xpos, int ypos);
|
||||
typedef void (*ptr_MoveScreen)(int xpos, int ypos);
|
||||
|
||||
/******************************************************************
|
||||
Function: ProcessDList
|
||||
Purpose: This function is called when there is a Dlist to be
|
||||
processed. (High level GFX list)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL ProcessDList(void);
|
||||
typedef void (*ptr_ProcessDList)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ProcessRDPList
|
||||
Purpose: This function is called when there is a Dlist to be
|
||||
processed. (Low level GFX list)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL ProcessRDPList(void);
|
||||
typedef void (*ptr_ProcessRDPList)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: RomClosed
|
||||
Purpose: This function is called when a rom is closed.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL RomClosed (void);
|
||||
typedef void (*ptr_RomClosed)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: RomOpen
|
||||
Purpose: This function is called when a rom is open. (from the
|
||||
emulation thread)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL RomOpen (void);
|
||||
typedef void (*ptr_RomOpen)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ShowCFB
|
||||
Purpose: Useally once Dlists are started being displayed, cfb is
|
||||
ignored. This function tells the dll to start displaying
|
||||
them again.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL ShowCFB (void);
|
||||
typedef void (*ptr_ShowCFB)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: UpdateScreen
|
||||
Purpose: This function is called in response to a vsync of the
|
||||
screen were the VI bit in MI_INTR_REG has already been
|
||||
set
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL UpdateScreen (void);
|
||||
typedef void (*ptr_UpdateScreen)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ViStatusChanged
|
||||
Purpose: This function is called to notify the dll that the
|
||||
ViStatus registers value has been changed.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL ViStatusChanged (void);
|
||||
typedef void (*ptr_ViStatusChanged)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ViWidthChanged
|
||||
Purpose: This function is called to notify the dll that the
|
||||
ViWidth registers value has been changed.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
//EXPORT void CALL ViWidthChanged (void);
|
||||
typedef void (*ptr_ViWidthChanged)(void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ReadScreen
|
||||
Purpose: Capture the current screen
|
||||
Input: none
|
||||
Output: dest - 24-bit RGB data
|
||||
width - width of image
|
||||
height - height of image
|
||||
******************************************************************/
|
||||
//EXPORT void CALL ReadScreen (void **dest, long *width, long *height);
|
||||
typedef void (*ptr_ReadScreen)(void **dest, long *width, long *height);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,14 +0,0 @@
|
|||
#include "m64p_config.h"
|
||||
|
||||
extern ptr_ConfigOpenSection ConfigOpenSection;
|
||||
extern ptr_ConfigSetParameter ConfigSetParameter;
|
||||
extern ptr_ConfigGetParameter ConfigGetParameter;
|
||||
extern ptr_ConfigGetParameterHelp ConfigGetParameterHelp;
|
||||
extern ptr_ConfigSetDefaultInt ConfigSetDefaultInt;
|
||||
extern ptr_ConfigSetDefaultFloat ConfigSetDefaultFloat;
|
||||
extern ptr_ConfigSetDefaultBool ConfigSetDefaultBool;
|
||||
extern ptr_ConfigSetDefaultString ConfigSetDefaultString;
|
||||
extern ptr_ConfigGetParamInt ConfigGetParamInt;
|
||||
extern ptr_ConfigGetParamFloat ConfigGetParamFloat;
|
||||
extern ptr_ConfigGetParamBool ConfigGetParamBool;
|
||||
extern ptr_ConfigGetParamString ConfigGetParamString;
|
|
@ -1,548 +0,0 @@
|
|||
/* Mupen64plus-video-jabo */
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#define M64P_PLUGIN_PROTOTYPES 1
|
||||
#include "m64p_types.h"
|
||||
#include "m64p_plugin.h"
|
||||
#include "m64p_common.h"
|
||||
#include "m64p_config.h"
|
||||
|
||||
#include "main.h"
|
||||
#include "typedefs.h"
|
||||
#include "Config.h"
|
||||
|
||||
//#define LOG(x) { std::ofstream myfile; myfile.open ("jabo_wrapper_log.txt", std::ios::app); myfile << x << "\n"; myfile.close(); }
|
||||
#define LOG(x)
|
||||
|
||||
namespace OldAPI
|
||||
{
|
||||
#include "jabo_api.h"
|
||||
ptr_InitiateGFX InitiateGFX = NULL;
|
||||
ptr_ProcessDList ProcessDList = NULL;
|
||||
ptr_ProcessRDPList ProcessRDPList = NULL;
|
||||
ptr_ShowCFB ShowCFB = NULL;
|
||||
ptr_ViStatusChanged ViStatusChanged = NULL;
|
||||
ptr_ViWidthChanged ViWidthChanged = NULL;
|
||||
ptr_RomOpen RomOpen = NULL;
|
||||
ptr_RomClosed RomClosed = NULL;
|
||||
ptr_CloseDLL CloseDLL = NULL;
|
||||
|
||||
ptr_DrawScreen DrawScreen = NULL;
|
||||
ptr_MoveScreen MoveScreen = NULL;
|
||||
ptr_UpdateScreen UpdateScreen = NULL;
|
||||
ptr_DllConfig DllConfig = NULL;
|
||||
ptr_GetDllInfo GetDllInfo = NULL;
|
||||
}
|
||||
|
||||
ptr_ConfigOpenSection ConfigOpenSection = NULL;
|
||||
ptr_ConfigSetParameter ConfigSetParameter = NULL;
|
||||
ptr_ConfigGetParameter ConfigGetParameter = NULL;
|
||||
ptr_ConfigGetParameterHelp ConfigGetParameterHelp = NULL;
|
||||
ptr_ConfigSetDefaultInt ConfigSetDefaultInt = NULL;
|
||||
ptr_ConfigSetDefaultFloat ConfigSetDefaultFloat = NULL;
|
||||
ptr_ConfigSetDefaultBool ConfigSetDefaultBool = NULL;
|
||||
ptr_ConfigSetDefaultString ConfigSetDefaultString = NULL;
|
||||
ptr_ConfigGetParamInt ConfigGetParamInt = NULL;
|
||||
ptr_ConfigGetParamFloat ConfigGetParamFloat = NULL;
|
||||
ptr_ConfigGetParamBool ConfigGetParamBool = NULL;
|
||||
ptr_ConfigGetParamString ConfigGetParamString = NULL;
|
||||
|
||||
/* local variables */
|
||||
static void (*l_DebugCallback)(void *, int, const char *) = NULL;
|
||||
static void *l_DebugCallContext = NULL;
|
||||
static int l_PluginInit = 0;
|
||||
|
||||
HMODULE JaboDLL;
|
||||
|
||||
HMODULE D3D8Dll;
|
||||
|
||||
typedef void (*ptr_D3D8_SetRenderingCallback)(void (*callback)(int));
|
||||
ptr_D3D8_SetRenderingCallback D3D8_SetRenderingCallback = NULL;
|
||||
typedef void (*ptr_D3D8_ReadScreen)(void *dest, int *width, int *height);
|
||||
ptr_D3D8_ReadScreen D3D8_ReadScreen = NULL;
|
||||
typedef void (*ptr_D3D8_CloseDLL)();
|
||||
ptr_D3D8_CloseDLL D3D8_CloseDLL = NULL;
|
||||
|
||||
DWORD old_options;
|
||||
DWORD old_initflags;
|
||||
|
||||
void setup_jabo_functions()
|
||||
{
|
||||
JaboDLL = LoadLibrary("Jabo_Direct3D8_patched.dll");
|
||||
|
||||
if (JaboDLL != NULL)
|
||||
{
|
||||
OldAPI::InitiateGFX = (OldAPI::ptr_InitiateGFX)GetProcAddress(JaboDLL,"InitiateGFX");
|
||||
OldAPI::ProcessDList = (OldAPI::ptr_ProcessDList)GetProcAddress(JaboDLL,"ProcessDList");
|
||||
OldAPI::ProcessRDPList = (OldAPI::ptr_ProcessRDPList)GetProcAddress(JaboDLL,"ProcessRDPList");
|
||||
OldAPI::ShowCFB = (OldAPI::ptr_ShowCFB)GetProcAddress(JaboDLL,"ShowCFB");
|
||||
OldAPI::ViStatusChanged = (OldAPI::ptr_ViStatusChanged)GetProcAddress(JaboDLL,"ViStatusChanged");
|
||||
OldAPI::ViWidthChanged = (OldAPI::ptr_ViWidthChanged)GetProcAddress(JaboDLL,"ViWidthChanged");
|
||||
OldAPI::RomOpen = (OldAPI::ptr_RomOpen)GetProcAddress(JaboDLL,"RomOpen");
|
||||
OldAPI::RomClosed = (OldAPI::ptr_RomClosed)GetProcAddress(JaboDLL,"RomClosed");
|
||||
OldAPI::CloseDLL = (OldAPI::ptr_CloseDLL)GetProcAddress(JaboDLL,"CloseDLL");
|
||||
|
||||
OldAPI::DrawScreen = (OldAPI::ptr_DrawScreen)GetProcAddress(JaboDLL,"DrawScreen");
|
||||
OldAPI::MoveScreen = (OldAPI::ptr_MoveScreen)GetProcAddress(JaboDLL,"MoveScreen");
|
||||
OldAPI::UpdateScreen = (OldAPI::ptr_UpdateScreen)GetProcAddress(JaboDLL,"UpdateScreen");
|
||||
OldAPI::DllConfig = (OldAPI::ptr_DllConfig)GetProcAddress(JaboDLL,"DllConfig");
|
||||
OldAPI::GetDllInfo = (OldAPI::ptr_GetDllInfo)GetProcAddress(JaboDLL,"GetDllInfo");
|
||||
}
|
||||
|
||||
D3D8Dll = LoadLibrary("D3D8.dll");
|
||||
if (D3D8Dll != NULL)
|
||||
{
|
||||
D3D8_SetRenderingCallback = (ptr_D3D8_SetRenderingCallback)GetProcAddress(D3D8Dll,"SetRenderingCallback");
|
||||
D3D8_ReadScreen = (ptr_D3D8_ReadScreen)GetProcAddress(D3D8Dll,"ReadScreen");
|
||||
D3D8_CloseDLL = (ptr_D3D8_CloseDLL)GetProcAddress(D3D8Dll,"CloseDLL");
|
||||
}
|
||||
}
|
||||
|
||||
BOOL readOptionsInitflags (DWORD* options_val, DWORD* initflags_val)
|
||||
{
|
||||
HKEY mainkey;
|
||||
if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\JaboSoft\\Project64 DLL\\Direct3D8 1.6.1",0,KEY_READ,&mainkey) != ERROR_SUCCESS)
|
||||
{
|
||||
// key doesn't exist, so we need to create it first
|
||||
if (RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\JaboSoft\\Project64 DLL\\Direct3D8 1.6.1",NULL,NULL,NULL,KEY_READ,NULL,&mainkey,NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
// Couldn't create the key
|
||||
printf("readOptionsInitflags: Couldn't create the key\n");
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
// Key exists, try to find the Options Value
|
||||
DWORD type;
|
||||
DWORD cbData;
|
||||
int options_value;
|
||||
LSTATUS result = RegQueryValueEx(mainkey, "Options", NULL, &type, (LPBYTE)&options_value, &cbData);
|
||||
if (result != ERROR_SUCCESS)
|
||||
{
|
||||
options_value = 0;
|
||||
printf("readOptionsInitflags: fail A\n");
|
||||
}
|
||||
*options_val = options_value;
|
||||
|
||||
// Try to find the Direct3D init flags subkey Value
|
||||
int initflags_value;
|
||||
result = RegQueryValueEx(mainkey, "Direct3D8.InitFlags", NULL, &type, (LPBYTE)&initflags_value, &cbData);
|
||||
if (result != ERROR_SUCCESS)
|
||||
{
|
||||
printf("readOptionsInitflags: fail B\n");
|
||||
initflags_value = 0x00e00000;
|
||||
}
|
||||
*initflags_val = initflags_value;
|
||||
|
||||
RegCloseKey(mainkey);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOL writeOptionsInitflags(DWORD options_val, DWORD initflags_val)
|
||||
{
|
||||
// Open the key for writing
|
||||
HKEY mainkey;
|
||||
if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\JaboSoft\\Project64 DLL\\Direct3D8 1.6.1",0,KEY_WRITE,&mainkey) != ERROR_SUCCESS)
|
||||
{
|
||||
printf("writeOptionsInitflags: Failure to open key for write\n");
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
// Store our options value
|
||||
DWORD new_val = options_val;
|
||||
if (RegSetValueEx(mainkey, "Options", NULL, REG_DWORD, (BYTE *)&new_val, 4) != ERROR_SUCCESS)
|
||||
{
|
||||
printf("writeOptionsInitflags: Couldn't write options value\n");
|
||||
}
|
||||
|
||||
// Store our init flags value
|
||||
new_val = initflags_val;
|
||||
if (RegSetValueEx(mainkey, "Direct3D8.InitFlags", NULL, REG_DWORD, (BYTE *)&new_val, 4) != ERROR_SUCCESS)
|
||||
{
|
||||
LOG("writeOptionsInitflags: Couldn't write init flags value");
|
||||
}
|
||||
|
||||
RegCloseKey(mainkey);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
void createRDBFile(unsigned char * header, int resolution_width, int resolution_height, int clear_mode)
|
||||
{
|
||||
std::ofstream rdbFile;
|
||||
rdbFile.open("Project64.rdb", std::ios::trunc | std::ios::out);
|
||||
|
||||
// File can't seem to have data on the first line. It has to be a comment or blank
|
||||
rdbFile << "\n";
|
||||
|
||||
rdbFile << "[";
|
||||
|
||||
rdbFile << std::hex << std::setfill('0') << std::setw(2) << std::uppercase;
|
||||
rdbFile << (int)header[16] << (int)header[17] << (int)header[18] << (int)header[19];
|
||||
rdbFile << "-";
|
||||
rdbFile << (int)header[20] << (int)header[21] << (int)header[22] << (int)header[23];
|
||||
rdbFile << "-C:";
|
||||
rdbFile << (int)header[62] << "]\n";
|
||||
|
||||
rdbFile << std::dec << std::nouppercase;
|
||||
rdbFile << "Clear Frame=" << clear_mode << "\n";
|
||||
rdbFile << "Resolution Width=" << resolution_width << "\n";
|
||||
rdbFile << "Resolution Height=" << resolution_height << "\n";
|
||||
rdbFile.close();
|
||||
}
|
||||
|
||||
/* Global functions */
|
||||
static void DebugMessage(int level, const char *message, ...)
|
||||
{
|
||||
char msgbuf[1024];
|
||||
va_list args;
|
||||
|
||||
if (l_DebugCallback == NULL)
|
||||
return;
|
||||
|
||||
va_start(args, message);
|
||||
vsprintf(msgbuf, message, args);
|
||||
|
||||
(*l_DebugCallback)(l_DebugCallContext, level, msgbuf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
#pragma region (De-)Initialization
|
||||
|
||||
/* Mupen64Plus plugin functions */
|
||||
EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Context,
|
||||
void (*DebugCallback)(void *, int, const char *))
|
||||
{
|
||||
LOG("API WRAPPER:\t PluginStartup")
|
||||
setup_jabo_functions();
|
||||
|
||||
ptr_CoreGetAPIVersions CoreAPIVersionFunc;
|
||||
|
||||
int ConfigAPIVersion, DebugAPIVersion, VidextAPIVersion;
|
||||
|
||||
if (l_PluginInit)
|
||||
return M64ERR_ALREADY_INIT;
|
||||
|
||||
/* first thing is to set the callback function for debug info */
|
||||
l_DebugCallback = DebugCallback;
|
||||
l_DebugCallContext = Context;
|
||||
|
||||
/* attach and call the CoreGetAPIVersions function, check Config API version for compatibility */
|
||||
CoreAPIVersionFunc = (ptr_CoreGetAPIVersions) GetProcAddress(CoreLibHandle, "CoreGetAPIVersions");
|
||||
|
||||
if (CoreAPIVersionFunc == NULL)
|
||||
{
|
||||
DebugMessage(M64MSG_ERROR, "Core emulator broken; no CoreAPIVersionFunc() function found.");
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
(*CoreAPIVersionFunc)(&ConfigAPIVersion, &DebugAPIVersion, &VidextAPIVersion, NULL);
|
||||
if ((ConfigAPIVersion & 0xffff0000) != (CONFIG_API_VERSION & 0xffff0000))
|
||||
{
|
||||
DebugMessage(M64MSG_ERROR, "Emulator core Config API (v%i.%i.%i) incompatible with plugin (v%i.%i.%i)",
|
||||
VERSION_PRINTF_SPLIT(ConfigAPIVersion), VERSION_PRINTF_SPLIT(CONFIG_API_VERSION));
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
ConfigOpenSection = (ptr_ConfigOpenSection) GetProcAddress(CoreLibHandle, "ConfigOpenSection");
|
||||
ConfigSetParameter = (ptr_ConfigSetParameter) GetProcAddress(CoreLibHandle, "ConfigSetParameter");
|
||||
ConfigGetParameter = (ptr_ConfigGetParameter) GetProcAddress(CoreLibHandle, "ConfigGetParameter");
|
||||
ConfigSetDefaultInt = (ptr_ConfigSetDefaultInt) GetProcAddress(CoreLibHandle, "ConfigSetDefaultInt");
|
||||
ConfigSetDefaultFloat = (ptr_ConfigSetDefaultFloat) GetProcAddress(CoreLibHandle, "ConfigSetDefaultFloat");
|
||||
ConfigSetDefaultBool = (ptr_ConfigSetDefaultBool) GetProcAddress(CoreLibHandle, "ConfigSetDefaultBool");
|
||||
ConfigSetDefaultString = (ptr_ConfigSetDefaultString) GetProcAddress(CoreLibHandle, "ConfigSetDefaultString");
|
||||
ConfigGetParamInt = (ptr_ConfigGetParamInt) GetProcAddress(CoreLibHandle, "ConfigGetParamInt");
|
||||
ConfigGetParamFloat = (ptr_ConfigGetParamFloat) GetProcAddress(CoreLibHandle, "ConfigGetParamFloat");
|
||||
ConfigGetParamBool = (ptr_ConfigGetParamBool) GetProcAddress(CoreLibHandle, "ConfigGetParamBool");
|
||||
ConfigGetParamString = (ptr_ConfigGetParamString) GetProcAddress(CoreLibHandle, "ConfigGetParamString");
|
||||
|
||||
l_PluginInit = 1;
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
EXPORT m64p_error CALL PluginShutdown(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t PluginShutdown")
|
||||
OldAPI::CloseDLL();
|
||||
|
||||
D3D8_CloseDLL();
|
||||
FreeLibrary(D3D8Dll);
|
||||
FreeLibrary(JaboDLL);
|
||||
|
||||
writeOptionsInitflags(old_options,old_initflags);
|
||||
|
||||
if (!l_PluginInit)
|
||||
return M64ERR_NOT_INIT;
|
||||
|
||||
/* reset some local variables */
|
||||
l_DebugCallback = NULL;
|
||||
l_DebugCallContext = NULL;
|
||||
|
||||
l_PluginInit = 0;
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
EXPORT int CALL RomOpen(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t RomOpen")
|
||||
OldAPI::RomOpen();
|
||||
|
||||
remove("Project64.rdb");
|
||||
|
||||
if (!l_PluginInit)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
EXPORT void CALL RomClosed( void )
|
||||
{
|
||||
LOG("API WRAPPER:\t RomClosed")
|
||||
OldAPI::RomClosed();
|
||||
|
||||
if (!l_PluginInit)
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Pluginversion
|
||||
EXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities)
|
||||
{
|
||||
LOG("API WRAPPER:\t PluginGetVersion")
|
||||
|
||||
OldAPI::PLUGIN_INFO info;
|
||||
OldAPI::GetDllInfo(&info);
|
||||
|
||||
/* set version info */
|
||||
if (PluginType != NULL)
|
||||
*PluginType = M64PLUGIN_GFX;
|
||||
|
||||
if (PluginVersion != NULL)
|
||||
*PluginVersion = PLUGIN_VERSION;
|
||||
|
||||
if (APIVersion != NULL)
|
||||
*APIVersion = VIDEO_PLUGIN_API_VERSION;
|
||||
|
||||
if (PluginNamePtr != NULL)
|
||||
*PluginNamePtr = PLUGIN_NAME;
|
||||
|
||||
if (Capabilities != NULL)
|
||||
{
|
||||
*Capabilities = 0;
|
||||
}
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
// IGNORE
|
||||
EXPORT void CALL ChangeWindow (void)
|
||||
{
|
||||
LOG("API WRAPPER:\t ChangeWindow")
|
||||
}
|
||||
|
||||
// NOTE: NEW GFX_INFO vs old
|
||||
EXPORT int CALL InitiateGFX(GFX_INFO Gfx_Info)
|
||||
{
|
||||
LOG("API WRAPPER:\t InitiateGFX")
|
||||
|
||||
Config_Open();
|
||||
|
||||
SETTINGS settings;
|
||||
settings.anisotropic_level = (int)Config_ReadInt("anisotropic_level","ANISOTROPIC_FILTERING_LEVEL",0,TRUE,FALSE);
|
||||
settings.brightness = (int)Config_ReadInt("brightness","Brightness level",0,TRUE,FALSE);
|
||||
settings.antialiasing_level = (int)Config_ReadInt("antialiasing_level","Antialiasing level",0,TRUE,FALSE);
|
||||
settings.super2xsal = (BOOL)Config_ReadInt("super2xsal","Enables Super2xSal textures",FALSE);
|
||||
settings.texture_filter = (BOOL)Config_ReadInt("texture_filter","Always use texture filter",FALSE);
|
||||
settings.adjust_aspect_ratio = (BOOL)Config_ReadInt("adjust_aspect_ratio","Adjust game aspect ratio to match yours",FALSE);
|
||||
settings.legacy_pixel_pipeline = (BOOL)Config_ReadInt("legacy_pixel_pipeline","Use legacy pixel pipeline",FALSE);
|
||||
settings.alpha_blending = (BOOL)Config_ReadInt("alpha_blending","Force alpha blending",FALSE);
|
||||
|
||||
// As far as I can tell there is no way to apply this setting without opening the dll config window
|
||||
//settings.wireframe = (BOOL)Config_ReadInt("wireframe","Wireframe rendering",FALSE);
|
||||
|
||||
settings.direct3d_transformation_pipeline = (BOOL)Config_ReadInt("direct3d_transformation_pipeline","Use Direct3D transformation pipeline",FALSE);
|
||||
settings.z_compare = (BOOL)Config_ReadInt("z_compare","Force Z Compare",FALSE);
|
||||
settings.copy_framebuffer = (BOOL)Config_ReadInt("copy_framebuffer","Copy framebuffer to RDRAM",FALSE);
|
||||
settings.resolution_width = (int)Config_ReadInt("resolution_width","Emulated Width",-1,TRUE,FALSE);
|
||||
settings.resolution_height = (int)Config_ReadInt("resolution_height","Emulated Height",-1,TRUE,FALSE);
|
||||
settings.clear_mode = (int)Config_ReadInt("clear_mode","Direct3D Clear Mode Height",0,TRUE,FALSE);
|
||||
|
||||
DWORD new_options_val = 0;
|
||||
if (settings.copy_framebuffer == TRUE) { new_options_val |= 0x20000000; }
|
||||
if (settings.z_compare == TRUE) { new_options_val |= 0x10000000; }
|
||||
if (settings.legacy_pixel_pipeline == TRUE) { new_options_val |= 0x08000000; }
|
||||
if (settings.alpha_blending == TRUE) { new_options_val |= 0x04000000; }
|
||||
if (settings.adjust_aspect_ratio == TRUE) { new_options_val |= 0x02000000; }
|
||||
if (settings.texture_filter == TRUE) { new_options_val |= 0x01000000; }
|
||||
if (settings.super2xsal == TRUE) { new_options_val |= 0x00001000; }
|
||||
new_options_val |= (((settings.brightness - 100) / 3) & 0x1F) << 19;
|
||||
switch (settings.antialiasing_level)
|
||||
{
|
||||
case 1: new_options_val |= 0x00004000; break;
|
||||
case 2: new_options_val |= 0x00008000; break;
|
||||
case 3: new_options_val |= 0x00010000; break;
|
||||
}
|
||||
switch (settings.anisotropic_level)
|
||||
{
|
||||
case 1: new_options_val |= 0x00000020; break;
|
||||
case 2: new_options_val |= 0x00000040; break;
|
||||
case 3: new_options_val |= 0x00000080; break;
|
||||
case 4: new_options_val |= 0x00000100; break;
|
||||
}
|
||||
|
||||
int width, height;
|
||||
Config_ReadScreenResolution(&width,&height);
|
||||
if (width == 320 && height == 240) { new_options_val |= 0x00000000; }
|
||||
else if (width == 400 && height == 300) { new_options_val |= 0x00000001; }
|
||||
else if (width == 512 && height == 384) { new_options_val |= 0x00000002; }
|
||||
else if (width == 640 && height == 480) { new_options_val |= 0x00000003; }
|
||||
else if (width == 800 && height == 600) { new_options_val |= 0x00000004; }
|
||||
else if (width == 1024 && height == 768) { new_options_val |= 0x00000005; }
|
||||
else if (width == 1152 && height == 864) { new_options_val |= 0x00000006; }
|
||||
else if (width == 1280 && height == 960) { new_options_val |= 0x00000007; }
|
||||
else if (width == 1600 && height == 1200) { new_options_val |= 0x00000008; }
|
||||
else if (width == 848 && height == 480) { new_options_val |= 0x00000009; }
|
||||
else if (width == 1024 && height == 576) { new_options_val |= 0x0000000a; }
|
||||
else if (width == 1380 && height == 768) { new_options_val |= 0x0000000b; }
|
||||
else { /* will pick 320x240 */ }
|
||||
|
||||
DWORD new_initflags_val = 0x00e00000;
|
||||
if (settings.direct3d_transformation_pipeline == TRUE) { new_initflags_val = 0x00a00000; }
|
||||
|
||||
readOptionsInitflags(&old_options,&old_initflags);
|
||||
|
||||
writeOptionsInitflags(new_options_val,new_initflags_val);
|
||||
|
||||
createRDBFile(Gfx_Info.HEADER, settings.resolution_height, settings.resolution_width, settings.clear_mode);
|
||||
|
||||
OldAPI::GFX_INFO blah;
|
||||
|
||||
blah.hWnd = GetDesktopWindow();
|
||||
blah.hStatusBar = NULL;
|
||||
blah.MemoryBswaped = true;
|
||||
|
||||
blah.HEADER = Gfx_Info.HEADER;
|
||||
|
||||
blah.RDRAM = Gfx_Info.RDRAM;
|
||||
blah.DMEM = Gfx_Info.DMEM;
|
||||
blah.IMEM = Gfx_Info.IMEM;
|
||||
|
||||
blah.MI_INTR_REG = (DWORD *)Gfx_Info.MI_INTR_REG;
|
||||
|
||||
blah.DPC_START_REG = (DWORD *)Gfx_Info.DPC_START_REG;
|
||||
blah.DPC_END_REG = (DWORD *)Gfx_Info.DPC_END_REG;
|
||||
blah.DPC_CURRENT_REG = (DWORD *)Gfx_Info.DPC_CURRENT_REG;
|
||||
blah.DPC_STATUS_REG = (DWORD *)Gfx_Info.DPC_STATUS_REG;
|
||||
blah.DPC_CLOCK_REG = (DWORD *)Gfx_Info.DPC_CLOCK_REG;
|
||||
blah.DPC_BUFBUSY_REG = (DWORD *)Gfx_Info.DPC_BUFBUSY_REG;
|
||||
blah.DPC_PIPEBUSY_REG = (DWORD *)Gfx_Info.DPC_PIPEBUSY_REG;
|
||||
blah.DPC_TMEM_REG = (DWORD *)Gfx_Info.DPC_TMEM_REG;
|
||||
|
||||
blah.VI_STATUS_REG = (DWORD *)Gfx_Info.VI_STATUS_REG;
|
||||
blah.VI_ORIGIN_REG = (DWORD *)Gfx_Info.VI_ORIGIN_REG;
|
||||
blah.VI_WIDTH_REG = (DWORD *)Gfx_Info.VI_WIDTH_REG;
|
||||
blah.VI_INTR_REG = (DWORD *)Gfx_Info.VI_INTR_REG;
|
||||
blah.VI_V_CURRENT_LINE_REG = (DWORD *)Gfx_Info.VI_V_CURRENT_LINE_REG;
|
||||
blah.VI_TIMING_REG = (DWORD *)Gfx_Info.VI_TIMING_REG;
|
||||
blah.VI_V_SYNC_REG = (DWORD *)Gfx_Info.VI_V_SYNC_REG;
|
||||
blah.VI_H_SYNC_REG = (DWORD *)Gfx_Info.VI_H_SYNC_REG;
|
||||
blah.VI_LEAP_REG = (DWORD *)Gfx_Info.VI_LEAP_REG;
|
||||
blah.VI_H_START_REG = (DWORD *)Gfx_Info.VI_H_START_REG;
|
||||
blah.VI_V_START_REG = (DWORD *)Gfx_Info.VI_V_START_REG;
|
||||
blah.VI_V_BURST_REG = (DWORD *)Gfx_Info.VI_V_BURST_REG;
|
||||
blah.VI_X_SCALE_REG = (DWORD *)Gfx_Info.VI_X_SCALE_REG;
|
||||
blah.VI_Y_SCALE_REG = (DWORD *)Gfx_Info.VI_Y_SCALE_REG;
|
||||
|
||||
blah.CheckInterrupts = Gfx_Info.CheckInterrupts;
|
||||
|
||||
OldAPI::InitiateGFX(blah);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
EXPORT void CALL MoveScreen (int xpos, int ypos)
|
||||
{
|
||||
LOG("API WRAPPER:\t MoveScreen")
|
||||
OldAPI::MoveScreen(xpos, ypos);
|
||||
}
|
||||
|
||||
EXPORT void CALL ProcessDList(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t ProcessDList")
|
||||
OldAPI::ProcessDList();
|
||||
}
|
||||
|
||||
EXPORT void CALL ProcessRDPList(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t ProcessRDPList")
|
||||
OldAPI::ProcessRDPList();
|
||||
}
|
||||
|
||||
EXPORT void CALL ShowCFB(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t ShowCFB")
|
||||
OldAPI::ShowCFB();
|
||||
}
|
||||
|
||||
EXPORT void CALL UpdateScreen(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t UpdateScreen")
|
||||
OldAPI::UpdateScreen();
|
||||
}
|
||||
|
||||
EXPORT void CALL ViStatusChanged(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t ViStatusChanged")
|
||||
OldAPI::ViStatusChanged();
|
||||
}
|
||||
|
||||
EXPORT void CALL ViWidthChanged(void)
|
||||
{
|
||||
LOG("API WRAPPER:\t ViWidthChanged")
|
||||
OldAPI::ViWidthChanged();
|
||||
}
|
||||
|
||||
EXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int bFront)
|
||||
{
|
||||
LOG("API WRAPPER:\t ReadScreen2")
|
||||
if (D3D8_ReadScreen != NULL)
|
||||
{
|
||||
D3D8_ReadScreen(dest, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void CALL SetRenderingCallback(void (*callback)(int))
|
||||
{
|
||||
LOG("API WRAPPER:\t SetRenderingCallback")
|
||||
if (D3D8_SetRenderingCallback != NULL)
|
||||
{
|
||||
D3D8_SetRenderingCallback(callback);
|
||||
}
|
||||
}
|
||||
|
||||
// IMPLEMENT LATER?
|
||||
EXPORT void CALL FBRead(uint32 addr)
|
||||
{
|
||||
LOG("API WRAPPER:\t FBRead")
|
||||
}
|
||||
|
||||
// IMPLEMENT LATER?
|
||||
EXPORT void CALL FBWrite(uint32 addr, uint32 size)
|
||||
{
|
||||
LOG("API WRAPPER:\t FBWrite")
|
||||
}
|
||||
|
||||
// ???
|
||||
EXPORT void CALL FBGetFrameBufferInfo(void *p)
|
||||
{
|
||||
LOG("API WRAPPER:\t FBGetFrameBufferInfo")
|
||||
//FrameBufferInfo * pinfo = (FrameBufferInfo *)p;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* version info */
|
||||
#define PLUGIN_NAME "Jabo Direct3D8 wrapper for Mupen64Plus"
|
||||
#define PLUGIN_VERSION 0x020000
|
||||
#define VIDEO_PLUGIN_API_VERSION 0x020200
|
||||
#define CONFIG_API_VERSION 0x020000
|
||||
#define VIDEXT_API_VERSION 0x030000
|
||||
#define CONFIG_PARAM_VERSION 1.00
|
||||
|
||||
#define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
|
||||
|
||||
typedef struct {
|
||||
int anisotropic_level;
|
||||
int brightness;
|
||||
int antialiasing_level;
|
||||
BOOL super2xsal;
|
||||
BOOL texture_filter;
|
||||
BOOL adjust_aspect_ratio;
|
||||
BOOL legacy_pixel_pipeline;
|
||||
BOOL alpha_blending;
|
||||
// BOOL wireframe;
|
||||
BOOL direct3d_transformation_pipeline;
|
||||
BOOL z_compare;
|
||||
BOOL copy_framebuffer;
|
||||
int resolution_width;
|
||||
int resolution_height;
|
||||
int clear_mode;
|
||||
} SETTINGS;
|
|
@ -1,184 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0C220B26-3D4D-431D-B829-CADE6508A771}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>mupen64plusvideojabo</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;..\..\mupen64plus-win32-deps\SDL-1.2.15\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;..\..\mupen64plus-win32-deps\SDL-1.2.15\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;..\..\mupen64plus-win32-deps\SDL-1.2.15\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader />
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>
|
||||
</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\..\mupen64plus-core\src\api;..\..\mupen64plus-win32-deps\SDL-1.2.15\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Config.h" />
|
||||
<ClInclude Include="..\jabo_api.h" />
|
||||
<ClInclude Include="..\m64p.h" />
|
||||
<ClInclude Include="..\main.h" />
|
||||
<ClInclude Include="..\typedefs.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\config.cpp" />
|
||||
<ClCompile Include="..\main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef _TYPEDEFS_H_
|
||||
#define _TYPEDEFS_H_
|
||||
|
||||
#define uchar unsigned char
|
||||
#define uint16 unsigned short
|
||||
#define uint32 unsigned int
|
||||
#define uint64 unsigned long long
|
||||
|
||||
typedef unsigned char uint8;
|
||||
|
||||
typedef signed char s8;
|
||||
typedef int s32;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned char u8;
|
||||
|
||||
#endif
|
||||
|
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
|
@ -24,100 +16,46 @@
|
|||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
|
@ -129,7 +67,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64\libpng16.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\lib\x64\libpng16.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
|
@ -138,34 +76,9 @@
|
|||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.13\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NO_ASM;WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
|
@ -176,7 +89,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\x64\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\lib\x64\libpng16.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL2-2.26.3\lib\x64\SDL2.lib;..\..\..\mupen64plus-win32-deps\libpng-1.6.39\lib\x64\libpng16.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
|
@ -1,652 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mupen64plus-video-rice"
|
||||
ProjectGUID="{7D4AFF6A-B7D9-4C25-975A-038B8079098E}"
|
||||
RootNamespace="mupen64plusvideorice"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="user32.lib gdi32.lib opengl32.lib glu32.lib ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib ..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="user32.lib gdi32.lib opengl32.lib glu32.lib ..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib ..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\Blender.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\BMGImage.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\BMGUtils.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\bmp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CNvTNTCombiner.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Combiner.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CombinerTable.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Config.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\ConvertImage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\ConvertImage16.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Debugger.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DecodedMux.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DeviceBuilder.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DirectXDecodedMux.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\FrameBuffer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\GeneralCombiner.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\GraphicsContext.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLCombiner.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLCombinerNV.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLCombinerTNT2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLDecodedMux.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLExtCombiner.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLExtensions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLExtRender.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLFragmentShaders.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLGraphicsContext.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLRender.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLRenderExt.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLTexture.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_dynamiclib_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_files_win32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\pngrw.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Render.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RenderBase.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RenderExt.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RenderTexture.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_Parser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_S2DEX.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Texture.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters_2xsai.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters_hq2x.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters_hq4x.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureManager.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\VectorMath.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Video.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\Blender.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\BMGDLL.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\BMGImage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\BMGLibPNG.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\BMGUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CNvTNTCombiner.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\COLOR.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Combiner.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CombinerDefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\ConvertImage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CritSect.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\CSortedList.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Debugger.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DecodedMux.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DeviceBuilder.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\DirectXDecodedMux.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\ExtendedRender.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\FrameBuffer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\GeneralCombiner.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\GraphicsContext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\IColor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\inffixed.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\jpegrw.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLCombiner.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLCombinerNV.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLCombinerTNT2.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLDebug.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLDecodedMux.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLExtCombiner.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLExtensions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLExtRender.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLFragmentShaders.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLGraphicsContext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLRender.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\OGLTexture.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_dynamiclib.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_files.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\osal_preproc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\pngrw.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RDP_Texture.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Render.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RenderBase.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RenderTexture.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_GBI0.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_GBI1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_GBI2.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_GBI2_ext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_GBI_Others.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_GBI_Sprite2D.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_Parser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\RSP_S2DEX.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Texture.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters_hq2x.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters_hq4x.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureFilters_lq2x.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\TextureManager.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\tiffrw.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Timing.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\typedefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\ucode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\UcodeDefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\VectorMath.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\version.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\VertexShaderConstantDef.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\Video.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\zconf.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\liblinux\zlib.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,420 +0,0 @@
|
|||
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# * Mupen64plus-video-rice - Makefile *
|
||||
# * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
# * Copyright (C) 2007-2009 Richard Goedeken *
|
||||
# * Copyright (C) 2007-2008 DarkJeztr Tillin9 *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the *
|
||||
# * Free Software Foundation, Inc., *
|
||||
# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
# Makefile for RiceVideo plugin in Mupen64Plus
|
||||
|
||||
# detect operating system
|
||||
UNAME ?= $(shell uname -s)
|
||||
OS := NONE
|
||||
ifeq ("$(UNAME)","Linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifneq ("$(filter GNU hurd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
OS = OSX
|
||||
SO_EXTENSION = dylib
|
||||
SHARED = -bundle
|
||||
PIC = 1 # force PIC under OSX
|
||||
endif
|
||||
ifeq ("$(UNAME)","FreeBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","OpenBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
$(warning OS type "$(UNAME)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
|
||||
OS = MINGW
|
||||
SO_EXTENSION = dll
|
||||
SHARED = -shared
|
||||
PIC = 0
|
||||
endif
|
||||
ifeq ("$(OS)","NONE")
|
||||
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# detect system architecture
|
||||
HOST_CPU ?= $(shell uname -m)
|
||||
CPU := NONE
|
||||
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ifeq ("$(BITS)", "32")
|
||||
ARCH_DETECTED := 64BITS_32
|
||||
PIC ?= 0
|
||||
else
|
||||
ARCH_DETECTED := 64BITS
|
||||
PIC ?= 1
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 0
|
||||
endif
|
||||
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 32BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 64BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter arm%,$(HOST_CPU))","")
|
||||
ifeq ("$(filter arm%b,$(HOST_CPU))","")
|
||||
CPU := ARM
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
endif
|
||||
ifeq ("$(CPU)","NONE")
|
||||
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# base CFLAGS, LDLIBS, and LDFLAGS
|
||||
OPTFLAGS ?= -O3 -flto
|
||||
WARNFLAGS ?= -Wall
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src
|
||||
CXXFLAGS += -fvisibility-inlines-hidden
|
||||
LDFLAGS += $(SHARED)
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
CFLAGS += -msse
|
||||
endif
|
||||
|
||||
# Since we are building a shared library, we must compile with -fPIC on some architectures
|
||||
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
|
||||
ifeq ($(PIC), 1)
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
CFLAGS += -fno-PIC
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN), 1)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# tweak flags for 32-bit build on 64-bit system
|
||||
ifeq ($(ARCH_DETECTED), 64BITS_32)
|
||||
ifeq ($(OS), FREEBSD)
|
||||
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
|
||||
endif
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -Wl,-m,elf_i386
|
||||
endif
|
||||
|
||||
# set special flags per-system
|
||||
ifeq ($(OS), LINUX)
|
||||
LDLIBS += -ldl
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
#xcode-select has been around since XCode 3.0, i.e. OS X 10.5
|
||||
OSX_SDK_ROOT = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs
|
||||
OSX_SDK_PATH = $(OSX_SDK_ROOT)/$(shell ls $(OSX_SDK_ROOT) | tail -1)
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH)
|
||||
LDFLAGS += -bundle
|
||||
LDLIBS += -ldl
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH)
|
||||
LDFLAGS += -bundle
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# test for essential build dependencies
|
||||
ifeq ($(origin PKG_CONFIG), undefined)
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
|
||||
$(error $(PKG_CONFIG) not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(origin LIBPNG_CFLAGS) $(origin LIBPNG_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion libpng 2>/dev/null),)
|
||||
$(error No libpng development libraries found!)
|
||||
endif
|
||||
LIBPNG_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng)
|
||||
LIBPNG_LDLIBS += $(shell $(PKG_CONFIG) --libs libpng)
|
||||
endif
|
||||
CFLAGS += $(LIBPNG_CFLAGS)
|
||||
LDLIBS += $(LIBPNG_LDLIBS)
|
||||
|
||||
# search for OpenGL libraries
|
||||
ifeq ($(OS), OSX)
|
||||
GL_LDLIBS = -framework OpenGL
|
||||
endif
|
||||
ifeq ($(OS), MINGW)
|
||||
GL_LDLIBS = -lopengl32
|
||||
endif
|
||||
ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
|
||||
$(error No OpenGL development libraries found!)
|
||||
endif
|
||||
GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
|
||||
GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
|
||||
endif
|
||||
CFLAGS += $(GL_CFLAGS)
|
||||
LDLIBS += $(GL_LDLIBS)
|
||||
|
||||
# test for presence of SDL
|
||||
ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
|
||||
SDL_CONFIG = $(CROSS_COMPILE)sdl-config
|
||||
ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
|
||||
$(error No SDL development libraries found!)
|
||||
endif
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
|
||||
endif
|
||||
CFLAGS += $(SDL_CFLAGS)
|
||||
LDLIBS += $(SDL_LDLIBS)
|
||||
|
||||
# set mupen64plus core API header path
|
||||
ifneq ("$(APIDIR)","")
|
||||
CFLAGS += "-I$(APIDIR)"
|
||||
else
|
||||
TRYDIR = ../../../mupen64plus-core/src/api
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/local/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
$(error Mupen64Plus API header files not found! Use makefile parameter APIDIR to force a location.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
||||
# set base program pointers and flags
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
RM ?= rm -f
|
||||
INSTALL ?= install
|
||||
MKDIR ?= mkdir -p
|
||||
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
|
||||
|
||||
# set special flags for given Makefile parameters
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
ifneq ($(OS),OSX)
|
||||
INSTALL_STRIP_FLAG ?= -s
|
||||
endif
|
||||
endif
|
||||
ifeq ($(NO_ASM), 1)
|
||||
CFLAGS += -DNO_ASM
|
||||
endif
|
||||
|
||||
# set installation options
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(SHAREDIR),)
|
||||
SHAREDIR := $(PREFIX)/share/mupen64plus
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(PLUGINDIR),)
|
||||
PLUGINDIR := $(LIBDIR)/mupen64plus
|
||||
endif
|
||||
|
||||
SRCDIR = ../../src
|
||||
OBJDIR = _obj$(POSTFIX)
|
||||
|
||||
# list of source files to compile
|
||||
SOURCE = \
|
||||
$(SRCDIR)/liblinux/BMGImage.c \
|
||||
$(SRCDIR)/liblinux/BMGUtils.cpp \
|
||||
$(SRCDIR)/liblinux/bmp.c \
|
||||
$(SRCDIR)/liblinux/pngrw.c \
|
||||
$(SRCDIR)/Blender.cpp \
|
||||
$(SRCDIR)/Combiner.cpp \
|
||||
$(SRCDIR)/CombinerTable.cpp \
|
||||
$(SRCDIR)/Config.cpp \
|
||||
$(SRCDIR)/ConvertImage.cpp \
|
||||
$(SRCDIR)/ConvertImage16.cpp \
|
||||
$(SRCDIR)/CNvTNTCombiner.cpp \
|
||||
$(SRCDIR)/Debugger.cpp \
|
||||
$(SRCDIR)/DecodedMux.cpp \
|
||||
$(SRCDIR)/DirectXDecodedMux.cpp \
|
||||
$(SRCDIR)/DeviceBuilder.cpp \
|
||||
$(SRCDIR)/FrameBuffer.cpp \
|
||||
$(SRCDIR)/GeneralCombiner.cpp \
|
||||
$(SRCDIR)/GraphicsContext.cpp \
|
||||
$(SRCDIR)/OGLCombiner.cpp \
|
||||
$(SRCDIR)/OGLCombinerNV.cpp \
|
||||
$(SRCDIR)/OGLCombinerTNT2.cpp \
|
||||
$(SRCDIR)/OGLDecodedMux.cpp \
|
||||
$(SRCDIR)/OGLExtCombiner.cpp \
|
||||
$(SRCDIR)/OGLExtensions.cpp \
|
||||
$(SRCDIR)/OGLExtRender.cpp \
|
||||
$(SRCDIR)/OGLFragmentShaders.cpp \
|
||||
$(SRCDIR)/OGLGraphicsContext.cpp \
|
||||
$(SRCDIR)/OGLRender.cpp \
|
||||
$(SRCDIR)/OGLRenderExt.cpp \
|
||||
$(SRCDIR)/OGLTexture.cpp \
|
||||
$(SRCDIR)/Render.cpp \
|
||||
$(SRCDIR)/RenderBase.cpp \
|
||||
$(SRCDIR)/RenderExt.cpp \
|
||||
$(SRCDIR)/RenderTexture.cpp \
|
||||
$(SRCDIR)/RSP_Parser.cpp \
|
||||
$(SRCDIR)/RSP_S2DEX.cpp \
|
||||
$(SRCDIR)/Texture.cpp \
|
||||
$(SRCDIR)/TextureFilters.cpp \
|
||||
$(SRCDIR)/TextureFilters_2xsai.cpp \
|
||||
$(SRCDIR)/TextureFilters_hq2x.cpp \
|
||||
$(SRCDIR)/TextureFilters_hq4x.cpp \
|
||||
$(SRCDIR)/TextureManager.cpp \
|
||||
$(SRCDIR)/VectorMath.cpp \
|
||||
$(SRCDIR)/Video.cpp
|
||||
|
||||
ifeq ($(OS),MINGW)
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osal_dynamiclib_win32.c \
|
||||
$(SRCDIR)/osal_files_win32.c
|
||||
else
|
||||
SOURCE += \
|
||||
$(SRCDIR)/osal_dynamiclib_unix.c \
|
||||
$(SRCDIR)/osal_files_unix.c
|
||||
endif
|
||||
|
||||
# generate a list of object files build, make a temporary directory for them
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
|
||||
OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE)))
|
||||
OBJDIRS = $(dir $(OBJECTS))
|
||||
$(shell $(MKDIR) $(OBJDIRS))
|
||||
|
||||
# build targets
|
||||
TARGET = mupen64plus-video-rice$(POSTFIX).$(SO_EXTENSION)
|
||||
|
||||
targets:
|
||||
@echo "Mupen64plus-video-rice N64 Graphics plugin makefile. "
|
||||
@echo " Targets:"
|
||||
@echo " all == Build Mupen64plus-video-rice plugin"
|
||||
@echo " clean == remove object files"
|
||||
@echo " rebuild == clean and re-build all"
|
||||
@echo " install == Install Mupen64Plus-video-rice plugin"
|
||||
@echo " uninstall == Uninstall Mupen64Plus-video-rice plugin"
|
||||
@echo " Options:"
|
||||
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
|
||||
@echo " NO_ASM=1 == build without inline assembly code (x86 MMX/SSE)"
|
||||
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
|
||||
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
|
||||
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
|
||||
@echo " PIC=(1|0) == Force enable/disable of position independent code"
|
||||
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
|
||||
@echo " Install Options:"
|
||||
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
|
||||
@echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"
|
||||
@echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
|
||||
@echo " PLUGINDIR=path == path to install plugin libraries (default: LIBDIR/mupen64plus)"
|
||||
@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)
|
||||
|
||||
install: $(TARGET)
|
||||
$(INSTALL) -d "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(SHAREDIR)"
|
||||
$(INSTALL) -m 0644 "../../data/RiceVideoLinux.ini" "$(DESTDIR)$(SHAREDIR)"
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
|
||||
$(RM) "$(DESTDIR)$(SHAREDIR)/RiceVideoLinux.ini"
|
||||
|
||||
clean:
|
||||
$(RM) -r $(OBJDIR) $(TARGET)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
# build dependency files
|
||||
CFLAGS += -MD
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
|
||||
# standard build rules
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(COMPILE.cc) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||
|
||||
.PHONY: all clean install uninstall targets
|
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,189 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\disasm.cpp" />
|
||||
<ClCompile Include="..\..\src\glshader.cpp" />
|
||||
<ClCompile Include="..\..\src\maingl.cpp" />
|
||||
<ClCompile Include="..\..\src\osal_dynamiclib_win32.c" />
|
||||
<ClCompile Include="..\..\src\rdp.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_debugger.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_geometry.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_glut.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_osdep.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_rendermode.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_settings.cpp" />
|
||||
<ClCompile Include="..\..\src\rgl_tiles.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\glshader.h" />
|
||||
<ClInclude Include="..\..\src\osal_dynamiclib.h" />
|
||||
<ClInclude Include="..\..\src\queue.h" />
|
||||
<ClInclude Include="..\..\src\rdp.h" />
|
||||
<ClInclude Include="..\..\src\rgl.h" />
|
||||
<ClInclude Include="..\..\src\rgl_assert.h" />
|
||||
<ClInclude Include="..\..\src\rgl_glut.h" />
|
||||
<ClInclude Include="..\..\src\z64.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7708C1D2-3303-4F90-BCE8-3BCE4046BFD7}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>mupen64plusvideoz64</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)..\..\..\..\Assets\dll\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUPEN64PLUSVIDEOZ64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\glew-1.10.0\include\GL</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4005;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>opengl32.lib;..\..\..\mupen64plus-win32-deps\glew-1.10.0\lib\Release\Win32\glew32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUPEN64PLUSVIDEOZ64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\glew-1.10.0\include\GL</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4005;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>opengl32.lib;..\..\..\mupen64plus-win32-deps\glew-1.10.0\lib\Release\Win32\glew32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUPEN64PLUSVIDEOZ64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\glew-1.10.0\include\GL</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4005;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>opengl32.lib;..\..\..\mupen64plus-win32-deps\glew-1.10.0\lib\Release\Win32\glew32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUPEN64PLUSVIDEOZ64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\include;..\..\..\mupen64plus-win32-deps\libpng-1.6.18\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;..\..\..\mupen64plus-win32-deps\glew-1.10.0\include\GL</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4005;4244</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>opengl32.lib;..\..\..\mupen64plus-win32-deps\glew-1.10.0\lib\Release\Win32\glew32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.15\lib\SDL.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,391 +0,0 @@
|
|||
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# * Mupen64plus-video-z64 - Makefile *
|
||||
# * https://github.com/mupen64plus/mupen64plus-video-z64/ *
|
||||
# * Copyright (C) 2010 Jon Ring *
|
||||
# * Copyright (C) 2007-2009 Richard Goedeken *
|
||||
# * Copyright (C) 2007-2008 DarkJeztr Tillin9 *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU General Public License as published by *
|
||||
# * the Free Software Foundation; either version 2 of the License, or *
|
||||
# * (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the *
|
||||
# * Free Software Foundation, Inc., *
|
||||
# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
# Makefile for Z64 Video plugin in Mupen64Plus
|
||||
|
||||
# detect operating system
|
||||
UNAME ?= $(shell uname -s)
|
||||
OS := NONE
|
||||
ifeq ("$(UNAME)","Linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","linux")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifneq ("$(filter GNU hurd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
OS = OSX
|
||||
SO_EXTENSION = dylib
|
||||
SHARED = -bundle
|
||||
endif
|
||||
ifeq ("$(UNAME)","FreeBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(UNAME)","OpenBSD")
|
||||
OS = FREEBSD
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
$(warning OS type "$(UNAME)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
|
||||
OS = LINUX
|
||||
SO_EXTENSION = so
|
||||
SHARED = -shared
|
||||
endif
|
||||
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
|
||||
OS = MINGW
|
||||
SO_EXTENSION = dll
|
||||
SHARED = -shared
|
||||
PIC = 0
|
||||
endif
|
||||
ifeq ("$(OS)","NONE")
|
||||
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# detect system architecture
|
||||
HOST_CPU ?= $(shell uname -m)
|
||||
CPU := NONE
|
||||
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ifeq ("$(BITS)", "32")
|
||||
ARCH_DETECTED := 64BITS_32
|
||||
PIC ?= 0
|
||||
else
|
||||
ARCH_DETECTED := 64BITS
|
||||
PIC ?= 1
|
||||
endif
|
||||
endif
|
||||
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
|
||||
CPU := X86
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 0
|
||||
endif
|
||||
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 32BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
|
||||
CPU := PPC
|
||||
ARCH_DETECTED := 64BITS
|
||||
BIG_ENDIAN := 1
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
ifneq ("$(filter arm%,$(HOST_CPU))","")
|
||||
ifeq ("$(filter arm%b,$(HOST_CPU))","")
|
||||
CPU := ARM
|
||||
ARCH_DETECTED := 32BITS
|
||||
PIC ?= 1
|
||||
NO_ASM := 1
|
||||
$(warning Architecture "$(HOST_CPU)" not officially supported.')
|
||||
endif
|
||||
endif
|
||||
ifeq ("$(CPU)","NONE")
|
||||
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
|
||||
endif
|
||||
|
||||
# base CFLAGS, LDLIBS, and LDFLAGS
|
||||
OPTFLAGS ?= -O3 -flto
|
||||
WARNFLAGS ?= -Wall
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src
|
||||
CXXFLAGS += -fvisibility-inlines-hidden
|
||||
LDFLAGS += $(SHARED)
|
||||
|
||||
# Since we are building a shared library, we must compile with -fPIC on some architectures
|
||||
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
|
||||
ifeq ($(PIC), 1)
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
CFLAGS += -fno-PIC
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_ENDIAN), 1)
|
||||
CFLAGS += -DM64P_BIG_ENDIAN
|
||||
endif
|
||||
|
||||
# tweak flags for 32-bit build on 64-bit system
|
||||
ifeq ($(ARCH_DETECTED), 64BITS_32)
|
||||
ifeq ($(OS), FREEBSD)
|
||||
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
|
||||
endif
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -Wl,-m,elf_i386
|
||||
endif
|
||||
|
||||
# set special flags per-system
|
||||
ifeq ($(OS), LINUX)
|
||||
# only export api symbols
|
||||
LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
|
||||
endif
|
||||
ifeq ($(OS), OSX)
|
||||
# Select the proper SDK
|
||||
# Also, SDKs are stored in a different location since XCode 4.3
|
||||
OSX_SDK ?= $(shell sw_vers -productVersion | cut -f1 -f2 -d .)
|
||||
OSX_XCODEMAJ = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f1 -d .)
|
||||
OSX_XCODEMIN = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f2 -d .)
|
||||
OSX_XCODEGE43 = $(shell echo "`expr $(OSX_XCODEMAJ) \>= 4``expr $(OSX_XCODEMIN) \>= 3`")
|
||||
ifeq ($(OSX_XCODEGE43), 11)
|
||||
OSX_SYSROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
|
||||
else
|
||||
OSX_SYSROOT := /Developer/SDKs
|
||||
endif
|
||||
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
|
||||
LDFLAGS += -bundle
|
||||
LDLIBS += -ldl
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
|
||||
LDFLAGS += -bundle
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS), LINUX)
|
||||
LDLIBS += -ldl
|
||||
endif
|
||||
ifeq ($(OS), FREEBSD)
|
||||
LDLIBS += -lc
|
||||
endif
|
||||
|
||||
# test for essential build dependencies
|
||||
ifeq ($(origin PKG_CONFIG), undefined)
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
|
||||
$(error $(PKG_CONFIG) not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(origin GLEW_CFLAGS) $(origin GLEW_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion glew 2>/dev/null),)
|
||||
$(error No GLEW development libraries found!)
|
||||
endif
|
||||
GLEW_CFLAGS += $(shell $(PKG_CONFIG) --cflags glew)
|
||||
GLEW_LDLIBS += $(shell $(PKG_CONFIG) --libs glew)
|
||||
endif
|
||||
CFLAGS += $(GLEW_CFLAGS)
|
||||
LDLIBS += $(GLEW_LDLIBS)
|
||||
|
||||
# search for OpenGL libraries
|
||||
ifeq ($(OS), OSX)
|
||||
GL_LDLIBS = -framework OpenGL
|
||||
endif
|
||||
ifeq ($(OS), MINGW)
|
||||
GL_LDLIBS = -lopengl32
|
||||
endif
|
||||
ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
|
||||
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
|
||||
$(error No OpenGL development libraries found!)
|
||||
endif
|
||||
GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
|
||||
GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
|
||||
endif
|
||||
CFLAGS += $(GL_CFLAGS)
|
||||
LDLIBS += $(GL_LDLIBS)
|
||||
|
||||
# test for presence of SDL
|
||||
ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
|
||||
SDL_CONFIG = $(CROSS_COMPILE)sdl-config
|
||||
ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
|
||||
$(error No SDL development libraries found!)
|
||||
endif
|
||||
ifeq ($(OS),OSX)
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
# sdl-config on mac screws up when we're trying to build a library and not an executable
|
||||
# SDL 1.3 is supposed to fix that, if it's ever released
|
||||
SDL_LDLIBS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
|
||||
else
|
||||
SDL_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
|
||||
endif
|
||||
endif
|
||||
CFLAGS += $(SDL_CFLAGS)
|
||||
LDLIBS += $(SDL_LDLIBS)
|
||||
|
||||
# set mupen64plus core API header path
|
||||
ifneq ("$(APIDIR)","")
|
||||
CFLAGS += "-I$(APIDIR)"
|
||||
else
|
||||
TRYDIR = ../../../mupen64plus-core/src/api
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/local/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
TRYDIR = /usr/include/mupen64plus
|
||||
ifneq ("$(wildcard $(TRYDIR)/m64p_types.h)","")
|
||||
CFLAGS += -I$(TRYDIR)
|
||||
else
|
||||
$(error Mupen64Plus API header files not found! Use makefile parameter APIDIR to force a location.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
||||
# set base program pointers and flags
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CXX = $(CROSS_COMPILE)g++
|
||||
RM ?= rm -f
|
||||
INSTALL ?= install
|
||||
MKDIR ?= mkdir -p
|
||||
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
|
||||
LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
|
||||
|
||||
# set special flags for given Makefile parameters
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g
|
||||
INSTALL_STRIP_FLAG ?=
|
||||
else
|
||||
INSTALL_STRIP_FLAG ?= -s
|
||||
endif
|
||||
|
||||
# set installation options
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
ifeq ($(SHAREDIR),)
|
||||
SHAREDIR := $(PREFIX)/share/mupen64plus
|
||||
endif
|
||||
ifeq ($(LIBDIR),)
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
endif
|
||||
ifeq ($(PLUGINDIR),)
|
||||
PLUGINDIR := $(LIBDIR)/mupen64plus
|
||||
endif
|
||||
|
||||
SRCDIR = ../../src
|
||||
OBJDIR = _obj$(POSTFIX)
|
||||
|
||||
# list of source files to compile
|
||||
SOURCE = \
|
||||
$(SRCDIR)/rgl.cpp \
|
||||
$(SRCDIR)/rgl_settings.cpp \
|
||||
$(SRCDIR)/rgl_tiles.cpp \
|
||||
$(SRCDIR)/rgl_rendermode.cpp \
|
||||
$(SRCDIR)/rgl_geometry.cpp \
|
||||
$(SRCDIR)/rgl_debugger.cpp \
|
||||
$(SRCDIR)/rgl_osdep.cpp \
|
||||
$(SRCDIR)/rdp.cpp \
|
||||
$(SRCDIR)/glshader.cpp \
|
||||
$(SRCDIR)/disasm.cpp \
|
||||
$(SRCDIR)/maingl.cpp
|
||||
|
||||
ifeq ($(OS),MINGW)
|
||||
SOURCE += $(SRCDIR)/osal_dynamiclib_win32.c
|
||||
else
|
||||
SOURCE += $(SRCDIR)/osal_dynamiclib_unix.c
|
||||
endif
|
||||
|
||||
# generate a list of object files build, make a temporary directory for them
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
|
||||
OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE)))
|
||||
OBJDIRS = $(dir $(OBJECTS))
|
||||
$(shell $(MKDIR) $(OBJDIRS))
|
||||
|
||||
# build targets
|
||||
TARGET = mupen64plus-video-z64$(POSTFIX).$(SO_EXTENSION)
|
||||
|
||||
targets:
|
||||
@echo "Mupen64plus-video-z64 N64 Graphics plugin makefile. "
|
||||
@echo " Targets:"
|
||||
@echo " all == Build Mupen64plus-video-z64 plugin"
|
||||
@echo " clean == remove object files"
|
||||
@echo " rebuild == clean and re-build all"
|
||||
@echo " install == Install Mupen64Plus-video-z64 plugin"
|
||||
@echo " uninstall == Uninstall Mupen64Plus-video-z64 plugin"
|
||||
@echo " Options:"
|
||||
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
|
||||
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
|
||||
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
|
||||
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
|
||||
@echo " PIC=(1|0) == Force enable/disable of position independent code"
|
||||
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
|
||||
@echo " Install Options:"
|
||||
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
|
||||
@echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"
|
||||
@echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
|
||||
@echo " PLUGINDIR=path == path to install plugin libraries (default: LIBDIR/mupen64plus)"
|
||||
@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)
|
||||
|
||||
install: $(TARGET)
|
||||
$(INSTALL) -d "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -m 0644 $(INSTALL_STRIP_FLAG) $(TARGET) "$(DESTDIR)$(PLUGINDIR)"
|
||||
$(INSTALL) -d "$(DESTDIR)$(SHAREDIR)"
|
||||
|
||||
uninstall:
|
||||
$(RM) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
|
||||
|
||||
clean:
|
||||
$(RM) -r $(OBJDIR) $(TARGET)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
# build dependency files
|
||||
CFLAGS += -MD -MP
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
|
||||
# standard build rules
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
$(COMPILE.c) -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(COMPILE.cc) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||
|
||||
.PHONY: all clean install uninstall targets
|
|
@ -1,422 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#include "z64.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static const char *image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
|
||||
static const char *image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" };
|
||||
|
||||
static const int rdp_command_length[64] =
|
||||
{
|
||||
8, // 0x00, No Op
|
||||
8, // 0x01, ???
|
||||
8, // 0x02, ???
|
||||
8, // 0x03, ???
|
||||
8, // 0x04, ???
|
||||
8, // 0x05, ???
|
||||
8, // 0x06, ???
|
||||
8, // 0x07, ???
|
||||
32, // 0x08, Non-Shaded Triangle
|
||||
32+16, // 0x09, Non-Shaded, Z-Buffered Triangle
|
||||
32+64, // 0x0a, Textured Triangle
|
||||
32+64+16, // 0x0b, Textured, Z-Buffered Triangle
|
||||
32+64, // 0x0c, Shaded Triangle
|
||||
32+64+16, // 0x0d, Shaded, Z-Buffered Triangle
|
||||
32+64+64, // 0x0e, Shaded+Textured Triangle
|
||||
32+64+64+16,// 0x0f, Shaded+Textured, Z-Buffered Triangle
|
||||
8, // 0x10, ???
|
||||
8, // 0x11, ???
|
||||
8, // 0x12, ???
|
||||
8, // 0x13, ???
|
||||
8, // 0x14, ???
|
||||
8, // 0x15, ???
|
||||
8, // 0x16, ???
|
||||
8, // 0x17, ???
|
||||
8, // 0x18, ???
|
||||
8, // 0x19, ???
|
||||
8, // 0x1a, ???
|
||||
8, // 0x1b, ???
|
||||
8, // 0x1c, ???
|
||||
8, // 0x1d, ???
|
||||
8, // 0x1e, ???
|
||||
8, // 0x1f, ???
|
||||
8, // 0x20, ???
|
||||
8, // 0x21, ???
|
||||
8, // 0x22, ???
|
||||
8, // 0x23, ???
|
||||
16, // 0x24, Texture_Rectangle
|
||||
16, // 0x25, Texture_Rectangle_Flip
|
||||
8, // 0x26, Sync_Load
|
||||
8, // 0x27, Sync_Pipe
|
||||
8, // 0x28, Sync_Tile
|
||||
8, // 0x29, Sync_Full
|
||||
8, // 0x2a, Set_Key_GB
|
||||
8, // 0x2b, Set_Key_R
|
||||
8, // 0x2c, Set_Convert
|
||||
8, // 0x2d, Set_Scissor
|
||||
8, // 0x2e, Set_Prim_Depth
|
||||
8, // 0x2f, Set_Other_Modes
|
||||
8, // 0x30, Load_TLUT
|
||||
8, // 0x31, ???
|
||||
8, // 0x32, Set_Tile_Size
|
||||
8, // 0x33, Load_Block
|
||||
8, // 0x34, Load_Tile
|
||||
8, // 0x35, Set_Tile
|
||||
8, // 0x36, Fill_Rectangle
|
||||
8, // 0x37, Set_Fill_Color
|
||||
8, // 0x38, Set_Fog_Color
|
||||
8, // 0x39, Set_Blend_Color
|
||||
8, // 0x3a, Set_Prim_Color
|
||||
8, // 0x3b, Set_Env_Color
|
||||
8, // 0x3c, Set_Combine
|
||||
8, // 0x3d, Set_Texture_Image
|
||||
8, // 0x3e, Set_Mask_Image
|
||||
8 // 0x3f, Set_Color_Image
|
||||
};
|
||||
|
||||
int rdp_dasm(UINT32 * rdp_cmd_data, int rdp_cmd_cur, int length, char *buffer)
|
||||
{
|
||||
//int i;
|
||||
int tile;
|
||||
const char *format, *size;
|
||||
char sl[32], tl[32], sh[32], th[32];
|
||||
char s[32], t[32];//, w[32];
|
||||
char dsdx[32], dtdy[32];
|
||||
#if 0
|
||||
char dsdx[32], dtdx[32], dwdx[32];
|
||||
char dsdy[32], dtdy[32], dwdy[32];
|
||||
char dsde[32], dtde[32], dwde[32];
|
||||
char yl[32], yh[32], ym[32], xl[32], xh[32], xm[32];
|
||||
char dxldy[32], dxhdy[32], dxmdy[32];
|
||||
char rt[32], gt[32], bt[32], at[32];
|
||||
char drdx[32], dgdx[32], dbdx[32], dadx[32];
|
||||
char drdy[32], dgdy[32], dbdy[32], dady[32];
|
||||
char drde[32], dgde[32], dbde[32], dade[32];
|
||||
#endif
|
||||
UINT32 r,g,b,a;
|
||||
|
||||
UINT32 cmd[64];
|
||||
UINT32 command;
|
||||
|
||||
if (length < 8)
|
||||
{
|
||||
sprintf(buffer, "ERROR: length = %d\n", length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmd[0] = rdp_cmd_data[rdp_cmd_cur+0];
|
||||
cmd[1] = rdp_cmd_data[rdp_cmd_cur+1];
|
||||
|
||||
tile = (cmd[1] >> 24) & 0x7;
|
||||
sprintf(sl, "%4.2f", (float)((cmd[0] >> 12) & 0xfff) / 4.0f);
|
||||
sprintf(tl, "%4.2f", (float)((cmd[0] >> 0) & 0xfff) / 4.0f);
|
||||
sprintf(sh, "%4.2f", (float)((cmd[1] >> 12) & 0xfff) / 4.0f);
|
||||
sprintf(th, "%4.2f", (float)((cmd[1] >> 0) & 0xfff) / 4.0f);
|
||||
|
||||
format = image_format[(cmd[0] >> 21) & 0x7];
|
||||
size = image_size[(cmd[0] >> 19) & 0x3];
|
||||
|
||||
r = (cmd[1] >> 24) & 0xff;
|
||||
g = (cmd[1] >> 16) & 0xff;
|
||||
b = (cmd[1] >> 8) & 0xff;
|
||||
a = (cmd[1] >> 0) & 0xff;
|
||||
|
||||
command = (cmd[0] >> 24) & 0x3f;
|
||||
//printf("command %x\n", command);
|
||||
switch (command)
|
||||
{
|
||||
case 0x00: sprintf(buffer, "No Op"); break;
|
||||
case 0x08:
|
||||
sprintf(buffer, "Tri_NoShade (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x0a:
|
||||
sprintf(buffer, "Tri_Tex (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x0c:
|
||||
sprintf(buffer, "Tri_Shade (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x0e:
|
||||
sprintf(buffer, "Tri_TexShade (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x09:
|
||||
sprintf(buffer, "TriZ_NoShade (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x0b:
|
||||
sprintf(buffer, "TriZ_Tex (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x0d:
|
||||
sprintf(buffer, "TriZ_Shade (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
case 0x0f:
|
||||
sprintf(buffer, "TriZ_TexShade (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
|
||||
#if 0
|
||||
case 0x08: // Tri_NoShade
|
||||
{
|
||||
int lft = (command >> 23) & 0x1;
|
||||
|
||||
if (length < rdp_command_length[command])
|
||||
{
|
||||
sprintf(buffer, "ERROR: Tri_NoShade length = %d\n", length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmd[2] = rdp_cmd_data[rdp_cmd_cur+2];
|
||||
cmd[3] = rdp_cmd_data[rdp_cmd_cur+3];
|
||||
cmd[4] = rdp_cmd_data[rdp_cmd_cur+4];
|
||||
cmd[5] = rdp_cmd_data[rdp_cmd_cur+5];
|
||||
cmd[6] = rdp_cmd_data[rdp_cmd_cur+6];
|
||||
cmd[7] = rdp_cmd_data[rdp_cmd_cur+7];
|
||||
|
||||
sprintf(yl, "%4.4f", (float)((cmd[0] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(ym, "%4.4f", (float)((cmd[1] >> 16) & 0x1fff) / 4.0f);
|
||||
sprintf(yh, "%4.4f", (float)((cmd[1] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(xl, "%4.4f", (float)(cmd[2] / 65536.0f));
|
||||
sprintf(dxldy, "%4.4f", (float)(cmd[3] / 65536.0f));
|
||||
sprintf(xh, "%4.4f", (float)(cmd[4] / 65536.0f));
|
||||
sprintf(dxhdy, "%4.4f", (float)(cmd[5] / 65536.0f));
|
||||
sprintf(xm, "%4.4f", (float)(cmd[6] / 65536.0f));
|
||||
sprintf(dxmdy, "%4.4f", (float)(cmd[7] / 65536.0f));
|
||||
|
||||
sprintf(buffer, "Tri_NoShade %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh);
|
||||
break;
|
||||
}
|
||||
case 0x0a: // Tri_Tex
|
||||
{
|
||||
int lft = (command >> 23) & 0x1;
|
||||
|
||||
if (length < rdp_command_length[command])
|
||||
{
|
||||
sprintf(buffer, "ERROR: Tri_Tex length = %d\n", length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i=2; i < 24; i++)
|
||||
{
|
||||
cmd[i] = rdp_cmd_data[rdp_cmd_cur+i];
|
||||
}
|
||||
|
||||
sprintf(yl, "%4.4f", (float)((cmd[0] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(ym, "%4.4f", (float)((cmd[1] >> 16) & 0x1fff) / 4.0f);
|
||||
sprintf(yh, "%4.4f", (float)((cmd[1] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(xl, "%4.4f", (float)((INT32)cmd[2] / 65536.0f));
|
||||
sprintf(dxldy, "%4.4f", (float)((INT32)cmd[3] / 65536.0f));
|
||||
sprintf(xh, "%4.4f", (float)((INT32)cmd[4] / 65536.0f));
|
||||
sprintf(dxhdy, "%4.4f", (float)((INT32)cmd[5] / 65536.0f));
|
||||
sprintf(xm, "%4.4f", (float)((INT32)cmd[6] / 65536.0f));
|
||||
sprintf(dxmdy, "%4.4f", (float)((INT32)cmd[7] / 65536.0f));
|
||||
|
||||
sprintf(s, "%4.4f", (float)(INT32)((cmd[ 8] & 0xffff0000) | ((cmd[12] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(t, "%4.4f", (float)(INT32)(((cmd[ 8] & 0xffff) << 16) | (cmd[12] & 0xffff)) / 65536.0f);
|
||||
sprintf(w, "%4.4f", (float)(INT32)((cmd[ 9] & 0xffff0000) | ((cmd[13] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dsdx, "%4.4f", (float)(INT32)((cmd[10] & 0xffff0000) | ((cmd[14] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dtdx, "%4.4f", (float)(INT32)(((cmd[10] & 0xffff) << 16) | (cmd[14] & 0xffff)) / 65536.0f);
|
||||
sprintf(dwdx, "%4.4f", (float)(INT32)((cmd[11] & 0xffff0000) | ((cmd[15] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dsde, "%4.4f", (float)(INT32)((cmd[16] & 0xffff0000) | ((cmd[20] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dtde, "%4.4f", (float)(INT32)(((cmd[16] & 0xffff) << 16) | (cmd[20] & 0xffff)) / 65536.0f);
|
||||
sprintf(dwde, "%4.4f", (float)(INT32)((cmd[17] & 0xffff0000) | ((cmd[21] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dsdy, "%4.4f", (float)(INT32)((cmd[18] & 0xffff0000) | ((cmd[22] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dtdy, "%4.4f", (float)(INT32)(((cmd[18] & 0xffff) << 16) | (cmd[22] & 0xffff)) / 65536.0f);
|
||||
sprintf(dwdy, "%4.4f", (float)(INT32)((cmd[19] & 0xffff0000) | ((cmd[23] >> 16) & 0xffff)) / 65536.0f);
|
||||
|
||||
|
||||
buffer+=sprintf(buffer, "Tri_Tex %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " S: %s, T: %s, W: %s\n", s, t, w);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DSDX: %s, DTDX: %s, DWDX: %s\n", dsdx, dtdx, dwdx);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DSDE: %s, DTDE: %s, DWDE: %s\n", dsde, dtde, dwde);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DSDY: %s, DTDY: %s, DWDY: %s\n", dsdy, dtdy, dwdy);
|
||||
break;
|
||||
}
|
||||
case 0x0c: // Tri_Shade
|
||||
{
|
||||
int lft = (command >> 23) & 0x1;
|
||||
|
||||
if (length < rdp_command_length[command])
|
||||
{
|
||||
sprintf(buffer, "ERROR: Tri_Shade length = %d\n", length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i=2; i < 24; i++)
|
||||
{
|
||||
cmd[i] = rdp_cmd_data[i];
|
||||
}
|
||||
|
||||
sprintf(yl, "%4.4f", (float)((cmd[0] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(ym, "%4.4f", (float)((cmd[1] >> 16) & 0x1fff) / 4.0f);
|
||||
sprintf(yh, "%4.4f", (float)((cmd[1] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(xl, "%4.4f", (float)((INT32)cmd[2] / 65536.0f));
|
||||
sprintf(dxldy, "%4.4f", (float)((INT32)cmd[3] / 65536.0f));
|
||||
sprintf(xh, "%4.4f", (float)((INT32)cmd[4] / 65536.0f));
|
||||
sprintf(dxhdy, "%4.4f", (float)((INT32)cmd[5] / 65536.0f));
|
||||
sprintf(xm, "%4.4f", (float)((INT32)cmd[6] / 65536.0f));
|
||||
sprintf(dxmdy, "%4.4f", (float)((INT32)cmd[7] / 65536.0f));
|
||||
sprintf(rt, "%4.4f", (float)(INT32)((cmd[8] & 0xffff0000) | ((cmd[12] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(gt, "%4.4f", (float)(INT32)(((cmd[8] & 0xffff) << 16) | (cmd[12] & 0xffff)) / 65536.0f);
|
||||
sprintf(bt, "%4.4f", (float)(INT32)((cmd[9] & 0xffff0000) | ((cmd[13] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(at, "%4.4f", (float)(INT32)(((cmd[9] & 0xffff) << 16) | (cmd[13] & 0xffff)) / 65536.0f);
|
||||
sprintf(drdx, "%4.4f", (float)(INT32)((cmd[10] & 0xffff0000) | ((cmd[14] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dgdx, "%4.4f", (float)(INT32)(((cmd[10] & 0xffff) << 16) | (cmd[14] & 0xffff)) / 65536.0f);
|
||||
sprintf(dbdx, "%4.4f", (float)(INT32)((cmd[11] & 0xffff0000) | ((cmd[15] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dadx, "%4.4f", (float)(INT32)(((cmd[11] & 0xffff) << 16) | (cmd[15] & 0xffff)) / 65536.0f);
|
||||
sprintf(drde, "%4.4f", (float)(INT32)((cmd[16] & 0xffff0000) | ((cmd[20] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dgde, "%4.4f", (float)(INT32)(((cmd[16] & 0xffff) << 16) | (cmd[20] & 0xffff)) / 65536.0f);
|
||||
sprintf(dbde, "%4.4f", (float)(INT32)((cmd[17] & 0xffff0000) | ((cmd[21] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dade, "%4.4f", (float)(INT32)(((cmd[17] & 0xffff) << 16) | (cmd[21] & 0xffff)) / 65536.0f);
|
||||
sprintf(drdy, "%4.4f", (float)(INT32)((cmd[18] & 0xffff0000) | ((cmd[22] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dgdy, "%4.4f", (float)(INT32)(((cmd[18] & 0xffff) << 16) | (cmd[22] & 0xffff)) / 65536.0f);
|
||||
sprintf(dbdy, "%4.4f", (float)(INT32)((cmd[19] & 0xffff0000) | ((cmd[23] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dady, "%4.4f", (float)(INT32)(((cmd[19] & 0xffff) << 16) | (cmd[23] & 0xffff)) / 65536.0f);
|
||||
|
||||
buffer+=sprintf(buffer, "Tri_Shade %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " R: %s, G: %s, B: %s, A: %s\n", rt, gt, bt, at);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DRDX: %s, DGDX: %s, DBDX: %s, DADX: %s\n", drdx, dgdx, dbdx, dadx);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DRDE: %s, DGDE: %s, DBDE: %s, DADE: %s\n", drde, dgde, dbde, dade);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DRDY: %s, DGDY: %s, DBDY: %s, DADY: %s\n", drdy, dgdy, dbdy, dady);
|
||||
break;
|
||||
}
|
||||
case 0x0e: // Tri_TexShade
|
||||
{
|
||||
int lft = (command >> 23) & 0x1;
|
||||
|
||||
if (length < rdp_command_length[command])
|
||||
{
|
||||
sprintf(buffer, "ERROR: Tri_TexShade length = %d\n", length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i=2; i < 40; i++)
|
||||
{
|
||||
cmd[i] = rdp_cmd_data[rdp_cmd_cur+i];
|
||||
}
|
||||
|
||||
sprintf(yl, "%4.4f", (float)((cmd[0] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(ym, "%4.4f", (float)((cmd[1] >> 16) & 0x1fff) / 4.0f);
|
||||
sprintf(yh, "%4.4f", (float)((cmd[1] >> 0) & 0x1fff) / 4.0f);
|
||||
sprintf(xl, "%4.4f", (float)((INT32)cmd[2] / 65536.0f));
|
||||
sprintf(dxldy, "%4.4f", (float)((INT32)cmd[3] / 65536.0f));
|
||||
sprintf(xh, "%4.4f", (float)((INT32)cmd[4] / 65536.0f));
|
||||
sprintf(dxhdy, "%4.4f", (float)((INT32)cmd[5] / 65536.0f));
|
||||
sprintf(xm, "%4.4f", (float)((INT32)cmd[6] / 65536.0f));
|
||||
sprintf(dxmdy, "%4.4f", (float)((INT32)cmd[7] / 65536.0f));
|
||||
sprintf(rt, "%4.4f", (float)(INT32)((cmd[8] & 0xffff0000) | ((cmd[12] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(gt, "%4.4f", (float)(INT32)(((cmd[8] & 0xffff) << 16) | (cmd[12] & 0xffff)) / 65536.0f);
|
||||
sprintf(bt, "%4.4f", (float)(INT32)((cmd[9] & 0xffff0000) | ((cmd[13] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(at, "%4.4f", (float)(INT32)(((cmd[9] & 0xffff) << 16) | (cmd[13] & 0xffff)) / 65536.0f);
|
||||
sprintf(drdx, "%4.4f", (float)(INT32)((cmd[10] & 0xffff0000) | ((cmd[14] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dgdx, "%4.4f", (float)(INT32)(((cmd[10] & 0xffff) << 16) | (cmd[14] & 0xffff)) / 65536.0f);
|
||||
sprintf(dbdx, "%4.4f", (float)(INT32)((cmd[11] & 0xffff0000) | ((cmd[15] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dadx, "%4.4f", (float)(INT32)(((cmd[11] & 0xffff) << 16) | (cmd[15] & 0xffff)) / 65536.0f);
|
||||
sprintf(drde, "%4.4f", (float)(INT32)((cmd[16] & 0xffff0000) | ((cmd[20] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dgde, "%4.4f", (float)(INT32)(((cmd[16] & 0xffff) << 16) | (cmd[20] & 0xffff)) / 65536.0f);
|
||||
sprintf(dbde, "%4.4f", (float)(INT32)((cmd[17] & 0xffff0000) | ((cmd[21] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dade, "%4.4f", (float)(INT32)(((cmd[17] & 0xffff) << 16) | (cmd[21] & 0xffff)) / 65536.0f);
|
||||
sprintf(drdy, "%4.4f", (float)(INT32)((cmd[18] & 0xffff0000) | ((cmd[22] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dgdy, "%4.4f", (float)(INT32)(((cmd[18] & 0xffff) << 16) | (cmd[22] & 0xffff)) / 65536.0f);
|
||||
sprintf(dbdy, "%4.4f", (float)(INT32)((cmd[19] & 0xffff0000) | ((cmd[23] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dady, "%4.4f", (float)(INT32)(((cmd[19] & 0xffff) << 16) | (cmd[23] & 0xffff)) / 65536.0f);
|
||||
|
||||
sprintf(s, "%4.4f", (float)(INT32)((cmd[24] & 0xffff0000) | ((cmd[28] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(t, "%4.4f", (float)(INT32)(((cmd[24] & 0xffff) << 16) | (cmd[28] & 0xffff)) / 65536.0f);
|
||||
sprintf(w, "%4.4f", (float)(INT32)((cmd[25] & 0xffff0000) | ((cmd[29] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dsdx, "%4.4f", (float)(INT32)((cmd[26] & 0xffff0000) | ((cmd[30] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dtdx, "%4.4f", (float)(INT32)(((cmd[26] & 0xffff) << 16) | (cmd[30] & 0xffff)) / 65536.0f);
|
||||
sprintf(dwdx, "%4.4f", (float)(INT32)((cmd[27] & 0xffff0000) | ((cmd[31] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dsde, "%4.4f", (float)(INT32)((cmd[32] & 0xffff0000) | ((cmd[36] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dtde, "%4.4f", (float)(INT32)(((cmd[32] & 0xffff) << 16) | (cmd[36] & 0xffff)) / 65536.0f);
|
||||
sprintf(dwde, "%4.4f", (float)(INT32)((cmd[33] & 0xffff0000) | ((cmd[37] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dsdy, "%4.4f", (float)(INT32)((cmd[34] & 0xffff0000) | ((cmd[38] >> 16) & 0xffff)) / 65536.0f);
|
||||
sprintf(dtdy, "%4.4f", (float)(INT32)(((cmd[34] & 0xffff) << 16) | (cmd[38] & 0xffff)) / 65536.0f);
|
||||
sprintf(dwdy, "%4.4f", (float)(INT32)((cmd[35] & 0xffff0000) | ((cmd[39] >> 16) & 0xffff)) / 65536.0f);
|
||||
|
||||
|
||||
buffer+=sprintf(buffer, "Tri_TexShade %d, XL: %s, XM: %s, XH: %s, YL: %s, YM: %s, YH: %s\n", lft, xl,xm,xh,yl,ym,yh);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " R: %s, G: %s, B: %s, A: %s\n", rt, gt, bt, at);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DRDX: %s, DGDX: %s, DBDX: %s, DADX: %s\n", drdx, dgdx, dbdx, dadx);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DRDE: %s, DGDE: %s, DBDE: %s, DADE: %s\n", drde, dgde, dbde, dade);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DRDY: %s, DGDY: %s, DBDY: %s, DADY: %s\n", drdy, dgdy, dbdy, dady);
|
||||
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " S: %s, T: %s, W: %s\n", s, t, w);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DSDX: %s, DTDX: %s, DWDX: %s\n", dsdx, dtdx, dwdx);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DSDE: %s, DTDE: %s, DWDE: %s\n", dsde, dtde, dwde);
|
||||
buffer+=sprintf(buffer, " ");
|
||||
buffer+=sprintf(buffer, " DSDY: %s, DTDY: %s, DWDY: %s\n", dsdy, dtdy, dwdy);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case 0x24:
|
||||
case 0x25:
|
||||
{
|
||||
if (length < 16)
|
||||
{
|
||||
sprintf(buffer, "ERROR: Texture_Rectangle length = %d\n", length);
|
||||
return 0;
|
||||
}
|
||||
cmd[2] = rdp_cmd_data[rdp_cmd_cur+2];
|
||||
cmd[3] = rdp_cmd_data[rdp_cmd_cur+3];
|
||||
sprintf(s, "%4.4f", (float)(INT16)((cmd[2] >> 16) & 0xffff) / 32.0f);
|
||||
sprintf(t, "%4.4f", (float)(INT16)((cmd[2] >> 0) & 0xffff) / 32.0f);
|
||||
sprintf(dsdx, "%4.4f", (float)(INT16)((cmd[3] >> 16) & 0xffff) / 1024.0f);
|
||||
sprintf(dtdy, "%4.4f", (float)(INT16)((cmd[3] >> 16) & 0xffff) / 1024.0f);
|
||||
|
||||
if (command == 0x24)
|
||||
sprintf(buffer, "Texture_Rectangle %d, %s, %s, %s, %s, %s, %s, %s, %s", tile, sh, th, sl, tl, s, t, dsdx, dtdy);
|
||||
else
|
||||
sprintf(buffer, "Texture_Rectangle_Flip %d, %s, %s, %s, %s, %s, %s, %s, %s", tile, sh, th, sl, tl, s, t, dsdx, dtdy);
|
||||
|
||||
break;
|
||||
}
|
||||
case 0x26: sprintf(buffer, "Sync_Load"); break;
|
||||
case 0x27: sprintf(buffer, "Sync_Pipe"); break;
|
||||
case 0x28: sprintf(buffer, "Sync_Tile"); break;
|
||||
case 0x29: sprintf(buffer, "Sync_Full"); break;
|
||||
case 0x2d: sprintf(buffer, "Set_Scissor %s, %s, %s, %s", sl, tl, sh, th); break;
|
||||
case 0x2e: sprintf(buffer, "Set_Prim_Depth %04X, %04X", (cmd[1] >> 16) & 0xffff, cmd[1] & 0xffff); break;
|
||||
case 0x2f: sprintf(buffer, "Set_Other_Modes %08X %08X", cmd[0], cmd[1]); break;
|
||||
case 0x30: sprintf(buffer, "Load_TLUT %d, %s, %s, %s, %s", tile, sl, tl, sh, th); break;
|
||||
case 0x32: sprintf(buffer, "Set_Tile_Size %d, %s, %s, %s, %s", tile, sl, tl, sh, th); break;
|
||||
case 0x33: sprintf(buffer, "Load_Block %d, %03X, %03X, %03X, %03X", tile, (cmd[0] >> 12) & 0xfff, cmd[0] & 0xfff, (cmd[1] >> 12) & 0xfff, cmd[1] & 0xfff); break;
|
||||
case 0x34: sprintf(buffer, "Load_Tile %d, %s, %s, %s, %s", tile, sl, tl, sh, th); break;
|
||||
case 0x35: sprintf(buffer, "Set_Tile %d, %s, %s, %d, %04X", tile, format, size, ((cmd[0] >> 9) & 0x1ff) * 8, (cmd[0] & 0x1ff) * 8); break;
|
||||
case 0x36: sprintf(buffer, "Fill_Rectangle %s, %s, %s, %s", sh, th, sl, tl); break;
|
||||
case 0x37: sprintf(buffer, "Set_Fill_Color R: %d, G: %d, B: %d, A: %d", r, g, b, a); break;
|
||||
case 0x38: sprintf(buffer, "Set_Fog_Color R: %d, G: %d, B: %d, A: %d", r, g, b, a); break;
|
||||
case 0x39: sprintf(buffer, "Set_Blend_Color R: %d, G: %d, B: %d, A: %d", r, g, b, a); break;
|
||||
case 0x3a: sprintf(buffer, "Set_Prim_Color %d, %d, R: %d, G: %d, B: %d, A: %d", (cmd[0] >> 8) & 0x1f, cmd[0] & 0xff, r, g, b, a); break;
|
||||
case 0x3b: sprintf(buffer, "Set_Env_Color R: %d, G: %d, B: %d, A: %d", r, g, b, a); break;
|
||||
case 0x3c: sprintf(buffer, "Set_Combine %08X %08X", cmd[0], cmd[1]); break;
|
||||
case 0x3d: sprintf(buffer, "Set_Texture_Image %s, %s, %d, %08X", format, size, (cmd[0] & 0x1ff)+1, cmd[1]); break;
|
||||
case 0x3e: sprintf(buffer, "Set_Mask_Image %08X", cmd[1]); break;
|
||||
case 0x3f: sprintf(buffer, "Set_Color_Image %s, %s, %d, %08X", format, size, (cmd[0] & 0x1ff)+1, cmd[1]); break;
|
||||
default: sprintf(buffer, "??? (%08X %08X)", cmd[0], cmd[1]); break;
|
||||
}
|
||||
|
||||
return rdp_command_length[command];
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "rgl_assert.h"
|
||||
#include <glew.h>
|
||||
#if defined(__MACOSX__)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glext.h>
|
||||
#elif defined(__MACOS__)
|
||||
#include <gl.h>
|
||||
#include <glext.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#ifndef WIN32
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
#endif
|
||||
#include "glshader.h"
|
||||
|
||||
static void printInfoLog(GLhandleARB obj, const char * src)
|
||||
{
|
||||
int infologLength = 0;
|
||||
int charsWritten = 0;
|
||||
char *infoLog;
|
||||
|
||||
glGetObjectParameterivARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB,
|
||||
&infologLength);
|
||||
|
||||
if (infologLength > 0)
|
||||
{
|
||||
infoLog = (char *)malloc(infologLength);
|
||||
glGetInfoLogARB(obj, infologLength, &charsWritten, infoLog);
|
||||
if (*infoLog)
|
||||
rdp_log(M64MSG_INFO, "%s\n%s", src, infoLog);
|
||||
free(infoLog);
|
||||
}
|
||||
}
|
||||
|
||||
//#define rglAssert(...)
|
||||
rglShader_t * rglCreateShader(const char * vsrc, const char * fsrc)
|
||||
{
|
||||
GLhandleARB vs, fs, prog;
|
||||
|
||||
//printf("Compiling shader :\n%s", fsrc);
|
||||
|
||||
vs = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
fs = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
|
||||
glShaderSourceARB(vs, 1, &vsrc,NULL);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
glShaderSourceARB(fs, 1, &fsrc,NULL);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
glCompileShaderARB(vs);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
glCompileShaderARB(fs);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
printInfoLog(vs, vsrc);
|
||||
printInfoLog(fs, fsrc);
|
||||
prog = glCreateProgramObjectARB();
|
||||
glAttachObjectARB(prog, fs);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
glAttachObjectARB(prog, vs);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
|
||||
glLinkProgramARB(prog);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
|
||||
rglShader_t * s = (rglShader_t *) malloc(sizeof(rglShader_t));
|
||||
s->vs = vs;
|
||||
s->fs = fs;
|
||||
s->prog = prog;
|
||||
//LOG("Creating shader %d %d %d\n", s->vs, s->fs, s->prog);
|
||||
#ifdef RDP_DEBUG
|
||||
s->vsrc = strdup(vsrc);
|
||||
s->fsrc = strdup(fsrc);
|
||||
#endif
|
||||
return s;
|
||||
}
|
||||
|
||||
void rglUseShader(rglShader_t * shader)
|
||||
{
|
||||
if (!shader)
|
||||
glUseProgramObjectARB(0);
|
||||
else
|
||||
glUseProgramObjectARB(shader->prog);
|
||||
}
|
||||
|
||||
void rglDeleteShader(rglShader_t * shader)
|
||||
{
|
||||
//LOG("Deleting shader %d %d %d\n", shader->vs, shader->fs, shader->prog);
|
||||
glDeleteObjectARB(shader->prog);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
glDeleteObjectARB(shader->vs);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
glDeleteObjectARB(shader->fs);
|
||||
rglAssert(glGetError() == GL_NO_ERROR);
|
||||
free(shader);
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef _GLSHADER_H_
|
||||
#define _GLSHADER_H_
|
||||
|
||||
#include "rdp.h"
|
||||
|
||||
typedef struct {
|
||||
GLhandleARB vs, fs, prog;
|
||||
#ifdef RDP_DEBUG
|
||||
const char * vsrc, * fsrc;
|
||||
#endif
|
||||
} rglShader_t;
|
||||
|
||||
rglShader_t * rglCreateShader(const char * vsrc, const char * fsrc);
|
||||
void rglUseShader(rglShader_t * shader);
|
||||
void rglDeleteShader(rglShader_t * shader);
|
||||
|
||||
#endif
|
|
@ -1,387 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#include "rdp.h"
|
||||
#include "rgl.h"
|
||||
#include "osal_dynamiclib.h"
|
||||
#include <SDL.h>
|
||||
|
||||
#define THREADED
|
||||
|
||||
#define PLUGIN_VERSION 0x020000
|
||||
#define VIDEO_PLUGIN_API_VERSION 0x020200
|
||||
#define CONFIG_API_VERSION 0x020000
|
||||
#define VIDEXT_API_VERSION 0x030000
|
||||
|
||||
#define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
|
||||
|
||||
GFX_INFO gfx;
|
||||
|
||||
void (*render_callback)(int) = NULL;
|
||||
static void (*l_DebugCallback)(void *, int, const char *) = NULL;
|
||||
static void *l_DebugCallContext = NULL;
|
||||
|
||||
|
||||
/* definitions of pointers to Core video extension functions */
|
||||
ptr_VidExt_Init CoreVideo_Init = NULL;
|
||||
ptr_VidExt_Quit CoreVideo_Quit = NULL;
|
||||
ptr_VidExt_ListFullscreenModes CoreVideo_ListFullscreenModes = NULL;
|
||||
ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode = NULL;
|
||||
ptr_VidExt_SetCaption CoreVideo_SetCaption = NULL;
|
||||
ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen = NULL;
|
||||
ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow = NULL;
|
||||
ptr_VidExt_GL_GetProcAddress CoreVideo_GL_GetProcAddress = NULL;
|
||||
ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute = NULL;
|
||||
ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers = NULL;
|
||||
|
||||
/* definitions of pointers to Core config functions */
|
||||
ptr_ConfigOpenSection ConfigOpenSection = NULL;
|
||||
ptr_ConfigSetParameter ConfigSetParameter = NULL;
|
||||
ptr_ConfigGetParameter ConfigGetParameter = NULL;
|
||||
ptr_ConfigGetParameterHelp ConfigGetParameterHelp = NULL;
|
||||
ptr_ConfigSetDefaultInt ConfigSetDefaultInt = NULL;
|
||||
ptr_ConfigSetDefaultFloat ConfigSetDefaultFloat = NULL;
|
||||
ptr_ConfigSetDefaultBool ConfigSetDefaultBool = NULL;
|
||||
ptr_ConfigSetDefaultString ConfigSetDefaultString = NULL;
|
||||
ptr_ConfigGetParamInt ConfigGetParamInt = NULL;
|
||||
ptr_ConfigGetParamFloat ConfigGetParamFloat = NULL;
|
||||
ptr_ConfigGetParamBool ConfigGetParamBool = NULL;
|
||||
ptr_ConfigGetParamString ConfigGetParamString = NULL;
|
||||
|
||||
#ifdef THREADED
|
||||
volatile static int waiting;
|
||||
SDL_sem * rdpCommandSema;
|
||||
SDL_sem * rdpCommandCompleteSema;
|
||||
SDL_Thread * rdpThread;
|
||||
int rdpThreadFunc(void * dummy)
|
||||
{
|
||||
while (1) {
|
||||
SDL_SemWait(rdpCommandSema);
|
||||
waiting = 1;
|
||||
if (rglNextStatus == RGL_STATUS_CLOSED)
|
||||
rglUpdateStatus();
|
||||
else
|
||||
rdp_process_list();
|
||||
if (!rglSettings.async)
|
||||
SDL_SemPost(rdpCommandCompleteSema);
|
||||
|
||||
if (rglStatus == RGL_STATUS_CLOSED) {
|
||||
rdpThread = NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rdpSignalFullSync()
|
||||
{
|
||||
SDL_SemPost(rdpCommandCompleteSema);
|
||||
}
|
||||
void rdpWaitFullSync()
|
||||
{
|
||||
SDL_SemWait(rdpCommandCompleteSema);
|
||||
}
|
||||
|
||||
void rdpPostCommand()
|
||||
{
|
||||
int sync = rdp_store_list();
|
||||
SDL_SemPost(rdpCommandSema);
|
||||
if (!rglSettings.async)
|
||||
SDL_SemWait(rdpCommandCompleteSema);
|
||||
else if (sync) {
|
||||
rdpWaitFullSync();
|
||||
*gfx.MI_INTR_REG |= 0x20;
|
||||
gfx.CheckInterrupts();
|
||||
}
|
||||
|
||||
waiting = 0;
|
||||
}
|
||||
|
||||
void rdpCreateThread()
|
||||
{
|
||||
if (!rdpCommandSema) {
|
||||
rdpCommandSema = SDL_CreateSemaphore(0);
|
||||
rdpCommandCompleteSema = SDL_CreateSemaphore(0);
|
||||
}
|
||||
if (!rdpThread) {
|
||||
LOG("Creating rdp thread\n");
|
||||
#if SDL_VERSION_ATLEAST(2,0,0)
|
||||
rdpThread = SDL_CreateThread(rdpThreadFunc, "z64rdp", 0);
|
||||
#else
|
||||
rdpThread = SDL_CreateThread(rdpThreadFunc, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void rdp_log(m64p_msg_level level, const char *msg, ...)
|
||||
{
|
||||
char buf[1024];
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
vsnprintf(buf, 1023, msg, args);
|
||||
buf[1023]='\0';
|
||||
va_end(args);
|
||||
if (l_DebugCallback)
|
||||
{
|
||||
l_DebugCallback(l_DebugCallContext, level, buf);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Context,
|
||||
void (*DebugCallback)(void *, int, const char *))
|
||||
{
|
||||
///* first thing is to set the callback function for debug info */
|
||||
l_DebugCallback = DebugCallback;
|
||||
l_DebugCallContext = Context;
|
||||
|
||||
/* Get the core Video Extension function pointers from the library handle */
|
||||
CoreVideo_Init = (ptr_VidExt_Init) osal_dynlib_getproc(CoreLibHandle, "VidExt_Init");
|
||||
CoreVideo_Quit = (ptr_VidExt_Quit) osal_dynlib_getproc(CoreLibHandle, "VidExt_Quit");
|
||||
CoreVideo_ListFullscreenModes = (ptr_VidExt_ListFullscreenModes) osal_dynlib_getproc(CoreLibHandle, "VidExt_ListFullscreenModes");
|
||||
CoreVideo_SetVideoMode = (ptr_VidExt_SetVideoMode) osal_dynlib_getproc(CoreLibHandle, "VidExt_SetVideoMode");
|
||||
CoreVideo_SetCaption = (ptr_VidExt_SetCaption) osal_dynlib_getproc(CoreLibHandle, "VidExt_SetCaption");
|
||||
CoreVideo_ToggleFullScreen = (ptr_VidExt_ToggleFullScreen) osal_dynlib_getproc(CoreLibHandle, "VidExt_ToggleFullScreen");
|
||||
CoreVideo_ResizeWindow = (ptr_VidExt_ResizeWindow) osal_dynlib_getproc(CoreLibHandle, "VidExt_ResizeWindow");
|
||||
CoreVideo_GL_GetProcAddress = (ptr_VidExt_GL_GetProcAddress) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_GetProcAddress");
|
||||
CoreVideo_GL_SetAttribute = (ptr_VidExt_GL_SetAttribute) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_SetAttribute");
|
||||
CoreVideo_GL_SwapBuffers = (ptr_VidExt_GL_SwapBuffers) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_SwapBuffers");
|
||||
|
||||
if (!CoreVideo_Init || !CoreVideo_Quit || !CoreVideo_ListFullscreenModes || !CoreVideo_SetVideoMode ||
|
||||
!CoreVideo_SetCaption || !CoreVideo_ToggleFullScreen || !CoreVideo_GL_GetProcAddress ||
|
||||
!CoreVideo_GL_SetAttribute || !CoreVideo_GL_SwapBuffers || !CoreVideo_ResizeWindow)
|
||||
{
|
||||
rdp_log(M64MSG_ERROR, "Couldn't connect to Core video functions");
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
/* attach and call the CoreGetAPIVersions function, check Config and Video Extension API versions for compatibility */
|
||||
ptr_CoreGetAPIVersions CoreAPIVersionFunc;
|
||||
CoreAPIVersionFunc = (ptr_CoreGetAPIVersions) osal_dynlib_getproc(CoreLibHandle, "CoreGetAPIVersions");
|
||||
if (CoreAPIVersionFunc == NULL)
|
||||
{
|
||||
rdp_log(M64MSG_ERROR, "Core emulator broken; no CoreAPIVersionFunc() function found.");
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
int ConfigAPIVersion, DebugAPIVersion, VidextAPIVersion;
|
||||
(*CoreAPIVersionFunc)(&ConfigAPIVersion, &DebugAPIVersion, &VidextAPIVersion, NULL);
|
||||
if ((ConfigAPIVersion & 0xffff0000) != (CONFIG_API_VERSION & 0xffff0000))
|
||||
{
|
||||
rdp_log(M64MSG_ERROR, "Emulator core Config API (v%i.%i.%i) incompatible with plugin (v%i.%i.%i)",
|
||||
VERSION_PRINTF_SPLIT(ConfigAPIVersion), VERSION_PRINTF_SPLIT(CONFIG_API_VERSION));
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
if ((VidextAPIVersion & 0xffff0000) != (VIDEXT_API_VERSION & 0xffff0000))
|
||||
{
|
||||
rdp_log(M64MSG_ERROR, "Emulator core Video Extension API (v%i.%i.%i) incompatible with plugin (v%i.%i.%i)",
|
||||
VERSION_PRINTF_SPLIT(VidextAPIVersion), VERSION_PRINTF_SPLIT(VIDEXT_API_VERSION));
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
/* Get the core config function pointers from the library handle */
|
||||
ConfigOpenSection = (ptr_ConfigOpenSection) osal_dynlib_getproc(CoreLibHandle, "ConfigOpenSection");
|
||||
ConfigSetParameter = (ptr_ConfigSetParameter) osal_dynlib_getproc(CoreLibHandle, "ConfigSetParameter");
|
||||
ConfigGetParameter = (ptr_ConfigGetParameter) osal_dynlib_getproc(CoreLibHandle, "ConfigGetParameter");
|
||||
ConfigSetDefaultInt = (ptr_ConfigSetDefaultInt) osal_dynlib_getproc(CoreLibHandle, "ConfigSetDefaultInt");
|
||||
ConfigSetDefaultFloat = (ptr_ConfigSetDefaultFloat) osal_dynlib_getproc(CoreLibHandle, "ConfigSetDefaultFloat");
|
||||
ConfigSetDefaultBool = (ptr_ConfigSetDefaultBool) osal_dynlib_getproc(CoreLibHandle, "ConfigSetDefaultBool");
|
||||
ConfigSetDefaultString = (ptr_ConfigSetDefaultString) osal_dynlib_getproc(CoreLibHandle, "ConfigSetDefaultString");
|
||||
ConfigGetParamInt = (ptr_ConfigGetParamInt) osal_dynlib_getproc(CoreLibHandle, "ConfigGetParamInt");
|
||||
ConfigGetParamFloat = (ptr_ConfigGetParamFloat) osal_dynlib_getproc(CoreLibHandle, "ConfigGetParamFloat");
|
||||
ConfigGetParamBool = (ptr_ConfigGetParamBool) osal_dynlib_getproc(CoreLibHandle, "ConfigGetParamBool");
|
||||
ConfigGetParamString = (ptr_ConfigGetParamString) osal_dynlib_getproc(CoreLibHandle, "ConfigGetParamString");
|
||||
if (!ConfigOpenSection || !ConfigSetParameter || !ConfigGetParameter ||
|
||||
!ConfigSetDefaultInt || !ConfigSetDefaultFloat || !ConfigSetDefaultBool || !ConfigSetDefaultString ||
|
||||
!ConfigGetParamInt || !ConfigGetParamFloat || !ConfigGetParamBool || !ConfigGetParamString)
|
||||
{
|
||||
rdp_log(M64MSG_ERROR, "Couldn't connect to Core configuration functions");
|
||||
return M64ERR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
rglReadSettings();
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
EXPORT m64p_error CALL PluginShutdown(void)
|
||||
{
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
EXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities)
|
||||
{
|
||||
/* set version info */
|
||||
if (PluginType != NULL)
|
||||
*PluginType = M64PLUGIN_GFX;
|
||||
|
||||
if (PluginVersion != NULL)
|
||||
*PluginVersion = PLUGIN_VERSION;
|
||||
|
||||
if (APIVersion != NULL)
|
||||
*APIVersion = VIDEO_PLUGIN_API_VERSION;
|
||||
|
||||
if (PluginNamePtr != NULL)
|
||||
*PluginNamePtr = "Z64gl";
|
||||
|
||||
if (Capabilities != NULL)
|
||||
{
|
||||
*Capabilities = 0;
|
||||
}
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
EXPORT void CALL SetRenderingCallback(void (*callback)(int))
|
||||
{
|
||||
render_callback = callback;
|
||||
}
|
||||
|
||||
EXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int front)
|
||||
{
|
||||
LOG("ReadScreen\n");
|
||||
*width = rglSettings.resX;
|
||||
*height = rglSettings.resY;
|
||||
if (dest)
|
||||
{
|
||||
GLint oldMode;
|
||||
glGetIntegerv( GL_READ_BUFFER, &oldMode );
|
||||
if (front)
|
||||
glReadBuffer( GL_FRONT );
|
||||
else
|
||||
glReadBuffer( GL_BACK );
|
||||
glReadPixels( 0, 0, rglSettings.resX, rglSettings.resY,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE, dest );
|
||||
glReadBuffer( oldMode );
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT int CALL InitiateGFX (GFX_INFO Gfx_Info)
|
||||
{
|
||||
LOG("InitiateGFX\n");
|
||||
gfx = Gfx_Info;
|
||||
memset(rdpTiles, 0, sizeof(rdpTiles));
|
||||
memset(rdpTmem, 0, 0x1000);
|
||||
memset(&rdpState, 0, sizeof(rdpState));
|
||||
#ifdef THREADED
|
||||
if (rglSettings.threaded)
|
||||
rdpCreateThread();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
EXPORT void CALL MoveScreen (int xpos, int ypos)
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT void CALL ChangeWindow()
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT void CALL ProcessDList(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
EXPORT void CALL ProcessRDPList(void)
|
||||
{
|
||||
#ifdef THREADED
|
||||
if (rglSettings.threaded) {
|
||||
rdpCreateThread();
|
||||
rdpPostCommand();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
rdp_process_list();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
EXPORT void CALL ResizeVideoOutput(int Width, int Height)
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT void CALL RomClosed (void)
|
||||
{
|
||||
#ifdef THREADED
|
||||
if (rglSettings.threaded) {
|
||||
rglNextStatus = RGL_STATUS_CLOSED;
|
||||
do
|
||||
rdpPostCommand();
|
||||
while (rglStatus != RGL_STATUS_CLOSED);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
rglNextStatus = rglStatus = RGL_STATUS_CLOSED;
|
||||
rglCloseScreen();
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT int CALL RomOpen()
|
||||
{
|
||||
int success = 1;
|
||||
#ifdef THREADED
|
||||
if (rglSettings.threaded) {
|
||||
rdpCreateThread();
|
||||
//while (rglStatus != RGL_STATUS_CLOSED);
|
||||
rglNextStatus = RGL_STATUS_WINDOWED;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
rglNextStatus = rglStatus = RGL_STATUS_WINDOWED;
|
||||
success = rglOpenScreen();
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
EXPORT void CALL ShowCFB (void)
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT void CALL UpdateScreen (void)
|
||||
{
|
||||
#ifdef THREADED
|
||||
if (rglSettings.threaded) {
|
||||
rdpPostCommand();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
rglUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT void CALL ViStatusChanged (void)
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT void CALL ViWidthChanged (void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Mupen64plus-core - osal/dynamiclib.h *
|
||||
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
* Copyright (C) 2009 Richard Goedeken *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#if !defined(OSAL_DYNAMICLIB_H)
|
||||
#define OSAL_DYNAMICLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "m64p_types.h"
|
||||
|
||||
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define OSAL_DYNAMICLIB_H */
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Mupen64plus-core - osal/dynamiclib_unix.c *
|
||||
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
* Copyright (C) 2009 Richard Goedeken *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "m64p_types.h"
|
||||
#include "osal_dynamiclib.h"
|
||||
|
||||
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName)
|
||||
{
|
||||
if (pccProcedureName == NULL)
|
||||
return NULL;
|
||||
|
||||
return dlsym(LibHandle, pccProcedureName);
|
||||
}
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Mupen64plus-ui-console - osal_dynamiclib_win32.c *
|
||||
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
|
||||
* Copyright (C) 2009 Richard Goedeken *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "m64p_types.h"
|
||||
#include "osal_dynamiclib.h"
|
||||
|
||||
m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
|
||||
{
|
||||
if (pLibHandle == NULL || pccLibraryPath == NULL)
|
||||
return M64ERR_INPUT_ASSERT;
|
||||
|
||||
*pLibHandle = LoadLibrary(pccLibraryPath);
|
||||
|
||||
if (*pLibHandle == NULL)
|
||||
{
|
||||
char *pchErrMsg;
|
||||
DWORD dwErr = GetLastError();
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
|
||||
fprintf(stderr, "LoadLibrary('%s') error: %s\n", pccLibraryPath, pchErrMsg);
|
||||
LocalFree(pchErrMsg);
|
||||
return M64ERR_INPUT_NOT_FOUND;
|
||||
}
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName)
|
||||
{
|
||||
if (pccProcedureName == NULL)
|
||||
return NULL;
|
||||
|
||||
return GetProcAddress(LibHandle, pccProcedureName);
|
||||
}
|
||||
|
||||
m64p_error osal_dynlib_close(m64p_dynlib_handle LibHandle)
|
||||
{
|
||||
int rval = FreeLibrary(LibHandle);
|
||||
|
||||
if (rval == 0)
|
||||
{
|
||||
char *pchErrMsg;
|
||||
DWORD dwErr = GetLastError();
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
|
||||
fprintf(stderr, "FreeLibrary() error: %s\n", pchErrMsg);
|
||||
LocalFree(pchErrMsg);
|
||||
return M64ERR_INTERNAL;
|
||||
}
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
|
@ -1,557 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)queue.h 8.5 (Berkeley) 8/20/94
|
||||
*/
|
||||
|
||||
#ifndef _SYS_QUEUE_H_
|
||||
#define _SYS_QUEUE_H_
|
||||
|
||||
/*
|
||||
* This file defines five types of data structures: singly-linked lists,
|
||||
* lists, simple queues, tail queues, and circular queues.
|
||||
*
|
||||
* A singly-linked list is headed by a single forward pointer. The
|
||||
* elements are singly linked for minimum space and pointer manipulation
|
||||
* overhead at the expense of O(n) removal for arbitrary elements. New
|
||||
* elements can be added to the list after an existing element or at the
|
||||
* head of the list. Elements being removed from the head of the list
|
||||
* should use the explicit macro for this purpose for optimum
|
||||
* efficiency. A singly-linked list may only be traversed in the forward
|
||||
* direction. Singly-linked lists are ideal for applications with large
|
||||
* datasets and few or no removals or for implementing a LIFO queue.
|
||||
*
|
||||
* A list is headed by a single forward pointer (or an array of forward
|
||||
* pointers for a hash table header). The elements are doubly linked
|
||||
* so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before
|
||||
* or after an existing element or at the head of the list. A list
|
||||
* may only be traversed in the forward direction.
|
||||
*
|
||||
* A simple queue is headed by a pair of pointers, one the head of the
|
||||
* list and the other to the tail of the list. The elements are singly
|
||||
* linked to save space, so elements can only be removed from the
|
||||
* head of the list. New elements can be added to the list after
|
||||
* an existing element, at the head of the list, or at the end of the
|
||||
* list. A simple queue may only be traversed in the forward direction.
|
||||
*
|
||||
* A tail queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or
|
||||
* after an existing element, at the head of the list, or at the end of
|
||||
* the list. A tail queue may be traversed in either direction.
|
||||
*
|
||||
* A circle queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or after
|
||||
* an existing element, at the head of the list, or at the end of the list.
|
||||
* A circle queue may be traversed in either direction, but has a more
|
||||
* complex end of list detection.
|
||||
*
|
||||
* For details on the use of these macros, see the queue(3) manual page.
|
||||
*/
|
||||
|
||||
/*
|
||||
* List definitions.
|
||||
*/
|
||||
#define LIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *lh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define LIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define LIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *le_next; /* next element */ \
|
||||
struct type **le_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* List functions.
|
||||
*/
|
||||
#define LIST_INIT(head) do { \
|
||||
(head)->lh_first = NULL; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_AFTER(listelm, elm, field) do { \
|
||||
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
|
||||
(listelm)->field.le_next->field.le_prev = \
|
||||
&(elm)->field.le_next; \
|
||||
(listelm)->field.le_next = (elm); \
|
||||
(elm)->field.le_prev = &(listelm)->field.le_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.le_prev = (listelm)->field.le_prev; \
|
||||
(elm)->field.le_next = (listelm); \
|
||||
*(listelm)->field.le_prev = (elm); \
|
||||
(listelm)->field.le_prev = &(elm)->field.le_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
|
||||
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
|
||||
(head)->lh_first = (elm); \
|
||||
(elm)->field.le_prev = &(head)->lh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_REMOVE(elm, field) do { \
|
||||
if ((elm)->field.le_next != NULL) \
|
||||
(elm)->field.le_next->field.le_prev = \
|
||||
(elm)->field.le_prev; \
|
||||
*(elm)->field.le_prev = (elm)->field.le_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->lh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.le_next))
|
||||
|
||||
/*
|
||||
* List access methods.
|
||||
*/
|
||||
#define LIST_EMPTY(head) ((head)->lh_first == NULL)
|
||||
#define LIST_FIRST(head) ((head)->lh_first)
|
||||
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
|
||||
|
||||
|
||||
/*
|
||||
* Singly-linked List definitions.
|
||||
*/
|
||||
#define SLIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *slh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define SLIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define SLIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sle_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked List functions.
|
||||
*/
|
||||
#define SLIST_INIT(head) do { \
|
||||
(head)->slh_first = NULL; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
|
||||
(elm)->field.sle_next = (slistelm)->field.sle_next; \
|
||||
(slistelm)->field.sle_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.sle_next = (head)->slh_first; \
|
||||
(head)->slh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE_HEAD(head, field) do { \
|
||||
(head)->slh_first = (head)->slh_first->field.sle_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->slh_first == (elm)) { \
|
||||
SLIST_REMOVE_HEAD((head), field); \
|
||||
} \
|
||||
else { \
|
||||
struct type *curelm = (head)->slh_first; \
|
||||
while(curelm->field.sle_next != (elm)) \
|
||||
curelm = curelm->field.sle_next; \
|
||||
curelm->field.sle_next = \
|
||||
curelm->field.sle_next->field.sle_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_FOREACH(var, head, field) \
|
||||
for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
|
||||
|
||||
/*
|
||||
* Singly-linked List access methods.
|
||||
*/
|
||||
#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
|
||||
#define SLIST_FIRST(head) ((head)->slh_first)
|
||||
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
|
||||
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue declarations.
|
||||
*/
|
||||
#define STAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *stqh_first; /* first element */ \
|
||||
struct type **stqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define STAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).stqh_first }
|
||||
|
||||
#define STAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *stqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue functions.
|
||||
*/
|
||||
#define STAILQ_INIT(head) do { \
|
||||
(head)->stqh_first = NULL; \
|
||||
(head)->stqh_last = &(head)->stqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
|
||||
(head)->stqh_last = &(elm)->field.stqe_next; \
|
||||
(head)->stqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.stqe_next = NULL; \
|
||||
*(head)->stqh_last = (elm); \
|
||||
(head)->stqh_last = &(elm)->field.stqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
|
||||
(head)->stqh_last = &(elm)->field.stqe_next; \
|
||||
(listelm)->field.stqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
|
||||
(head)->stqh_last = &(head)->stqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->stqh_first == (elm)) { \
|
||||
STAILQ_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->stqh_first; \
|
||||
while (curelm->field.stqe_next != (elm)) \
|
||||
curelm = curelm->field.stqe_next; \
|
||||
if ((curelm->field.stqe_next = \
|
||||
curelm->field.stqe_next->field.stqe_next) == NULL) \
|
||||
(head)->stqh_last = &(curelm)->field.stqe_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->stqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.stqe_next))
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue access methods.
|
||||
*/
|
||||
#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
|
||||
#define STAILQ_FIRST(head) ((head)->stqh_first)
|
||||
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
|
||||
|
||||
|
||||
/*
|
||||
* Simple queue definitions.
|
||||
*/
|
||||
#define SIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sqh_first; /* first element */ \
|
||||
struct type **sqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define SIMPLEQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).sqh_first }
|
||||
|
||||
#define SIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple queue functions.
|
||||
*/
|
||||
#define SIMPLEQ_INIT(head) do { \
|
||||
(head)->sqh_first = NULL; \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(head)->sqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqe_next = NULL; \
|
||||
*(head)->sqh_last = (elm); \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(listelm)->field.sqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->sqh_first == (elm)) { \
|
||||
SIMPLEQ_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->sqh_first; \
|
||||
while (curelm->field.sqe_next != (elm)) \
|
||||
curelm = curelm->field.sqe_next; \
|
||||
if ((curelm->field.sqe_next = \
|
||||
curelm->field.sqe_next->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(curelm)->field.sqe_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->sqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.sqe_next))
|
||||
|
||||
/*
|
||||
* Simple queue access methods.
|
||||
*/
|
||||
#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
|
||||
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
|
||||
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
|
||||
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define _TAILQ_HEAD(name, type, qual) \
|
||||
struct name { \
|
||||
qual type *tqh_first; /* first element */ \
|
||||
qual type *qual *tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
|
||||
|
||||
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).tqh_first }
|
||||
|
||||
#define _TAILQ_ENTRY(type, qual) \
|
||||
struct { \
|
||||
qual type *tqe_next; /* next element */ \
|
||||
qual type *qual *tqe_prev; /* address of previous next element */\
|
||||
}
|
||||
#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#define TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = NULL; \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.tqe_next = NULL; \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_REMOVE(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next) != NULL) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->tqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.tqe_next))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||
for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
|
||||
(var); \
|
||||
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
|
||||
|
||||
/*
|
||||
* Tail queue access methods.
|
||||
*/
|
||||
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
|
||||
#define TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
#define TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
|
||||
|
||||
/*
|
||||
* Circular queue definitions.
|
||||
*/
|
||||
#define CIRCLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *cqh_first; /* first element */ \
|
||||
struct type *cqh_last; /* last element */ \
|
||||
}
|
||||
|
||||
#define CIRCLEQ_HEAD_INITIALIZER(type, head) \
|
||||
{ (type *)&head, (type *)&head }
|
||||
|
||||
#define CIRCLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *cqe_next; /* next element */ \
|
||||
struct type *cqe_prev; /* previous element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Circular queue functions.
|
||||
*/
|
||||
#define CIRCLEQ_INIT(type, head) do { \
|
||||
(head)->cqh_first = (type *)(head); \
|
||||
(head)->cqh_last = (type *)(head); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_AFTER(type, head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
|
||||
(elm)->field.cqe_prev = (listelm); \
|
||||
if ((listelm)->field.cqe_next == (type *)(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
|
||||
(listelm)->field.cqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_BEFORE(type, head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm); \
|
||||
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
|
||||
if ((listelm)->field.cqe_prev == (type *)(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
|
||||
(listelm)->field.cqe_prev = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_HEAD(type, head, elm, field) do { \
|
||||
(elm)->field.cqe_next = (head)->cqh_first; \
|
||||
(elm)->field.cqe_prev = (type *)(head); \
|
||||
if ((head)->cqh_last == (type *)(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(head)->cqh_first->field.cqe_prev = (elm); \
|
||||
(head)->cqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_TAIL(type, head, elm, field) do { \
|
||||
(elm)->field.cqe_next = (type *)(head); \
|
||||
(elm)->field.cqe_prev = (head)->cqh_last; \
|
||||
if ((head)->cqh_first == (type *)(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(head)->cqh_last->field.cqe_next = (elm); \
|
||||
(head)->cqh_last = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_REMOVE(head, elm, field) do { \
|
||||
if ((elm)->field.cqe_next == (void *)(head)) \
|
||||
(head)->cqh_last = (elm)->field.cqe_prev; \
|
||||
else \
|
||||
(elm)->field.cqe_next->field.cqe_prev = \
|
||||
(elm)->field.cqe_prev; \
|
||||
if ((elm)->field.cqe_prev == (void *)(head)) \
|
||||
(head)->cqh_first = (elm)->field.cqe_next; \
|
||||
else \
|
||||
(elm)->field.cqe_prev->field.cqe_next = \
|
||||
(elm)->field.cqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_FOREACH(type, var, head, field) \
|
||||
for ((var) = ((head)->cqh_first); \
|
||||
(var) != (const type *)(head); \
|
||||
(var) = ((var)->field.cqe_next))
|
||||
|
||||
#define CIRCLEQ_FOREACH_REVERSE(type, var, head, field) \
|
||||
for ((var) = ((head)->cqh_last); \
|
||||
(var) != (const type *)(head); \
|
||||
(var) = ((var)->field.cqe_prev))
|
||||
|
||||
/*
|
||||
* Circular queue access methods.
|
||||
*/
|
||||
#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
|
||||
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
|
||||
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
|
||||
#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
|
||||
#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
|
||||
|
||||
#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
|
||||
(((elm)->field.cqe_next == (void *)(head)) \
|
||||
? ((head)->cqh_first) \
|
||||
: (elm->field.cqe_next))
|
||||
#define CIRCLEQ_LOOP_PREV(head, elm, field) \
|
||||
(((elm)->field.cqe_prev == (void *)(head)) \
|
||||
? ((head)->cqh_last) \
|
||||
: (elm->field.cqe_prev))
|
||||
|
||||
#endif /* sys/queue.h */
|
|
@ -1,858 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#include "rdp.h"
|
||||
#include "rgl.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
const char *rdpImageFormats[] =
|
||||
{ "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
|
||||
|
||||
rdpState_t rdpState;
|
||||
uint32_t rdpChanged;
|
||||
//rdpColor_t rdpTlut[1024];
|
||||
uint8_t rdpTmem[4*0x1000];
|
||||
int rdpFbFormat;
|
||||
int rdpFbSize;
|
||||
int rdpFbWidth;
|
||||
uint32_t rdpFbAddress;
|
||||
uint32_t rdpZbAddress;
|
||||
int rdpTiFormat;
|
||||
int rdpTiSize;
|
||||
int rdpTiWidth;
|
||||
uint32_t rdpTiAddress;
|
||||
rdpTile_t rdpTiles[8];
|
||||
int rdpTileSet;
|
||||
|
||||
struct area_t {
|
||||
int start, stop;
|
||||
uint32_t from;
|
||||
int fromLine, fromFormat, fromSize;
|
||||
};
|
||||
|
||||
#define MAX_TMEM_AREAS 16
|
||||
static area_t tmemAreas[MAX_TMEM_AREAS];
|
||||
static int nbTmemAreas;
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
int rdp_dump;
|
||||
#endif
|
||||
|
||||
#define MAXCMD 0x100000
|
||||
static uint32_t rdp_cmd_data[MAXCMD+44];
|
||||
static volatile int rdp_cmd_ptr = 0;
|
||||
static volatile int rdp_cmd_cur = 0;
|
||||
static int rdp_cmd_left = 0;
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
uint32_t rdpTraceBuf[0x100000];
|
||||
int rdpTracePos;
|
||||
#endif
|
||||
|
||||
|
||||
static void MarkTmemArea(int start, int stop, uint32_t from, uint32_t fromLine,
|
||||
int fromFormat, int fromSize)
|
||||
{
|
||||
int i;
|
||||
|
||||
// remove areas that intersect
|
||||
for (i=0; i<nbTmemAreas; i++)
|
||||
while (i<nbTmemAreas &&
|
||||
tmemAreas[i].start<stop && tmemAreas[i].stop>start) {
|
||||
memmove(tmemAreas+i, tmemAreas+i+1, nbTmemAreas-i-1);
|
||||
nbTmemAreas--;
|
||||
}
|
||||
|
||||
DUMP("marking tmem %x --> %x rdram %x\n", start, stop, from);
|
||||
|
||||
// add new area
|
||||
//rglAssert(nbTmemAreas < MAX_TMEM_AREAS);
|
||||
if (nbTmemAreas == MAX_TMEM_AREAS) {
|
||||
LOG("tmem areas buffer full, clearing\n");
|
||||
nbTmemAreas = 0;
|
||||
}
|
||||
tmemAreas[nbTmemAreas].start = start;
|
||||
tmemAreas[nbTmemAreas].stop = stop;
|
||||
tmemAreas[nbTmemAreas].from = from;
|
||||
tmemAreas[nbTmemAreas].fromLine = fromLine;
|
||||
tmemAreas[nbTmemAreas].fromFormat = fromFormat;
|
||||
tmemAreas[nbTmemAreas].fromSize = fromSize;
|
||||
nbTmemAreas++;
|
||||
}
|
||||
|
||||
uint32_t rdpGetTmemOrigin(int tmem, int * line, int * stop, int * format, int * size)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<nbTmemAreas; i++)
|
||||
if (tmemAreas[i].start == tmem) {
|
||||
*line = tmemAreas[i].fromLine;
|
||||
*stop = tmemAreas[i].stop;
|
||||
*format = tmemAreas[i].fromFormat;
|
||||
*size = tmemAreas[i].fromSize;
|
||||
return tmemAreas[i].from;
|
||||
}
|
||||
|
||||
return ~0;
|
||||
}
|
||||
|
||||
inline uint32_t READ_RDP_DATA(uint32_t address)
|
||||
{
|
||||
if (dp_status & 0x1) // XBUS_DMEM_DMA enabled
|
||||
{
|
||||
return rsp_dmem[(address & 0xfff) / 4];
|
||||
}
|
||||
else
|
||||
{
|
||||
return rdram[(address / 4)];
|
||||
}
|
||||
}
|
||||
|
||||
static const int rdp_command_length[64] =
|
||||
{
|
||||
8, // 0x00, No Op
|
||||
8, // 0x01, ???
|
||||
8, // 0x02, ???
|
||||
8, // 0x03, ???
|
||||
8, // 0x04, ???
|
||||
8, // 0x05, ???
|
||||
8, // 0x06, ???
|
||||
8, // 0x07, ???
|
||||
32, // 0x08, Non-Shaded Triangle
|
||||
32+16, // 0x09, Non-Shaded, Z-Buffered Triangle
|
||||
32+64, // 0x0a, Textured Triangle
|
||||
32+64+16, // 0x0b, Textured, Z-Buffered Triangle
|
||||
32+64, // 0x0c, Shaded Triangle
|
||||
32+64+16, // 0x0d, Shaded, Z-Buffered Triangle
|
||||
32+64+64, // 0x0e, Shaded+Textured Triangle
|
||||
32+64+64+16,// 0x0f, Shaded+Textured, Z-Buffered Triangle
|
||||
8, // 0x10, ???
|
||||
8, // 0x11, ???
|
||||
8, // 0x12, ???
|
||||
8, // 0x13, ???
|
||||
8, // 0x14, ???
|
||||
8, // 0x15, ???
|
||||
8, // 0x16, ???
|
||||
8, // 0x17, ???
|
||||
8, // 0x18, ???
|
||||
8, // 0x19, ???
|
||||
8, // 0x1a, ???
|
||||
8, // 0x1b, ???
|
||||
8, // 0x1c, ???
|
||||
8, // 0x1d, ???
|
||||
8, // 0x1e, ???
|
||||
8, // 0x1f, ???
|
||||
8, // 0x20, ???
|
||||
8, // 0x21, ???
|
||||
8, // 0x22, ???
|
||||
8, // 0x23, ???
|
||||
16, // 0x24, Texture_Rectangle
|
||||
16, // 0x25, Texture_Rectangle_Flip
|
||||
8, // 0x26, Sync_Load
|
||||
8, // 0x27, Sync_Pipe
|
||||
8, // 0x28, Sync_Tile
|
||||
8, // 0x29, Sync_Full
|
||||
8, // 0x2a, Set_Key_GB
|
||||
8, // 0x2b, Set_Key_R
|
||||
8, // 0x2c, Set_Convert
|
||||
8, // 0x2d, Set_Scissor
|
||||
8, // 0x2e, Set_Prim_Depth
|
||||
8, // 0x2f, Set_Other_Modes
|
||||
8, // 0x30, Load_TLUT
|
||||
8, // 0x31, ???
|
||||
8, // 0x32, Set_Tile_Size
|
||||
8, // 0x33, Load_Block
|
||||
8, // 0x34, Load_Tile
|
||||
8, // 0x35, Set_Tile
|
||||
8, // 0x36, Fill_Rectangle
|
||||
8, // 0x37, Set_Fill_Color
|
||||
8, // 0x38, Set_Fog_Color
|
||||
8, // 0x39, Set_Blend_Color
|
||||
8, // 0x3a, Set_Prim_Color
|
||||
8, // 0x3b, Set_Env_Color
|
||||
8, // 0x3c, Set_Combine
|
||||
8, // 0x3d, Set_Texture_Image
|
||||
8, // 0x3e, Set_Mask_Image
|
||||
8 // 0x3f, Set_Color_Image
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
////////////////////////
|
||||
// RDP COMMANDS
|
||||
////////////////////////
|
||||
|
||||
static void rdp_invalid(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
LOGERROR("RDP: invalid command %d, %08X %08X\n", (w1 >> 24) & 0x3f, w1, w2);
|
||||
}
|
||||
|
||||
static void rdp_noop(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void triangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer)
|
||||
{
|
||||
rglTriangle(w1, w2, shade, texture, zbuffer, rdp_cmd_data + rdp_cmd_cur);
|
||||
}
|
||||
|
||||
static void rdp_tri_noshade(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 0, 0, 0);
|
||||
}
|
||||
|
||||
static void rdp_tri_noshade_z(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 0, 0, 1);
|
||||
}
|
||||
|
||||
static void rdp_tri_tex(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 0, 1, 0);
|
||||
}
|
||||
|
||||
static void rdp_tri_tex_z(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 0, 1, 1);
|
||||
}
|
||||
|
||||
static void rdp_tri_shade(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 1, 0, 0);
|
||||
}
|
||||
|
||||
static void rdp_tri_shade_z(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 1, 0, 1);
|
||||
}
|
||||
|
||||
static void rdp_tri_texshade(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 1, 1, 0);
|
||||
}
|
||||
|
||||
static void rdp_tri_texshade_z(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
triangle(w1, w2, 1, 1, 1);
|
||||
}
|
||||
|
||||
static void rdp_tex_rect(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
uint32_t w3, w4;
|
||||
rdpTexRect_t rect;
|
||||
|
||||
w3 = rdp_cmd_data[rdp_cmd_cur+2];
|
||||
w4 = rdp_cmd_data[rdp_cmd_cur+3];
|
||||
|
||||
rect.tilenum = (w2 >> 24) & 0x7;
|
||||
rect.xl = (w1 >> 12) & 0xfff;
|
||||
rect.yl = (w1 >> 0) & 0xfff;
|
||||
rect.xh = (w2 >> 12) & 0xfff;
|
||||
rect.yh = (w2 >> 0) & 0xfff;
|
||||
rect.s = (w3 >> 16) & 0xffff;
|
||||
rect.t = (w3 >> 0) & 0xffff;
|
||||
rect.dsdx = (w4 >> 16) & 0xffff;
|
||||
rect.dtdy = (w4 >> 0) & 0xffff;
|
||||
|
||||
rglTextureRectangle(&rect, 0);
|
||||
}
|
||||
|
||||
static void rdp_tex_rect_flip(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
uint32_t w3, w4;
|
||||
rdpTexRect_t rect;
|
||||
|
||||
w3 = rdp_cmd_data[rdp_cmd_cur+2];
|
||||
w4 = rdp_cmd_data[rdp_cmd_cur+3];
|
||||
|
||||
rect.tilenum = (w2 >> 24) & 0x7;
|
||||
rect.xl = (w1 >> 12) & 0xfff;
|
||||
rect.yl = (w1 >> 0) & 0xfff;
|
||||
rect.xh = (w2 >> 12) & 0xfff;
|
||||
rect.yh = (w2 >> 0) & 0xfff;
|
||||
rect.t = (w3 >> 16) & 0xffff;
|
||||
rect.s = (w3 >> 0) & 0xffff;
|
||||
rect.dtdy = (w4 >> 16) & 0xffff;
|
||||
rect.dsdx = (w4 >> 0) & 0xffff;
|
||||
|
||||
rglTextureRectangle(&rect, 1);
|
||||
}
|
||||
|
||||
static void rdp_sync_load(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
// Nothing to do?
|
||||
}
|
||||
|
||||
static void rdp_sync_pipe(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
// Nothing to do?
|
||||
}
|
||||
|
||||
static void rdp_sync_tile(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
// Nothing to do?
|
||||
}
|
||||
|
||||
void rdpSignalFullSync();
|
||||
void rdpWaitFullSync();
|
||||
#ifdef RDP_DEBUG
|
||||
int nbFullSync;
|
||||
#endif
|
||||
static void rdp_sync_full(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
//printf("full sync\n");
|
||||
rglFullSync();
|
||||
rglUpdate();
|
||||
|
||||
if (rglSettings.async)
|
||||
rdpSignalFullSync();
|
||||
else {
|
||||
*gfx.MI_INTR_REG |= 0x20;
|
||||
gfx.CheckInterrupts();
|
||||
}
|
||||
#ifdef RDP_DEBUG
|
||||
nbFullSync++;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void rdp_set_key_gb(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
//osd_die("RDP: unhandled command set_key_gb, %08X %08X\n", w1, w2);
|
||||
}
|
||||
|
||||
static void rdp_set_key_r(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
//osd_die("RDP: unhandled command set_key_r, %08X %08X\n", w1, w2);
|
||||
}
|
||||
|
||||
static void rdp_set_convert(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpState.k5 = w2&0xff;
|
||||
//osd_die("RDP: unhandled command set_convert, %08X %08X\n", w1, w2);
|
||||
}
|
||||
|
||||
static void rdp_set_scissor(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_CLIP;
|
||||
rdpState.clipMode = (w2 >> 24) & 3;
|
||||
rdpState.clip.xh = (w1 >> 12) & 0xfff;
|
||||
rdpState.clip.yh = (w1 >> 0) & 0xfff;
|
||||
rdpState.clip.xl = (w2 >> 12) & 0xfff;
|
||||
rdpState.clip.yl = (w2 >> 0) & 0xfff;
|
||||
// TODO: handle f & o?
|
||||
}
|
||||
|
||||
static void rdp_set_prim_depth(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_MISC;
|
||||
rdpState.primitiveZ = (uint16_t)(w2 >> 16);
|
||||
rdpState.primitiveDeltaZ = (uint16_t)(w1);
|
||||
}
|
||||
|
||||
static void rdp_set_other_modes(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_OTHER_MODES;
|
||||
rdpState.otherModes.w1 = w1;
|
||||
rdpState.otherModes.w2 = w2;
|
||||
}
|
||||
|
||||
static void rdp_load_tlut(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
int tilenum = (w2 >> 24) & 0x7;
|
||||
|
||||
rdpChanged |= RDP_BITS_TILE_SETTINGS;
|
||||
|
||||
#define tile rdpTiles[tilenum]
|
||||
//rdpTile_t tile;
|
||||
tile.sl = (w1 >> 12) & 0xfff;
|
||||
tile.tl = (w1 >> 0) & 0xfff;
|
||||
tile.sh = (w2 >> 12) & 0xfff;
|
||||
tile.th = (w2 >> 0) & 0xfff;
|
||||
|
||||
int i;
|
||||
|
||||
rdpChanged |= RDP_BITS_TLUT;
|
||||
|
||||
int count = ((tile.sh - tile.sl + 4) >>2) * ((tile.th - tile.tl + 4) >>2);
|
||||
|
||||
switch (rdpTiSize)
|
||||
{
|
||||
case RDP_PIXEL_SIZE_16BIT:
|
||||
{
|
||||
uint16_t *src = (uint16_t *)&rdram[(rdpTiAddress + (tile.tl >>2) * rdpTiWidth * 2 + ((tile.sl >>2) << rdpTiSize >> 1))/4];
|
||||
uint16_t *dst = (uint16_t *)(rdpTmem + rdpTiles[tilenum].tmem);
|
||||
|
||||
// printf("loading TLUT from %x --> %x\n",
|
||||
// tile.th * rdpTiWidth / 2 + (tile.sh << rdpTiSize >> 1)/4
|
||||
|
||||
for (i=0; i < count; i++)
|
||||
{
|
||||
dst[i*4] = src[i^1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: LOGERROR("RDP: load_tlut: size = %d\n", rdpTiSize);
|
||||
}
|
||||
#undef tile
|
||||
}
|
||||
|
||||
static void rdp_set_tile_size(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
int tilenum = (w2 >> 24) & 0x7;
|
||||
|
||||
rdpChanged |= RDP_BITS_TILE_SETTINGS;
|
||||
|
||||
#define tile rdpTiles[tilenum]
|
||||
tile.sl = (w1 >> 12) & 0xfff;
|
||||
tile.tl = (w1 >> 0) & 0xfff;
|
||||
tile.sh = (w2 >> 12) & 0xfff;
|
||||
tile.th = (w2 >> 0) & 0xfff;
|
||||
#undef tile
|
||||
}
|
||||
|
||||
static void rdp_load_block(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
int i, width;
|
||||
uint16_t sl, sh, tl, dxt;
|
||||
int tilenum = (w2 >> 24) & 0x7;
|
||||
uint32_t *src, *tc;
|
||||
int tb;
|
||||
|
||||
rdpChanged |= RDP_BITS_TMEM;
|
||||
|
||||
sl = ((w1 >> 12) & 0xfff);
|
||||
tl = ((w1 >> 0) & 0xfff) << 11;
|
||||
sh = ((w2 >> 12) & 0xfff);
|
||||
dxt = ((w2 >> 0) & 0xfff);
|
||||
|
||||
width = (sh - sl + 1) << rdpTiSize >> 1;
|
||||
|
||||
src = (uint32_t*)&rdram[0];
|
||||
tc = (uint32_t*)rdpTmem;
|
||||
tb = rdpTiles[tilenum].tmem/4;
|
||||
|
||||
//printf("Load block to %x width %x\n", rdpTiles[tilenum].tmem, width);
|
||||
|
||||
MarkTmemArea(rdpTiles[tilenum].tmem, rdpTiles[tilenum].tmem + width,
|
||||
tl * rdpTiWidth*4 + rdpTiAddress + sl*4, 0, ~0, ~0);
|
||||
|
||||
if (tb+width/4 > 0x1000/4) {
|
||||
LOG("load_block : fixup too large width\n");
|
||||
width = 0x1000-tb*4;
|
||||
}
|
||||
|
||||
if (dxt != 0)
|
||||
{
|
||||
int j=0;
|
||||
|
||||
//rglAssert(tb+width/4 <= 0x1000/4);
|
||||
|
||||
int swap = rdpTiles[tilenum].size == 3? 2 : 1;
|
||||
|
||||
for (i=0; i < width / 4; i+=2)
|
||||
{
|
||||
int t = j >> 11;
|
||||
|
||||
tc[(((tb+i) + 0) ^ ((t & 1) ? swap : 0))&0x3ff] =
|
||||
src[rdpTiAddress / 4 + ((tl * rdpTiWidth) / 4) + sl + i + 0];
|
||||
tc[(((tb+i) + 1) ^ ((t & 1) ? swap : 0))&0x3ff] =
|
||||
src[rdpTiAddress / 4 + ((tl * rdpTiWidth) / 4) + sl + i + 1];
|
||||
|
||||
j += dxt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//rglAssert(tb+width/4 <= 0x1000/4);
|
||||
for (i=0; i < width / 4; i++)
|
||||
{
|
||||
tc[(tb+i)&0x3ff] = src[((tl * rdpTiWidth) / 4) + rdpTiAddress / 4 + sl + i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void rdp_load_tile(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
int i, j;
|
||||
uint16_t sl, sh, tl, th;
|
||||
int width, height;
|
||||
int tilenum = (w2 >> 24) & 0x7;
|
||||
int line;
|
||||
|
||||
rdpChanged |= RDP_BITS_TMEM;
|
||||
|
||||
sl = ((w1 >> 12) & 0xfff) / 4;
|
||||
tl = ((w1 >> 0) & 0xfff) / 4;
|
||||
sh = ((w2 >> 12) & 0xfff) / 4;
|
||||
th = ((w2 >> 0) & 0xfff) / 4;
|
||||
|
||||
width = (sh - sl) + 1;
|
||||
height = (th - tl) + 1;
|
||||
|
||||
// printf("Load tile to %x line %x height %d\n",
|
||||
// rdpTiles[tilenum].tmem,
|
||||
// rdpTiles[tilenum].line,
|
||||
// height);
|
||||
|
||||
rdpTiles[tilenum].size = rdpTiSize; // CHECK THIS
|
||||
line = rdpTiles[tilenum].line;
|
||||
switch (rdpTiles[tilenum].size /*rdpTiSize*/)
|
||||
{
|
||||
case RDP_PIXEL_SIZE_8BIT:
|
||||
{
|
||||
uint8_t *src = (uint8_t*)&rdram[0];
|
||||
uint8_t *tc = (uint8_t*)rdpTmem;
|
||||
int tb = rdpTiles[tilenum].tmem;
|
||||
|
||||
MarkTmemArea(tb, tb + height*line, rdpTiAddress + tl * rdpTiWidth + sl,
|
||||
rdpTiWidth, rdpTiFormat, rdpTiSize);
|
||||
|
||||
if (tb + (line * (height-1) + width) > 4096)
|
||||
{
|
||||
LOGERROR("rdp_load_tile 8-bit: tmem %04X, width %d, height %d = %d\n", rdpTiles[tilenum].tmem, width, height, width*height);
|
||||
height = (4096-tb)/line;
|
||||
}
|
||||
|
||||
for (j=0; j < height; j++)
|
||||
{
|
||||
int tline = tb + (rdpTiles[tilenum].line * j);
|
||||
int s = ((j + tl) * rdpTiWidth) + sl;
|
||||
|
||||
for (i=0; i < width; i++)
|
||||
{
|
||||
tc[(((tline+i) ^ BYTE_ADDR_XOR) ^ ((j & 1) ? 4 : 0))&0xfff] = src[(rdpTiAddress + s++) ^ BYTE_ADDR_XOR];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RDP_PIXEL_SIZE_16BIT:
|
||||
{
|
||||
uint16_t *src = (uint16_t*)&rdram[0];
|
||||
uint16_t *tc = (uint16_t*)rdpTmem;
|
||||
int tb = (rdpTiles[tilenum].tmem / 2);
|
||||
|
||||
if (tb + (line/2 * (height-1) + width) > 2048)
|
||||
{
|
||||
LOGERROR("rdp_load_tile 16-bit: tmem %04X, width %d, height %d = %d\n", rdpTiles[tilenum].tmem, width, height, width*height);
|
||||
height = (2048 - tb) / (line/2);
|
||||
}
|
||||
|
||||
MarkTmemArea(tb*2, tb*2 + height*line,
|
||||
rdpTiAddress + (tl * rdpTiWidth + sl)*2,
|
||||
rdpTiWidth*2, rdpTiFormat, rdpTiSize);
|
||||
|
||||
for (j=0; j < height; j++)
|
||||
{
|
||||
int tline = tb + ((rdpTiles[tilenum].line / 2) * j);
|
||||
int s = ((j + tl) * rdpTiWidth) + sl;
|
||||
|
||||
for (i=0; i < width; i++)
|
||||
{
|
||||
tc[(((tline+i) ^ WORD_ADDR_XOR) ^ ((j & 1) ? 2 : 0))&0x7ff] = src[(rdpTiAddress / 2 + s++) ^ WORD_ADDR_XOR];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RDP_PIXEL_SIZE_32BIT:
|
||||
{
|
||||
uint32_t *src = (uint32_t*)&rdram[0];
|
||||
uint32_t *tc = (uint32_t*)rdpTmem;
|
||||
int tb = (rdpTiles[tilenum].tmem / 4);
|
||||
|
||||
MarkTmemArea(tb*4, tb*4 + height*line*2,
|
||||
rdpTiAddress + (tl * rdpTiWidth + sl)*4,
|
||||
rdpTiWidth*4, rdpTiFormat, rdpTiSize);
|
||||
|
||||
if (tb + (line/2 * (height-1) + width) > 1024)
|
||||
{
|
||||
rdp_log(M64MSG_ERROR, "rdp_load_tile 32-bit: tmem %04X, width %d, height %d = %d\n", rdpTiles[tilenum].tmem, width, height, width*height);
|
||||
}
|
||||
|
||||
for (j=0; j < height; j++)
|
||||
{
|
||||
int tline = tb + ((rdpTiles[tilenum].line / 2) * j);
|
||||
int s = ((j + tl) * rdpTiWidth) + sl;
|
||||
|
||||
for (i=0; i < width; i++)
|
||||
{
|
||||
tc[((tline+i) ^ ((j & 1) ? 2 : 0))&0x3ff] = src[(rdpTiAddress / 4 + s++)];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
rdp_log(M64MSG_ERROR, "RDP: load_tile: size = %d\n", rdpTiSize);
|
||||
}
|
||||
}
|
||||
|
||||
static void rdp_set_tile(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
int tilenum = (w2 >> 24) & 0x7;
|
||||
//int i;
|
||||
|
||||
rdpChanged |= RDP_BITS_TILE_SETTINGS;
|
||||
rdpTileSet |= 1<<tilenum;
|
||||
|
||||
#define tile rdpTiles[tilenum]
|
||||
tile.format = (w1 >> 21) & 0x7;
|
||||
tile.size = (w1 >> 19) & 0x3;
|
||||
tile.line = ((w1 >> 9) & 0x1ff) * 8;
|
||||
tile.tmem = ((w1 >> 0) & 0x1ff) * 8;
|
||||
tile.palette= (w2 >> 20) & 0xf;
|
||||
tile.ct = (w2 >> 19) & 0x1;
|
||||
tile.mt = (w2 >> 18) & 0x1;
|
||||
tile.mask_t = (w2 >> 14) & 0xf;
|
||||
tile.shift_t= (w2 >> 10) & 0xf;
|
||||
if (tile.shift_t >= 12) tile.shift_t -= 16;
|
||||
tile.cs = (w2 >> 9) & 0x1;
|
||||
tile.ms = (w2 >> 8) & 0x1;
|
||||
tile.mask_s = (w2 >> 4) & 0xf;
|
||||
tile.shift_s= (w2 >> 0) & 0xf;
|
||||
if (tile.shift_s >= 12) tile.shift_s -= 16;
|
||||
#undef tile
|
||||
}
|
||||
|
||||
static void rdp_fill_rect(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpRect_t rect;
|
||||
rect.xl = (w1 >> 12) & 0xfff;
|
||||
rect.yl = (w1 >> 0) & 0xfff;
|
||||
rect.xh = (w2 >> 12) & 0xfff;
|
||||
rect.yh = (w2 >> 0) & 0xfff;
|
||||
|
||||
rglFillRectangle(&rect);
|
||||
}
|
||||
|
||||
static void rdp_set_fill_color(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_FILL_COLOR;
|
||||
rdpState.fillColor = w2;
|
||||
}
|
||||
|
||||
static void rdp_set_fog_color(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_FOG_COLOR;
|
||||
rdpState.fogColor = w2;
|
||||
}
|
||||
|
||||
static void rdp_set_blend_color(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_BLEND_COLOR;
|
||||
rdpState.blendColor = w2;
|
||||
}
|
||||
|
||||
static void rdp_set_prim_color(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_PRIM_COLOR;
|
||||
// TODO: prim min level, prim_level
|
||||
rdpState.primColor = w2;
|
||||
}
|
||||
|
||||
static void rdp_set_env_color(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_ENV_COLOR;
|
||||
rdpState.envColor = w2;
|
||||
}
|
||||
|
||||
static void rdp_set_combine(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_COMBINE_MODES;
|
||||
|
||||
rdpState.combineModes.w1 = w1;
|
||||
rdpState.combineModes.w2 = w2;
|
||||
}
|
||||
|
||||
static void rdp_set_texture_image(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_TI_SETTINGS;
|
||||
|
||||
rdpTiFormat = (w1 >> 21) & 0x7;
|
||||
rdpTiSize = (w1 >> 19) & 0x3;
|
||||
rdpTiWidth = (w1 & 0x3ff) + 1;
|
||||
rdpTiAddress = w2 & 0x01ffffff;
|
||||
}
|
||||
|
||||
static void rdp_set_mask_image(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_ZB_SETTINGS;
|
||||
rdpZbAddress = w2 & 0x01ffffff;
|
||||
}
|
||||
|
||||
static void rdp_set_color_image(uint32_t w1, uint32_t w2)
|
||||
{
|
||||
rdpChanged |= RDP_BITS_FB_SETTINGS;
|
||||
rdpFbFormat = (w1 >> 21) & 0x7;
|
||||
rdpFbSize = (w1 >> 19) & 0x3;
|
||||
rdpFbWidth = (w1 & 0x3ff) + 1;
|
||||
rdpFbAddress = w2 & 0x01ffffff;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void (* rdp_command_table[64])(uint32_t w1, uint32_t w2) =
|
||||
{
|
||||
/* 0x00 */
|
||||
rdp_noop, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
rdp_invalid, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
rdp_tri_noshade, rdp_tri_noshade_z, rdp_tri_tex, rdp_tri_tex_z,
|
||||
rdp_tri_shade, rdp_tri_shade_z, rdp_tri_texshade, rdp_tri_texshade_z,
|
||||
/* 0x10 */
|
||||
rdp_invalid, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
rdp_invalid, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
rdp_invalid, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
rdp_invalid, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
/* 0x20 */
|
||||
rdp_invalid, rdp_invalid, rdp_invalid, rdp_invalid,
|
||||
rdp_tex_rect, rdp_tex_rect_flip, rdp_sync_load, rdp_sync_pipe,
|
||||
rdp_sync_tile, rdp_sync_full, rdp_set_key_gb, rdp_set_key_r,
|
||||
rdp_set_convert, rdp_set_scissor, rdp_set_prim_depth, rdp_set_other_modes,
|
||||
/* 0x30 */
|
||||
rdp_load_tlut, rdp_invalid, rdp_set_tile_size, rdp_load_block,
|
||||
rdp_load_tile, rdp_set_tile, rdp_fill_rect, rdp_set_fill_color,
|
||||
rdp_set_fog_color, rdp_set_blend_color, rdp_set_prim_color, rdp_set_env_color,
|
||||
rdp_set_combine, rdp_set_texture_image, rdp_set_mask_image, rdp_set_color_image
|
||||
};
|
||||
|
||||
void rdp_process_list(void)
|
||||
{
|
||||
//int i;
|
||||
uint32_t cmd;//, length, cmd_length;
|
||||
|
||||
rglUpdateStatus();
|
||||
if (!rglSettings.threaded)
|
||||
rdp_store_list();
|
||||
|
||||
if (rglStatus == RGL_STATUS_CLOSED)
|
||||
return;
|
||||
|
||||
// this causes problem with depth writeback in zelda mm
|
||||
// but is necessary for in fisherman
|
||||
rglUpdate();
|
||||
|
||||
while (rdp_cmd_cur != rdp_cmd_ptr)
|
||||
{
|
||||
cmd = (rdp_cmd_data[rdp_cmd_cur] >> 24) & 0x3f;
|
||||
// if (((rdp_cmd_data[rdp_cmd_cur] >> 24) & 0xc0) != 0xc0)
|
||||
// {
|
||||
// LOGERROR("rdp_process_list: invalid rdp command %08X at %08X\n", rdp_cmd_data[rdp_cmd_cur], dp_start+(rdp_cmd_cur * 4));
|
||||
// }
|
||||
|
||||
if ((((rdp_cmd_ptr-rdp_cmd_cur)&(MAXCMD-1)) * 4) < rdp_command_length[cmd])
|
||||
{
|
||||
// LOGERROR("rdp_process_list: not enough rdp command data: cur = %d, ptr = %d, expected = %d\n", rdp_cmd_cur, rdp_cmd_ptr, rdp_command_length[cmd]);
|
||||
// return;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
if (rdp_dump)
|
||||
{
|
||||
char string[4000];
|
||||
int rdp_dasm(uint32_t * rdp_cmd_data, int rdp_cmd_cur, int length, char *buffer);
|
||||
rdp_dasm(rdp_cmd_data, rdp_cmd_cur, rdp_command_length[cmd], string);
|
||||
|
||||
fprintf(stderr, "%08X: %08X %08X %s\n", dp_start+(rdp_cmd_cur * 4), rdp_cmd_data[rdp_cmd_cur+0], rdp_cmd_data[rdp_cmd_cur+1], string);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
memcpy(rdpTraceBuf+rdpTracePos, rdp_cmd_data+rdp_cmd_cur, rdp_command_length[cmd]);
|
||||
#endif
|
||||
|
||||
if (rdp_cmd_cur + rdp_command_length[cmd]/4 > MAXCMD)
|
||||
memcpy(rdp_cmd_data + MAXCMD, rdp_cmd_data, rdp_command_length[cmd] - (MAXCMD - rdp_cmd_cur)*4);
|
||||
|
||||
// execute the command
|
||||
rdp_command_table[cmd](rdp_cmd_data[rdp_cmd_cur+0], rdp_cmd_data[rdp_cmd_cur+1]);
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
rdpTracePos += rdp_command_length[cmd] / 4;
|
||||
rglAssert(rdpTracePos < sizeof(rdpTraceBuf)/sizeof(rdpTraceBuf[0]));
|
||||
#endif
|
||||
|
||||
rdp_cmd_cur = (rdp_cmd_cur + rdp_command_length[cmd] / 4) & (MAXCMD-1);
|
||||
}
|
||||
|
||||
// dp_current = dp_end;
|
||||
// dp_start = dp_end;
|
||||
dp_start = dp_current;
|
||||
|
||||
dp_status &= ~0x0002;
|
||||
}
|
||||
|
||||
int rdp_store_list(void)
|
||||
{
|
||||
uint32_t i;
|
||||
uint32_t data, cmd, length;
|
||||
int sync = 0;
|
||||
|
||||
// while (dp_current < dp_end) {
|
||||
|
||||
// }
|
||||
// dp_status &= ~0x0002;
|
||||
|
||||
length = dp_end - dp_current;
|
||||
|
||||
// LOG("rdp start %x cur %x end %x length %d dp_status %x\n",
|
||||
// dp_start, dp_current, dp_end,
|
||||
// length, dp_status);
|
||||
|
||||
if (dp_end <= dp_current) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// load command data
|
||||
for (i=0; i < length; i += 4)
|
||||
{
|
||||
data = READ_RDP_DATA(dp_current + i);
|
||||
if (rglSettings.async) {
|
||||
if (rdp_cmd_left) {
|
||||
rdp_cmd_left--;
|
||||
} else {
|
||||
cmd = (data >> 24) & 0x3f;
|
||||
rdp_cmd_left = rdp_command_length[cmd]/4-1;
|
||||
if (cmd == 0x29) // full_sync
|
||||
sync = 1;
|
||||
}
|
||||
}
|
||||
rdp_cmd_data[rdp_cmd_ptr] = data;
|
||||
rdp_cmd_ptr = (rdp_cmd_ptr + 1) & (MAXCMD-1);
|
||||
}
|
||||
|
||||
dp_current += length;
|
||||
|
||||
return sync;
|
||||
}
|
||||
|
||||
|
||||
int rdp_init()
|
||||
{
|
||||
rdp_cmd_cur = rdp_cmd_ptr = 0;
|
||||
rdp_cmd_left = 0;
|
||||
#ifdef RDP_DEBUG
|
||||
rdpTracePos = 0;
|
||||
#endif
|
||||
nbTmemAreas = 0;
|
||||
return rglInit();
|
||||
}
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef _RDP_H_
|
||||
#define _RDP_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define M64P_PLUGIN_PROTOTYPES 1
|
||||
#include "m64p_types.h"
|
||||
#include "m64p_common.h"
|
||||
#include "m64p_plugin.h"
|
||||
#include "m64p_vidext.h"
|
||||
#include "m64p_config.h"
|
||||
|
||||
#define LSB_FIRST 1 // TODO : check for platform
|
||||
#ifdef LSB_FIRST
|
||||
#define BYTE_ADDR_XOR 3
|
||||
#define WORD_ADDR_XOR 1
|
||||
#define BYTE4_XOR_BE(a) ((a) ^ 3) /* read/write a byte to a 32-bit space */
|
||||
#else
|
||||
#define BYTE_ADDR_XOR 0
|
||||
#define WORD_ADDR_XOR 0
|
||||
#define BYTE4_XOR_BE(a) (a)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define RDP_PIXEL_SIZE_4BIT 0
|
||||
#define RDP_PIXEL_SIZE_8BIT 1
|
||||
#define RDP_PIXEL_SIZE_16BIT 2
|
||||
#define RDP_PIXEL_SIZE_32BIT 3
|
||||
|
||||
#define RDP_FORMAT_RGBA 0
|
||||
#define RDP_FORMAT_YUV 1
|
||||
#define RDP_FORMAT_CI 2
|
||||
#define RDP_FORMAT_IA 3
|
||||
#define RDP_FORMAT_I 4
|
||||
|
||||
#define RDP_CYCLE_TYPE_1 0
|
||||
#define RDP_CYCLE_TYPE_2 1
|
||||
#define RDP_CYCLE_TYPE_COPY 2
|
||||
#define RDP_CYCLE_TYPE_FILL 3
|
||||
|
||||
typedef uint32_t rdpColor_t;
|
||||
|
||||
#define RDP_GETC32_R(c) ( ((c)>>24) & 0xff )
|
||||
#define RDP_GETC32_G(c) ( ((c)>>16) & 0xff )
|
||||
#define RDP_GETC32_B(c) ( ((c)>> 8) & 0xff )
|
||||
#define RDP_GETC32_A(c) ( ((c)>> 0) & 0xff )
|
||||
|
||||
#define RDP_GETC16_R(c) ( ((c)>>11) & 0x1f )
|
||||
#define RDP_GETC16_G(c) ( ((c)>> 6) & 0x1f )
|
||||
#define RDP_GETC16_B(c) ( ((c)>> 1) & 0x1f )
|
||||
#define RDP_GETC16_A(c) ( ((c)>> 0) & 0x1 )
|
||||
|
||||
struct rdpRect_t {
|
||||
uint16_t xl, yl, xh, yh; // 10.2 fixed-point
|
||||
};
|
||||
|
||||
struct rdpTexRect_t {
|
||||
int tilenum;
|
||||
uint16_t xl, yl, xh, yh; // 10.2 fixed-point
|
||||
int16_t s, t; // 10.5 fixed-point
|
||||
int16_t dsdx, dtdy; // 5.10 fixed-point
|
||||
};
|
||||
|
||||
extern const char *rdpImageFormats[];
|
||||
|
||||
// TODO put ct ... palette in a bitfield
|
||||
struct rdpTile_t {
|
||||
uint16_t line;
|
||||
uint16_t tmem;
|
||||
uint16_t sl, tl, sh, th; // 10.2 fixed-point
|
||||
uint16_t w, h;
|
||||
int8_t format, size;
|
||||
int8_t mask_t, shift_t, mask_s, shift_s;
|
||||
int8_t ct, mt, cs, ms;
|
||||
int8_t palette;
|
||||
};
|
||||
|
||||
struct rdpCombineModes_t {
|
||||
uint32_t w1, w2;
|
||||
};
|
||||
|
||||
#define RDP_GETCM_SUB_A_RGB0(cm) (((cm).w1 >> 20) & 0xf)
|
||||
#define RDP_GETCM_MUL_RGB0(cm) (((cm).w1 >> 15) & 0x1f)
|
||||
#define RDP_GETCM_SUB_A_A0(cm) (((cm).w1 >> 12) & 0x7)
|
||||
#define RDP_GETCM_MUL_A0(cm) (((cm).w1 >> 9) & 0x7)
|
||||
#define RDP_GETCM_SUB_A_RGB1(cm) (((cm).w1 >> 5) & 0xf)
|
||||
#define RDP_GETCM_MUL_RGB1(cm) (((cm).w1 >> 0) & 0x1f)
|
||||
|
||||
#define RDP_GETCM_SUB_B_RGB0(cm) (((cm).w2 >> 28) & 0xf)
|
||||
#define RDP_GETCM_SUB_B_RGB1(cm) (((cm).w2 >> 24) & 0xf)
|
||||
#define RDP_GETCM_SUB_A_A1(cm) (((cm).w2 >> 21) & 0x7)
|
||||
#define RDP_GETCM_MUL_A1(cm) (((cm).w2 >> 18) & 0x7)
|
||||
#define RDP_GETCM_ADD_RGB0(cm) (((cm).w2 >> 15) & 0x7)
|
||||
#define RDP_GETCM_SUB_B_A0(cm) (((cm).w2 >> 12) & 0x7)
|
||||
#define RDP_GETCM_ADD_A0(cm) (((cm).w2 >> 9) & 0x7)
|
||||
#define RDP_GETCM_ADD_RGB1(cm) (((cm).w2 >> 6) & 0x7)
|
||||
#define RDP_GETCM_SUB_B_A1(cm) (((cm).w2 >> 3) & 0x7)
|
||||
#define RDP_GETCM_ADD_A1(cm) (((cm).w2 >> 0) & 0x7)
|
||||
|
||||
#define RDP_COMBINE_MASK11 ((0xfu<<20)|(0x1fu<<15)|(0x7u<<12)|(0x7u<<9))
|
||||
#define RDP_COMBINE_MASK12 ((0xfu<<28)|(0x7u<<15)|(0x7u<<12)|(0x7u<<9))
|
||||
#define RDP_COMBINE_MASK21 ((0xfu<<5)|(0x1fu<<0))
|
||||
#define RDP_COMBINE_MASK22 ((0xfu<<24)|(0x7u<<21)|(0x7u<<18)|(0x7u<<6)|(0x7u<<3)|(0x7u<<0))
|
||||
|
||||
static const rdpCombineModes_t rdpCombineMasks[4] = {
|
||||
{ ~RDP_COMBINE_MASK21, ~RDP_COMBINE_MASK22 },
|
||||
{ ~0u, ~0u },
|
||||
{ ~(RDP_COMBINE_MASK11|RDP_COMBINE_MASK21), ~(RDP_COMBINE_MASK12|RDP_COMBINE_MASK22) },
|
||||
{ ~(RDP_COMBINE_MASK11|RDP_COMBINE_MASK21), ~(RDP_COMBINE_MASK12|RDP_COMBINE_MASK22) },
|
||||
};
|
||||
|
||||
struct rdpOtherModes_t {
|
||||
uint32_t w1, w2;
|
||||
};
|
||||
|
||||
#define RDP_OM_MISSING1 (~((3<<20)|0x80000|0x40000|0x20000|0x10000|0x08000| \
|
||||
0x04000|0x02000|0x01000|0x00800|0x00400|0x00200| \
|
||||
0x00100|(3<<6)|(3<<4)))
|
||||
#define RDP_OM_MISSING2 (~(0xffff0000|0x4000|0x2000|0x1000|(3<<10)|(3<<8)| \
|
||||
0x80|0x40|0x20|0x10|0x08|0x04|0x02|0x01))
|
||||
|
||||
#define RDP_GETOM_CYCLE_TYPE(om) (((om).w1 >> 20) & 0x3)
|
||||
#define RDP_GETOM_PERSP_TEX_EN(om) (((om).w1 & 0x80000) ? 1 : 0)
|
||||
#define RDP_GETOM_DETAIL_TEX_EN(om) (((om).w1 & 0x40000) ? 1 : 0)
|
||||
#define RDP_GETOM_SHARPEN_TEX_EN(om) (((om).w1 & 0x20000) ? 1 : 0)
|
||||
#define RDP_GETOM_TEX_LOD_EN(om) (((om).w1 & 0x10000) ? 1 : 0)
|
||||
#define RDP_GETOM_EN_TLUT(om) (((om).w1 & 0x08000) ? 1 : 0)
|
||||
#define RDP_GETOM_TLUT_TYPE(om) (((om).w1 & 0x04000) ? 1 : 0)
|
||||
#define RDP_GETOM_SAMPLE_TYPE(om) (((om).w1 & 0x02000) ? 1 : 0)
|
||||
#define RDP_GETOM_MID_TEXEL(om) (((om).w1 & 0x01000) ? 1 : 0)
|
||||
#define RDP_GETOM_BI_LERP0(om) (((om).w1 & 0x00800) ? 1 : 0)
|
||||
#define RDP_GETOM_BI_LERP1(om) (((om).w1 & 0x00400) ? 1 : 0)
|
||||
#define RDP_GETOM_CONVERT_ONE(om) (((om).w1 & 0x00200) ? 1 : 0)
|
||||
#define RDP_GETOM_KEY_EN(om) (((om).w1 & 0x00100) ? 1 : 0)
|
||||
#define RDP_GETOM_RGB_DITHER_SEL(om) (((om).w1 >> 6) & 0x3)
|
||||
#define RDP_GETOM_ALPHA_DITHER_SEL(om) (((om).w1 >> 4) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M1A_0(om) (((om).w2 >> 30) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M1A_1(om) (((om).w2 >> 28) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M1B_0(om) (((om).w2 >> 26) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M1B_1(om) (((om).w2 >> 24) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M2A_0(om) (((om).w2 >> 22) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M2A_1(om) (((om).w2 >> 20) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M2B_0(om) (((om).w2 >> 18) & 0x3)
|
||||
#define RDP_GETOM_BLEND_M2B_1(om) (((om).w2 >> 16) & 0x3)
|
||||
#define RDP_GETOM_FORCE_BLEND(om) (((om).w2 & 0x4000) ? 1 : 0)
|
||||
#define RDP_GETOM_ALPHA_CVG_SELECT(om) (((om).w2 & 0x2000) ? 1 : 0)
|
||||
#define RDP_GETOM_CVG_TIMES_ALPHA(om) (((om).w2 & 0x1000) ? 1 : 0)
|
||||
#define RDP_GETOM_Z_MODE(om) (((om).w2 >> 10) & 0x3)
|
||||
#define RDP_GETOM_CVG_DEST(om) (((om).w2 >> 8) & 0x3)
|
||||
#define RDP_GETOM_COLOR_ON_CVG(om) (((om).w2 & 0x80) ? 1 : 0)
|
||||
#define RDP_GETOM_IMAGE_READ_EN(om) (((om).w2 & 0x40) ? 1 : 0)
|
||||
#define RDP_GETOM_Z_UPDATE_EN(om) (((om).w2 & 0x20) ? 1 : 0)
|
||||
#define RDP_GETOM_Z_COMPARE_EN(om) (((om).w2 & 0x10) ? 1 : 0)
|
||||
#define RDP_GETOM_ANTIALIAS_EN(om) (((om).w2 & 0x08) ? 1 : 0)
|
||||
#define RDP_GETOM_Z_SOURCE_SEL(om) (((om).w2 & 0x04) ? 1 : 0)
|
||||
#define RDP_GETOM_DITHER_ALPHA_EN(om) (((om).w2 & 0x02) ? 1 : 0)
|
||||
#define RDP_GETOM_ALPHA_COMPARE_EN(om) (((om).w2 & 0x01) ? 1 : 0)
|
||||
|
||||
#define RDP_BLEND_MASK1 ((3u<<30)|(3u<<26)|(3u<<22)|(3u<<18))
|
||||
#define RDP_BLEND_MASK2 ((3u<<28)|(3u<<24)|(3u<<20)|(3u<<16))
|
||||
|
||||
static const rdpOtherModes_t rdpBlendMasks[4] = {
|
||||
{ ~0u, ~RDP_BLEND_MASK2 },
|
||||
{ ~0u, ~0u },
|
||||
{ ~0u, ~(RDP_BLEND_MASK1|RDP_BLEND_MASK2) },
|
||||
{ ~0u, ~(RDP_BLEND_MASK1|RDP_BLEND_MASK2) },
|
||||
};
|
||||
|
||||
struct rdpState_t {
|
||||
rdpCombineModes_t combineModes;
|
||||
rdpOtherModes_t otherModes;
|
||||
rdpColor_t blendColor;
|
||||
rdpColor_t primColor;
|
||||
rdpColor_t envColor;
|
||||
rdpColor_t fogColor;
|
||||
rdpColor_t fillColor;
|
||||
int primitiveZ;
|
||||
int primitiveDeltaZ;
|
||||
rdpRect_t clip;
|
||||
uint8_t k5, clipMode;
|
||||
};
|
||||
|
||||
extern rdpState_t rdpState;
|
||||
extern uint32_t rdpChanged;
|
||||
//extern rdpColor_t rdpTlut[];
|
||||
#define rdpTlut ((uint16_t *) (rdpTmem + 0x800))
|
||||
extern uint8_t rdpTmem[];
|
||||
extern int rdpFbFormat;
|
||||
extern int rdpFbSize;
|
||||
extern int rdpFbWidth;
|
||||
extern uint32_t rdpFbAddress;
|
||||
extern uint32_t rdpZbAddress;
|
||||
extern int rdpTiFormat;
|
||||
extern int rdpTiSize;
|
||||
extern int rdpTiWidth;
|
||||
extern uint32_t rdpTiAddress;
|
||||
extern rdpTile_t rdpTiles[8];
|
||||
extern int rdpTileSet;
|
||||
|
||||
#define RDP_BITS_COMBINE_MODES (1<<0)
|
||||
#define RDP_BITS_OTHER_MODES (1<<1)
|
||||
#define RDP_BITS_CLIP (1<<2)
|
||||
#define RDP_BITS_BLEND_COLOR (1<<3)
|
||||
#define RDP_BITS_PRIM_COLOR (1<<4)
|
||||
#define RDP_BITS_ENV_COLOR (1<<5)
|
||||
#define RDP_BITS_FOG_COLOR (1<<6)
|
||||
#define RDP_BITS_FB_SETTINGS (1<<7)
|
||||
#define RDP_BITS_ZB_SETTINGS (1<<8)
|
||||
#define RDP_BITS_TI_SETTINGS (1<<9)
|
||||
#define RDP_BITS_TMEM (1<<10)
|
||||
#define RDP_BITS_TLUT (1<<11)
|
||||
#define RDP_BITS_TILE_SETTINGS (1<<12)
|
||||
#define RDP_BITS_FILL_COLOR (1<<13)
|
||||
#define RDP_BITS_MISC (1<<14)
|
||||
|
||||
// return where the data in rdram came from at this address in tmem
|
||||
uint32_t rdpGetTmemOrigin(int tmem, int * line, int * stop, int * fromFormat, int * size);
|
||||
|
||||
|
||||
int rdp_init();
|
||||
int rdp_dasm(uint32_t * rdp_cmd_data, int rdp_cmd_cur, int length, char *buffer);
|
||||
void rdp_process_list(void);
|
||||
int rdp_store_list(void);
|
||||
|
||||
void rdp_log(m64p_msg_level level, const char *msg, ...);
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
|
||||
extern uint32_t rdpTraceBuf[];
|
||||
extern int rdpTracePos;
|
||||
|
||||
extern int rdp_dump;
|
||||
|
||||
#define DUMP if (!rdp_dump) ; else LOG
|
||||
|
||||
static void LOG(const char * s, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, s);
|
||||
vfprintf(stderr, s, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#define LOGERROR LOG
|
||||
|
||||
#else // RDP_DEBUG
|
||||
|
||||
#define DUMP(...) rdp_log(M64MSG_VERBOSE, __VA_ARGS__)
|
||||
#define LOG(...) rdp_log(M64MSG_VERBOSE, __VA_ARGS__)
|
||||
#define LOGERROR(...) rdp_log(M64MSG_WARNING, __VA_ARGS__)
|
||||
|
||||
#endif // RDP_DEBUG
|
||||
|
||||
|
||||
#endif // _RDP_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -1,279 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef _RGL_H_
|
||||
#define _RGL_H_
|
||||
|
||||
#include "queue.h"
|
||||
#include "rgl_assert.h"
|
||||
#include "rdp.h"
|
||||
|
||||
#include <glew.h>
|
||||
#if defined(__MACOSX__)
|
||||
#include <OpenGL/gl.h>
|
||||
#elif defined(__MACOS__)
|
||||
#include <gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
//#include <IL/il.h>
|
||||
#endif
|
||||
|
||||
#include "glshader.h"
|
||||
|
||||
#include <limits.h> //for PATH_MAX
|
||||
|
||||
#define DWORD unsigned int
|
||||
extern GFX_INFO gfx;
|
||||
#define rdram ((uint32_t*)gfx.RDRAM)
|
||||
#define rsp_imem ((uint32_t*)gfx.IMEM)
|
||||
#define rsp_dmem ((uint32_t*)gfx.DMEM)
|
||||
#define vi_origin (*(uint32_t*)gfx.VI_ORIGIN_REG)
|
||||
#define vi_width (*(uint32_t*)gfx.VI_WIDTH_REG)
|
||||
#define vi_control (*(uint32_t*)gfx.VI_STATUS_REG)
|
||||
|
||||
#define dp_start (*(uint32_t*)gfx.DPC_START_REG)
|
||||
#define dp_end (*(uint32_t*)gfx.DPC_END_REG)
|
||||
#define dp_current (*(uint32_t*)gfx.DPC_CURRENT_REG)
|
||||
#define dp_status (*(uint32_t*)gfx.DPC_STATUS_REG)
|
||||
|
||||
// highly experimental AND slow
|
||||
//#define RGL_EXACT_BLEND
|
||||
|
||||
struct rglSettings_t {
|
||||
int hiresFb;
|
||||
int resX, resY;
|
||||
int fsResX, fsResY;
|
||||
int fbInfo;
|
||||
int forceSwap;
|
||||
int threaded;
|
||||
int async;
|
||||
int noNpotFbos;
|
||||
int lowres;
|
||||
int fullscreen;
|
||||
};
|
||||
|
||||
extern rglSettings_t rglSettings;
|
||||
extern void (*render_callback)(int);
|
||||
|
||||
struct rglDepthBuffer_t {
|
||||
uint32_t address;
|
||||
int width, height;
|
||||
GLuint zbid;
|
||||
};
|
||||
#define MAX_DEPTH_BUFFERS 16
|
||||
extern rglDepthBuffer_t zBuffers[MAX_DEPTH_BUFFERS];
|
||||
extern int nbZBuffers;
|
||||
|
||||
struct rglRenderBuffer_t;
|
||||
struct rglDepthSection_t {
|
||||
rglRenderBuffer_t * buffer;
|
||||
int chunkId;
|
||||
};
|
||||
#define RGL_MAX_DEPTH_SECTIONS 16
|
||||
|
||||
struct rglRenderBuffer_t {
|
||||
CIRCLEQ_ENTRY(rglRenderBuffer_t) link;
|
||||
uint32_t addressStart, addressStop;
|
||||
int format, size, fbWidth, line;
|
||||
int width, height;
|
||||
int flags;
|
||||
GLuint texid, fbid;
|
||||
#ifdef RGL_EXACT_BLEND
|
||||
GLuint texid2, fbid2;
|
||||
#endif
|
||||
int realWidth, realHeight;
|
||||
int fboWidth, fboHeight;
|
||||
int redimensionStamp;
|
||||
rdpRect_t area;
|
||||
rdpRect_t mod;
|
||||
rglDepthBuffer_t * depthBuffer;
|
||||
int chunkId;
|
||||
rglDepthSection_t depthSections[16];
|
||||
int nbDepthSections;
|
||||
};
|
||||
#define RGL_RB_DEPTH 1
|
||||
#define RGL_RB_FULL 2
|
||||
#define RGL_RB_ERASED 4
|
||||
#define RGL_RB_FBMOD 8 // the GL framebuffer was modified
|
||||
#define RGL_RB_RAMMOD 16 // the framebuffer was modified in rdram
|
||||
#define RGL_RB_HASTRIANGLES 32 // we assume it's not a depth buffer in this case
|
||||
|
||||
CIRCLEQ_HEAD(rglRenderBufferHead_t, rglRenderBuffer_t);
|
||||
|
||||
#define MAX_RENDER_BUFFERS 64
|
||||
extern rglRenderBuffer_t rBuffers[MAX_RENDER_BUFFERS];
|
||||
extern int nbRBuffers;
|
||||
extern rglRenderBuffer_t * curRBuffer;
|
||||
extern rglRenderBuffer_t * curZBuffer;
|
||||
extern rglRenderBufferHead_t rBufferHead;
|
||||
|
||||
extern int rglTexCacheCounter;
|
||||
struct rglTexture_t {
|
||||
CIRCLEQ_ENTRY(rglTexture_t) byCrc, byUsage;
|
||||
GLuint id, zid;
|
||||
uint32_t crc;
|
||||
int w, h, fmt;
|
||||
int clipw, cliph;
|
||||
GLuint ws, wt, filter; // current settings
|
||||
};
|
||||
CIRCLEQ_HEAD(rglTextureHead_t, rglTexture_t);
|
||||
#define RGL_TEX_CACHE_SIZE 1024
|
||||
extern rglTexture_t rglTextures[RGL_TEX_CACHE_SIZE];
|
||||
struct rglTexCache_t {
|
||||
int counter;
|
||||
rglTexture_t * tex;
|
||||
};
|
||||
extern rglTexCache_t rglTexCache[0x1000];
|
||||
extern uint8_t rglTmpTex[];
|
||||
extern uint8_t rglTmpTex2[];
|
||||
|
||||
struct rglTile_t : public rdpTile_t {
|
||||
rglTexture_t * tex;
|
||||
rglRenderBuffer_t * hiresBuffer;
|
||||
uint32_t hiresAddress;
|
||||
GLuint ws, wt; // GL clamping modes
|
||||
GLuint filter; // GL filter mode
|
||||
};
|
||||
|
||||
struct rglVertex_t {
|
||||
float x, y, z, w;
|
||||
float s, t;
|
||||
uint8_t r, g, b, a;
|
||||
};
|
||||
|
||||
struct rglStrip_t {
|
||||
int tilenum;
|
||||
int nbVtxs;
|
||||
int flags;
|
||||
rglVertex_t * vtxs;
|
||||
};
|
||||
|
||||
#define RGL_STRIP_TEX1 1
|
||||
#define RGL_STRIP_TEX2 2
|
||||
#define RGL_STRIP_SHADE 4
|
||||
#define RGL_STRIP_ZBUFFER 8
|
||||
|
||||
struct rglRenderChunk_t {
|
||||
rdpState_t rdpState;
|
||||
rglTile_t tiles[8];
|
||||
rglRenderBuffer_t * renderBuffer;
|
||||
uint32_t depthAddress;
|
||||
int flags;
|
||||
int nbStrips;
|
||||
rglStrip_t * strips;
|
||||
#ifdef RDP_DEBUG
|
||||
rglShader_t * shader;
|
||||
int tracePos;
|
||||
#endif
|
||||
};
|
||||
|
||||
// first 8 bits used for tile usage
|
||||
#define RGL_CHUNK_CLEAR (1<<8)
|
||||
|
||||
#define MAX_RENDER_CHUNKS 40000
|
||||
extern rglRenderChunk_t chunks[MAX_RENDER_CHUNKS];
|
||||
extern rglRenderChunk_t * curChunk;
|
||||
extern int nbChunks;
|
||||
|
||||
#define MAX_STRIPS 80000
|
||||
extern rglStrip_t strips[MAX_STRIPS];
|
||||
extern rglVertex_t vtxs[6*MAX_STRIPS];
|
||||
extern int nbStrips, nbVtxs;
|
||||
|
||||
struct rglRenderMode_t {
|
||||
rdpOtherModes_t otherModes;
|
||||
rdpCombineModes_t combineModes;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
#define RGL_RM_DEPTH 1
|
||||
|
||||
// TODO use a hash table
|
||||
#define MAX_RENDER_MODES 1024
|
||||
extern rglRenderMode_t renderModesDb[MAX_RENDER_MODES];
|
||||
extern int nbRenderModes;
|
||||
|
||||
extern rglShader_t * rglCopyShader;
|
||||
extern rglShader_t * rglCopyDepthShader;
|
||||
|
||||
|
||||
#define RGL_COMB_FMT_RGBA 0
|
||||
#define RGL_COMB_FMT_I 1
|
||||
#define RGL_COMB_FMT_DEPTH 2
|
||||
#define RGL_COMB_FMT 3
|
||||
#define RGL_COMB_IN0_DEPTH 4
|
||||
#define RGL_COMB_IN0 4
|
||||
#define RGL_COMB_IN1_DEPTH 8
|
||||
#define RGL_COMB_IN1 8
|
||||
#define RGL_COMB_TILE7 16
|
||||
|
||||
extern volatile int rglStatus, rglNextStatus;
|
||||
#define RGL_STATUS_CLOSED 0
|
||||
#define RGL_STATUS_WINDOWED 1
|
||||
#define RGL_STATUS_FULLSCREEN 2
|
||||
|
||||
|
||||
void rglUpdateStatus();
|
||||
void rglTouchTMEM();
|
||||
void rglResetTextureCache();
|
||||
void rglTile(rdpTile_t & tile, rglTile_t & rtile, int recth);
|
||||
void rglRenderMode(rglRenderChunk_t & chunk);
|
||||
void rglBlender(rglRenderChunk_t & chunk);
|
||||
void rglClearCombiners();
|
||||
void rglSetCombiner(rglRenderChunk_t & chunk, int format);
|
||||
void rglPrepareRendering(int texturing, int tilenum, int recth, int depth);
|
||||
rglRenderBuffer_t * rglSelectRenderBuffer(uint32_t addr, int width, int size, int format);
|
||||
char * rglCombiner2String(rdpState_t & state);
|
||||
|
||||
|
||||
int rglInit();
|
||||
void rglClose();
|
||||
int rglOpenScreen();
|
||||
void rglCloseScreen();
|
||||
int rglReadSettings();
|
||||
void rglUpdate();
|
||||
void rglFullSync();
|
||||
void rglTextureRectangle(rdpTexRect_t * rect, int flip);
|
||||
void rglFillRectangle(rdpRect_t * rect);
|
||||
void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
|
||||
uint32_t * rdp_cmd);
|
||||
void rglRenderChunks();
|
||||
void rglDisplayFramebuffers();
|
||||
int rglT1Usage(rdpState_t & state);
|
||||
int rglT2Usage(rdpState_t & state);
|
||||
void rglDebugger();
|
||||
void rglCloseDebugger();
|
||||
void rglFramebuffer2Rdram(rglRenderBuffer_t & buffer, uint32_t start, uint32_t stop);
|
||||
void rglRdram2Framebuffer(rglRenderBuffer_t & buffer, uint32_t start, uint32_t stop);
|
||||
void rglRenderChunks(rglRenderBuffer_t * upto);
|
||||
void rglRenderChunks(int upto);
|
||||
float rglZscale(uint16_t z);
|
||||
|
||||
void rglSwapBuffers();
|
||||
|
||||
extern int screen_width, screen_height;
|
||||
|
||||
extern void check();
|
||||
|
||||
#endif
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#ifndef _RGL_ASSERT_H_
|
||||
#define _RGL_ASSERT_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef RGL_ASSERT
|
||||
inline void _rglAssert(int test, const char * s, int line, const char * file) {
|
||||
if (!test) {
|
||||
fprintf(stderr, "z64 assert failed (%s : %d) : %s\n", file, line, s);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
*(unsigned int *)0 = 0xdeadbeef; // hopefully will generate a segfault
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
#define rglAssert(test) _rglAssert((test), #test, __LINE__, __FILE__)
|
||||
#else
|
||||
#define rglAssert(test)
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,861 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#include "rdp.h"
|
||||
#include "rgl.h"
|
||||
|
||||
static const char *saRGBText[] =
|
||||
{
|
||||
"PREV", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "NOISE", "1",
|
||||
"0", "0", "0", "0",
|
||||
"0", "0", "0", "0"
|
||||
};
|
||||
|
||||
static const char *mRGBText[] =
|
||||
{
|
||||
"PREV", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "SCALE", "PREV_ALPHA",
|
||||
"TEXEL0_ALPHA", "TEXEL1_ALPHA", "PRIM_ALPHA", "SHADE_ALPHA",
|
||||
"ENV_ALPHA", "LOD_FRACTION", "PRIM_LOD_FRAC", "K5",
|
||||
"0", "0", "0", "0",
|
||||
"0", "0", "0", "0",
|
||||
"0", "0", "0", "0",
|
||||
"0", "0", "0", "0"
|
||||
};
|
||||
|
||||
static const char *aRGBText[] =
|
||||
{
|
||||
"PREV", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "1", "0",
|
||||
};
|
||||
|
||||
static const char *saAText[] =
|
||||
{
|
||||
"PREV", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "1", "0",
|
||||
};
|
||||
|
||||
static const char *sbAText[] =
|
||||
{
|
||||
"PREV", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "1", "0",
|
||||
};
|
||||
|
||||
static const char *mAText[] =
|
||||
{
|
||||
"LOD_FRACTION", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "PRIM_LOD_FRAC", "0",
|
||||
};
|
||||
|
||||
static const char *aAText[] =
|
||||
{
|
||||
"PREV", "TEXEL0", "TEXEL1", "PRIM",
|
||||
"SHADE", "ENV", "1", "0",
|
||||
};
|
||||
|
||||
const static char * bRGBText[] = { "PREV", "FRAG", "BLEND", "FOG" };
|
||||
const static char * bAText[2][4] = { {"PREVA", "FOGA", "SHADEA", "0"},
|
||||
{"(1.0-ALPHA)", "FRAGA", "1", "0"}};
|
||||
|
||||
char * rglCombiner2String(rdpState_t & state)
|
||||
{
|
||||
rdpOtherModes_t om = state.otherModes;
|
||||
int cycle = RDP_GETOM_CYCLE_TYPE(om);
|
||||
static char res[256];
|
||||
char * p = res;
|
||||
if (cycle < 2) {
|
||||
p += sprintf(
|
||||
p,
|
||||
"c = [ (%s - %s) * %s + %s | (%s - %s) * %s + %s ]\n",
|
||||
saRGBText[RDP_GETCM_SUB_A_RGB0(state.combineModes)],
|
||||
saRGBText[RDP_GETCM_SUB_B_RGB0(state.combineModes)],
|
||||
mRGBText[RDP_GETCM_MUL_RGB0(state.combineModes)],
|
||||
aRGBText[RDP_GETCM_ADD_RGB0(state.combineModes)],
|
||||
saAText[RDP_GETCM_SUB_A_A0(state.combineModes)],
|
||||
sbAText[RDP_GETCM_SUB_B_A0(state.combineModes)],
|
||||
mAText[RDP_GETCM_MUL_A0(state.combineModes)],
|
||||
aAText[RDP_GETCM_ADD_A0(state.combineModes)]);
|
||||
}
|
||||
if (cycle == 1) {
|
||||
p += sprintf(
|
||||
p,
|
||||
"c = [ (%s - %s) * %s + %s | (%s - %s) * %s + %s ]\n",
|
||||
saRGBText[RDP_GETCM_SUB_A_RGB1(state.combineModes)],
|
||||
saRGBText[RDP_GETCM_SUB_B_RGB1(state.combineModes)],
|
||||
mRGBText[RDP_GETCM_MUL_RGB1(state.combineModes)],
|
||||
aRGBText[RDP_GETCM_ADD_RGB1(state.combineModes)],
|
||||
saAText[RDP_GETCM_SUB_A_A1(state.combineModes)],
|
||||
sbAText[RDP_GETCM_SUB_B_A1(state.combineModes)],
|
||||
mAText[RDP_GETCM_MUL_A1(state.combineModes)],
|
||||
aAText[RDP_GETCM_ADD_A1(state.combineModes)]);
|
||||
}
|
||||
if (cycle < 2) {
|
||||
p += sprintf(
|
||||
p,
|
||||
"%s*%s + %s*%s\n"
|
||||
,bAText[0][RDP_GETOM_BLEND_M1B_0(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M1A_0(state.otherModes)],
|
||||
bAText[1][RDP_GETOM_BLEND_M2B_0(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M2A_0(state.otherModes)]
|
||||
);
|
||||
}
|
||||
if (cycle == 1) {
|
||||
p += sprintf(
|
||||
p,
|
||||
"%s*%s + %s*%s\n"
|
||||
,bAText[0][RDP_GETOM_BLEND_M1B_1(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M1A_1(state.otherModes)],
|
||||
bAText[1][RDP_GETOM_BLEND_M2B_1(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M2A_1(state.otherModes)]
|
||||
);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef RDP_DEBUG
|
||||
|
||||
#include <SDL.h>
|
||||
//#include <IL/il.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <FTGLTextureFont.h>
|
||||
|
||||
#define FONT "LucidaTypewriterRegular.ttf"
|
||||
#define SMALLFONT "LucidaTypewriterRegular.ttf"
|
||||
//#define SMALLFONT "/usr/share/fonts/corefonts/arial.ttf"
|
||||
#define FS 12
|
||||
#define SMALLFS 12
|
||||
|
||||
static FTFont * font;
|
||||
static FTFont * smallfont;
|
||||
static FTFont * curfont;
|
||||
|
||||
static int fbindex;
|
||||
static int chunkindex, stripindex;
|
||||
static int mx, my;
|
||||
static float scalex, scaley;
|
||||
static rglShader_t * alphaShader;
|
||||
|
||||
static int lines[0x10000], nblines;
|
||||
static char dasm[512];
|
||||
|
||||
void gglPrint(int x, int y, const char * text)
|
||||
{
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
glPushMatrix();
|
||||
glTranslatef(x, y, 0);
|
||||
|
||||
glEnable( GL_TEXTURE_2D);
|
||||
glDisable( GL_DEPTH_TEST);
|
||||
//glRasterPos2i( x , y);
|
||||
curfont->Render(text);
|
||||
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
|
||||
//printf("%s\n", text);
|
||||
}
|
||||
|
||||
void gglPrintf(int x, int y, const char * s, ...)
|
||||
{
|
||||
char buf[1024];
|
||||
va_list ap;
|
||||
va_start(ap, s);
|
||||
vsprintf(buf, s, ap);
|
||||
va_end(ap);
|
||||
gglPrint(x, y, buf);
|
||||
}
|
||||
|
||||
void rglDisplayTrace(int x, int y, int start, int lines)
|
||||
{
|
||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||
rglUseShader(0);
|
||||
curfont = smallfont;
|
||||
start = ::lines[start];
|
||||
while (lines-->0 && start <= rdpTracePos) {
|
||||
glColor4f(0,0,0, 0.5);
|
||||
glEnable(GL_BLEND);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex2f(x, y);
|
||||
glVertex2f(x+2*screen_width*3/4, y);
|
||||
glVertex2f(x, y-(SMALLFS+2));
|
||||
glVertex2f(x+2*screen_width*3/4, y-(SMALLFS+2));
|
||||
glEnd();
|
||||
|
||||
glColor4f(1,1,0.5,1);
|
||||
glDisable(GL_BLEND);
|
||||
start += rdp_dasm(rdpTraceBuf, start, start+256, dasm)/4;
|
||||
gglPrintf(x, y-(SMALLFS), "%4x %s", start, dasm);
|
||||
y -= (SMALLFS+2);
|
||||
}
|
||||
curfont = font;
|
||||
// glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
void rglDisplayColor(uint32_t color, int x , int y, const char * name, int sixteen = 0)
|
||||
{
|
||||
float r, g, b, a;
|
||||
if (sixteen) {
|
||||
r = RDP_GETC16_R(color)/ 31.0f;
|
||||
g = RDP_GETC16_G(color)/ 31.0f;
|
||||
b = RDP_GETC16_B(color)/ 31.0f;
|
||||
a = RDP_GETC16_A(color)/ 1.0f;
|
||||
} else {
|
||||
r = RDP_GETC32_R(color)/255.0f;
|
||||
g = RDP_GETC32_G(color)/255.0f;
|
||||
b = RDP_GETC32_B(color)/255.0f;
|
||||
a = RDP_GETC32_A(color)/255.0f;
|
||||
}
|
||||
y -= FS+2;
|
||||
glColor4f(r, g, b, 1);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex2f(x, y);
|
||||
glVertex2f(x+128, y);
|
||||
glVertex2f(x, y-16);
|
||||
glVertex2f(x+128, y-16);
|
||||
glEnd();
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glColor4f(1,1,1,1);
|
||||
gglPrintf(x, y+2, "%5s %08x", name, color);
|
||||
|
||||
}
|
||||
|
||||
void rglDisplayChunkInfo(rglRenderChunk_t & chunk)
|
||||
{
|
||||
int x = 0, y = screen_height;
|
||||
int i;
|
||||
rdpState_t & state = chunk.rdpState;
|
||||
rdpOtherModes_t om = state.otherModes;
|
||||
rdpCombineModes_t cm = state.combineModes;
|
||||
int cycle = RDP_GETOM_CYCLE_TYPE(om);
|
||||
|
||||
rglDisplayColor(chunk.rdpState.primColor, x, y, "prim");
|
||||
y -= 16+FS+10;
|
||||
rglDisplayColor(chunk.rdpState.blendColor, x, y, "blend");
|
||||
y -= 16+FS+10;
|
||||
rglDisplayColor(chunk.rdpState.envColor, x, y, "env");
|
||||
y -= 16+FS+10;
|
||||
rglDisplayColor(chunk.rdpState.fogColor, x, y, "fog");
|
||||
y -= 16+FS+10;
|
||||
rglDisplayColor(chunk.rdpState.fillColor, x, y, "fill", 1);
|
||||
y -= 16+FS+10;
|
||||
|
||||
y += 5*(16+FS+10);
|
||||
x += 128+20;
|
||||
|
||||
glColor4f(1,1,1,1);
|
||||
int oldy = y;
|
||||
for (i=0; i<8; i++) {
|
||||
int j;
|
||||
int oldx = x;
|
||||
if (!(chunk.flags & (1<<i))) continue;
|
||||
rglTile_t & tile = chunk.tiles[i];
|
||||
int w = tile.w, h = tile.h;
|
||||
if (w > 64) w = 64;
|
||||
if (h > 64) h = 64;
|
||||
gglPrintf(x, y-h-FS, "#%d %dx%d %x", i, tile.w, tile.h, tile.hiresBuffer? 0 : tile.tex->crc);
|
||||
gglPrintf(x, y-h-2*FS, "fmt %s-%d %d %d", rdpImageFormats[tile.format], tile.size, tile.line, tile.hiresBuffer? tile.hiresBuffer-rBuffers : -1);
|
||||
gglPrintf(x, y-h-3*FS, "clip %dx%d %dx%d", tile.sl, tile.tl, tile.sh, tile.th);
|
||||
gglPrintf(x, y-h-4*FS, "mask %dx%d shift %dx%d", tile.mask_s, tile.mask_t, tile.shift_s, tile.shift_t);
|
||||
gglPrintf(x, y-h-5*FS, "%d %d %d %d pal %d", tile.cs, tile.ms, tile.ct, tile.ms, tile.palette);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
if (tile.hiresBuffer)
|
||||
glBindTexture(GL_TEXTURE_2D, tile.hiresBuffer->texid);
|
||||
else
|
||||
glBindTexture(GL_TEXTURE_2D, tile.tex->id);
|
||||
for (j=0; j<2; j++) {
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glTexCoord2f(0, 0); glVertex2f(x, y);
|
||||
glTexCoord2f(0, 1); glVertex2f(x, y-h);
|
||||
glTexCoord2f(1, 0); glVertex2f(x+w, y);
|
||||
glTexCoord2f(1, 1); glVertex2f(x+w, y-h);
|
||||
glEnd();
|
||||
rglUseShader(alphaShader);
|
||||
x += w+2;
|
||||
}
|
||||
rglUseShader(0);
|
||||
// if ((tile.w+2)*2 < 256)
|
||||
// x += 256 - (tile.w+2)*2;
|
||||
x = oldx;
|
||||
y -= h + 5*FS + 5;
|
||||
}
|
||||
|
||||
y = oldy;
|
||||
x = 128+210;
|
||||
|
||||
y -= FS;
|
||||
gglPrintf(x, y, "cycle %d persp %d detail %d sharpen %d tex_lod %d en_tlut %d tlut_type %d clipm %d",
|
||||
RDP_GETOM_CYCLE_TYPE(om),
|
||||
RDP_GETOM_PERSP_TEX_EN(om),
|
||||
RDP_GETOM_DETAIL_TEX_EN(om),
|
||||
RDP_GETOM_SHARPEN_TEX_EN(om),
|
||||
RDP_GETOM_TEX_LOD_EN(om),
|
||||
RDP_GETOM_EN_TLUT(om),
|
||||
RDP_GETOM_TLUT_TYPE(om),
|
||||
chunk.rdpState.clipMode);
|
||||
|
||||
y -= FS;
|
||||
gglPrintf(x, y, "sample_type %d mid %d lerp0 %d lerp1 %d convert1 %d key_en %d rgb_dith_sel %d",
|
||||
RDP_GETOM_SAMPLE_TYPE(om),
|
||||
RDP_GETOM_MID_TEXEL(om),
|
||||
RDP_GETOM_BI_LERP0(om),
|
||||
RDP_GETOM_BI_LERP1(om),
|
||||
RDP_GETOM_CONVERT_ONE(om),
|
||||
RDP_GETOM_KEY_EN(om),
|
||||
RDP_GETOM_RGB_DITHER_SEL(om));
|
||||
|
||||
y -= FS;
|
||||
gglPrintf(x, y, "A_dith_sel %d force_blend %d A_cvg_sel %d cvgXA %d Zmode %d cvg_dest %d col_on %d",
|
||||
RDP_GETOM_ALPHA_DITHER_SEL(om),
|
||||
RDP_GETOM_FORCE_BLEND(om),
|
||||
RDP_GETOM_ALPHA_CVG_SELECT(om),
|
||||
RDP_GETOM_CVG_TIMES_ALPHA(om),
|
||||
RDP_GETOM_Z_MODE(om),
|
||||
RDP_GETOM_CVG_DEST(om),
|
||||
RDP_GETOM_COLOR_ON_CVG(om));
|
||||
|
||||
y -= FS;
|
||||
gglPrintf(x, y, "img_read %d Zupdate %d Zcmp_sel %d antialias %d Zsource %d dith_A_en %d A_cmp %d",
|
||||
RDP_GETOM_IMAGE_READ_EN(om),
|
||||
RDP_GETOM_Z_UPDATE_EN(om),
|
||||
RDP_GETOM_Z_COMPARE_EN(om),
|
||||
RDP_GETOM_ANTIALIAS_EN(om),
|
||||
RDP_GETOM_Z_SOURCE_SEL(om),
|
||||
RDP_GETOM_DITHER_ALPHA_EN(om),
|
||||
RDP_GETOM_ALPHA_COMPARE_EN(om));
|
||||
|
||||
y -= 2*FS;
|
||||
|
||||
if (cycle < 2) {
|
||||
gglPrintf(x, y,
|
||||
"c = [ (%s - %s) * %s + %s | (%s - %s) * %s + %s ];",
|
||||
saRGBText[RDP_GETCM_SUB_A_RGB0(state.combineModes)],
|
||||
saRGBText[RDP_GETCM_SUB_B_RGB0(state.combineModes)],
|
||||
mRGBText[RDP_GETCM_MUL_RGB0(state.combineModes)],
|
||||
aRGBText[RDP_GETCM_ADD_RGB0(state.combineModes)],
|
||||
saAText[RDP_GETCM_SUB_A_A0(state.combineModes)],
|
||||
sbAText[RDP_GETCM_SUB_B_A0(state.combineModes)],
|
||||
mAText[RDP_GETCM_MUL_A0(state.combineModes)],
|
||||
aAText[RDP_GETCM_ADD_A0(state.combineModes)]);
|
||||
|
||||
y -= FS;
|
||||
}
|
||||
if (cycle == 1) {
|
||||
//if (cycle < 2) {
|
||||
gglPrintf(x, y,
|
||||
"c = [ (%s - %s) * %s + %s | (%s - %s) * %s + %s ];",
|
||||
saRGBText[RDP_GETCM_SUB_A_RGB1(state.combineModes)],
|
||||
saRGBText[RDP_GETCM_SUB_B_RGB1(state.combineModes)],
|
||||
mRGBText[RDP_GETCM_MUL_RGB1(state.combineModes)],
|
||||
aRGBText[RDP_GETCM_ADD_RGB1(state.combineModes)],
|
||||
saAText[RDP_GETCM_SUB_A_A1(state.combineModes)],
|
||||
sbAText[RDP_GETCM_SUB_B_A1(state.combineModes)],
|
||||
mAText[RDP_GETCM_MUL_A1(state.combineModes)],
|
||||
aAText[RDP_GETCM_ADD_A1(state.combineModes)]);
|
||||
|
||||
y -= FS;
|
||||
}
|
||||
if (cycle < 2) {
|
||||
gglPrintf(x, y,
|
||||
"%s*%s + %s*%s"
|
||||
,bAText[0][RDP_GETOM_BLEND_M1B_0(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M1A_0(state.otherModes)],
|
||||
bAText[1][RDP_GETOM_BLEND_M2B_0(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M2A_0(state.otherModes)]
|
||||
);
|
||||
|
||||
y -= FS;
|
||||
}
|
||||
if (cycle == 1) {
|
||||
//if (cycle < 2) {
|
||||
gglPrintf(x, y,
|
||||
"%s*%s + %s*%s"
|
||||
,bAText[0][RDP_GETOM_BLEND_M1B_1(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M1A_1(state.otherModes)],
|
||||
bAText[1][RDP_GETOM_BLEND_M2B_1(state.otherModes)],
|
||||
bRGBText[RDP_GETOM_BLEND_M2A_1(state.otherModes)]
|
||||
);
|
||||
|
||||
y -= FS;
|
||||
}
|
||||
|
||||
if (chunk.nbStrips) {
|
||||
y -= FS;
|
||||
rglStrip_t & strip = chunk.strips[chunkindex >= 0? stripindex:0];
|
||||
|
||||
int i;
|
||||
for (i=0; i<strip.nbVtxs; i++) {
|
||||
rglVertex_t vtx = strip.vtxs[i];
|
||||
int oldx;
|
||||
gglPrintf(x, y, "%g %g %g %g", vtx.x, vtx.y, vtx.z, vtx.w);
|
||||
x += 256;
|
||||
if (strip.flags & RGL_STRIP_SHADE) {
|
||||
gglPrintf(x, y, "%d %d %d %d", vtx.r, vtx.g, vtx.b, vtx.a);
|
||||
x += 200;
|
||||
}
|
||||
if (strip.flags & (RGL_STRIP_TEX1|RGL_STRIP_TEX2)) {
|
||||
gglPrintf(x, y, "%g %g", vtx.s, vtx.t);
|
||||
x += 192;
|
||||
}
|
||||
y -= FS;
|
||||
x = oldx;
|
||||
}
|
||||
}
|
||||
|
||||
// LOG("missing om %x %x (%x %x)\n",
|
||||
// chunk.rdpState.otherModes.w1&RDP_OM_MISSING1,
|
||||
// chunk.rdpState.otherModes.w2&RDP_OM_MISSING2,
|
||||
// RDP_OM_MISSING1,
|
||||
// RDP_OM_MISSING2);
|
||||
// LOG("missing cm %x %x\n",
|
||||
// chunk.rdpState.combineModes.w1&~(RDP_COMBINE_MASK11|RDP_COMBINE_MASK21),
|
||||
// chunk.rdpState.combineModes.w2&~(RDP_COMBINE_MASK12|RDP_COMBINE_MASK22));
|
||||
}
|
||||
|
||||
void rglDisplayFramebuffer(rglRenderBuffer_t & buffer, int alpha)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (alpha)
|
||||
rglUseShader(alphaShader);
|
||||
else
|
||||
rglUseShader(rglCopyShader);
|
||||
glBindTexture(GL_TEXTURE_2D, buffer.texid);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_BLEND);
|
||||
glColor4ub(255, 255, 255, 255);
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glTexCoord2f(1, 1); glVertex2f(1, 0);
|
||||
glTexCoord2f(0, 1); glVertex2f(0, 0);
|
||||
glTexCoord2f(1, 0); glVertex2f(1, 1);
|
||||
glTexCoord2f(0, 0); glVertex2f(0, 1);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
void rglDisplayFlat(rglRenderChunk_t & chunk)
|
||||
{
|
||||
int j;
|
||||
rglRenderBuffer_t & buffer = *chunk.renderBuffer;
|
||||
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
//glEnable(GL_SCISSOR_TEST);
|
||||
rglUseShader(0);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_CULL_FACE);
|
||||
|
||||
// glScissor((chunk.rdpState.clip.xh >>2)*buffer.realWidth/buffer.width,
|
||||
// (chunk.rdpState.clip.yh >>2)*buffer.realHeight/buffer.height,
|
||||
// (chunk.rdpState.clip.xl-chunk.rdpState.clip.xh >>2)*buffer.realWidth/buffer.width,
|
||||
// (chunk.rdpState.clip.yl-chunk.rdpState.clip.yh >>2)*buffer.realHeight/buffer.height);
|
||||
|
||||
|
||||
for (j=0; j<chunk.nbStrips; j++) {
|
||||
rglStrip_t & strip = chunk.strips[j];
|
||||
int k;
|
||||
|
||||
if (chunkindex >= 0 && j == stripindex) {
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
glColor4ub(255, 255, 128, 255);
|
||||
}
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
for (k=0; k<strip.nbVtxs; k++) {
|
||||
glVertex2f((strip.vtxs[k].x/(buffer.width)),
|
||||
1-(strip.vtxs[k].y/(buffer.height)));
|
||||
}
|
||||
glEnd();
|
||||
if (chunkindex >= 0 && j == stripindex)
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
int rglFindStrip(rglRenderChunk_t & chunk, float mx, float my)
|
||||
{
|
||||
int j;
|
||||
rglRenderBuffer_t & buffer = *chunk.renderBuffer;
|
||||
for (j=chunk.nbStrips-1; j>=0; j--) {
|
||||
rglStrip_t & strip = chunk.strips[j];
|
||||
int k;
|
||||
struct { float x, y; } s[3];
|
||||
|
||||
for (k=0; k<strip.nbVtxs; k++) {
|
||||
s[0] = s[1];
|
||||
s[1] = s[2];
|
||||
s[2].x = strip.vtxs[k].x/(buffer.width);
|
||||
s[2].y = 1 - strip.vtxs[k].y/(buffer.height);
|
||||
if (k >= 2) {
|
||||
float last = 0;
|
||||
int i;
|
||||
for (i=0; i<3; i++) {
|
||||
float dx1 = s[(i+1)%3].x - s[i].x;
|
||||
float dy1 = s[(i+1)%3].y - s[i].y;
|
||||
float dx2 = mx - s[i].x;
|
||||
float dy2 = my - s[i].y;
|
||||
dx1 = dx1*dy2-dx2*dy1;
|
||||
if (dx1 == 0) goto next;
|
||||
if (last*dx1 < 0)
|
||||
goto next;
|
||||
last = dx1;
|
||||
}
|
||||
stripindex = j;
|
||||
return j;
|
||||
next:;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void rglDisplayFlat(rglRenderBuffer_t & buffer)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<nbChunks; i++) {
|
||||
rglRenderChunk_t & chunk = chunks[i];
|
||||
if (chunk.renderBuffer != &buffer) continue;
|
||||
rglDisplayFlat(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
int rglFindChunk(rglRenderBuffer_t & buffer, float mx, float my)
|
||||
{
|
||||
int i;
|
||||
if (chunkindex <= 0)
|
||||
i = nbChunks-1;
|
||||
else
|
||||
i = chunkindex-1;
|
||||
for (; i>=0; i--) {
|
||||
rglRenderChunk_t & chunk = chunks[i];
|
||||
if (chunk.renderBuffer != &buffer) continue;
|
||||
if (rglFindStrip(chunk, mx, my) >= 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void rglShowCursor(int state)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#else
|
||||
SDL_ShowCursor(state);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
static int keys[512];
|
||||
#define MOUSEBUT 511
|
||||
#else
|
||||
# define MOUSEBUT VK_LBUTTON
|
||||
# define SDLK_ESCAPE VK_ESCAPE
|
||||
# define SDLK_KP_PLUS VK_ADD
|
||||
# define SDLK_KP_MINUS VK_SUBTRACT
|
||||
# define SDLK_TAB VK_TAB
|
||||
# define SDLK_UP VK_UP
|
||||
# define SDLK_DOWN VK_DOWN
|
||||
# define SDLK_PAGEUP VK_PRIOR
|
||||
# define SDLK_PAGEDOWN VK_NEXT
|
||||
#endif
|
||||
|
||||
int rglCheckKey(int key)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return GetAsyncKeyState (key) & 1;
|
||||
#else
|
||||
if (key >= 'A' && key <= 'Z') key += 'a' - 'A';
|
||||
int res = keys[key];
|
||||
keys[key] = 0;
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
|
||||
void rglDebugger()
|
||||
{
|
||||
SDL_Event event;
|
||||
int paused = 1;
|
||||
int i, j;
|
||||
int traceX = 1;
|
||||
int tracepos = 0;
|
||||
int tracepage = (screen_height*3/4)/(SMALLFS+2);
|
||||
int oldchunkindex = -1;
|
||||
|
||||
fbindex = 0;
|
||||
chunkindex = -1;
|
||||
|
||||
void rglInitDebugger();
|
||||
rglInitDebugger();
|
||||
|
||||
rglShowCursor(SDL_ENABLE);
|
||||
|
||||
glActiveTextureARB(GL_TEXTURE1_ARB);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glActiveTextureARB(GL_TEXTURE2_ARB);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
glDrawBuffer(GL_BACK);
|
||||
|
||||
for (i=nblines=0; i<=rdpTracePos; i += rdp_dasm(rdpTraceBuf, i, i+256, dasm)/4, nblines++)
|
||||
lines[nblines] = i;
|
||||
|
||||
if (nbChunks > 1)
|
||||
// skip chunk 0 as it's usually depth clear
|
||||
fbindex = chunks[1].renderBuffer - rBuffers;
|
||||
|
||||
while (paused) {
|
||||
#ifndef WIN32
|
||||
int res = SDL_WaitEvent(&event);
|
||||
while (res) {
|
||||
switch (event.type) {
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
keys[MOUSEBUT] = 1;
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
keys[MOUSEBUT] = 0;
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
if (event.key.keysym.sym < MOUSEBUT)
|
||||
keys[event.key.keysym.sym] = 1;
|
||||
break;
|
||||
case SDL_KEYUP:
|
||||
if (event.key.keysym.sym < MOUSEBUT)
|
||||
keys[event.key.keysym.sym] = 0;
|
||||
break;
|
||||
}
|
||||
res = SDL_PollEvent(&event);
|
||||
}
|
||||
#endif
|
||||
rglRenderBuffer_t & buffer = rBuffers[fbindex];
|
||||
scalex = buffer.realWidth; scaley = buffer.realHeight;
|
||||
|
||||
if (rBuffers[fbindex].fbid) {
|
||||
if (buffer.realWidth > scalex*3/4 ||
|
||||
buffer.realHeight > scaley*3/4) {
|
||||
scalex = scalex*3/4;
|
||||
scaley = scaley*3/4;
|
||||
}
|
||||
}
|
||||
|
||||
if (rglCheckKey(MOUSEBUT)) {
|
||||
if (buffer.fbid) {
|
||||
#ifdef WIN32
|
||||
POINT pt;
|
||||
GetCursorPos(&pt);
|
||||
mx = pt.x;
|
||||
my = pt.y;
|
||||
#else
|
||||
SDL_GetMouseState(&mx, &my);
|
||||
#endif
|
||||
int old = chunkindex;
|
||||
if (old >= 0)
|
||||
chunkindex++;
|
||||
chunkindex = rglFindChunk(buffer, float(mx)/scalex, float(screen_height - my)/scaley);
|
||||
if (old >= 0 && chunkindex == old) {
|
||||
} else {
|
||||
chunkindex = -1;
|
||||
}
|
||||
chunkindex = rglFindChunk(buffer, float(mx)/scalex, float(screen_height - my)/scaley);
|
||||
if (chunkindex >= 0 && nbChunks)
|
||||
printf("%s\n", chunks[chunkindex].shader->fsrc);
|
||||
}
|
||||
}
|
||||
if (rglCheckKey('P') || rglCheckKey(SDLK_ESCAPE))
|
||||
paused = 0;
|
||||
if (rglCheckKey(SDLK_KP_PLUS)) {
|
||||
if (fbindex < MAX_RENDER_BUFFERS-1/* &&
|
||||
rBuffers[fbindex+1].fbid*/)
|
||||
fbindex++;
|
||||
chunkindex = -1;
|
||||
}
|
||||
if (rglCheckKey(SDLK_KP_MINUS)) {
|
||||
if (fbindex > 0/* &&
|
||||
rBuffers[fbindex-1].fbid*/)
|
||||
fbindex--;
|
||||
chunkindex = -1;
|
||||
}
|
||||
if (rglCheckKey(SDLK_TAB))
|
||||
traceX = !traceX;
|
||||
if (rglCheckKey(SDLK_UP))
|
||||
tracepos--;
|
||||
if (rglCheckKey(SDLK_DOWN))
|
||||
tracepos++;
|
||||
if (rglCheckKey(SDLK_PAGEUP))
|
||||
tracepos -= tracepage/2;
|
||||
if (rglCheckKey(SDLK_PAGEDOWN))
|
||||
tracepos += tracepage/2;
|
||||
if (tracepos < 0)
|
||||
tracepos = 0;
|
||||
if (tracepos > nblines-tracepage/2)
|
||||
tracepos = nblines-tracepage/2;
|
||||
|
||||
//rglRenderChunks();
|
||||
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
glDrawBuffer(GL_BACK);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
glActiveTextureARB(GL_TEXTURE1_ARB);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
|
||||
glClearColor(0, 0, 0, 0);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
if (buffer.fbid) {
|
||||
//glViewport(0, 0, scalex*screen_width/buffer.realWidth, scaley*screen_height/buffer.realHeight);
|
||||
glViewport(0, 0, scalex, scaley);
|
||||
rglDisplayFramebuffer(buffer, 0);
|
||||
glViewport(scalex, 0, scalex, scaley);
|
||||
rglDisplayFramebuffer(buffer, 1);
|
||||
|
||||
glViewport(0, 0, scalex, scaley);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
glEnable(GL_BLEND);
|
||||
//glBlendFunc( GL_ONE, GL_ONE );
|
||||
glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_DST_COLOR);
|
||||
if (chunkindex < 0) {
|
||||
//glColor4f(0.1, 0, 0.1, 0.5);
|
||||
glColor4f(0.6, 0, 0.6, 0.5);
|
||||
rglDisplayFlat(buffer);
|
||||
} else {
|
||||
glColor4f(0.6, 0, 0.6, 0.5);
|
||||
rglDisplayFlat(chunks[chunkindex]);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
|
||||
glMatrixMode( GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
gluOrtho2D(0, screen_width, 0, screen_height);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
glViewport(0, 0, screen_width, screen_height);
|
||||
rglUseShader(0);
|
||||
|
||||
glColor3f(1,0.5,0.5);
|
||||
gglPrintf(0, 0, "Fb #%d at $%x --> %x (%dx%d fmt %s-%d) upto %d %s", fbindex,
|
||||
buffer.addressStart, buffer.addressStop,
|
||||
buffer.width, buffer.height,
|
||||
(buffer.flags & RGL_RB_DEPTH)? "Z":rdpImageFormats[buffer.format], buffer.size,
|
||||
buffer.chunkId,
|
||||
(buffer.flags & RGL_RB_ERASED)? "ERASED":"");
|
||||
|
||||
if (chunkindex >= 0) {
|
||||
gglPrintf(0, FS, "Chunk #%d", chunkindex);
|
||||
|
||||
rglDisplayChunkInfo(chunks[chunkindex]);
|
||||
}
|
||||
|
||||
if (oldchunkindex != chunkindex) {
|
||||
oldchunkindex = chunkindex;
|
||||
if (chunkindex >= 0)
|
||||
for (i=0; i<nblines; i++)
|
||||
if (lines[i] == chunks[chunkindex].tracePos)
|
||||
tracepos = i;
|
||||
}
|
||||
rglDisplayTrace(traceX*scalex, screen_height*3/4, tracepos, tracepage);
|
||||
|
||||
glMatrixMode( GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
rglSwapBuffers();
|
||||
}
|
||||
|
||||
rglShowCursor(SDL_DISABLE);
|
||||
}
|
||||
|
||||
void rglCloseDebugger()
|
||||
{
|
||||
if (font) {
|
||||
delete font;
|
||||
font = 0;
|
||||
}
|
||||
if (smallfont) {
|
||||
delete smallfont;
|
||||
smallfont = 0;
|
||||
}
|
||||
if (alphaShader) {
|
||||
rglDeleteShader(alphaShader);
|
||||
alphaShader = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void rglInitDebugger()
|
||||
{
|
||||
if (!font) {
|
||||
char s[1024];
|
||||
extern char rgl_cwd[512];
|
||||
sprintf(s, "%s/"FONT, rgl_cwd);
|
||||
curfont = font = new FTGLTextureFont(s);
|
||||
sprintf(s, "%s/"SMALLFONT, rgl_cwd);
|
||||
smallfont = new FTGLTextureFont(s);
|
||||
if (!font || !smallfont) {
|
||||
LOGERROR("Couldn't load font '%s'\n", s);
|
||||
return;
|
||||
}
|
||||
font->FaceSize(FS);
|
||||
smallfont->FaceSize(SMALLFS);
|
||||
}
|
||||
|
||||
if (!alphaShader) {
|
||||
alphaShader = rglCreateShader(
|
||||
"void main() \n"
|
||||
"{ \n"
|
||||
" gl_Position = ftransform(); \n"
|
||||
" gl_FrontColor = gl_Color; \n"
|
||||
" gl_TexCoord[0] = gl_MultiTexCoord0; \n"
|
||||
"} \n"
|
||||
,
|
||||
"uniform sampler2D texture0; \n"
|
||||
" \n"
|
||||
"void main() \n"
|
||||
"{ \n"
|
||||
" gl_FragColor = gl_Color * texture2D(texture0, vec2(gl_TexCoord[0])).a; \n"
|
||||
"} \n"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void rdpBacktrace()
|
||||
{
|
||||
int i=0;
|
||||
while (i <= rdpTracePos) {
|
||||
i += rdp_dasm(rdpTraceBuf, i, i+256, dasm)/4;
|
||||
printf("%4x %s\n", i, dasm);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,576 +0,0 @@
|
|||
/*
|
||||
* z64
|
||||
*
|
||||
* Copyright (C) 2007 ziggy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
**/
|
||||
|
||||
#include "rdp.h"
|
||||
#include "rgl.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
inline float _zscale(uint16_t z)
|
||||
{
|
||||
uint32_t res;
|
||||
int e = z>>(16-3);
|
||||
int m = (z>>2)&((1<<11)-1);
|
||||
|
||||
static struct {
|
||||
int shift;
|
||||
long add;
|
||||
} z_format[8] = {
|
||||
{6, 0x00000},
|
||||
{5, 0x20000},
|
||||
{4, 0x30000},
|
||||
{3, 0x38000},
|
||||
{2, 0x3c000},
|
||||
{1, 0x3e000},
|
||||
{0, 0x3f000},
|
||||
{0, 0x3f800},
|
||||
};
|
||||
|
||||
res = (m << z_format[e].shift) +
|
||||
z_format[e].add;
|
||||
return float(res)/0x3ffff;
|
||||
}
|
||||
|
||||
inline float zscale(uint16_t z)
|
||||
{
|
||||
return float(z)/0xffff;
|
||||
}
|
||||
//#define zscale _zscale
|
||||
|
||||
float rglZscale(uint16_t z)
|
||||
{
|
||||
return _zscale(z);
|
||||
}
|
||||
|
||||
void rglTextureRectangle(rdpTexRect_t * rect, int flip)
|
||||
{
|
||||
int tilenum = rect->tilenum;
|
||||
int x1,x2,y1,y2,z;
|
||||
int s, t;
|
||||
int dx, dy;
|
||||
|
||||
// if (tilenum == 7) {
|
||||
// LOG("Fixing tilenum from 7 to 0\n");
|
||||
// tilenum = 0;
|
||||
// }
|
||||
|
||||
x1 = (rect->xh);
|
||||
x2 = (rect->xl);
|
||||
y1 = (rect->yh);
|
||||
y2 = (rect->yl);
|
||||
s = int(rect->s)<<5;
|
||||
t = int(rect->t)<<5;
|
||||
|
||||
DUMP("texrect %d x %d --> %d x %d s %d t %d flip %d\n",
|
||||
x1, y1, x2, y2, s, t, flip);
|
||||
|
||||
if (RDP_GETOM_CYCLE_TYPE(rdpState.otherModes) == RDP_CYCLE_TYPE_FILL ||
|
||||
RDP_GETOM_CYCLE_TYPE(rdpState.otherModes) == RDP_CYCLE_TYPE_COPY)
|
||||
{
|
||||
rect->dsdx /= 4;
|
||||
//s /= 4;
|
||||
x2 += 4;
|
||||
y2 += 4;
|
||||
} else {
|
||||
x2 += 1;
|
||||
y2 += 1;
|
||||
}
|
||||
|
||||
x1 /= 4;
|
||||
x2 /= 4;
|
||||
y1 /= 4;
|
||||
y2 /= 4;
|
||||
|
||||
if (x2 < x1) x2 = x1+1; // black gauge in SCARS (E)
|
||||
|
||||
int t1 = rglT1Usage(rdpState)? RGL_STRIP_TEX1:0;
|
||||
int t2 = (rect->tilenum < 7 && rglT2Usage(rdpState))? RGL_STRIP_TEX2:0;
|
||||
if (t1)
|
||||
rglPrepareRendering(1, (tilenum==7 && RDP_GETOM_CYCLE_TYPE(rdpState.otherModes)==1)? 0:tilenum, y2-y1, 1);
|
||||
if (t2)
|
||||
rglPrepareRendering(1, tilenum+1, y2-y1, 1);
|
||||
else if (!t1)
|
||||
rglPrepareRendering(0, 0, 0, 1);
|
||||
|
||||
// TO BE REMOVED when we implement depth texture writing
|
||||
curRBuffer->flags |= RGL_RB_HASTRIANGLES;
|
||||
|
||||
// TO CHECK should this before or after the rescaling above ?
|
||||
// s -= (rdpTiles[tilenum].sl << 8);
|
||||
// t -= (rdpTiles[tilenum].tl << 8);
|
||||
// if (/*!tile.ms && */tile.mask_s)
|
||||
// s &= (1<<tile.mask_s+10) - 1;
|
||||
// if (/*!tile.mt && */tile.mask_t)
|
||||
// t &= (1<<tile.mask_t+10) - 1;
|
||||
|
||||
#define XSCALE(x) (float(x))
|
||||
#define YSCALE(y) (float(y))
|
||||
#define ZSCALE(z) (zscale(z))
|
||||
#define SSCALE(s) (float(s)/(1 << 10))
|
||||
#define TSCALE(s) (float(s)/(1 << 10))
|
||||
// #define glTexCoord2f(s, t) printf("tex %g %g\n", s, t), glTexCoord2f(s, t)
|
||||
// #define glVertex3f(s, t, z) printf("vert %g %g %g\n", s, t, z), glVertex3f(s, t, z)
|
||||
|
||||
dx = x2 - x1;
|
||||
dy = y2 - y1;
|
||||
if (RDP_GETOM_Z_SOURCE_SEL(rdpState.otherModes))
|
||||
z = rdpState.primitiveZ;
|
||||
else
|
||||
z = 0xffff;
|
||||
// if (dump)
|
||||
// fprintf(stderr, "fillrect cycle %d\n", other_modes.cycle_type);
|
||||
|
||||
rglStrip_t * strip = strips + nbStrips++;
|
||||
rglAssert(nbStrips < MAX_STRIPS);
|
||||
curChunk->nbStrips++;
|
||||
rglVertex_t * vtx = vtxs + nbVtxs;
|
||||
|
||||
strip->flags = t1 | t2 | RGL_STRIP_ZBUFFER;
|
||||
strip->vtxs = vtx;
|
||||
strip->tilenum = tilenum;
|
||||
|
||||
float s2, tr;
|
||||
s2 = s+int(rect->dsdx)*dx;
|
||||
tr = t+int(rect->dtdy)*dy;
|
||||
//LOG("%d %d\n", rect->dsdx, rect->dtdy);
|
||||
if (0 && RDP_GETOM_CYCLE_TYPE(rdpState.otherModes) < 2)
|
||||
{
|
||||
//if (rect->dsdx == (1<<10))
|
||||
{
|
||||
s += 1<<9;
|
||||
s2 -= 1<<9;
|
||||
}
|
||||
//if (rect->dtdy == (1<<10))
|
||||
{
|
||||
t += 1<<9;
|
||||
tr -= 1<<9;
|
||||
}
|
||||
}
|
||||
|
||||
if (flip) { vtx->t = SSCALE(s2); vtx->s = TSCALE(t);
|
||||
} else { vtx->s = SSCALE(s2); vtx->t = TSCALE(t); }
|
||||
vtx->x = XSCALE(x2); vtx->y = YSCALE(y1); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
if (flip) { vtx->t = SSCALE(s); vtx->s = TSCALE(t);
|
||||
} else { vtx->s = SSCALE(s); vtx->t = TSCALE(t); }
|
||||
vtx->x = XSCALE(x1); vtx->y = YSCALE(y1); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
if (flip) { vtx->t = SSCALE(s2); vtx->s = TSCALE(tr);
|
||||
} else { vtx->s = SSCALE(s2); vtx->t = TSCALE(tr); }
|
||||
vtx->x = XSCALE(x2); vtx->y = YSCALE(y2); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
if (flip) { vtx->t = SSCALE(s); vtx->s = TSCALE(tr);
|
||||
} else { vtx->s = SSCALE(s); vtx->t = TSCALE(tr); }
|
||||
vtx->x = XSCALE(x1); vtx->y = YSCALE(y2); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
|
||||
strip->nbVtxs = vtx - strip->vtxs;
|
||||
nbVtxs = vtx - vtxs;
|
||||
}
|
||||
|
||||
void rglFillRectangle(rdpRect_t * rect)
|
||||
{
|
||||
int x1,x2,y1,y2,z;
|
||||
//int s, t;
|
||||
//int dx, dy;
|
||||
|
||||
rglPrepareRendering(0, 0, 0, 1);
|
||||
DUMP("fillrect curRBuffer->flags %x %x %x\n", curRBuffer->flags, curRBuffer->addressStart, rdpZbAddress);
|
||||
// if (/*(curRBuffer->flags & RGL_RB_DEPTH) &&*/
|
||||
// RDP_GETOM_CYCLE_TYPE(rdpState.otherModes) == RDP_CYCLE_TYPE_FILL &&
|
||||
// rect->xh-4 <= rdpState.clip.xh && rect->xl+8 >= rdpState.clip.xl &&
|
||||
// rect->yh-4 <= rdpState.clip.yh && rect->yl+8 >= rdpState.clip.yl
|
||||
// ) {
|
||||
// curChunk->flags |= RGL_CHUNK_CLEAR;
|
||||
// return;
|
||||
// }
|
||||
|
||||
x1 = (rect->xh / 4);
|
||||
x2 = (rect->xl / 4);
|
||||
y1 = (rect->yh / 4);
|
||||
y2 = (rect->yl / 4);
|
||||
|
||||
if (RDP_GETOM_CYCLE_TYPE(rdpState.otherModes) == RDP_CYCLE_TYPE_FILL ||
|
||||
RDP_GETOM_CYCLE_TYPE(rdpState.otherModes) == RDP_CYCLE_TYPE_COPY)
|
||||
{
|
||||
x2 += 1;
|
||||
y2 += 1;
|
||||
} else {
|
||||
//rglAssert(!(curRBuffer->flags & RGL_RB_DEPTH));
|
||||
// x2 -= 1;
|
||||
// y2 -= 1;
|
||||
}
|
||||
|
||||
if (x2 < x1) x2 = x1+1; // black gauge in SCARS (E)
|
||||
|
||||
#define XSCALE(x) (float(x))
|
||||
#define YSCALE(y) (float(y))
|
||||
#define ZSCALE(z) (zscale(z))
|
||||
|
||||
if (RDP_GETOM_Z_SOURCE_SEL(rdpState.otherModes))
|
||||
z = rdpState.primitiveZ;
|
||||
else
|
||||
z = 0xffff;
|
||||
// if (dump)
|
||||
// fprintf(stderr, "fillrect cycle %d\n", other_modes.cycle_type);
|
||||
|
||||
rglStrip_t * strip = strips + nbStrips++;
|
||||
rglAssert(nbStrips < MAX_STRIPS);
|
||||
curChunk->nbStrips++;
|
||||
rglVertex_t * vtx = vtxs + nbVtxs;
|
||||
|
||||
strip->flags = RGL_STRIP_ZBUFFER;
|
||||
strip->vtxs = vtx;
|
||||
|
||||
vtx->x = XSCALE(x2); vtx->y = YSCALE(y1); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
vtx->x = XSCALE(x1); vtx->y = YSCALE(y1); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
vtx->x = XSCALE(x2); vtx->y = YSCALE(y2); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
vtx->x = XSCALE(x1); vtx->y = YSCALE(y2); vtx->z = ZSCALE(z); vtx++->w = 1;
|
||||
|
||||
strip->nbVtxs = vtx - strip->vtxs;
|
||||
nbVtxs = vtx - vtxs;
|
||||
}
|
||||
|
||||
void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
|
||||
uint32_t * rdp_cmd)
|
||||
{
|
||||
int tilenum = (w1 >> 16) & 0x7;
|
||||
// if (tilenum == 7) {
|
||||
// LOG("Fixing tilenum from 7 to 0\n");
|
||||
// tilenum = 0;
|
||||
// }
|
||||
int j;
|
||||
int xleft, xright, xleft_inc, xright_inc;
|
||||
//int xstart, xend;
|
||||
int r, g, b, a, z, s, t, w;
|
||||
int drdx = 0, dgdx = 0, dbdx = 0, dadx = 0, dzdx = 0, dsdx = 0, dtdx = 0, dwdx = 0;
|
||||
int drde = 0, dgde = 0, dbde = 0, dade = 0, dzde = 0, dsde = 0, dtde = 0, dwde = 0;
|
||||
int flip = (w1 & 0x800000) ? 1 : 0;
|
||||
|
||||
int32_t yl, ym, yh;
|
||||
int32_t xl, xm, xh;
|
||||
int64_t dxldy, dxhdy, dxmdy;
|
||||
uint32_t w3, w4, w5, w6, w7, w8;
|
||||
|
||||
uint32_t * shade_base = rdp_cmd + 8;
|
||||
uint32_t * texture_base = rdp_cmd + 8;
|
||||
uint32_t * zbuffer_base = rdp_cmd + 8;
|
||||
|
||||
int t1 = (texture && rglT1Usage(rdpState))? RGL_STRIP_TEX1:0;
|
||||
int t2 = (texture && tilenum < 7 && rglT2Usage(rdpState))? RGL_STRIP_TEX2:0;
|
||||
if (t1)
|
||||
rglPrepareRendering(1, (tilenum==7 && RDP_GETOM_CYCLE_TYPE(rdpState.otherModes)==1)? 0:tilenum, 0, zbuffer);
|
||||
if (t2)
|
||||
rglPrepareRendering(1, tilenum+1, 0, zbuffer);
|
||||
else if (!t1)
|
||||
rglPrepareRendering(0, 0, 0, zbuffer);
|
||||
|
||||
curRBuffer->flags |= RGL_RB_HASTRIANGLES;
|
||||
|
||||
if (shade)
|
||||
{
|
||||
texture_base += 16;
|
||||
zbuffer_base += 16;
|
||||
}
|
||||
if (texture)
|
||||
{
|
||||
zbuffer_base += 16;
|
||||
}
|
||||
|
||||
w3 = rdp_cmd[2];
|
||||
w4 = rdp_cmd[3];
|
||||
w5 = rdp_cmd[4];
|
||||
w6 = rdp_cmd[5];
|
||||
w7 = rdp_cmd[6];
|
||||
w8 = rdp_cmd[7];
|
||||
|
||||
yl = (w1 & 0x3fff);
|
||||
ym = ((w2 >> 16) & 0x3fff);
|
||||
yh = ((w2 >> 0) & 0x3fff);
|
||||
xl = (int32_t)(w3);
|
||||
xh = (int32_t)(w5);
|
||||
xm = (int32_t)(w7);
|
||||
dxldy = (int32_t)(w4);
|
||||
dxhdy = (int32_t)(w6);
|
||||
dxmdy = (int32_t)(w8);
|
||||
|
||||
if (yl & (0x800<<2)) yl |= 0xfffff000<<2;
|
||||
if (ym & (0x800<<2)) ym |= 0xfffff000<<2;
|
||||
if (yh & (0x800<<2)) yh |= 0xfffff000<<2;
|
||||
|
||||
yh &= ~3;
|
||||
|
||||
r = 0xff; g = 0xff; b = 0xff; a = 0xff; z = 0xffff0000; s = 0; t = 0; w = 0x30000;
|
||||
|
||||
if (shade)
|
||||
{
|
||||
r = (shade_base[0] & 0xffff0000) | ((shade_base[+4 ] >> 16) & 0x0000ffff);
|
||||
g = ((shade_base[0 ] << 16) & 0xffff0000) | (shade_base[4 ] & 0x0000ffff);
|
||||
b = (shade_base[1 ] & 0xffff0000) | ((shade_base[5 ] >> 16) & 0x0000ffff);
|
||||
a = ((shade_base[1 ] << 16) & 0xffff0000) | (shade_base[5 ] & 0x0000ffff);
|
||||
drdx = (shade_base[2 ] & 0xffff0000) | ((shade_base[6 ] >> 16) & 0x0000ffff);
|
||||
dgdx = ((shade_base[2 ] << 16) & 0xffff0000) | (shade_base[6 ] & 0x0000ffff);
|
||||
dbdx = (shade_base[3 ] & 0xffff0000) | ((shade_base[7 ] >> 16) & 0x0000ffff);
|
||||
dadx = ((shade_base[3 ] << 16) & 0xffff0000) | (shade_base[7 ] & 0x0000ffff);
|
||||
drde = (shade_base[8 ] & 0xffff0000) | ((shade_base[12] >> 16) & 0x0000ffff);
|
||||
dgde = ((shade_base[8 ] << 16) & 0xffff0000) | (shade_base[12] & 0x0000ffff);
|
||||
dbde = (shade_base[9 ] & 0xffff0000) | ((shade_base[13] >> 16) & 0x0000ffff);
|
||||
dade = ((shade_base[9 ] << 16) & 0xffff0000) | (shade_base[13] & 0x0000ffff);
|
||||
}
|
||||
if (texture)
|
||||
{
|
||||
s = (texture_base[0 ] & 0xffff0000) | ((texture_base[4 ] >> 16) & 0x0000ffff);
|
||||
t = ((texture_base[0 ] << 16) & 0xffff0000) | (texture_base[4 ] & 0x0000ffff);
|
||||
w = (texture_base[1 ] & 0xffff0000) | ((texture_base[5 ] >> 16) & 0x0000ffff);
|
||||
dsdx = (texture_base[2 ] & 0xffff0000) | ((texture_base[6 ] >> 16) & 0x0000ffff);
|
||||
dtdx = ((texture_base[2 ] << 16) & 0xffff0000) | (texture_base[6 ] & 0x0000ffff);
|
||||
dwdx = (texture_base[3 ] & 0xffff0000) | ((texture_base[7 ] >> 16) & 0x0000ffff);
|
||||
dsde = (texture_base[8 ] & 0xffff0000) | ((texture_base[12] >> 16) & 0x0000ffff);
|
||||
dtde = ((texture_base[8 ] << 16) & 0xffff0000) | (texture_base[12] & 0x0000ffff);
|
||||
dwde = (texture_base[9 ] & 0xffff0000) | ((texture_base[13] >> 16) & 0x0000ffff);
|
||||
}
|
||||
if (zbuffer)
|
||||
{
|
||||
//rglAssert(!(curRBuffer->flags & RGL_RB_DEPTH));
|
||||
|
||||
z = zbuffer_base[0];
|
||||
dzdx = zbuffer_base[1];
|
||||
dzde = zbuffer_base[2];
|
||||
}
|
||||
|
||||
xh <<= 2; xm <<= 2; xl <<= 2;
|
||||
r <<= 2; g <<= 2; b <<= 2; a <<= 2;
|
||||
dsde >>= 2; dtde >>= 2; dsdx >>= 2; dtdx >>= 2;
|
||||
dzdx >>= 2; dzde >>= 2;
|
||||
dwdx >>= 2; dwde >>= 2;
|
||||
|
||||
|
||||
// #define tile rdpTiles[tilenum]
|
||||
// s -= (rdpTiles[tilenum].sl << 8);
|
||||
// t -= (rdpTiles[tilenum].tl << 8);
|
||||
// if (/*!tile.ms && */tile.mask_s)
|
||||
// s &= (1<<tile.mask_s+10) - 1;
|
||||
// if (/*!tile.mt && */tile.mask_t)
|
||||
// t &= (1<<tile.mask_t+10) - 1;
|
||||
// #undef tile
|
||||
|
||||
|
||||
xleft = xm;
|
||||
xright = xh;
|
||||
xleft_inc = dxmdy;
|
||||
xright_inc = dxhdy;
|
||||
|
||||
while (yh<ym &&
|
||||
!((!flip && xleft < xright+0x10000) ||
|
||||
(flip && xleft > xright-0x10000))) {
|
||||
xleft += xleft_inc; xright += xright_inc;
|
||||
s += dsde; t += dtde; w += dwde;
|
||||
r += drde; g += dgde; b += dbde; a += dade;
|
||||
z += dzde;
|
||||
yh++;
|
||||
}
|
||||
|
||||
j = ym-yh;
|
||||
//rglAssert(j >= 0);
|
||||
#undef XSCALE
|
||||
#undef YSCALE
|
||||
#undef ZSCALE
|
||||
#undef SSCALE
|
||||
#undef TSCALE
|
||||
#define XSCALE(x) (float(x)/(1<<18))
|
||||
#define YSCALE(y) (float(y)/(1<<2))
|
||||
#define ZSCALE(z) (RDP_GETOM_Z_SOURCE_SEL(rdpState.otherModes)? zscale(rdpState.primitiveZ) : zscale((z)>>16))
|
||||
#define WSCALE(z) 1.0f/(RDP_GETOM_PERSP_TEX_EN(rdpState.otherModes)? (float(uint32_t(z) + 0x10000)/0xffff0000) : 1.0f)
|
||||
//#define WSCALE(w) (RDP_GETOM_PERSP_TEX_EN(rdpState.otherModes)? 65536.0f*65536.0f/float((w+ 0x10000)) : 1.0f)
|
||||
#define CSCALE(c) (((c)>0x3ff0000? 0x3ff0000:((c)<0? 0 : (c)))>>18)
|
||||
#define _PERSP(w) ( w )
|
||||
#define PERSP(s, w) ( ((int64_t)(s) << 20) / (_PERSP(w)? _PERSP(w):1) )
|
||||
#define SSCALE(s, _w) (RDP_GETOM_PERSP_TEX_EN(rdpState.otherModes)? float(PERSP(s, _w))/(1 << 10) : float(s)/(1<<21))
|
||||
#define TSCALE(s, w) (RDP_GETOM_PERSP_TEX_EN(rdpState.otherModes)? float(PERSP(s, w))/(1 << 10) : float(s)/(1<<21))
|
||||
|
||||
rglStrip_t * strip = strips + nbStrips++;
|
||||
rglAssert(nbStrips < MAX_STRIPS);
|
||||
curChunk->nbStrips++;
|
||||
rglVertex_t * vtx = vtxs + nbVtxs;
|
||||
|
||||
strip->flags = (shade? RGL_STRIP_SHADE : 0) | t1 | t2
|
||||
| RGL_STRIP_ZBUFFER;
|
||||
//| (zbuffer? RGL_STRIP_ZBUFFER : 0);
|
||||
strip->vtxs = vtx;
|
||||
strip->tilenum = tilenum;
|
||||
|
||||
//int sw;
|
||||
if (j > 0)
|
||||
{
|
||||
int dx = ((xleft-xright)>>16);
|
||||
if ((!flip && xleft < xright) ||
|
||||
(flip/* && xleft > xright*/))
|
||||
{
|
||||
if (shade) {
|
||||
vtx->r = CSCALE(r+drdx*dx);
|
||||
vtx->g = CSCALE(g+dgdx*dx);
|
||||
vtx->b = CSCALE(b+dbdx*dx);
|
||||
vtx->a = CSCALE(a+dadx*dx);
|
||||
}
|
||||
if (texture) {
|
||||
vtx->s = SSCALE(s+dsdx*dx, w+dwdx*dx);
|
||||
vtx->t = TSCALE(t+dtdx*dx, w+dwdx*dx);
|
||||
}
|
||||
vtx->x = XSCALE(xleft);
|
||||
vtx->y = YSCALE(yh);
|
||||
vtx->z = ZSCALE(z+dzdx*dx);
|
||||
vtx->w = WSCALE(w+dwdx*dx);
|
||||
vtx++;
|
||||
}
|
||||
if ((!flip/* && xleft < xright*/) ||
|
||||
(flip && xleft > xright))
|
||||
{
|
||||
if (shade) {
|
||||
vtx->r = CSCALE(r);
|
||||
vtx->g = CSCALE(g);
|
||||
vtx->b = CSCALE(b);
|
||||
vtx->a = CSCALE(a);
|
||||
}
|
||||
if (texture) {
|
||||
vtx->s = SSCALE(s, w);
|
||||
vtx->t = TSCALE(t, w);
|
||||
}
|
||||
vtx->x = XSCALE(xright);
|
||||
vtx->y = YSCALE(yh);
|
||||
vtx->z = ZSCALE(z);
|
||||
vtx->w = WSCALE(w);
|
||||
vtx++;
|
||||
}
|
||||
}
|
||||
xleft += xleft_inc*j; xright += xright_inc*j;
|
||||
s += dsde*j; t += dtde*j; w += dwde*j;
|
||||
r += drde*j; g += dgde*j; b += dbde*j; a += dade*j;
|
||||
z += dzde*j;
|
||||
// render ...
|
||||
|
||||
xleft = xl;
|
||||
|
||||
//if (yl-ym > 0)
|
||||
{
|
||||
int dx = ((xleft-xright)>>16);
|
||||
if ((!flip && xleft <= xright) ||
|
||||
(flip/* && xleft >= xright*/))
|
||||
{
|
||||
if (shade) {
|
||||
vtx->r = CSCALE(r+drdx*dx);
|
||||
vtx->g = CSCALE(g+dgdx*dx);
|
||||
vtx->b = CSCALE(b+dbdx*dx);
|
||||
vtx->a = CSCALE(a+dadx*dx);
|
||||
}
|
||||
if (texture) {
|
||||
vtx->s = SSCALE(s+dsdx*dx, w+dwdx*dx);
|
||||
vtx->t = TSCALE(t+dtdx*dx, w+dwdx*dx);
|
||||
}
|
||||
vtx->x = XSCALE(xleft);
|
||||
vtx->y = YSCALE(ym);
|
||||
vtx->z = ZSCALE(z+dzdx*dx);
|
||||
vtx->w = WSCALE(w+dwdx*dx);
|
||||
vtx++;
|
||||
}
|
||||
if ((!flip/* && xleft <= xright*/) ||
|
||||
(flip && xleft >= xright))
|
||||
{
|
||||
if (shade) {
|
||||
vtx->r = CSCALE(r);
|
||||
vtx->g = CSCALE(g);
|
||||
vtx->b = CSCALE(b);
|
||||
vtx->a = CSCALE(a);
|
||||
}
|
||||
if (texture) {
|
||||
vtx->s = SSCALE(s, w);
|
||||
vtx->t = TSCALE(t, w);
|
||||
}
|
||||
vtx->x = XSCALE(xright);
|
||||
vtx->y = YSCALE(ym);
|
||||
vtx->z = ZSCALE(z);
|
||||
vtx->w = WSCALE(w);
|
||||
vtx++;
|
||||
}
|
||||
}
|
||||
xleft_inc = dxldy;
|
||||
xright_inc = dxhdy;
|
||||
|
||||
j = yl-ym;
|
||||
//rglAssert(j >= 0);
|
||||
//j--; // ?
|
||||
xleft += xleft_inc*j; xright += xright_inc*j;
|
||||
s += dsde*j; t += dtde*j; w += dwde*j;
|
||||
r += drde*j; g += dgde*j; b += dbde*j; a += dade*j;
|
||||
z += dzde*j;
|
||||
|
||||
while (yl>ym &&
|
||||
!((!flip && xleft < xright+0x10000) ||
|
||||
(flip && xleft > xright-0x10000))) {
|
||||
xleft -= xleft_inc; xright -= xright_inc;
|
||||
s -= dsde; t -= dtde; w -= dwde;
|
||||
r -= drde; g -= dgde; b -= dbde; a -= dade;
|
||||
z -= dzde;
|
||||
j--;
|
||||
yl--;
|
||||
}
|
||||
|
||||
// render ...
|
||||
if (j >= 0) {
|
||||
int dx = ((xleft-xright)>>16);
|
||||
if ((!flip && xleft <= xright) ||
|
||||
(flip/* && xleft >= xright*/))
|
||||
{
|
||||
if (shade) {
|
||||
vtx->r = CSCALE(r+drdx*dx);
|
||||
vtx->g = CSCALE(g+dgdx*dx);
|
||||
vtx->b = CSCALE(b+dbdx*dx);
|
||||
vtx->a = CSCALE(a+dadx*dx);
|
||||
}
|
||||
if (texture) {
|
||||
vtx->s = SSCALE(s+dsdx*dx, w+dwdx*dx);
|
||||
vtx->t = TSCALE(t+dtdx*dx, w+dwdx*dx);
|
||||
}
|
||||
vtx->x = XSCALE(xleft);
|
||||
vtx->y = YSCALE(yl);
|
||||
vtx->z = ZSCALE(z+dzdx*dx);
|
||||
vtx->w = WSCALE(w+dwdx*dx);
|
||||
vtx++;
|
||||
}
|
||||
if ((!flip/* && xleft <= xright*/) ||
|
||||
(flip && xleft >= xright))
|
||||
{
|
||||
if (shade) {
|
||||
vtx->r = CSCALE(r);
|
||||
vtx->g = CSCALE(g);
|
||||
vtx->b = CSCALE(b);
|
||||
vtx->a = CSCALE(a);
|
||||
}
|
||||
if (texture) {
|
||||
vtx->s = SSCALE(s, w);
|
||||
vtx->t = TSCALE(t, w);
|
||||
}
|
||||
vtx->x = XSCALE(xright);
|
||||
vtx->y = YSCALE(yl);
|
||||
vtx->z = ZSCALE(z);
|
||||
vtx->w = WSCALE(w);
|
||||
vtx++;
|
||||
}
|
||||
}
|
||||
|
||||
strip->nbVtxs = vtx - strip->vtxs;
|
||||
nbVtxs = vtx - vtxs;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue