22 #ifndef NUVIE_CORE_CONVERSE_INTERPRET_H 23 #define NUVIE_CORE_CONVERSE_INTERPRET_H 25 #include "ultima/nuvie/core/converse.h" 45 #define U6OP_LAND 0x95 46 #define U6OP_CANCARRY 0x9a 47 #define U6OP_WEIGHT 0x9b 48 #define U6OP_HORSED 0x9d 49 #define U6OP_HASOBJ 0x9f 50 #define U6OP_RAND 0xa0 51 #define U6OP_EVAL 0xa7 52 #define U6OP_FLAG 0xab 54 #define U6OP_SVAR 0xb3 55 #define U6OP_DATA 0xb4 56 #define U6OP_OBJCOUNT 0xbb 57 #define U6OP_INPARTY 0xc6 58 #define U6OP_OBJINPARTY 0xc7 59 #define U6OP_JOIN 0xca 60 #define U6OP_LEAVE 0xcc 61 #define U6OP_NPCNEARBY 0xd7 62 #define U6OP_WOUNDED 0xda 63 #define U6OP_POISONED 0xdc 71 #define U6OP_HORSE 0x9c 72 #define U6OP_SLEEP 0x9e 74 #define U6OP_ENDIF 0xa2 75 #define U6OP_ELSE 0xa3 76 #define U6OP_SETF 0xa4 77 #define U6OP_CLEARF 0xa5 78 #define U6OP_DECL 0xa6 79 #define U6OP_ASSIGN 0xa8 80 #define U6OP_JUMP 0xb0 81 #define U6OP_DPRINT 0xb5 83 #define U6OP_INDEXOF 0xb7 85 #define U6OP_DELETE 0xba 86 #define U6OP_INVENTORY 0xbe 87 #define U6OP_PORTRAIT 0xbf 88 #define U6OP_ADDKARMA 0xc4 89 #define U6OP_SUBKARMA 0xc5 90 #define U6OP_GIVE 0xc9 91 #define U6OP_WAIT 0xcb 92 #define U6OP_WORKTYPE 0xcd 93 #define U6OP_RESURRECT 0xd6 94 #define U6OP_SETNAME 0xd8 95 #define U6OP_HEAL 0xd9 96 #define U6OP_CURE 0xdb 97 #define U6OP_ENDANSWER 0xee 98 #define U6OP_KEYWORDS 0xef 99 #define U6OP_SLOOK 0xf1 100 #define U6OP_SCONVERSE 0xf2 101 #define U6OP_SPREFIX 0xf3 102 #define U6OP_ANSWER 0xf6 103 #define U6OP_ASK 0xf7 104 #define U6OP_ASKC 0xf8 105 #define U6OP_INPUTSTR 0xf9 106 #define U6OP_INPUT 0xfb 107 #define U6OP_INPUTNUM 0xfc 108 #define U6OP_SIDENT 0xff 110 #define U6OP_ENDDATA 0xb8 112 #define MDOP_MISC_ACTION 0xd1 126 #define ANSWER_DONE 2 142 converse_value start_c;
144 converse_value break_c;
157 converse_value db_loc;
158 converse_value db_offset;
161 const char *get_rstr(uint32 sn)
const {
162 return ((sn < rstrings.
size()) ? rstrings[sn].c_str() :
"");
164 const string &get_ystr()
const {
167 void set_ystr(
const char *s);
168 void set_rstr(uint32 sn,
const char *s);
169 converse_value add_rstr(
const char *s);
171 void let(uint8 v, uint8 t) {
176 decl_v = decl_t = 0x00;
179 void enter(converse_value c);
182 while (b_frame && !b_frame->empty()) leave();
185 return ((b_frame && !b_frame->empty()) ? b_frame->top() :
nullptr);
187 void do_frame(converse_value c);
189 void set_break(converse_value c) {
190 if (top_frame()) top_frame()->break_c = c;
192 converse_value get_break()
const {
193 return (top_frame() ? top_frame()->break_c : 0x00);
198 void set_run(
bool r) {
199 if (top_frame()) top_frame()->run = r;
201 bool get_run()
const {
202 return (top_frame() ? top_frame()->run :
true);
209 bool waiting()
const {
230 virtual void collect_input();
231 virtual struct in_val_s read_value();
232 void eval(uint32 vi = 0);
234 void add_val(converse_value c, uint8 d = 0);
235 void add_text(
unsigned char c = 0);
238 uint32 val_count()
const {
241 converse_value get_val(uint32 vi);
242 uint8 get_val_size(uint32 vi);
243 converse_value pop_val();
244 uint8 pop_val_size();
258 string get_formatted_text(
const char *c_str);
269 virtual uint8 npc_num(uint32 n);
271 bool var_input()
const {
272 return decl_t != 0x00;
276 converse_value get_db_integer(uint32 loc, uint32 i);
277 void set_db_integer(uint32 loc, uint32 i, converse_value val);
278 char *get_db_string(uint32 loc, uint32 i);
279 converse_value find_db_string(uint32 loc,
const char *dstring);
282 virtual bool is_print(converse_value check)
const {
283 return (((check == 0x0a) || (check >= 0x20 && check <= 0x7a) || (check == 0x7e) || (check == 0x7b)));
285 virtual bool is_ctrl(converse_value code)
const {
286 return (((code >= 0xa1 || code == 0x9c || code == 0x9e) && !is_valop(code) && !is_datasize(code)));
288 virtual bool is_datasize(converse_value check)
const {
289 return ((check == 0xd3 || check == 0xd2 || check == 0xd4));
291 virtual bool is_valop(converse_value check)
const {
292 return (((check == 0x81) || (check == 0x82) || (check == 0x83)
293 || (check == 0x84) || (check == 0x85) || (check == 0x86)
294 || (check == 0x90) || (check == 0x91) || (check == 0x92)
295 || (check == 0x93) || (check == 0x94) || (check == 0x95)
296 || (check == 0x9a) || (check == 0x9b) || (check == 0x9d)
297 || (check == 0x9f) || (check == 0xa0) || (check == 0xa7)
298 || (check == 0xab) || (check == 0xb2) || (check == 0xb3)
299 || (check == 0xb4) || (check == 0xb7) || (check == 0xbb) || (check == 0xc6)
300 || (check == 0xc7) || (check == 0xca) || (check == 0xcc)
301 || (check == 0xd7) || (check == 0xda) || (check == 0xdc)
302 || (check == 0xdd) || (check == 0xe0) || (check == 0xe1)
303 || (check == 0xe2) || (check == 0xe3) || (check == 0xe4)));
305 const char *evop_str(converse_value op);
306 const char *op_str(converse_value op);
Definition: converse.h:57
Definition: converse_interpret.h:140
Definition: converse_interpret.h:134
void resize(size_t count)
Definition: converse_interpret.h:316
Definition: detection.h:27
Definition: converse_interpret.h:129
Definition: converse_interpret.h:310
size_type size() const
Definition: array.h:315
void resize(size_type newSize)
Definition: array.h:411
Definition: converse_interpret.h:117
Definition: converse_interpret.h:330
Definition: converse.h:81
Definition: converse_interpret.h:324