Command & Conquer™ Remastered Collection

Command & Conquer™ Remastered Collection

RA-Assets
DontCryJustDie  [developer] 31 Jul, 2024 @ 4:08am
Shape data
BuildingTypes
ATEK width=48 height=48 frames=2
IRON width=48 height=48 frames=22
WEAP width=72 height=48 frames=2
PDOX width=48 height=48 frames=58
PBOX width=24 height=24 frames=2
HBOX width=24 height=24 frames=4
DOME width=48 height=48 frames=2
GAP width=24 height=48 frames=64
GUN width=24 height=24 frames=128
AGUN width=24 height=48 frames=128
FTUR width=24 height=24 frames=2
FACT width=72 height=72 frames=52
PROC width=72 height=72 frames=2
SILO width=24 height=24 frames=10
HPAD width=48 height=48 frames=14
SAM width=48 height=24 frames=68
AFLD width=72 height=48 frames=16
POWR width=48 height=48 frames=2
APWR width=72 height=72 frames=2
STEK width=72 height=48 frames=2
HOSP width=48 height=48 frames=9
BARR width=48 height=48 frames=20
TENT width=48 height=48 frames=20
KENN width=24 height=24 frames=2
FIX width=72 height=72 frames=14
BIO width=48 height=48 frames=3
MISS width=72 height=48 frames=3
SYRD width=72 height=48 frames=2
SPEN width=72 height=48 frames=2
FCOM width=48 height=48 frames=2
TSLA width=24 height=48 frames=20
WEAF width=72 height=48 frames=2
FACF width=72 height=72 frames=52
SYRF width=72 height=48 frames=2
SPEF width=72 height=48 frames=2
DOMF width=48 height=48 frames=2
SBAG width=24 height=24 frames=32
CYCL width=24 height=24 frames=48
BRIK width=24 height=24 frames=64
BARB width=24 height=24 frames=32
WOOD width=24 height=24 frames=32
FENC width=24 height=24 frames=32
MINV width=24 height=24 frames=1
MINP width=24 height=24 frames=1
V19 width=24 height=24 frames=29
BARL width=12 height=10 frames=3
BRL3 width=24 height=22 frames=3
QUEE width=48 height=24 frames=20
LAR1 width=24 height=24 frames=3
LAR2 width=24 height=24 frames=3

VehicleTypes
4TNK width=48 height=48 frames=64
3TNK width=36 height=36 frames=64
2TNK width=36 height=36 frames=64
1TNK width=24 height=24 frames=64
APC width=24 height=24 frames=38
MNLY width=24 height=24 frames=48
JEEP width=24 height=24 frames=64
HARV width=48 height=48 frames=111
ARTY width=24 height=24 frames=32
MRJ width=24 height=24 frames=64
MGG width=40 height=40 frames=40
MCV width=48 height=48 frames=32
V2RL width=40 height=40 frames=80
TRUK width=24 height=24 frames=32
ANT1 width=48 height=48 frames=112
ANT2 width=48 height=48 frames=112
ANT3 width=48 height=48 frames=112
CTNK width=48 height=48 frames=32
TTNK width=48 height=48 frames=64
QTNK width=48 height=48 frames=96
DTRK width=24 height=24 frames=32
STNK width=24 height=24 frames=70

InfantryTypes
E1 width=50 height=39 frames=438
E2 width=50 height=39 frames=566
E3 width=50 height=39 frames=454
E4 width=50 height=39 frames=566
E6 width=50 height=39 frames=248
E7 width=50 height=39 frames=316
SPY width=50 height=39 frames=342
THF width=50 height=39 frames=193
MEDI width=50 height=39 frames=247
GNRL width=50 height=39 frames=264
DOG width=50 height=39 frames=268
C1 width=50 height=39 frames=198
C2 width=50 height=39 frames=198
C3 width=50 height=39 frames=198
C4 width=50 height=39 frames=198
C5 width=50 height=39 frames=198
C6 width=50 height=39 frames=198
C7 width=50 height=39 frames=198
C8 width=50 height=39 frames=198
C9 width=50 height=39 frames=198
C10 width=50 height=39 frames=198
EINSTEIN width=50 height=39 frames=165
DELPHI width=50 height=39 frames=375
CHAN width=50 height=39 frames=165
SHOK width=50 height=39 frames=566
MECH width=50 height=39 frames=247

