mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Added first enviro prop building(restricted asset from Tiberian Sun).
This commit is contained in:
+6
-1
@@ -243,6 +243,11 @@ Height=51
|
||||
15=USSR,TSLA,256,6967,0,None,0,0
|
||||
16=USSR,TSLA,256,6455,0,None,0,0
|
||||
17=USSR,TSLA,256,8503,0,None,0,0
|
||||
18=Spain,ABAN01,256,6958,0,None,1,0
|
||||
19=Spain,ABAN01,256,5934,0,None,1,0
|
||||
20=Spain,ABAN01,256,8238,0,None,1,0
|
||||
21=Spain,ABAN01,256,8232,0,None,1,0
|
||||
22=Spain,ABAN01,256,5294,0,None,1,0
|
||||
|
||||
[Base]
|
||||
Player=USSR
|
||||
@@ -258,5 +263,5 @@ Count=0
|
||||
4=lesson.
|
||||
|
||||
[Digest]
|
||||
1=HGaGc9BMP2GKbQj3Rdp7tS0y1yo=
|
||||
1=7835Am9csNI1jFgHaaJZovKwZmk=
|
||||
|
||||
|
||||
+57
-17
@@ -2458,6 +2458,37 @@ static BuildingTypeClass const ClassV37(
|
||||
(short const *)ListWestwood, // OCCUPYLIST: List of active foundation squares.
|
||||
(short const *)OListWestwood // OVERLAPLIST:List of overlap cell offset.
|
||||
);
|
||||
|
||||
static BuildingTypeClass const ClassAban01(
|
||||
STRUCT_ABAN01,
|
||||
TXT_CIV37, // NAME: Short name of the structure.
|
||||
"ABAN01", // NAME: Short name of the structure.
|
||||
FACING_NONE, // Foundation direction from center of building.
|
||||
XYP_COORD(0, 0), // Exit point for produced units.
|
||||
REMAP_ALTERNATE, // Sidebar remap logic.
|
||||
0x0000, // Vertical offset.
|
||||
0x0000, // Primary weapon offset along turret centerline.
|
||||
0x0000, // Primary weapon lateral offset along turret centerline.
|
||||
false, // Is this building a fake (decoy?)
|
||||
true, // Animation rate is regulated for constant speed?
|
||||
true, // Always use the given name for the building?
|
||||
false, // Is this a wall type structure?
|
||||
true, // Simple (one frame) damage imagery?
|
||||
false, // Is it invisible to radar?
|
||||
true, // Can the player select this?
|
||||
true, // Is this a legal target for attack or move?
|
||||
false, // Is this an insignificant building?
|
||||
false, // Theater specific graphic image?
|
||||
false, // Does it have a rotating turret?
|
||||
false, // Can the building be color remapped to indicate owner?
|
||||
RTTI_NONE, // The object type produced at this factory.
|
||||
DIR_N, // Starting idle frame to match construction.
|
||||
BSIZE_42, // SIZE: Building size.
|
||||
NULL, // Preferred exit cell list.
|
||||
(short const*)ListWestwood, // OCCUPYLIST: List of active foundation squares.
|
||||
(short const*)OListWestwood // OVERLAPLIST:List of overlap cell offset.
|
||||
);
|
||||
|
||||
static BuildingTypeClass const ClassMission(
|
||||
STRUCT_MISSION,
|
||||
TXT_CIVMISS, // NAME: Short name of the structure.
|
||||
@@ -3024,6 +3055,8 @@ void BuildingTypeClass::Init_Heap(void)
|
||||
new BuildingTypeClass(ClassBarrel); // STRUCT_BARREL
|
||||
new BuildingTypeClass(ClassBarrel3); // STRUCT_BARREL3
|
||||
|
||||
new BuildingTypeClass(ClassAban01);
|
||||
|
||||
#ifdef FIXIT_ANTS
|
||||
new BuildingTypeClass(ClassQueen); // STRUCT_QUEEN
|
||||
new BuildingTypeClass(ClassLarva1); // STRUCT_LARVA1
|
||||
@@ -3035,18 +3068,19 @@ void BuildingTypeClass::Init_Heap(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
Image_t* BuildingTypeClass::LoadHDImage(const char* fullname, int& numHDShapes) {
|
||||
Image_t* BuildingTypeClass::LoadHDImage(const char* fullname, int& numHDShapes, bool remapHouse) {
|
||||
const char* imageFileName = Buildings_FindHDTexture(fullname, 0, 0);
|
||||
Image_t* image = NULL;
|
||||
|
||||
numHDShapes = -1;
|
||||
|
||||
if (imageFileName) {
|
||||
image = Image_LoadImage(imageFileName, true, true);
|
||||
image = Image_LoadImage(imageFileName, remapHouse, remapHouse);
|
||||
int numBuildingAnims = Buildings_GetNumFramesForTile(fullname, 0);
|
||||
int shapeId = 1;
|
||||
|
||||
// Load the old school animation pipeline.
|
||||
if(remapHouse)
|
||||
{
|
||||
while (true) {
|
||||
imageFileName = Buildings_FindHDTexture(fullname, shapeId, 0);
|
||||
@@ -3063,9 +3097,15 @@ Image_t* BuildingTypeClass::LoadHDImage(const char* fullname, int& numHDShapes)
|
||||
if (numBuildingAnims > 0)
|
||||
{
|
||||
for (int i = 1; i < numBuildingAnims; i++) {
|
||||
imageFileName = Buildings_FindHDTexture(fullname, 0, i);
|
||||
for (int d = 0; d < MAX_MPLAYER_COLORS; d++) {
|
||||
Image_Add32BitImage(imageFileName, image, d, 0, i);
|
||||
if(!remapHouse) {
|
||||
imageFileName = Buildings_FindHDTexture(fullname, 0, i);
|
||||
Image_Add32BitImage(imageFileName, image, -1, i, 0);
|
||||
}
|
||||
else {
|
||||
imageFileName = Buildings_FindHDTexture(fullname, 0, i);
|
||||
for (int d = 0; d < MAX_MPLAYER_COLORS; d++) {
|
||||
Image_Add32BitImage(imageFileName, image, d, i, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3184,18 +3224,18 @@ void BuildingTypeClass::One_Time(void)
|
||||
*/
|
||||
_makepath(fullname, NULL, NULL, building.Graphic_Name(), ".SHP");
|
||||
((void const *&)building.ImageData) = MFCD::Retrieve(fullname);
|
||||
((void const*&)building.HDImageData) = LoadHDImage(fullname, numhdimages);
|
||||
((void const*&)building.HDImageData) = LoadHDImage(fullname, numhdimages, building.IsRemappable);
|
||||
|
||||
if (building.ImageData != NULL && building.HDImageData != NULL) {
|
||||
int width = Get_Build_Frame_Width(building.ImageData);
|
||||
int height = Get_Build_Frame_Height(building.ImageData);
|
||||
|
||||
for (int d = 0; d < numhdimages; d++)
|
||||
{
|
||||
building.HDImageData->renderwidth[d] = width;
|
||||
building.HDImageData->renderheight[d] = height;
|
||||
}
|
||||
}
|
||||
//if (building.ImageData != NULL && building.HDImageData != NULL) {
|
||||
// int width = Get_Build_Frame_Width(building.ImageData);
|
||||
// int height = Get_Build_Frame_Height(building.ImageData);
|
||||
//
|
||||
// for (int d = 0; d < numhdimages; d++)
|
||||
// {
|
||||
// building.HDImageData->renderwidth[d] = width;
|
||||
// building.HDImageData->renderheight[d] = height;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
int specialNumHDImages = 0;
|
||||
@@ -3204,7 +3244,7 @@ void BuildingTypeClass::One_Time(void)
|
||||
char fullname[_MAX_FNAME+_MAX_EXT];
|
||||
_makepath(fullname, NULL, NULL, (char const *)"WEAP2",".SHP");
|
||||
WarFactoryOverlay = MFCD::Retrieve(fullname);
|
||||
WarFactoryHDOverlay = LoadHDImage(fullname, specialNumHDImages);
|
||||
WarFactoryHDOverlay = LoadHDImage(fullname, specialNumHDImages, false);
|
||||
if (WarFactoryOverlay != NULL && WarFactoryHDOverlay != NULL) {
|
||||
int width = Get_Build_Frame_Width(WarFactoryOverlay);
|
||||
int height = Get_Build_Frame_Height(WarFactoryOverlay);
|
||||
|
||||
@@ -1465,6 +1465,7 @@ typedef enum StructType : char {
|
||||
STRUCT_V37,
|
||||
STRUCT_BARREL,
|
||||
STRUCT_BARREL3,
|
||||
STRUCT_ABAN01,
|
||||
|
||||
#ifdef FIXIT_ANTS
|
||||
STRUCT_QUEEN,
|
||||
|
||||
@@ -718,6 +718,7 @@ long __cdecl Buffer_Frame_To_Page(int shapeNum, int x, int y, int w, int h, Imag
|
||||
*/
|
||||
INT_PTR Build_Frame(void const *dataptr, unsigned short framenumber, void *buffptr);
|
||||
unsigned short Get_Build_Frame_Count(void const *dataptr);
|
||||
bool Get_Build_TiberianSun_Format(void const* dataptr);
|
||||
unsigned short Get_Build_Frame_X(void const *dataptr);
|
||||
unsigned short Get_Build_Frame_Y(void const *dataptr);
|
||||
unsigned short Get_Build_Frame_Width(void const *dataptr);
|
||||
|
||||
@@ -841,7 +841,7 @@ class BuildingTypeClass : public TechnoTypeClass {
|
||||
void const * BuildupData;
|
||||
|
||||
void Init_Anim(BStateType state, int start, int count, int rate) const;
|
||||
static Image_t* LoadHDImage(const char* fullname, int &numHDShapes);
|
||||
static Image_t* LoadHDImage(const char* fullname, int &numHDShapes, bool remapHouse);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -222,6 +222,21 @@ static bool Image_loadHDImage(Image_t *image, const char* name, int houseid, int
|
||||
if (Data[(i * 4) + 2] == 0 && Data[(i * 4) + 1] == 0 && Data[(i * 4) + 0] == 117) {
|
||||
Data[(i * 4) + 3] = 0;
|
||||
}
|
||||
|
||||
if (Data[(i * 4) + 2] == 117 && Data[(i * 4) + 1] == 0 && Data[(i * 4) + 0]) {
|
||||
Data[(i * 4) + 3] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Bpp == 3) {
|
||||
for (int i = 0; i < Width * Height; i++) {
|
||||
byte b = Data[(i * 3) + 2];
|
||||
Data[(i * 3) + 2] = Data[(i * 4) + 0];
|
||||
Data[(i * 3) + 0] = b;
|
||||
|
||||
if (Data[(i * 3) + 2] == 0 && Data[(i * 3) + 1] == 0 && Data[(i * 3) + 0] == 117) {
|
||||
Data[(i * 3) + 3] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0"?>
|
||||
<Tilesets>
|
||||
<TilesetTypeClass name="RA_Structures">
|
||||
<RootTexturePath>Red_Alert\Structures</RootTexturePath>
|
||||
<Tiles>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>ABAN01</Name>
|
||||
<Shape>0</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>ABAN04/aban04_0000.png</Frame>
|
||||
<Frame>ABAN04/aban04_0000.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
<Tile>
|
||||
<Key>
|
||||
<Name>ABAN01</Name>
|
||||
<Shape>1</Shape>
|
||||
</Key>
|
||||
<Value>
|
||||
<Frames>
|
||||
<Frame>ABAN04/aban04_0000.png</Frame>
|
||||
<Frame>ABAN04/aban04_0000.png</Frame>
|
||||
</Frames>
|
||||
</Value>
|
||||
</Tile>
|
||||
</Tiles>
|
||||
</TilesetTypeClass>
|
||||
</Tilesets>
|
||||
Reference in New Issue
Block a user