mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Initial test code to render isometric tiles, including test art and test map.
This commit is contained in:
+190
@@ -0,0 +1,190 @@
|
||||
[General]
|
||||
ChronoTechLevel=12
|
||||
ParaTech=5
|
||||
ParabombTech=8
|
||||
SpyPlaneTech=5
|
||||
GPSTechLevel=10
|
||||
|
||||
[HBOX]
|
||||
Power=-10
|
||||
|
||||
[PBOX]
|
||||
Power=-10
|
||||
|
||||
[AGUN]
|
||||
Power=-40
|
||||
|
||||
[FTUR]
|
||||
Power=-40
|
||||
|
||||
[MRJ]
|
||||
TechLevel=15
|
||||
Owner=soviet
|
||||
|
||||
[MGG]
|
||||
TechLevel=15
|
||||
|
||||
[MCV]
|
||||
TechLevel=15
|
||||
|
||||
[LST]
|
||||
TechLevel=1
|
||||
|
||||
[DOG]
|
||||
TechLevel=3
|
||||
|
||||
[E4]
|
||||
TechLevel=6
|
||||
|
||||
[THF]
|
||||
TechLevel=15
|
||||
|
||||
[E7]
|
||||
Prerequisite=atek
|
||||
TechLevel=15
|
||||
Owner=allies
|
||||
|
||||
[YAK]
|
||||
TechLevel=1
|
||||
|
||||
[TRAN]
|
||||
TechLevel=15
|
||||
Owner=allies,soviet
|
||||
|
||||
[HELI]
|
||||
TechLevel=10
|
||||
|
||||
[HIND]
|
||||
TechLevel=10
|
||||
|
||||
[IRON]
|
||||
TechLevel=15
|
||||
|
||||
[ATEK]
|
||||
TechLevel=10
|
||||
|
||||
[PDOX]
|
||||
TechLevel=15
|
||||
|
||||
[SPEN]
|
||||
TechLevel=5
|
||||
|
||||
[HPAD]
|
||||
TechLevel=10
|
||||
|
||||
[MSLO]
|
||||
TechLevel=15
|
||||
Owner=soviet
|
||||
|
||||
[AFLD]
|
||||
TechLevel=4
|
||||
|
||||
[KENN]
|
||||
TechLevel=2
|
||||
|
||||
[FACF]
|
||||
TechLevel=15
|
||||
|
||||
[WEAF]
|
||||
TechLevel=15
|
||||
|
||||
[SYRF]
|
||||
TechLevel=15
|
||||
|
||||
[DOMF]
|
||||
TechLevel=15
|
||||
|
||||
[Italy]
|
||||
MaxUnit=150
|
||||
MaxInfantry=150
|
||||
MaxBuilding=150
|
||||
MaxVessel=20
|
||||
Allies=Special
|
||||
|
||||
[Basic]
|
||||
Name=In the thick of it
|
||||
Intro=<none>
|
||||
Brief=<none>
|
||||
Win=<none>
|
||||
Lose=<none>
|
||||
Action=<none>
|
||||
Player=USSR
|
||||
Theme=No theme
|
||||
CarryOverMoney=0
|
||||
ToCarryOver=no
|
||||
ToInherit=no
|
||||
TimerInherit=no
|
||||
CivEvac=no
|
||||
NewINIFormat=3
|
||||
CarryOverCap=0
|
||||
EndOfGame=no
|
||||
NoSpyPlane=no
|
||||
SkipScore=no
|
||||
OneTimeOnly=no
|
||||
SkipMapSelect=no
|
||||
Official=yes
|
||||
FillSilos=no
|
||||
TruckCrate=no
|
||||
Percent=0
|
||||
|
||||
[Greece]
|
||||
PlayerControl=yes
|
||||
|
||||
[Map]
|
||||
Theater=SNOW
|
||||
X=49
|
||||
Y=49
|
||||
Width=30
|
||||
Height=30
|
||||
|
||||
[Waypoints]
|
||||
98=8256
|
||||
99=8256
|
||||
|
||||
[MapPack]
|
||||
1=BwAAIIH//v8f/4AHAAAggf/+/x//gAcAACCB//7/H/+ABwAAIIH//v8f/4AHAAAggQD+/x
|
||||
2=8AgAcAACCBAP7/HwCA
|
||||
|
||||
[TERRAIN]
|
||||
8638=T01
|
||||
8778=T01
|
||||
7989=T01
|
||||
6453=T01
|
||||
8008=T01
|
||||
8399=T01
|
||||
7503=T01
|
||||
8631=T01
|
||||
9781=T01
|
||||
8883=T01
|
||||
9147=T03
|
||||
9043=T03
|
||||
8280=T03
|
||||
6998=T03
|
||||
7519=TC04
|
||||
8923=TC05
|
||||
|
||||
[UNITS]
|
||||
0=Spain,4TNK,256,9288,0,Guard,None
|
||||
|
||||
[STRUCTURES]
|
||||
0=USSR,IRON,256,7115,0,None,0,0
|
||||
1=USSR,WEAP,256,6978,0,None,0,0
|
||||
2=USSR,FACT,256,7355,0,None,0,0
|
||||
3=USSR,PROC,256,7873,0,None,0,0
|
||||
|
||||
[Base]
|
||||
Player=USSR
|
||||
Count=0
|
||||
|
||||
[OverlayPack]
|
||||
1=BwAAIIH//v8f/4AHAAAggf/+/x//gA==
|
||||
|
||||
[Briefing]
|
||||
1=Rescue Einstein from the Headquarters inside this Soviet complex. Once
|
||||
2=found, evacuate him via the helicopter at the signal flare. Einstein and
|
||||
3=Tanya must be kept alive at all costs. Beware the Soviet's Tesla Coils.
|
||||
4=Direct Tanya to destroy the westmost power plants to take them off-line.
|
||||
|
||||
[Digest]
|
||||
1=pInr5IMV1Wll5YhV9IYdIxGdJ24=
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
set PATH="C:\Program Files\ImageMagick-7.0.10-Q16-HDRI"
|
||||
|
||||
magick.exe convert sno1.png -alpha set -virtual-pixel transparent +distort Affine "0,512 0,0 0,0 -87,-50 512,512 87,-50" -background none -compose plus -bordercolor black -compose over -border 5x2 sno1_iso.png
|
||||
pause
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@@ -569,10 +569,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);
|
||||
TacLeptonWidth = Pixel_To_Lepton( width - x) * 2;
|
||||
|
||||
if (height == -1) height = SeenBuff.Get_Height();
|
||||
TacLeptonHeight = Pixel_To_Lepton(height - y);
|
||||
TacLeptonHeight = Pixel_To_Lepton(height - y) * 2;
|
||||
|
||||
/*
|
||||
** Adjust the tactical cell if it is now in an invalid position
|
||||
@@ -1756,6 +1756,17 @@ bool DisplayClass::Coord_To_Pixel(COORDINATE coord, int &x, int &y) const
|
||||
if ((int)yoff <= TacLeptonHeight + EDGE_ZONE*2) {
|
||||
x = Lepton_To_Pixel(xoff)-CELL_PIXEL_W*2;
|
||||
y = Lepton_To_Pixel(yoff)-CELL_PIXEL_H*2;
|
||||
// jmarshall - isometric
|
||||
int tileWidth = CELL_PIXEL_W;
|
||||
int tileHeight = CELL_PIXEL_H;
|
||||
int sx = (x / CELL_PIXEL_W) * (tileWidth / 2) - (y / CELL_PIXEL_W) * (tileWidth / 2);
|
||||
int sy = (x / CELL_PIXEL_W) * (tileHeight / 2) + (y / CELL_PIXEL_W) * (tileHeight / 2);
|
||||
|
||||
x = sx + (CELL_PIXEL_W / 2);
|
||||
y = sy + (CELL_PIXEL_W / 2);
|
||||
|
||||
x = x + (ScreenWidth / 2);
|
||||
// jmarshall end
|
||||
return(true);
|
||||
}
|
||||
}
|
||||
@@ -2344,7 +2355,7 @@ void DisplayClass::Redraw_Icons(void)
|
||||
/*
|
||||
** Only cells flagged to be redraw are examined.
|
||||
*/
|
||||
if (In_View(cell) && Is_Cell_Flagged(cell)) {
|
||||
{
|
||||
int xpixel;
|
||||
int ypixel;
|
||||
|
||||
@@ -2403,7 +2414,7 @@ void DisplayClass::Redraw_OIcons(void)
|
||||
cellptr->Draw_It(xpixel, ypixel, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,11 @@
|
||||
|
||||
struct Image_t;
|
||||
|
||||
#define ICON_PIXEL_W 24
|
||||
// jmarshall - isometric
|
||||
#define ICON_PIXEL_W 48
|
||||
#define ICON_PIXEL_H 24
|
||||
#define ICON_LEPTON_W 256
|
||||
// jmarshall end
|
||||
#define ICON_LEPTON_W 512
|
||||
#define ICON_LEPTON_H 256
|
||||
#define CELL_PIXEL_W ICON_PIXEL_W
|
||||
#define CELL_PIXEL_H ICON_PIXEL_H
|
||||
|
||||
@@ -219,7 +219,7 @@ Image_t* Load_StampHD(int theater, const char* iconName, const void* icondata) {
|
||||
{
|
||||
const char* tileEntryName = Tileset_FindHDTexture(theater, fixedIconName, i, d);
|
||||
sprintf(filename, "DATA/ART/TEXTURES/SRGB/RED_ALERT/TERRAIN/%s/%s", Theaters[theater].Name, tileEntryName);
|
||||
COM_SetExtension(filename, sizeof(filename), ".dds");
|
||||
//COM_SetExtension(filename, sizeof(filename), ".dds");
|
||||
|
||||
if (image == NULL) {
|
||||
// If the image is already loaded, then we are done.
|
||||
@@ -330,8 +330,8 @@ void __cdecl Buffer_Draw_Stamp_Clip2(GraphicViewPortClass& viewport, const void
|
||||
uint8_t* MapPtr = (uint8_t * )iconImage->IconMapPtr;
|
||||
int icon_index = MapPtr != nullptr ? MapPtr[icon] : icon;
|
||||
{
|
||||
int blit_height = iconImage->renderheight[0];
|
||||
int blit_width = iconImage->renderwidth[0];
|
||||
int blit_height = CELL_PIXEL_H;
|
||||
int blit_width = CELL_PIXEL_W;
|
||||
|
||||
int width = left + right;
|
||||
int xstart = left + x;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,228 @@
|
||||
<?xml version="1.0"?>
|
||||
<Tilesets>
|
||||
<TilesetTypeClass name="RA_Terrain_Snow">
|
||||
<RootTexturePath>Red_Alert\Terrain\Snow</RootTexturePath>
|
||||
<Tiles>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>0</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>1</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>2</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>3</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>4</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>5</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>6</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>7</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>8</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>9</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>10</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>11</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>12</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>13</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>14</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>15</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>16</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>17</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>18</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>CLEAR1</Name>
|
||||
<Shape>19</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>clear1.sno\clear1.0012.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
</Tiles>
|
||||
</TilesetTypeClass>
|
||||
</Tilesets>
|
||||
Reference in New Issue
Block a user