From d141e5ee53a9147f694690b618cb954aaa1a5425 Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Wed, 1 Jul 2020 19:17:09 -0700 Subject: [PATCH] Fixed the lepton size being incorrect. --- code/redalert/cdata.cpp | 1 - code/redalert/cell.cpp | 1 - code/redalert/display.h | 4 ++-- code/redalert/image.h | 6 ++++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/redalert/cdata.cpp b/code/redalert/cdata.cpp index 4e37ed5..89af522 100644 --- a/code/redalert/cdata.cpp +++ b/code/redalert/cdata.cpp @@ -2367,7 +2367,6 @@ TemplateType TemplateTypeClass::From_Name(char const * name) return(TEMPLATE_NONE); } - /*********************************************************************************************** * TemplateTypeClass::Occupy_List -- Determines occupation list. * * * diff --git a/code/redalert/cell.cpp b/code/redalert/cell.cpp index 0de5995..dd19b73 100644 --- a/code/redalert/cell.cpp +++ b/code/redalert/cell.cpp @@ -999,7 +999,6 @@ bool CellClass::Get_Template_Info(char *template_name, int &icon, void *&image_d } void CellClass::ConvertCoordsToIsometric(int& x, int& y) { - y = y * 2; int tileWidth = CELL_PIXEL_W; int tileHeight = CELL_PIXEL_H; int sx = (x / CELL_PIXEL_W) * (tileWidth / 2) - (y / CELL_PIXEL_W) * (tileWidth / 2); diff --git a/code/redalert/display.h b/code/redalert/display.h index 7fbca54..524cc27 100644 --- a/code/redalert/display.h +++ b/code/redalert/display.h @@ -44,8 +44,8 @@ struct Image_t; #define ICON_PIXEL_W 48 #define ICON_PIXEL_H 24 // jmarshall end -#define ICON_LEPTON_W 512 -#define ICON_LEPTON_H 256 +#define ICON_LEPTON_W 256 +#define ICON_LEPTON_H 128 #define CELL_PIXEL_W ICON_PIXEL_W #define CELL_PIXEL_H ICON_PIXEL_H #define CELL_LEPTON_W ICON_LEPTON_W diff --git a/code/redalert/image.h b/code/redalert/image.h index fb5750c..04087b2 100644 --- a/code/redalert/image.h +++ b/code/redalert/image.h @@ -64,11 +64,13 @@ struct IsoTileHeader_t { int TileImageHeight; }; +#define WESTWOOD_ISO_NOTSET_FLAG -842150451 // Westwood didn't zero everything out in there tile exporter, so this is required. + struct IsoTileImageHeader { uint8_t* GetExtraData(void) - { - if(ExtraOffset == 0) { + { + if(ExtraOffset == 0 || ExtraOffset == WESTWOOD_ISO_NOTSET_FLAG) { return NULL; } return reinterpret_cast(this) + ExtraOffset + sizeof(IsoTileImageHeader);