1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* buttons can use more than one def

* underground/urface switch button changes look when cliked
* object handler stories pointers to object instances
* new structure for terrain tile - TerrainTile2
* started doing video handlers - unfortunetly they don't work...
This commit is contained in:
Michał W. Urbańczyk
2007-08-08 19:28:56 +00:00
parent 0c17ec03a8
commit a3c45bcaa2
14 changed files with 559 additions and 560 deletions

View File

@@ -1,3 +1,4 @@
#include "stdafx.h"
#include "global.h"
#include "CPathfinder.h"
@@ -25,10 +26,10 @@ CPath * CPathfinder::getPath(int3 &src, int3 &dest)
for(int h=0; h<CGI->objh->objInstances.size(); ++h)
{
if(CGI->objh->objInstances[h].pos.z == src.z)
if(CGI->objh->objInstances[h]->pos.z == src.z)
{
unsigned char blockMap[6];
std::string ourName = CGI->ac->map.defy[CGI->objh->objInstances[h].defNumber].name;
std::string ourName = CGI->ac->map.defy[CGI->objh->objInstances[h]->defNumber].name;
std::transform(ourName.begin(), ourName.end(), ourName.begin(), (int(*)(int))toupper);
for(int y=0; y<CGI->dobjinfo->objs.size(); ++y)
{
@@ -47,8 +48,8 @@ CPath * CPathfinder::getPath(int3 &src, int3 &dest)
{
for(int j=0; j<8; ++j)
{
int cPosX = CGI->objh->objInstances[h].pos.x - j;
int cPosY = CGI->objh->objInstances[h].pos.y - i;
int cPosX = CGI->objh->objInstances[h]->pos.x - j;
int cPosY = CGI->objh->objInstances[h]->pos.y - i;
if(cPosX>0 && cPosY>0)
{
graph[cPosX][cPosY].accesible = blockMap[i] & (128 >> j);