浏览代码

Added icon to the MSVC project, minor fixes, version bumped to 0.74.

Michał W. Urbańczyk 16 年之前
父节点
当前提交
3d4db35df0
共有 9 个文件被更改,包括 108 次插入7 次删除
  1. 1 1
      CConsoleHandler.cpp
  2. 4 3
      client/CBattleInterface.cpp
  3. 1 1
      client/SDL_Extensions.cpp
  4. 72 0
      client/VCMI_client.rc
  5. 12 0
      client/VCMI_client.vcproj
  6. 16 0
      client/resource.h
  7. 二进制
      client/vcmi.ico
  8. 1 1
      global.h
  9. 1 1
      lib/Connection.h

+ 1 - 1
CConsoleHandler.cpp

@@ -134,7 +134,7 @@ LONG WINAPI onUnhandledException(EXCEPTION_POINTERS* exception)
 
 	strcat(mname, "_crashinfo.dmp");
 	HANDLE dfile = CreateFileA(mname, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0);
-	tlog1 << "Crash info will be put in " << dfile << std::endl;
+	tlog1 << "Crash info will be put in " << mname << std::endl;
 	MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), dfile, MiniDumpWithDataSegs, &meinfo, 0, 0);
 	MessageBoxA(0, "VCMI has crashed. We are sorry. File with information about encountered problem has been created.", "VCMI Crashhandler", MB_OK | MB_ICONERROR);
 	return EXCEPTION_EXECUTE_HANDLER;

+ 4 - 3
client/CBattleInterface.cpp

@@ -2706,7 +2706,6 @@ void CBattleInterface::activateStack()
 	stackToActivate = -1;
 	myTurn = true;
 	queue->update();
-	GH.fakeMouseMove();
 	redrawBackgroundWithHexes(activeStack);
 	bWait->block(vstd::contains(LOCPLINT->cb->battleGetStackByID(activeStack)->state,WAITING)); //block waiting button if stack has been already waiting
 
@@ -2721,6 +2720,7 @@ void CBattleInterface::activateStack()
 		if(!defendingHeroInstance->getArt(17)) //don't unlock if already locked
 			bSpell->block(!defendingHeroInstance->getArt(17));
 	}
+	GH.fakeMouseMove();
 }
 
 float CBattleInterface::getAnimSpeedMultiplier() const
@@ -3995,8 +3995,9 @@ void CStackQueue::StackBox::showAll( SDL_Surface *to )
 	if(bg)
 	{
 		graphics->blueToPlayersAdv(bg, my->owner);
-		SDL_UpdateRect(bg, 0, 0, 0, 0);
-		blitAt(bg, pos, to);
+		//SDL_UpdateRect(bg, 0, 0, 0, 0);
+		CSDL_Ext::blit8bppAlphaTo24bpp(bg, NULL, to, &genRect(bg->h, bg->w, pos.x, pos.y));
+		//blitAt(bg, pos, to);
 		blitAt(graphics->bigImgs[my->creature->idNumber], pos.x +9, pos.y + 1, to);
 		printAtMiddleLoc(makeNumberShort(my->amount), pos.w/2, pos.h - 12, FONT_MEDIUM, zwykly, to);
 	}

+ 1 - 1
client/SDL_Extensions.cpp

@@ -668,7 +668,7 @@ int CSDL_Ext::blit8bppAlphaTo24bpp(const SDL_Surface * src, const SDL_Rect * src
 		}
 		else
 		{
-				srcx = srcy = 0;
+			srcx = srcy = 0;
 			w = src->w;
 			h = src->h;
 		}

+ 72 - 0
client/VCMI_client.rc

@@ -0,0 +1,72 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Polish resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK)
+#ifdef _WIN32
+LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
+#pragma code_page(1250)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1               ICON                    "vcmi.ico"
+#endif    // Polish resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+

+ 12 - 0
client/VCMI_client.vcproj

@@ -548,6 +548,10 @@
 				RelativePath="..\nodrze.h"
 				>
 			</File>
+			<File
+				RelativePath=".\resource.h"
+				>
+			</File>
 			<File
 				RelativePath=".\SDL_Extensions.h"
 				>
@@ -577,6 +581,14 @@
 			RelativePath="C:\Documents and Settings\Micha³\Moje dokumenty\net.txt"
 			>
 		</File>
+		<File
+			RelativePath=".\vcmi.ico"
+			>
+		</File>
+		<File
+			RelativePath=".\VCMI_client.rc"
+			>
+		</File>
 	</Files>
 	<Globals>
 	</Globals>

+ 16 - 0
client/resource.h

@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by VCMI_client.rc
+//
+#define IDI_ICON1                       101
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif

二进制
client/vcmi.ico


+ 1 - 1
global.h

@@ -20,7 +20,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
 #define THC
 #endif
 
-#define NAME_VER ("VCMI 0.73d")
+#define NAME_VER ("VCMI 0.74")
 extern std::string NAME; //full name
 extern std::string NAME_AFFIX; //client / server
 #define CONSOLE_LOGGING_LEVEL 5

+ 1 - 1
lib/Connection.h

@@ -19,7 +19,7 @@
 #include <boost/mpl/identity.hpp>
 
 #include <boost/type_traits/is_array.hpp>
-const ui32 version = 709;
+const ui32 version = 710;
 class CConnection;
 namespace mpl = boost::mpl;