Talk:World/@comment-28241556-20151007155839/@comment-26817273-20151010094019

Before the level completion screen is reached, Crash will obviously have to land on the goal/warp panel, and when this happens, the WarpC code writes the number of boxes broken-global variable 0x3E-and the ID for the level being completed-global variable 0-to global variables 0x46 and 0x47, respectively, before loading the level completion screen level. Here you can view the disassembled output for the GOOL executable used in the level completion screen-"GamOC". At line 2381/offset 0x2530 begins the routine that determines the box count for the level that is completed; it looks like the counts are hardcoded for each level. The GLBR 0x4700  instruction at 2383 reads global variable 0x47-i.e. the ID for the level that was completed-and in the following lines are comparisons for each possible level; if a comparison is successful, the object field at offset 0x174 is written with the level's corresponding box count. So, for example: This says if the level completed was N. Sanity Beach (0x900 is level 0x9), then set field 0x174 (evidently, the box count value), to 0x31 = 49. So if you wanted to change it you could just change the 31 in 11831E45 at address 0x2548 in the GamOC bytecode item to whatever.