From a8fe38121b156ca4ae9e4b676b5708d57bf094cc Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 25 Jun 2018 15:45:26 -0400 Subject: [PATCH] tfv: clean up item handling --- gr-sim/tfv/tfv_help.c | 7 ------- gr-sim/tfv/tfv_info.c | 20 +++++++++----------- gr-sim/tfv/tfv_items.h | 2 +- gr-sim/tfv/tfv_map.c | 8 -------- 4 files changed, 10 insertions(+), 27 deletions(-) diff --git a/gr-sim/tfv/tfv_help.c b/gr-sim/tfv/tfv_help.c index 178245c9..2f70b068 100644 --- a/gr-sim/tfv/tfv_help.c +++ b/gr-sim/tfv/tfv_help.c @@ -1,14 +1,9 @@ #include #include -#include -#include #include "gr-sim.h" #include "tfv_utils.h" #include "tfv_zp.h" -#include "tfv_defines.h" - -#include "tfv_backgrounds.h" void print_help(void) { @@ -57,5 +52,3 @@ void print_help(void) { soft_switch(TXTCLR); } - - diff --git a/gr-sim/tfv/tfv_info.c b/gr-sim/tfv/tfv_info.c index 06873609..f5073e33 100644 --- a/gr-sim/tfv/tfv_info.c +++ b/gr-sim/tfv/tfv_info.c @@ -1,14 +1,12 @@ #include #include -#include -#include #include "gr-sim.h" #include "tfv_utils.h" #include "tfv_zp.h" #include "tfv_defines.h" -#include "tfv_backgrounds.h" +#include "tfv_items.h" /* @@ -41,13 +39,13 @@ EXPERIENCE = 0...255 LEVEL = EXPERIENCE / = 0...63 -NEXT LEVEL = +NEXT LEVEL = MONEY = 0...255 MAX_HP = 32+EXPERIENCE (maxing at 255) */ - -static char item_names1[8][15]={ +char item_names[2][8][15]={ + { "CUPCAKE", // cafeteria lady "CARROT", // capabara "SMARTPASS", // metro worker @@ -56,9 +54,8 @@ static char item_names1[8][15]={ "KARTE SPIEL", // Frau "GLAMDRING", // Gus "VEGEMITE", // Nicole -}; - -static char item_names2[8][15]={ + }, + { "BLUE LED", // bird "RED LED", // "1K RESISTOR", // brown black red, Elaine @@ -67,6 +64,7 @@ static char item_names2[8][15]={ "1.5V BATTERY", // Oscar "LINUX CD", // john "ARMY KNIFE", // Steve + } }; void print_info(void) { @@ -107,11 +105,11 @@ void print_info(void) { for(i=0;i<8;i++) { basic_htab(4); basic_vtab(6+i); - if (items1&(1< #include -#include -#include #include "gr-sim.h" #include "tfv_utils.h" @@ -25,8 +23,6 @@ void show_map(void) { basic_plot(8+((map_location&0x3)*6)+(tfv_x/6),8+(((map_location&0xc)>>2)*6)+(tfv_y/6)); - - // basic_plot(8+((map_location&0x3)*6)+(tfv_x/6),8+(((map_location&0xc)>>2)*6)+(tfv_y/6)); ram[CH]=20; @@ -36,7 +32,3 @@ void show_map(void) { repeat_until_keypressed(); } - - - -