mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Isometric tiles now render the entire screen. Off screen tiles will not be rendered.
This commit is contained in:
@@ -1008,10 +1008,12 @@ void CellClass::ConvertCoordsToIsometric(int& x, int& y) {
|
||||
y = sy;// + (CELL_PIXEL_W / 2);
|
||||
|
||||
x = x + (ScreenWidth / 2);
|
||||
y = y - (ScreenWidth / 4);
|
||||
}
|
||||
|
||||
bool CellClass::ScreenCoordsToIsoTile(int x, int y, int &tileX, int &tileY) {
|
||||
x = x - (ScreenWidth / 2);
|
||||
y = y + (ScreenWidth / 4);
|
||||
|
||||
float tempPt_x = (2 * y + x) / 2;
|
||||
float tempPt_y = (2 * y - x) / 2;
|
||||
|
||||
@@ -571,10 +571,10 @@ short const * DisplayClass::Text_Overlap_List(char const * text, int x, int y) c
|
||||
void DisplayClass::Set_View_Dimensions(int x, int y, int width, int height)
|
||||
{
|
||||
if (width == -1) width = SeenBuff.Get_Width();
|
||||
TacLeptonWidth = Pixel_To_Lepton( width - x) * 2;
|
||||
TacLeptonWidth = Pixel_To_Lepton( width - x) * 2.5;
|
||||
|
||||
if (height == -1) height = SeenBuff.Get_Height();
|
||||
TacLeptonHeight = Pixel_To_Lepton(height - y) * 2;
|
||||
TacLeptonHeight = Pixel_To_Lepton(height - y) * 4;
|
||||
|
||||
/*
|
||||
** Adjust the tactical cell if it is now in an invalid position
|
||||
|
||||
@@ -25,6 +25,14 @@ void GL_ResetClipRect(void) {
|
||||
}
|
||||
|
||||
void GL_RenderImage(Image_t* image, int x, int y, int width, int height, int colorRemap, int shapeId) {
|
||||
if(x < 0 || y < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(x >= ScreenWidth || y >= ScreenHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
ImVec2 mi(x, y);
|
||||
ImVec2 ma(x + width, y + height);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user