Jump to content

yo pichorra


Iran

Recommended Posts

Small question... was the icon remapping actually still in there somewhere? Did you re-enable it, or built it in there yourself?

 

I'm just asking because, the icons of the structures, MCV and Harvester should be red for Nod... in my exe, they should follow the SecondaryScheme logic.

Link to comment
Share on other sites

In RA95 there's a call to HouseClass::Remap_Table(), but the value returned into EAX isn't stored. There's also special logic to make sure 100h is pushed  as arg for the CC_Draw_Shape SHP drawing function, if a non-NULL remap table is used as arg for drawing the sidebar cameo icons, but just before doing that push there's an OR opcode that sets the value to push to 10h. So Westwood added special logic for the drawing if a remap table is used, but then discards the changes from this special logic. Here's the code for C&C95 to show what I mean:

 

.text:004A6A00                 push    eax             ;  always zero, is supposed to also hold the remap table pointer
.text:004A6A01                 test    eax, eax        ; if remaptable pointer is NULL
.text:004A6A03                 jz      short loc_4A6A0C ; jump
.text:004A6A05                 mov     eax, 100h       ; else set eax to 100h
.text:004A6A0A                 jmp     short loc_4A6A0E ; and jump past 'xor eax, eax'
.text:004A6A0C ; ---------------------------------------------------------------------------
.text:004A6A0C
.text:004A6A0C loc_4A6A0C:                             ; CODE XREF: SidebarClass::StripClass::Draw_It(int)+2F3j
.text:004A6A0C                 xor     eax, eax
.text:004A6A0E
.text:004A6A0E loc_4A6A0E:                             ; CODE XREF: SidebarClass::StripClass::Draw_It(int)+2FAj
.text:004A6A0E                 or      al, 10h         ; fuck up value of eax anyway
.text:004A6A10                 mov     ebx, stripbariconswidthtoffset
.text:004A6A16                 and     eax, 0FFFFh     ; fuck up value of eax anyway
.text:004A6A1B                 mov     ecx, edi
.text:004A6A1D                 push    eax

 

Seems to be the same way in C&C95, but there's three different calls to HouseClass::Remap_Table(), in RA95 there's only one.

Link to comment
Share on other sites

Yes, not as odd as this though (from the start of the RA95 AI naval building code):

 

AUTO:004DBD35 05C                 mov     dh, ds:SessionClass Session
AUTO:004DBD3B 05C                 test    dh, dh
AUTO:004DBD3D 05C                 jnz     jump_out
AUTO:004DBD43 05C                 jnz     short jump_skirmish_ai

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...