tfv: query conversations sorta work now

still a bug where the cursor goes wacky
This commit is contained in:
Vince Weaver
2018-07-16 12:20:33 -04:00
parent 078fb7b2b5
commit 90c959bb81
3 changed files with 34 additions and 3 deletions

View File

@@ -18,6 +18,7 @@ struct dialog_type dialog[MAX_DIALOG]={
.statement[3].action=ACTION_TIME,
.statement[3].next=0,
.statement[4].words="Maybe next time.",
.statement[4].action=ACTION_DONE,
.statement[4].next=0,
},
[DIALOG_PETE] = {
@@ -43,9 +44,15 @@ struct dialog_type dialog[MAX_DIALOG]={
.statement[0].words="In Talbot 0101C",
.statement[0].next=1,
.statement[1].words="There lived a big giant bee",
.statement[1].next=1,
.statement[1].action=ACTION_ITEM,
.statement[1].item=ITEM_5K_RESISTOR,
.statement[1].next=2,
.statement[2].words="Don't open the door,",
.statement[2].next=3,
.statement[3].words="Because there before",
.statement[3].next=4,
.statement[4].words="Will be a big giant bee",
.statement[4].next=0,
.statement[4].action=ACTION_ITEM,
.statement[4].item=ITEM_5K_RESISTOR,
},
// Dining Hall
[DIALOG_OSCAR]= {

View File

@@ -5,6 +5,7 @@
#define ACTION_BIRD 4
#define ACTION_SMARTPASS 5
#define ACTION_RESTORE 6
#define ACTION_DONE 7
#define DIALOG_LIZ_WILL 0
#define DIALOG_PETE 1

View File

@@ -217,6 +217,22 @@ int world_map(void) {
conversation_started=1;
conversation_person=special_destination;
/* HACK */
conversation_count=dialog[conversation_person].count;
if (dialog[conversation_person].statement[conversation_count].action==ACTION_DONE) {
conversation_started=0;
dialog[conversation_person].count=-1;
goto skip_all_this;
}
if (dialog[conversation_person].statement[conversation_count].action==ACTION_TIME) {
conversation_started=0;
dialog[conversation_person].count=-1;
if (time_hours<95) time_hours+=4;
goto skip_all_this;
}
if (dialog[conversation_person].count==-1) {
dialog[conversation_person].count=0;
}
@@ -225,6 +241,12 @@ int world_map(void) {
dialog[conversation_person].statement[dialog[conversation_person].count].next;
}
conversation_count=dialog[conversation_person].count;
if (dialog[conversation_person].statement[conversation_count].action==ACTION_ITEM) {
item_received=dialog[conversation_person].statement[conversation_count].item;
if (item_received<8) {
@@ -256,6 +278,7 @@ int world_map(void) {
entry=1;
refresh=1;
}
skip_all_this: ;
}
if (ch=='h') {