AircraftTypes
TRAN width=48 height=48 frames=36
BADR width=72 height=72 frames=16
U2 width=56 height=56 frames=16
MIG width=56 height=56 frames=16
YAK width=40 height=40 frames=16
HELI width=46 height=29 frames=32
HIND width=56 height=56 frames=32

VesselTypes
SS width=56 height=56 frames=16
DD width=72 height=72 frames=16
CA width=72 height=72 frames=16
LST width=46 height=34 frames=5
PT width=56 height=56 frames=16
MSUB width=56 height=56 frames=16
CARR width=30 height=30 frames=10
< >
Showing 1-15 of 21 comments
Thank you for the response, I'll delete my other comment about moving the Tesla Coil to TD on the main page since it was not in the right location. I do prefer the 1st option but even tried adding the LITNING.SHP, file in an EXPAND.MIX file in the CCDATA folder as well. Here is the layout I have at the bottom of the Electric_Zap that I'm having trouble with. The other locations of LightningShapes is also on EXTERNS.H & both locations on BDATA.CPP like they are in RA. I also have the LITNING.ZIP file in ART \ TEXTURES \ SRGB \ TIBERIAN_DAWN \ VFX as well as the tiles in TD_VFX.XML. The structure charges/lights up and its weapon works its just the actual lightning bolts that don't show.

