First of all, yesterday I continued the Od debugging game, run the wrong version, and then OD notes, labels and breakpoints are all gone. As soon as the sky closed a door, and I opened a window--to abandon the shackles of the former, to start again, it is possible to find the whole process of judging the map trigger, to be further tested, and to find the source of immediate victory.
Let's pick up the book.
(13) Enumerate map players--the dark ones hidden behind
If you are careful in the wild plunder of the last step, you find that no one occupies the powner of the building is not NULL, you may find a new continent. Who owns the building, but still can show no ownership.
The last diagram, the transfer of the function (call [ebx+378]) preceded by a call with such a note: The player ID gets the data base address (in fact, this description is not accurate), do not know whether to notice? At that time, when debugging, the incoming Ecx=0,eax returned to the player data address, and then a cursory look at the inside of the loop, made a label like this. After all, can return the Player data address function, need a parameter, that 80% is the player ID, because we are the first local player, is the location of the number No. 0. Connected to wartime, will become other locations, stand-alone only in the number No. 0 ...
Since there is such an ID, look for the ID at which offset. Using the CE analysis data/structure function, compare and analyze all the player data on the map (through the computer building Powner to get the computer player data address, I tested two players, I use the United States, the opponent is simple Soviet Union), while trying to find some other obvious data, only found that offset + 30 is more obvious, I am 0, the computer is 1. Basically, the +30 offset is the player ID. Then there is a bunch of less obvious data, a big chunk of 0.
However, when for some reason I went and looked at the so-called call< player ID to get the data base, but found that no instruction read the +30 offset, amazing! Then carefully follow the discovery of an inexplicable number of cycles, the map has 2 players, but the cycle of 4 times. Try 3 players and the results loop 5 times. Moreover, compared with the parameter ecx, the data at the +b8 offset of an address at the offset of the player data +34 is more complicated. The C language description is: if (currentplayer.onepointer->onevalue = = ECX).
This onevalue, is it always the same as the player ID? What structure is this pointer pointing to? Ultimately inspired by the map editor, the Unit attribution on the map can be set to different countries, as well as flat (i.e. no attribution) and policing (a mysterious organization), which explains why the number of cycles is always two times: peace and security in places you can't see, as a special player has been there. It also explains that the unit does not seem to belong, in fact there is a person who belongs. player Data +34 offset is the member of the Force object pointer, the structure of the +B8 offset is the force number. Then the exact comment of this call should be: The force number gets the data base.
Now it's time to get to the point, to analyze This function (004ed760), you can find the necessary conditions for enumerating players: map players (including peace and Security) (GAME.EXE+6322A8), map player Array (game.exe+63229c). then you can see how much money they have, how many infantry they have, how many buildings and so on, and so on, these offsets are easier to find.
Extra, seems to be in a Soviet mission found that the player ID is finally not 0, because the plot is forced to build base, I was the aggressor and the last level, captured the president's mission map has 13 players (there are two hidden deeper forces called GDI and Nod)-I blind, play time did not see.
(14) Immediate victory-to hit me ~
Red Alert 2 modifier principle Encyclopedia (vi)