Trigger query frequency

https://github.com/bwapi/bwapi
murph
Posts: 30
Joined: Thu Jan 06, 2011 4:59 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby murph » Thu Mar 08, 2012 7:47 pm

The problem is that this set of palette maps is loaded at a different address every game. Follow this debugging procedure to see where the VirtualAlloc() call for this address is made:

Set breakpoint at 4bdee5 and start a Starcraft game.
Notice each time you hit this, esi contains the size of the palette array (there are many palette map sets besides the one we are interested in)
The sequence always seems to be: after you start a game, it creates a palette array of size 0x4000 bytes (64 entries), then one of size 0x2100 (33 entries), 0x2900, 0x4000, then 0x10000 which is the 256 entry palette set we are interested in.
step into the CALL to storm.#401(). at instruction 15020f66 it calls storm.15020cd0(), step in
step down to instruction 15020d49 it calls storm.15020a00(), step in
at instruction 15020c5f it calls VirtualAlloc() returning the address where the palette map will be placed. if you then run to the next hit of 4bdee5, the palette set should have been filled in by then.

You could just find it one time that way, then save it to disk for future use. I don't think it would change (at least the main part, color indices #16..#199 zero-based, i.e., the "non-changing" portion of the Starcraft palette).
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Heinermann » Sun May 06, 2012 5:49 pm


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “BWAPI (wrappers in other languages / questions and announcements related to BWAPI itself)”

Who is online

Users browsing this forum: No registered users and 8 guests