From ec7f385bf8f21fa7cc80f17fb7513e08d78a5ccd Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Wed, 31 Dec 2008 15:54:33 +0000 Subject: * Changes to the script engine: - new stack datatype script_retinfo for C_RETINFO to hold all the return state info that was being stored in the stack. (the script engine in 64bit-ready now) - pop_stack is responsible for adjusting all the stack pointers. - push_* returns the created script_data. - 'return' only converts to value scope variables of the current scope. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13427 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/map/script.h') diff --git a/src/map/script.h b/src/map/script.h index fc6422bc5..fa287fc50 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -67,11 +67,20 @@ typedef enum c_op { C_L_SHIFT // a << b } c_op; +struct script_retinfo { + struct linkdb_node** var_function;// scope variables + struct script_code* script;// script code + int pos;// script location + int nargs;// argument count + int defsp;// default stack pointer +}; + struct script_data { enum c_op type; union script_data_val { int num; char *str; + struct script_retinfo* ri; } u; struct linkdb_node** ref; }; @@ -89,7 +98,7 @@ struct script_stack { int sp_max;// capacity of the stack int defsp; struct script_data *stack_data;// stack - struct linkdb_node **var_function; // ֐ˑϐ + struct linkdb_node** var_function;// scope variables }; -- cgit v1.2.3-60-g2f50