1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

* minimap fix

* headers fix
* commented LUA stuff
This commit is contained in:
Michał W. Urbańczyk 2007-09-02 12:36:54 +00:00
parent 5222be8d94
commit 4edc6176dc
23 changed files with 81 additions and 27 deletions

View File

@ -7,10 +7,6 @@ extern TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX; //fonts
using namespace boost::logic;
using namespace CSDL_Ext;
CDefHandler * CHeroList::arrdo = NULL;
CDefHandler * CHeroList::arrup = NULL;
CDefHandler * CTownList::arrdo = NULL;
CDefHandler * CTownList::arrup = NULL;
CAdvMapInt::~CAdvMapInt()
{
SDL_FreeSurface(bg);
@ -133,6 +129,11 @@ void CList::clickLeft(tribool down)
CHeroList::CHeroList()
{
pos = genRect(192,64,609,196);
arrup = CGI->spriteh->giveDef("IAM012.DEF");
arrdo = CGI->spriteh->giveDef("IAM013.DEF");
mobile = CGI->spriteh->giveDef("IMOBIL.DEF");
mana = CGI->spriteh->giveDef("IMANA.DEF");
}
void CHeroList::select(int which)
{
@ -152,7 +153,8 @@ void CHeroList::keyPressed (SDL_KeyboardEvent & key)
CTownList::CTownList()
{
pos = genRect(192,48,747,196);
arrdo = NULL;
arrup = CGI->spriteh->giveDef("IAM014.DEF");
arrdo = CGI->spriteh->giveDef("IAM015.DEF");
}
void CTownList::select(int which)
{
@ -636,6 +638,7 @@ void CAdvMapInt::fswitchLevel()
underground.show();
}
updateScreen = true;
minimap.draw();
}
void CAdvMapInt::fshowQuestlog()
{

View File

@ -38,7 +38,8 @@ class CList
{
public:
SDL_Surface * bg;
//arrow up, arrow down
CDefHandler *arrup, *arrdo;
SDL_Rect arrupp, arrdop;
int posw, posh; //position width/height
void clickLeft(tribool down);
@ -50,7 +51,7 @@ class CHeroList
: public CList
{
public:
static CDefHandler *arrup, *arrdo;
CDefHandler *mobile, *mana;
CHeroList();
void select(int which);
@ -62,8 +63,7 @@ public:
class CTownList
: public CList
{
public:
static CDefHandler *arrup, *arrdo;
public:
CTownList();
void select(int which);

50
CMT.cpp
View File

@ -63,8 +63,58 @@ const char * NAME = "VCMI 0.3";
SDL_Surface * ekran, * screen, * screen2;
TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX, *GEORM;
// #include "lua.h"
// #include "lualib.h"
// #include "lauxlib.h"
//#include <luabind/luabind.hpp>
//#include <luabind/function.hpp>
//#include <luabind/class.hpp>
//
//#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
//void piszpowitanie2(std::string i)
//{
// std::cout<<"powitanie2zc++. Liczba dnia to " << i;
//}
int _tmain(int argc, _TCHAR* argv[])
{
//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, "test.lua")) == 0)
//{
//
//
// // Call main...
// if ((iErr = lua_pcall (lua, 0, LUA_MULTRET, 0)) == 0)
// { luabind::open(lua);
// luabind::module(lua)
// [
// luabind::def("powitanie",&piszpowitanie2,NULL)
//
// ];
//
// int ret = luabind::call_function<int>(lua, "helloWorld2");
// // Push the function name onto the stack
// lua_pushstring (lua, "helloWorld");
// // Function is located in the Global Table
// lua_gettable (lua, LUA_GLOBALSINDEX);
// lua_pcall (lua, 0, 0, 0);
// }
//
//}
//lua_close (lua);
//CBIKHandler cb;
//cb.open("CSECRET.BIK");
THC timeHandler tmh;

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CAbilityHandler.h"
#include "../CGameInfo.h"
#include "CGeneralTextHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CAmbarCendamo.h"
#include "CSemiDefHandler.h"
#include "../CGameInfo.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CArtHandler.h"
#include "../CGameInfo.h"
#include "CGeneralTextHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "../CGameInfo.h"
#include "CBuildingHandler.h"
#include "CLodHandler.h"

View File

@ -1 +1,2 @@
#include "stdafx.h"
#include "CCastleHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "../CGameInfo.h"
#include "CCreatureHandler.h"
#include "CLodHandler.h"

Binary file not shown.

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CDefObjInfoHandler.h"
#include "../CGameInfo.h"
#include "CLodHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CGeneralTextHandler.h"
#include "../CGameInfo.h"
#include "CLodHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CHeroHandler.h"
#include "../CGameInfo.h"
#include <sstream>

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CLodHandler.h"
#include "../SDL_Extensions.h"
#include <sstream>

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CMusicHandler.h"
void CMusicHandler::initMusics()

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CObjectHandler.h"
#include "../CGameInfo.h"
#include "CGeneralTextHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CPreGameTextHandler.h"
#include "../CGameInfo.h"
#include "CLodHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CSemiDefHandler.h"
#include <fstream>
extern SDL_Surface * ekran;

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CSemiLodHandler.h"
void CSemiLodHandler::openLod(std::string path)
{

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CSndHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CSpellHandler.h"
#include "../CGameInfo.h"
#include "CLodHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include "CTownHandler.h"
#include "../CGameInfo.h"
#include "CLodHandler.h"

View File

@ -1,4 +1,4 @@
#include "../stdafx.h"
#include "stdafx.h"
#include <iostream>
#include "CVideoHandler.h"
#include "SDL.h"