From 5aedb4c5d6d1c279ef6470259f6c1e318a5636de Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 22 Apr 2013 11:11:55 +1000 Subject: [PATCH] Glide64: Add version number in to name, also fix some warnings. --- .gitignore | 1 + Project64.sln | 1 + Source/Common/Version.h | 22 +++++++++++----------- Source/Glide64/Main.cpp | 33 ++++++++++++++++----------------- Source/Glide64/TexCache.cpp | 2 +- Source/Glide64/TexLoad.h | 2 +- Source/Glide64/TexLoad16b.h | 2 +- Source/GlideHQ/TxFilter.cpp | 5 ----- 8 files changed, 32 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index f8bba8c0e..8cd81a825 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ /Plugin/GFX/map/PJ64Glide64_d.map /Plugin/GFX/pdb/PJ64Glide64.pdb /Plugin/GFX/pdb/PJ64Glide64_d.pdb +/Source/Glide64/Glide64.aps diff --git a/Project64.sln b/Project64.sln index 45abd0f36..65b4186b8 100644 --- a/Project64.sln +++ b/Project64.sln @@ -35,6 +35,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Glide64", "Source\Glide64\G {05B9CB11-12D1-47CD-8E4A-88E12162119B} = {05B9CB11-12D1-47CD-8E4A-88E12162119B} {93447136-FACD-4740-8F35-FC46FB4A9E82} = {93447136-FACD-4740-8F35-FC46FB4A9E82} {25A25249-C284-4C5A-8DC2-26FC3EB13703} = {25A25249-C284-4C5A-8DC2-26FC3EB13703} + {B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421} {2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {2DADDAA5-0F57-46ED-A974-747908DDC7F3} {427F1DCD-3BED-4010-9322-077A4C06D871} = {427F1DCD-3BED-4010-9322-077A4C06D871} {93CFEDF3-9A75-4484-B169-D9D8074F5AC2} = {93CFEDF3-9A75-4484-B169-D9D8074F5AC2} diff --git a/Source/Common/Version.h b/Source/Common/Version.h index 7a07fd915..89d3e9b28 100644 --- a/Source/Common/Version.h +++ b/Source/Common/Version.h @@ -1,16 +1,16 @@ #pragma once -#define VERSION_COMPANY_NAME TEXT("CompanyName") -#define VERSION_FILE_DESCRIPTION TEXT("FileDescription") -#define VERSION_FILE_VERSION TEXT("FileVersion") -#define VERSION_INTERNAL_NAME TEXT("InternalName") -#define VERSION_LEGAL_COPYRIGHT TEXT("LegalCopyright") -#define VERSION_ORIGINAL_FILE_NAME TEXT("OriginalFileName") -#define VERSION_PRODUCT_NAME TEXT("ProductName") -#define VERSION_PRODUCT_VERSION TEXT("ProductVersion") +#define VERSION_COMPANY_NAME "CompanyName" +#define VERSION_FILE_DESCRIPTION "FileDescription" +#define VERSION_FILE_VERSION "FileVersion" +#define VERSION_INTERNAL_NAME "InternalName" +#define VERSION_LEGAL_COPYRIGHT "LegalCopyright" +#define VERSION_ORIGINAL_FILE_NAME "OriginalFileName" +#define VERSION_PRODUCT_NAME "ProductName" +#define VERSION_PRODUCT_VERSION "ProductVersion" #include "std string.h" -bool HasFileVersionInfo ( LPCTSTR Info, LPCTSTR FileName ); -stdstr FileVersionInfo ( LPCTSTR Info, LPCTSTR FileName ); -stdstr VersionInfo ( LPCTSTR Info, HMODULE hModule = NULL); +bool HasFileVersionInfo ( LPCSTR Info, LPCSTR FileName ); +stdstr FileVersionInfo ( LPCSTR Info, LPCSTR FileName ); +stdstr VersionInfo ( LPCSTR Info, HMODULE hModule = NULL); diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp index 979fc605a..a3242ca3f 100644 --- a/Source/Glide64/Main.cpp +++ b/Source/Glide64/Main.cpp @@ -38,6 +38,7 @@ //**************************************************************** #include "Gfx #1.3.h" +#include #include #include #include "Util.h" @@ -54,14 +55,6 @@ int ghq_dmptex_toggle_key = 0; #endif -#ifdef _DEBUG -#define G64_VERSION "For PJ64 (Debug) " -#else -#define G64_VERSION "For PJ64 " -#endif - -#define RELTIME "Date: " __DATE__// " Time: " __TIME__ - #ifdef EXT_LOGGING std::ofstream extlog; #endif @@ -95,6 +88,7 @@ int ev_fullscreen = 0; #ifdef __WINDOWS__ #define WINPROC_OVERRIDE +HINSTANCE hinstDLL = NULL; #endif #ifdef WINPROC_OVERRIDE @@ -713,7 +707,7 @@ GRSTIPPLE grStippleModeExt = NULL; GRSTIPPLE grStipplePatternExt = NULL; FxBool (FX_CALL *grKeyPressed)(FxU32) = NULL; -int GetTexAddrUMA(int tmu, int texsize) +int GetTexAddrUMA(int /*tmu*/, int texsize) { int addr = voodoo.tex_min_addr[0] + voodoo.tmem_ptr[0]; voodoo.tmem_ptr[0] += texsize; @@ -1284,16 +1278,17 @@ int DllUnload(void) #ifdef __WINDOWS__ void wxSetInstance(HINSTANCE hInstance); -extern "C" int WINAPI DllMain (HINSTANCE hinstDLL, +extern "C" int WINAPI DllMain (HINSTANCE hinst, wxUint32 fdwReason, - LPVOID lpReserved) + LPVOID /*lpReserved*/) { - sprintf (out_buf, "DllMain (%08lx - %d)\n", hinstDLL, fdwReason); + sprintf (out_buf, "DllMain (%08lx - %d)\n", hinst, fdwReason); LOG (out_buf); if (fdwReason == DLL_PROCESS_ATTACH) { - wxSetInstance(hinstDLL); + hinstDLL = hinst; + wxSetInstance(hinstDLL); return DllLoad(); } else if (fdwReason == DLL_PROCESS_DETACH) @@ -1518,7 +1513,7 @@ to allow the user to test the dll input: a handle to the window that calls this function output: none *******************************************************************/ -void CALL DllTest ( HWND hParent ) +void CALL DllTest ( HWND /*hParent*/ ) { } @@ -1548,11 +1543,15 @@ void CALL GetDllInfo ( PLUGIN_INFO * PluginInfo ) LOG ("GetDllInfo ()\n"); PluginInfo->Version = 0x0103; // Set to 0x0103 PluginInfo->Type = PLUGIN_TYPE_GFX; // Set to PLUGIN_TYPE_GFX - sprintf (PluginInfo->Name, "Glide64 "G64_VERSION RELTIME); // Name of the DLL +#ifdef _DEBUG + sprintf(PluginInfo->Name,"Glide64 For PJ64 (Debug): %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str()); +#else + sprintf(PluginInfo->Name,"Glide64 For PJ64: %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str()); +#endif // If DLL supports memory these memory options then set them to TRUE or FALSE // if it does not support it - PluginInfo->NormalMemory = TRUE; // a normal wxUint8 array + PluginInfo->NormalMemory = FALSE; // a normal wxUint8 array PluginInfo->MemoryBswaped = TRUE; // a normal wxUint8 array where the memory has been pre // bswap on a dword (32 bits) boundry } @@ -2371,8 +2370,8 @@ static Glide64Keys g64Keys; #else if (grKeyPressed) return grKeyPressed(g64Keys[key]); -#endif return 0; +#endif } diff --git a/Source/Glide64/TexCache.cpp b/Source/Glide64/TexCache.cpp index 58e3cc296..ee2403703 100644 --- a/Source/Glide64/TexCache.cpp +++ b/Source/Glide64/TexCache.cpp @@ -958,7 +958,7 @@ inline wxUint32 Txl2Words(wxUint32 width, wxUint32 size) return max(1, width*sizeBytes[size]/8); } -inline wxUint32 ReverseDXT(wxUint32 val, wxUint32 lrs, wxUint32 width, wxUint32 size) +inline wxUint32 ReverseDXT(wxUint32 val, wxUint32 /*lrs*/, wxUint32 width, wxUint32 size) { if( val == 0x800 ) return 1; diff --git a/Source/Glide64/TexLoad.h b/Source/Glide64/TexLoad.h index 98c1606da..f54e63c71 100644 --- a/Source/Glide64/TexLoad.h +++ b/Source/Glide64/TexLoad.h @@ -42,7 +42,7 @@ #include "TexLoad16b.h" #include "TexLoad32b.h" -wxUint32 LoadNone (wxUIntPtr dst, wxUIntPtr src, int wid_64, int height, int line, int real_width, int tile) +wxUint32 LoadNone (wxUIntPtr dst, wxUIntPtr src, int wid_64, int height, int line, int /*real_width*/, int tile) { memset (texture, 0, 4096*4); return (1 << 16) | GR_TEXFMT_ARGB_1555; diff --git a/Source/Glide64/TexLoad16b.h b/Source/Glide64/TexLoad16b.h index b9203c0d7..7daa0e618 100644 --- a/Source/Glide64/TexLoad16b.h +++ b/Source/Glide64/TexLoad16b.h @@ -115,7 +115,7 @@ wxUint16 yuv_to_rgb565(wxUint8 y, wxUint8 u, wxUint8 v) // Size: 2, Format: 1 // -wxUint32 Load16bYUV (wxUIntPtr dst, wxUIntPtr src, int wid_64, int /*height*/, int /*line*/, int /*real_width*/, int tile) +wxUint32 Load16bYUV (wxUIntPtr dst, wxUIntPtr /*src*/, int /*wid_64*/, int /*height*/, int /*line*/, int /*real_width*/, int tile) { wxUint32 * mb = (wxUint32*)(gfx.RDRAM+rdp.addr[rdp.tiles[tile].t_mem]); //pointer to the macro block wxUint16 * tex = (wxUint16*)dst; diff --git a/Source/GlideHQ/TxFilter.cpp b/Source/GlideHQ/TxFilter.cpp index 39b0a3296..dd4fa6e46 100644 --- a/Source/GlideHQ/TxFilter.cpp +++ b/Source/GlideHQ/TxFilter.cpp @@ -83,11 +83,6 @@ TxFilter::TxFilter(int maxwidth, int maxheight, int maxbpp, int options, /* shamelessness :P this first call to the debug output message creates * a file in the executable directory. */ INFO(0, L"------------------------------------------------------------------\n"); -#ifdef GHQCHK - INFO(0, L" GlideHQ Hires Texture Checker 1.02.00.%d\n", BUILD_NUMBER); -#else -// INFO(0, L" GlideHQ version 1.02.00.%d\n", BUILD_NUMBER); -#endif INFO(0, L" Copyright (C) 2010 Hiroshi Morii All Rights Reserved\n"); INFO(0, L" email : koolsmoky(at)users.sourceforge.net\n"); INFO(0, L" website : http://www.3dfxzone.it/koolsmoky\n");