mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-11 23:50:51 +02:00
Terrain templates with hidden tiles now work correctly.
This commit is contained in:
@@ -178,6 +178,10 @@ public:
|
||||
uint8_t* ptr = reinterpret_cast<uint8_t*>(this);
|
||||
ptr += sizeof(IsoTileHeader_t);
|
||||
uint32_t* offsets = (uint32_t*)ptr;
|
||||
if (offsets[idx] == 0 || offsets[idx] == WESTWOOD_ISO_NOTSET_FLAG) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IsoTileImageHeader* tileImageHeaders = (IsoTileImageHeader*)(((uint8_t*)this) + offsets[idx]);
|
||||
return tileImageHeaders;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include "function.h"
|
||||
#include "template.h"
|
||||
|
||||
#include "image.h"
|
||||
|
||||
/***********************************************************************************************
|
||||
* TemplateClass::Init -- Resets the template object system. *
|
||||
@@ -87,8 +87,9 @@ bool TemplateClass::Mark(MarkType mark)
|
||||
assert(IsActive);
|
||||
|
||||
static bool noup = false;
|
||||
void const * iset = Get_Image_Data();
|
||||
if (iset && ObjectClass::Mark(mark)) {
|
||||
IsoTile* isoTile = (IsoTile *)Get_Image_Data();
|
||||
|
||||
if (isoTile && ObjectClass::Mark(mark)) {
|
||||
|
||||
//void * map = Get_Icon_Set_Map(iset);
|
||||
|
||||
@@ -106,7 +107,7 @@ bool TemplateClass::Mark(MarkType mark)
|
||||
*/
|
||||
//char * mapptr = (char*)map;
|
||||
//bool real = (mapptr[number] != -1);
|
||||
|
||||
if(isoTile->GetTileInfo(number) != NULL)
|
||||
{
|
||||
/*
|
||||
** Lift the terrain object from the map.
|
||||
|
||||
Reference in New Issue
Block a user