diff --git a/gr-sim/tfv/TODO b/gr-sim/tfv/TODO index 5ba052a1..fc805777 100644 --- a/gr-sim/tfv/TODO +++ b/gr-sim/tfv/TODO @@ -2,7 +2,6 @@ Known bugs: + When moving to new screen can get stuck or else wrap at weird offset + Weird glitch at top of screen when printing damage during battle + No sound/music on Linux version -+ Game starts with all items + It is not possible to trigger the final battle + Cannot save game @@ -16,6 +15,12 @@ Soon: --> green background on anti-damage printing --> pick up vortex cannon from someone --> Balance the battles +--> Do something with experience/leveling up + ++ Worldmap +--> Make location inverse text to offset it from dialog? +--> Make actions inverse to highlight +--> Start with 0 money + Game over screen --> Pause 2 seconds diff --git a/gr-sim/tfv/tfv.c b/gr-sim/tfv/tfv.c index dd2639ff..ab617189 100644 --- a/gr-sim/tfv/tfv.c +++ b/gr-sim/tfv/tfv.c @@ -11,10 +11,10 @@ /* stats */ unsigned char level=0; -unsigned char hp=100,max_hp=100; -unsigned char mp=50,max_mp=50; +unsigned char hp=95,max_hp=100; +unsigned char mp=45,max_mp=50; unsigned char limit=1; -unsigned char money=0,experience=0; +unsigned char money=10,experience=0; unsigned char time_hours=0,time_minutes=0; //unsigned char items1=0xff,items2=0xff,items3=0x07; unsigned char items1=0,items2=0,items3=0; diff --git a/gr-sim/tfv/tfv_dialog.c b/gr-sim/tfv/tfv_dialog.c index b0b0f9c3..db610d4d 100644 --- a/gr-sim/tfv/tfv_dialog.c +++ b/gr-sim/tfv/tfv_dialog.c @@ -102,10 +102,13 @@ struct dialog_type dialog[MAX_DIALOG]={ .statement[0].action=ACTION_QUERY, .statement[1].words="YES", .statement[1].next=3, +// .statement[1].action=ACTION_ITEM, +// .statement[1].item=ITEM_SMARTPASS, .statement[2].words="NO", .statement[2].next=4, .statement[3].words="That will be $5", - .statement[3].action=ACTION_SMARTPASS, + .statement[3].action=ACTION_ITEM, + .statement[3].item=ITEM_SMARTPASS, .statement[3].next=4, .statement[4].words="Sorry, all trains cancelled. SmartTrip", .statement[4].next=4, @@ -124,15 +127,17 @@ struct dialog_type dialog[MAX_DIALOG]={ .statement[0].words="WARK?", .statement[0].next=0, .statement[0].action=ACTION_QUERY, - .statement[1].words="YES", - .statement[1].next=3, - .statement[2].words="NO", - .statement[2].next=4, + .statement[1].words="NO", + .statement[1].next=4, + .statement[2].words="YES", + .statement[2].next=3, +// .statement[2].action=ACTION_BIRD, .statement[3].words="WARK!", .statement[3].action=ACTION_BIRD, .statement[3].next=0, .statement[4].words="Poot-tee-tweet", .statement[4].next=0, + .statement[4].action=ACTION_DONE, }, // FOUNTAIN [DIALOG_MERMAID]= { @@ -143,11 +148,14 @@ struct dialog_type dialog[MAX_DIALOG]={ .statement[1].next=3, .statement[2].words="NO", .statement[2].next=4, + .statement[2].action=ACTION_RESTORE, .statement[3].words="Begone, wastrel!", .statement[3].next=0, + .statement[3].action=ACTION_DONE, .statement[4].words="Must have been those band knaves.", .statement[4].next=0, - .statement[4].action=ACTION_RESTORE, + .statement[4].action=ACTION_DONE, +// .statement[4].action=ACTION_RESTORE, }, // BEL AIR [DIALOG_CMW]= { diff --git a/gr-sim/tfv/tfv_mapinfo.h b/gr-sim/tfv/tfv_mapinfo.h index 88d6d291..0be7c362 100644 --- a/gr-sim/tfv/tfv_mapinfo.h +++ b/gr-sim/tfv/tfv_mapinfo.h @@ -441,14 +441,14 @@ struct map_info_type map_info[34] = { .location[1] = { .name="Large Bird", .x0 = 26, .x1 = 33, - .y0 = 16, .y1 = 20, + .y0 = 16, .y1 = 22, .destination=DIALOG_LARGE_BIRD, .type=LOCATION_CONVERSATION, }, .location[2] = { .name="Giant Guinea Pig", .x0 = 28, .x1 = 33, - .y0 = 22, .y1 = 30, + .y0 = 24, .y1 = 30, .destination=DIALOG_GIANT_GUINEA_PIG, .type=LOCATION_CONVERSATION, }, diff --git a/gr-sim/tfv/tfv_worldmap.c b/gr-sim/tfv/tfv_worldmap.c index eeb8db39..dad4fa9b 100644 --- a/gr-sim/tfv/tfv_worldmap.c +++ b/gr-sim/tfv/tfv_worldmap.c @@ -148,7 +148,7 @@ int world_map(void) { int conversation_started=0; int conversation_person=0; int conversation_count=0; - int item_received=-1; + int item_received=-1,health_restored=0; int in_query=0; /************************************************/ @@ -213,11 +213,16 @@ int world_map(void) { if (moved) conversation_started=0; if (ch==13) { + + health_restored=0; + if (destination_type==LOCATION_CONVERSATION) { conversation_started=1; conversation_person=special_destination; /* HACK */ + + /* Action Done */ conversation_count=dialog[conversation_person].count; if (dialog[conversation_person].statement[conversation_count].action==ACTION_DONE) { conversation_started=0; @@ -225,6 +230,22 @@ int world_map(void) { goto skip_all_this; } + /* Get on Large Bird */ + if (dialog[conversation_person].statement[conversation_count].action==ACTION_BIRD) { + printf("BIRD BIRD BIRD BIRD!\n"); + on_bird=1; + conversation_started=0; + dialog[conversation_person].count=-1; + map_location=COLLEGE_PARK; + tfv_x=35; + tfv_y=5; + refresh=1; + goto skip_all_this; + } + + + + /* Action Time */ if (dialog[conversation_person].statement[conversation_count].action==ACTION_TIME) { conversation_started=0; dialog[conversation_person].count=-1; @@ -232,7 +253,6 @@ int world_map(void) { goto skip_all_this; } - if (dialog[conversation_person].count==-1) { dialog[conversation_person].count=0; } @@ -244,11 +264,24 @@ int world_map(void) { - - - if (dialog[conversation_person].statement[conversation_count].action==ACTION_ITEM) { + item_received=dialog[conversation_person].statement[conversation_count].item; + printf("ACTION ITEM %d\n",item_received); + + /* Action Smartpass */ + /* FIXME: make generic item buy? */ + if (item_received==ITEM_SMARTPASS) { + printf("Trying to get smartpass!\n"); + if (money<5) { + goto no_smartpass; + } + else { + money-=5; + } + } + + if (item_received<8) { items1|=(1<