22 #ifndef NUVIE_CORE_CONVERSE_INTERPRET_H 23 #define NUVIE_CORE_CONVERSE_INTERPRET_H 25 #include "ultima/nuvie/core/converse.h" 42 #define U6OP_LAND 0x95 43 #define U6OP_CANCARRY 0x9a 44 #define U6OP_WEIGHT 0x9b 45 #define U6OP_HORSED 0x9d 46 #define U6OP_HASOBJ 0x9f 47 #define U6OP_RAND 0xa0 48 #define U6OP_EVAL 0xa7 49 #define U6OP_FLAG 0xab 51 #define U6OP_SVAR 0xb3 52 #define U6OP_DATA 0xb4 53 #define U6OP_OBJCOUNT 0xbb 54 #define U6OP_INPARTY 0xc6 55 #define U6OP_OBJINPARTY 0xc7 56 #define U6OP_JOIN 0xca 57 #define U6OP_LEAVE 0xcc 58 #define U6OP_NPCNEARBY 0xd7 59 #define U6OP_WOUNDED 0xda 60 #define U6OP_POISONED 0xdc 68 #define U6OP_HORSE 0x9c 69 #define U6OP_SLEEP 0x9e 71 #define U6OP_ENDIF 0xa2 72 #define U6OP_ELSE 0xa3 73 #define U6OP_SETF 0xa4 74 #define U6OP_CLEARF 0xa5 75 #define U6OP_DECL 0xa6 76 #define U6OP_ASSIGN 0xa8 77 #define U6OP_JUMP 0xb0 78 #define U6OP_DPRINT 0xb5 80 #define U6OP_INDEXOF 0xb7 82 #define U6OP_DELETE 0xba 83 #define U6OP_INVENTORY 0xbe 84 #define U6OP_PORTRAIT 0xbf 85 #define U6OP_ADDKARMA 0xc4 86 #define U6OP_SUBKARMA 0xc5 87 #define U6OP_GIVE 0xc9 88 #define U6OP_WAIT 0xcb 89 #define U6OP_WORKTYPE 0xcd 90 #define U6OP_RESURRECT 0xd6 91 #define U6OP_SETNAME 0xd8 92 #define U6OP_HEAL 0xd9 93 #define U6OP_CURE 0xdb 94 #define U6OP_ENDANSWER 0xee 95 #define U6OP_KEYWORDS 0xef 96 #define U6OP_SLOOK 0xf1 97 #define U6OP_SCONVERSE 0xf2 98 #define U6OP_SPREFIX 0xf3 99 #define U6OP_ANSWER 0xf6 100 #define U6OP_ASK 0xf7 101 #define U6OP_ASKC 0xf8 102 #define U6OP_INPUTSTR 0xf9 103 #define U6OP_INPUT 0xfb 104 #define U6OP_INPUTNUM 0xfc 105 #define U6OP_SIDENT 0xff 107 #define U6OP_ENDDATA 0xb8 109 #define MDOP_MISC_ACTION 0xd1 123 #define ANSWER_DONE 2 139 converse_value start_c;
141 converse_value break_c;
154 converse_value db_loc;
155 converse_value db_offset;
158 const char *get_rstr(uint32 sn)
const {
159 return ((sn < rstrings.
size()) ? rstrings[sn].c_str() :
"");
164 void set_ystr(
const char *s);
165 void set_rstr(uint32 sn,
const char *s);
166 converse_value add_rstr(
const char *s);
168 void let(uint8 v, uint8 t) {
173 decl_v = decl_t = 0x00;
176 void enter(converse_value c);
179 while (b_frame && !b_frame->empty()) leave();
182 return ((b_frame && !b_frame->empty()) ? b_frame->top() :
nullptr);
184 void do_frame(converse_value c);
186 void set_break(converse_value c) {
187 if (top_frame()) top_frame()->break_c = c;
189 converse_value get_break()
const {
190 return (top_frame() ? top_frame()->break_c : 0x00);
195 void set_run(
bool r) {
196 if (top_frame()) top_frame()->run = r;
198 bool get_run()
const {
199 return (top_frame() ? top_frame()->run :
true);
206 bool waiting()
const {
227 virtual void collect_input();
228 virtual struct in_val_s read_value();
229 void eval(uint32 vi = 0);
231 void add_val(converse_value c, uint8 d = 0);
232 void add_text(
unsigned char c = 0);
235 uint32 val_count()
const {
238 converse_value get_val(uint32 vi);
239 uint8 get_val_size(uint32 vi);
240 converse_value pop_val();
241 uint8 pop_val_size();
266 virtual uint8 npc_num(uint32 n);
268 bool var_input()
const {
269 return decl_t != 0x00;
273 converse_value get_db_integer(uint32 loc, uint32 i);
274 void set_db_integer(uint32 loc, uint32 i, converse_value val);
275 char *get_db_string(uint32 loc, uint32 i);
276 converse_value find_db_string(uint32 loc,
const char *dstring);
279 virtual bool is_print(converse_value check)
const {
280 return (((check == 0x0a) || (check >= 0x20 && check <= 0x7a) || (check == 0x7e) || (check == 0x7b)));
282 virtual bool is_ctrl(converse_value code)
const {
283 return (((code >= 0xa1 || code == 0x9c || code == 0x9e) && !is_valop(code) && !is_datasize(code)));
285 virtual bool is_datasize(converse_value check)
const {
286 return ((check == 0xd3 || check == 0xd2 || check == 0xd4));
288 virtual bool is_valop(converse_value check)
const {
289 return (((check == 0x81) || (check == 0x82) || (check == 0x83)
290 || (check == 0x84) || (check == 0x85) || (check == 0x86)
291 || (check == 0x90) || (check == 0x91) || (check == 0x92)
292 || (check == 0x93) || (check == 0x94) || (check == 0x95)
293 || (check == 0x9a) || (check == 0x9b) || (check == 0x9d)
294 || (check == 0x9f) || (check == 0xa0) || (check == 0xa7)
295 || (check == 0xab) || (check == 0xb2) || (check == 0xb3)
296 || (check == 0xb4) || (check == 0xb7) || (check == 0xbb) || (check == 0xc6)
297 || (check == 0xc7) || (check == 0xca) || (check == 0xcc)
298 || (check == 0xd7) || (check == 0xda) || (check == 0xdc)
299 || (check == 0xdd) || (check == 0xe0) || (check == 0xe1)
300 || (check == 0xe2) || (check == 0xe3) || (check == 0xe4)));
302 const char *evop_str(converse_value op);
303 const char *op_str(converse_value op);
Definition: converse.h:55
Definition: converse_interpret.h:137
Definition: converse_interpret.h:131
Definition: converse_interpret.h:313
Definition: detection.h:27
Definition: converse_interpret.h:126
Definition: converse_interpret.h:307
size_type size() const
Definition: array.h:316
void resize(size_type newSize)
Definition: array.h:412
Definition: converse_interpret.h:114
Definition: converse_interpret.h:327
Definition: converse.h:79
Definition: converse_interpret.h:321