x += _xadd[facing][lastfacing];
y += _yadd[facing][lastfacing];
if (remap != NULL) {

void const *LightningShapes = MixFileClass::Retrieve("LITNING.SHP");
CC_Draw_Shape(LightningShapes, _shape[facing] + (shots ? 4 : 0), x, y, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_FADING | SHAPE_CENTER | SHAPE_WIN_REL, remap);

} else {

void const *LightningShapes = MixFileClass::Retrieve("LITNING.SHP");
CC_Draw_Shape(LightningShapes, _shape[facing] + (shots ? 4 : 0), x, y, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_CENTER | SHAPE_WIN_REL);
DontCryJustDie  [developer] 1 May @ 4:23am 
TD has the remastered data already (LITNING.ZIP and entries in TD_VFX.XML) it is just missing the shape size (24,24) from the shp file. If you can't figure out how to load the shape file then just draw the image directly by using the DLL_Draw_Intercept function.

DLL_Draw_Intercept(_shape[facing]+(shots ? 4 : 0), x, y, 24, 24, SHAPE_CENTER|SHAPE_WIN_REL, this, "LITNING", -1, 256);
Last edited by DontCryJustDie; 1 May @ 4:24am
ty for the DLL_ I def. like that direction more than the CC_. I use DLL for my PIPS too, but when replacing the above with:


x += _xadd[facing][lastfacing];
y += _yadd[facing][lastfacing];
DLL_Draw_Intercept(_shape[facing] + (shots ? 4 : 0), x, y, 24, 24, SHAPE_CENTER | SHAPE_WIN_REL, this, "LITNING", -1, 256);


this error shows below, it still doesn't like the word "this". I was having issues with this techno/object error even using the CC_Draw_Shape as well:

const TechnoClass *const this
argument of type "const TechnoClass*" is incompatible with parameter of type "ObjectClass*"
DontCryJustDie  [developer] 1 May @ 9:36pm 
Remove const with a const_cast or refactor the function so it can be non const.

const_cast<TechnoClass*>(this)
TY, removing the const worked great for the techno/object error. It seems that in my attempt to fix the prior 3 errors is now whats preventing the lightning effect from showing. Below is the entire Electric_Zap function with the 3 original error changes I made. In addition to changes of the 2 "::Distance" although the 1 "Dir_Facing" seems to have transfer smooth I figured I would mention it just in case (they are all notated with OLD RA CODE below). I also attempted to port over the entire 3 functions but resulted in a lot of errors, still looking into the compatibility for the "::Distance" function.



//bool TechnoClass::Electric_Zap(COORDINATE target_coord, int which, WindowNumberType window, COORDINATE source_coord, unsigned char * remap) const // OLD RA CODE.
bool TechnoClass::Electric_Zap(COORDINATE target_coord, int which, WindowNumberType window, COORDINATE source_coord, unsigned char * remap) // NEW TD CODE.
{
//int x,y,x1,y1;
//PG init variables
int x = 0;
int y = 0;
int x1 = 0;
int y1 = 0;
COORDINATE source;

if (source_coord != 0) {
source = source_coord;
} else {
source = Fire_Coord(which);
}
if (What_Am_I() == RTTI_BUILDING) {
((BuildingClass *)this)->IsCharging = false;
}
bool gonnadraw = false;

if (SpecialDialog == SDLG_NONE) {
Map.Coord_To_Pixel(source, x, y);
Map.Coord_To_Pixel(target_coord, x1, y1);
x += Map.TacPixelX;
x1 += Map.TacPixelX;
y += Map.TacPixelY;
y1 += Map.TacPixelY;
gonnadraw = true;
}

static int _shape[]={ 2, 3, 1, 0, 2, 3, 1, 0};
static int _xadd[8][8]={
{ 0, 8, 8, 8, 0, 0, 0, 0},
{ 0, 8, 8, 8, 0, 0, 0, 0},
{ 0, 8, 8, 8, 0, 0, 0, 0},
{ 0, 8, 8, 8, 0, 0, 0, 0},
{ 0, 8, 8, 8, 0, 0, 0, 0},
{-8, 0, 0, 0,-8,-8,-8,-8},
{-8, 0, 0, 0,-8,-8,-8,-8},
{-8, 0, 0, 0,-8,-8,-8,-8}
};
static int _yadd[8][8]={
{-8,-8,-8, 0, 0, 0,-8,-8},
{-8,-8,-8, 0, 0, 0,-8,-8},
{ 0, 0, 0, 8, 8, 8, 0, 0},
{ 0, 0, 0, 8, 8, 8, 0, 0},
{ 0, 0, 0, 8, 8, 8, 0, 0},
{ 0, 0, 0, 8, 8, 8, 0, 0},
{ 0, 0, 0, 8, 8, 8, 0, 0},
{-8,-8,-8, 0, 0, 0,-8,-8}
};

int savex = x, savey = y;
if (gonnadraw) {
for (int shots = 0; shots < 3; shots++) {
x = savex;
y = savey;
int lastfacing = 0;
while (

#ifdef TESLA_COILZ // FUNCTION COMPATIBILITY ERROR BELOW
::Distance
#endif // TESLA_COILZ

(x, y, x1, y1) > 8) {

/*
** Determine true (0..7) facing from current position to
** destination (actually the source coordinate of the zap).
*/
int facing = Dir_Facing(Desired_Facing8(x, y, x1, y1)); // FUNCTION TRANSFERRED OK.

/*
** If there's quite a bit of distance to go,
** we may vary the desired facing to give the
** bolt some randomness.
*/
if (

#ifdef TESLA_COILZ // FUNCTION COMPATIBILITY ERROR BELOW
::Distance
#endif // TESLA_COILZ

(x, y, x1, y1) > 40) {
switch (Sim_Random_Pick(1, 3 + ((shots==0) ? 3 : 0))) {
case 1:
facing++;
break;

case 2:
facing--;
break;

default:
break;
}
facing &= 7;
}

/*
** Now that we have the direction of the bolt,
** draw it and move the x & y coords in the right
** direction for the next piece.
*/
// Electric zap coordinates are always tactical, so don't use the partial window if passed - SKY
x += _xadd[facing][lastfacing];
y += _yadd[facing][lastfacing];
//if (remap != NULL) {
// CC_Draw_Shape(this, "LITNING", LightningShapes, _shape[facing]+(shots ? 4 : 0), x, y, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_FADING|SHAPE_CENTER|SHAPE_WIN_REL, remap);
//} else {
// CC_Draw_Shape(this, "LITNING", LightningShapes, _shape[facing]+(shots ? 4 : 0), x, y, (window != WINDOW_PARTIAL) ? window : WINDOW_TACTICAL, SHAPE_CENTER|SHAPE_WIN_REL);
//}
DLL_Draw_Intercept(_shape[facing] + (shots ? 4 : 0), x, y, 24, 24, SHAPE_CENTER | SHAPE_WIN_REL, this, "LITNING", -1, 256);

lastfacing = facing;
}
}
}

return (gonnadraw);
}
Last edited by NightFalcon101; 4 May @ 4:02am
DontCryJustDie  [developer] 4 May @ 3:13am 
Sorry but that is hard to read and one reason I prefer the discussion section is because you can format you posts here. Another is that you can edit your posts. For code snippets please use the code tag (click on the formating help button if you don't know how to use it).

Here is my Draw_Electric_Zap, see how using the code tag makes it easy to read.

void TechnoClass::Draw_Electric_Zap() { int x = 0, y = 0, x1 = 0, y1 = 0; Map.Coord_To_Pixel(Fire_Coord(ElectricZapWhich), x, y); Map.Coord_To_Pixel(ElectricZapTarget, x1, y1); static int _shape[]={ 2, 3, 1, 0, 2, 3, 1, 0}; static int _xadd[8][8]={ { 0, 8, 8, 8, 0, 0, 0, 0}, { 0, 8, 8, 8, 0, 0, 0, 0}, { 0, 8, 8, 8, 0, 0, 0, 0}, { 0, 8, 8, 8, 0, 0, 0, 0}, { 0, 8, 8, 8, 0, 0, 0, 0}, {-8, 0, 0, 0,-8,-8,-8,-8}, {-8, 0, 0, 0,-8,-8,-8,-8}, {-8, 0, 0, 0,-8,-8,-8,-8} }; static int _yadd[8][8]={ {-8,-8,-8, 0, 0, 0,-8,-8}, {-8,-8,-8, 0, 0, 0,-8,-8}, { 0, 0, 0, 8, 8, 8, 0, 0}, { 0, 0, 0, 8, 8, 8, 0, 0}, { 0, 0, 0, 8, 8, 8, 0, 0}, { 0, 0, 0, 8, 8, 8, 0, 0}, { 0, 0, 0, 8, 8, 8, 0, 0}, {-8,-8,-8, 0, 0, 0,-8,-8} }; const int savex = x, savey = y; for (int shots = 0; shots < 3; shots++) { x = savex; y = savey; int lastfacing = 0; while (::Distance(x, y, x1, y1) > 8) { int facing = Dir_Facing(Desired_Facing8(x, y, x1, y1)); if (::Distance(x, y, x1, y1) > 40) { switch (Random::Pick(1, 3 + ((shots==0) ? 3 : 0))) { case 1: facing++; break; case 2: facing--; break; default: break; } facing &= 7; } x += _xadd[facing][lastfacing]; y += _yadd[facing][lastfacing]; DLLExportClass::Draw_Shape(_shape[facing]+(shots ? 4 : 0), x, y, 24, 24, SHAPE_CENTER|SHAPE_WIN_REL, this, "LITNING", -1, 256); lastfacing = facing; } } }
Last edited by DontCryJustDie; 4 May @ 3:21am
DontCryJustDie  [developer] 4 May @ 3:55am 
Originally posted by NightFalcon101:
if (::Distance(x, y, x1, y1) > 40) { // OLD RA CODE. (originally in INLINE.H)
// ISSUES WITH TRANSFER. (similar function in FUNCTION.H)

I used a local static function for a long time here which was a copy from RA.
Later I refactored it to use global Distance function.

// This function is defined and implemented directly in TECHNO.CPP. static int _Distance(int x1, int y1, int x2, int y2) { int diff1 = y1 - y2; if (diff1 < 0) diff1 = -diff1; int diff2 = x1 - x2; if (diff2 < 0) diff2 = -diff2; if (diff1 > diff2) { return(diff1 + ((unsigned)diff2 / 2)); } return(diff2 + ((unsigned)diff1 / 2)); } void TechnoClass::Draw_Electric_Zap() { ... if (_Distance(x, y, x1, y1) > 40) { } ... }
Last edited by DontCryJustDie; 7 May @ 3:25am
Apologies on the formatting, that IS a real nice layout. I'm going to have to redo my steam guides in that format, I'll keep looking into how to do snippets. I like your shorter code its way better than what I transferred over from RA. What do you have for TechnoClass::Draw_It? As soon as I changed Electric_Zap to Draw_Electric_Zap it said too many arguments function does not take 3 arguments.

/*
** Draw electric zap
*/
if ((ElectricZapDelay >= 0) && ElectricZapTarget) {
Draw_Electric_Zap(ElectricZapTarget, ElectricZapWhich, window);
}
DontCryJustDie  [developer] 4 May @ 9:19am 
My function name is just Draw_Electric_Zap instead of Electric_Zap and I removed the parameters because I don't need them. ElectricZapTarget and ElectricZapWhich are members of TechnoClass and Draw_Electric_Zap is a non static member function so why should I pass them as parameters? And I don't need the window parameter because I have the legacy renderer removed from the code and disabled via xml. The other parameters from RA are also not used by my mod.

I refactored alot of code to fit my liking that is why you see Random::Pick instead of Sim_Random_Pick and DLLExportClass::Draw_Shape instead of DLL_Draw_Intercept. Just use the functions that you have in those places.

Edit: My function was never intended as a copy-paste solution, but rather as an example. And to show how useful it is to format your posts correctly. Also the IsCharging status change is missing in my function because it is done in a different place.
Last edited by DontCryJustDie; 4 May @ 9:51am
Gotcha on the example. When transferring the ::Distance and Desired_Facing8 from RA to TD into TYPE.H it went from 2 errors to 152. I even tried it with a slight name change adding TSLA at the end of each to try to make it specifically attached to the function, but all the error codes showed this:

"enum DirType __cdecl Desired_FacingTSLA8(int,int,int,int)" (?Desired_FacingTSLA8@@YA?AW4DirType@@HHHH@Z) already defined in AADATA.obj

I'm also still looking into doing code tags, is there a link or video that shows how to do it? That is a really nice feature and would like to learn how to use it. Until then would creating a steam guide with screen shots that show everything that has been transferred over so far help?
DontCryJustDie  [developer] 7 May @ 2:52am 
TD has a Desired_Facing8 function, use it. It returns an int instead of DirType so do a cast (just like done in InfantryClass::Scatter).

TD doesn't have any Distance function that accepts 4 parameters so idk why you are having problems with it. Anyways I already talked about it in post #7, I'll update the post to make it more clean because I think local function means something else in C++.

Not sure what you problem with the code tag is, you never used format tags in forums? It is like html or xml. Just click on the help button left to the smiley button which is left to the post button.

[code]My formatted source code[/code]
Last edited by DontCryJustDie; 7 May @ 3:23am
sigh...its been a long time for html. But never the less TY for posting how to format it. On the brighter side I found out why the LITNING wasn't showing. It was creating an error because the definition is similar, apparently I had to add "inline" in front of DirType Desired_Facing8TSLA function. Then it was glitching by getting stuck in shapenum 3 in the IsCharged cycle so I changed it to 7 and all is well (shown below), the coil should be added to the MOD in this weeks update NLT Friday as well as a Steam guide on how to do this process.

#ifdef TESLA_COIL // NightFalcon101 /* ** The Tesla Coil has a stage value that can be overridden by ** its current state. ** CHANGING THE shapenum (PICTURE) NUMBER FROM 3 TO 7 PREVENTS THE ANIMATION FROM ** FREEZING MIDWAY THROUGH THE IsCharged PROCESS. THIS SHOULD BE CONSIDERED A ** QOL OR A BUGFIX FOR BOTH RA AND TD REMASTERED. NightFalcon101 */ if (*this == STRUCT_TSLA) { if (IsChargedTSLA) { //shapenum = 3; // OLD RA CODE. shapenum = 7; // NEW TD CODE. } else { if (IsChargingTSLA) { shapenum = Fetch_Stage(); } else { shapenum = 0; } } } #endif // TESLA_COIL

TY for all your help in getting it working, I'll def add you to the credits!
Last edited by NightFalcon101; 8 May @ 2:03am
Do you know where I can find the infantry electrocution death data from RA to transfer to TD? I found the dog images in the VFX folder (I'm temporarily using burn death), is it something coded in RA I'm overlooking?
Last edited by NightFalcon101; 29 May @ 9:23pm
DontCryJustDie  [developer] 29 May @ 11:36pm 
You can find it inside terrain/snow/electro.sno and terrain/temperate/electro.tem. For my mod I converted the temperate version from dds to tga and created a new animation (vfx).
Last edited by DontCryJustDie; 29 May @ 11:36pm
Was able to create the new animation, got the TD_VFX.XML updated with the tiles, and images in the VFX folder (hope you don't mind me using your images I'll def give you credit). But something peculiar happened after each death. After each animated electrocution death a small white box the size of the infantry stayed there for a few seconds then disappeared. The only thing I can think of is this entry in INFANTRY.CPP Take_Damage section with the other warhead entries.

#ifdef TESLA_COIL // NightFalcon101 TEST TEST TEST case WARHEAD_TESLA: Sound_Effect(sound, Coord); AnimType anim = ANIM_ELECT_DIE; //if (Class->IsDog) anim = ANIM_DOG_ELECT_DIE; new AnimClass(anim, Coord); delthis = true; break; #endif // TESLA_COIL
< >
Showing 1-15 of 21 comments
Per page: 1530 50