Browse Source

* fixed crashbug on savegame choice when no savegames were available
* removed unneeded files
* bumped up version (0.68a)
* added authors list

Michał W. Urbańczyk 16 năm trước cách đây
mục cha
commit
302b5d9427
8 tập tin đã thay đổi với 49 bổ sung177 xóa
  1. 29 0
      AUTHORS
  2. 0 129
      CLuaHandler.cpp
  3. 0 24
      CLuaHandler.h
  4. 0 1
      CMT.cpp
  5. 15 14
      CPreGame.cpp
  6. 4 8
      client/VCMI_client.vcproj
  7. 1 1
      global.h
  8. BIN
      manisfest VCMI.txt

+ 29 - 0
AUTHORS

@@ -0,0 +1,29 @@
+VCMI PROJECT CODE CONTRIBUTORS:
+
+Micha³ Urbañczyk aka Tow,        <[email protected]>
+   * project originator; programming, making releases, website
+maintenance, reverse engineering, general support.
+
+Tow dragon,                <[email protected]>
+   * general suport, battle support, support for many Heroes 3 config files
+
+Stefan Pavlov aka Ste,            <[email protected]>
+   * minor fixes in pregame
+
+Yifeng Sun aka phoebus118,        <[email protected]>
+   * a part of .snd handling, minor fixes and updates
+
+Andrea Palmate aka afxgroup,        <[email protected]>
+   * GCC/AmigaOS4 compatibility updates and makefile
+
+Vadim Glazunov aka neweagle,        <[email protected]>
+   * minor GCC/Linux compatibility changes
+
+Rafal R. aka ambtrip,            <[email protected]>
+   * GeniusAI (battles)
+
+Lukasz Wychrystenko aka tezeriusz,    <[email protected]>
+   * minor GCC/Linux compatibility changes, code review
+
+Xiaomin Ding                <[email protected]>
+   * smack videos player

+ 0 - 129
CLuaHandler.cpp

