peterthepigeon Posted March 20, 2016 Share Posted March 20, 2016 CPU Disasm Address Hex dump Command Comments 0041D1EC |. 8D4D AC LEA ECX,[EBP-54] 0041D1EF |. 8D5D A8 LEA EBX,[EBP-58] 0041D1F2 |. 8B55 B8 MOV EDX,DWORD PTR SS:[EBP-48] 0041D1F5 |. B8 C0DD5300 MOV EAX,0053DDC0 0041D1FA |. E8 A9520100 CALL 004324A8 ; [C&C95.004324A8 0041D1FF |. 8D4D B4 LEA ECX,[EBP-4C] 0041D202 |. 8D5D B0 LEA EBX,[EBP-50] 0041D205 |. 8B55 BC MOV EDX,DWORD PTR SS:[EBP-44] 0041D208 |. B8 C0DD5300 MOV EAX,0053DDC0 0041D20D |. E8 96520100 CALL 004324A8 ; [C&C95.004324A8 The lea just means pass by reference, from what I can see it takes a pointer to the map in EAX. void Compute ( void* mapptr, int unknown, short* a, short* b ) { // stuff goes here } This is what tells it where to draw the laser from and it's obviously related to cell computation or other drawing because I see this call referenced elsewhere. I haven't checked, nor do I really desire to spend too much time on it. The only question is what other input is necessary, and I'll examine that. Once you have this working it's a trivial matter to call drawline in the unit/infantry firing code to render the laser. This is the first real reverse engineering I've done in months on C&C. I'm lazy, get over it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now