- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2018-07-31T23:46:41+09:00","","")
[[GAME作成システム]]
#author("2018-07-31T23:48:52+09:00","","")
*int型変数管理サブルーチン [#x0220753]
#include "mdl_value.as"
#include "mdl_value.as" //includeガードが効いてるかのTEST
//struct int_vars {
// char[100] name;
// int name_l=-1;
// int value=0;
//}
//int型変数一つを扱うモジュール
//int_var_youso_name:変数の名前
//int_var_youso_l:変数の名前の長さ
//int_var_youso_value:変数の値
#module int_var_3youso int_var_youso_name,int_var_youso_l,int_var_youso_value
//コンスタラクタ。引数なし
#modinit
int_var_youso_name=""
int_var_youso_l=-1
int_var_youso_value=0
return
//varのnameのsetter
#modfunc local set_name str __p_str
int_var_youso_name=__p_str
return
//varのnameのstrlenを計算して格納
#modfunc local calc_strlen
int_var_youso_l=strlen(int_var_youso_name)
return
//varのvalueのsetter
#modfunc local set_value int __p_int
int_var_youso_value=__p_int
return
//varのnameのgetter
#modcfunc local get_name
return int_var_youso_name
//varのnameの長さのgetter
#modcfunc local get_length
return int_var_youso_l
//varのvalueのgetter
#modcfunc local get_value
return int_var_youso_value
#global
//そういえばこのモジュールテストしてないっすw