CleoOptimizer is a program to convert old missions written for main into Cleo missions. The program replaces global variables with local ones. The program takes into account such factors as: + Does not convert to local global variables predefined in CustomVariables.ini, such as $ONMISSION and $Player_Actor. + Takes into account that 32@ and 33@ are timers and cannot be used for storage. + Takes into account that variables can occupy several "slots" (for example, 0@v occupies 0@,1@,2@,3@) + Takes into account that some local "slots" may be occupied by local variables used in the mission + Considers sizes of global and local arrays + Doesn't convert commented out variables inside the lines + Considers that opcodes of status texts and timers require global variables + Automatically determines the type of flow (regular or mission) + Converts end_thread, create_thread, create_thread_wb, start_mission opcodes.
+ An additional option - defragmentation of local variables - is used if there is not enough space.