@@ -1,129 +0,0 @@
-#include "stdafx.h"
-
-#ifndef _MSC_VER
-extern "C" {
-#endif
-
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h" 
-
-#ifndef _MSC_VER
-}
-#endif
-
-//#include <luabind/luabind.hpp>
-//#include <luabind/function.hpp>
-//#include <luabind/class.hpp>
-#include "CLuaHandler.h"
-#include "boost/filesystem.hpp"
-#include <boost/algorithm/string.hpp>
-void piszpowitanie2(std::string i) //simple global function for testing
-{
-	std::cout<<"powitanie2zc++. Liczba dnia to " << i;
-}
-
-
-CLuaHandler::CLuaHandler()
-{
-}
-CLuaHandler::~CLuaHandler()
-{
-}
-void CLuaHandler::test()
-{
-	//int iErr = 0;
-	//lua_State *lua = lua_open ();  // Open Lua
-	//LUA_OPEN_LIB(lua, luaopen_base);
-	//LUA_OPEN_LIB(lua, luaopen_io);
-	//if ((iErr = luaL_loadfile (lua, "scripts/lua/objects/0023_marletto_tower.lua")) == 0)
-	//{
-	//   // Call main...
-	//   if ((iErr = lua_pcall (lua, 0, LUA_MULTRET, 0)) == 0)
-	//   {    
-	//		lua_pushstring (lua, "rightText");
-	//		lua_gettable (lua, LUA_GLOBALSINDEX);  
-	//		lua_pcall (lua, 0, 0, 0);
-	//	}
-	//}
-	//lua_close (lua);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-
-std::vector<std::string> * CLuaHandler::searchForScripts(std::string fol)
-{
-	std::vector<std::string> * ret = new std::vector<std::string> ();
-	boost::filesystem::path folder(fol);
-	if (!boost::filesystem::exists(folder))
-#ifndef __GNUC__
-		throw new std::exception("No such folder!");
-#else
-		throw new std::exception();
-#endif
-	boost::filesystem::directory_iterator end_itr;
-	for 
-	  (
-	  boost::filesystem::directory_iterator it(folder);
-	  it!=end_itr;
-	  it++
-	  )
-	{
-		if(boost::algorithm::ends_with((it->path().leaf()),".lua"))
-		{
-			ret->push_back(fol+"/"+(it->path().leaf()));
-		}
-	}
-	return ret;
-}
-std::vector<std::string> * CLuaHandler::functionList(std::string file)
-{
-	std::vector<std::string> * ret = new std::vector<std::string> ();
-	char linia[500];
-	std::ifstream is(file.c_str());
-	while (!is.eof())
-	{
-		is.getline(linia,500);
-		std::string ss(linia);
-		boost::algorithm::trim_left(ss);
-		if (boost::algorithm::starts_with(ss,"local"))
-			boost::algorithm::erase_first(ss,"local ");
-		if (boost::algorithm::starts_with(ss,"function"))
-		{
-			boost::algorithm::erase_first(ss,"function ");
-			int ps = ss.find_first_of(' ');
-			int op = ss.find_first_of('(');
-			if (ps<0)
-				ps = ss.length()-1;
-			if (op<0)
-				op = ss.length()-1;
-			ps = std::min(ps,op);
-			ret->push_back(ss.substr(0,ps));
-		}
-	}
-	is.close();
-	return ret;
-}

+ 0 - 24
CLuaHandler.h

@@ -1,24 +0,0 @@
-#ifndef __CLUAHANDLER_H__
-#define __CLUAHANDLER_H__
-#include "global.h"
-#if (LUA_VERSION_NUM < 500)
-#  define LUA_OPEN_LIB(L, lib) lib(L)
-#else
-#  define LUA_OPEN_LIB(L, lib) \
-     lua_pushcfunction((L), lib); \
-     lua_pcall((L), 0, 0, 0);
-#endif
-class CLuaHandler
-{
-public:
-	CLuaHandler();
-
-	static std::vector<std::string> * searchForScripts(std::string fol);
-	static std::vector<std::string> * functionList(std::string file);
-
-	~CLuaHandler();
-
-	void test();
-};
-
-#endif // __CLUAHANDLER_H__

+ 0 - 1
CMT.cpp

@@ -24,7 +24,6 @@
 #include "CGameState.h"
 #include "CCallback.h"
 #include "CPlayerInterface.h"
-#include "CLuaHandler.h"
 #include "CAdvmapInterface.h"
 #include "hch/CBuildingHandler.h"
 #include "hch/CVideoHandler.h"

+ 15 - 14
CPreGame.cpp

@@ -835,22 +835,23 @@ int MapSel::countWL()
 }
 void MapSel::printMaps(int from, int to, int at, bool abs)
 {
-	if (true)//
+	if(slid->positionsAmnt < slid->capacity)
+		from = 0;
+	int help=-1;
+	for (size_t i=0; i < curVector().size(); ++i)
 	{
-		int help=-1;
-		for (size_t i=0; i < curVector().size(); ++i)
+		if (sizeFilter && ((curVector()[i].width) != sizeFilter)) 
 		{
-			if (sizeFilter && ((curVector()[i].width) != sizeFilter)) {
-				continue;
-                        }
-			else {
-                            help++;
-                        }
-			if (help==from)
-			{
-				from=i;
-				break;
-			}
+			continue;
+		}
+		else 
+		{
+			help++;
+		}
+		if (help==from)
+		{
+			from=i;
+			break;
 		}
 	}
 	SDL_Surface * scenin = CSDL_Ext::newSurface(351,25);

+ 4 - 8
client/VCMI_client.vcproj

@@ -326,10 +326,6 @@
 				RelativePath=".\Client.cpp"
 				>
 			</File>
-			<File
-				RelativePath="..\CLuaHandler.cpp"
-				>
-			</File>
 			<File
 				RelativePath="..\CMessage.cpp"
 				>
@@ -468,10 +464,6 @@
 				RelativePath=".\Client.h"
 				>
 			</File>
-			<File
-				RelativePath="..\CLuaHandler.h"
-				>
-			</File>
 			<File
 				RelativePath="..\CMessage.h"
 				>
@@ -557,6 +549,10 @@
 			RelativePath="..\ChangeLog"
 			>
 		</File>
+		<File
+			RelativePath="C:\Documents and Settings\Micha³\Moje dokumenty\net.txt"
+			>
+		</File>
 	</Files>
 	<Globals>
 	</Globals>

+ 1 - 1
global.h

@@ -19,7 +19,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
 #define THC
 #endif
 
-#define NAME_VER ("VCMI 0.65")
+#define NAME_VER ("VCMI 0.68a")
 #define CONSOLE_LOGGING_LEVEL 5
 #define FILE_LOGGING_LEVEL 6
 

BIN
manisfest VCMI.txt