summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-12-31 15:54:33 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-12-31 15:54:33 +0000
commitec7f385bf8f21fa7cc80f17fb7513e08d78a5ccd (patch)
treeebf6e4777ae4577ccae9bb5bc85371639a90b20f /src/map/script.h
parentb0bf26b076dcc5a6f1d6ecddde89948366e96a1a (diff)
downloadhercules-ec7f385bf8f21fa7cc80f17fb7513e08d78a5ccd.tar.gz
hercules-ec7f385bf8f21fa7cc80f17fb7513e08d78a5ccd.tar.bz2
hercules-ec7f385bf8f21fa7cc80f17fb7513e08d78a5ccd.tar.xz
hercules-ec7f385bf8f21fa7cc80f17fb7513e08d78a5ccd.zip
* 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
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h11
1 files changed, 10 insertions, 1 deletions
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
};