55 #define qu( x ) ("\""+x+"\"")
60 #define missionNode easyDomNode
65 typedef vector< varInst* >
olist_t;
66 typedef vsUMap< string, varInst* >
omap_t;
73 #define SCRIPT_PARSE 0
75 #define SCRIPT_PARSE_DECL 2
312 std::cout<<
"varInst() obsolete\n"<<std::endl;
472 Mission(
const char *configfile,
bool loadscripts =
true );
473 Mission(
const char *filename,
const std::string &pythonscript,
bool loadscripts =
true );
475 void UnPickle( std::string pickled );
493 string getVariable(
string name,
string defaultval );
517 bool runScript(
string modulename,
const string &scriptname,
unsigned int classid = 0 );
523 current_ai_unit = unit;
527 current_ai_order = order;
540 void ConstructMission(
const char *configfile,
const std::string &pythonscript,
bool loadscripts =
true );
547 Unit *current_ai_unit;
548 Order *current_ai_order;
555 static int total_nr_frames;
565 char *nextpythonmission;
566 std::string unpickleData;
583 vector< missionNode* >scope_stack;
587 vector< string >import_stack;
588 vsUMap< string, callback_module_string_type > module_string_map;
589 vsUMap< string, callback_module_omap_type > module_omap_map;
590 vsUMap< string, callback_module_olist_type > module_olist_map;
591 vsUMap< string, callback_module_order_type > module_order_map;
592 vsUMap< string, callback_module_unit_type > module_unit_map;
593 vsUMap< string, callback_module_std_type > module_std_map;
594 vsUMap< string, callback_module_briefing_type >module_briefing_map;
595 vsUMap< string, callback_module_type >module_map;
597 void saveVariables(
const ostream &out );
600 void initCallbackMaps();
603 bool checkMission(
easyDomNode *node,
bool loadscripts );
618 void removeContext();
619 void removeContextStack();
633 void checkStatement(
missionNode *node,
int mode );
640 void doDefVar(
missionNode *node,
int mode,
bool global_var =
false );
650 int intMath(
string mathname,
int res1,
int res2 );
651 double floatMath(
string mathname,
double res1,
double res2 );
659 double checkFloatExpr(
missionNode *node,
int mode );
668 bool have_return(
int mode );
669 missionNode * lookupScript(
string scriptname,
string modulename );
671 var_type vartypeFromString(
string type );
676 void fatalError(
missionNode *node,
int mode,
string message );
677 void runtimeFatal(
string message );
678 void warning(
string message );
679 void debug(
missionNode *node,
int mode,
string message );
687 void printVarInst(
varInst *vi );
688 void saveVarInst(
varInst *vi, ostream &out );
689 void printVarInst(
int dbg_level,
varInst *vi );
690 void printGlobals(
int dbg_level );
693 string modestring(
int mode );
695 varInst * searchScopestack(
string name );
720 string replaceNewline(
string origstr );
758 string getStringArgument(
missionNode *node,
int mode,
int arg_nr );
760 void findNextEnemyTarget(
Unit *my_unit );
763 void doCall_toxml(
string module,
varInst *ovi );
766 int vi_counter, old_vi_counter;
767 int olist_counter, old_olist_counter;
768 int string_counter, old_string_counter;
778 double getFloatArg(
missionNode *node,
int mode,
int arg_nr );
779 int getIntArg(
missionNode *node,
int mode,
int arg_nr );
780 bool getBoolArg(
missionNode *node,
int mode,
int arg_nr );