From 27e71a2848d182812faa818b9381ec97c482bbfc Mon Sep 17 00:00:00 2001 From: matze Date: Sat, 28 Jul 2007 18:13:53 +0000 Subject: [PATCH] git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@12 af93e077-1a23-4f1e-9cbe-9382a9d578f5 --- config.c | 13 ++++++++++++- kasse.c | 9 --------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/config.c b/config.c index 259e937..681f2ff 100644 --- a/config.c +++ b/config.c @@ -8,7 +8,18 @@ void load_config(); void load_items(){ num_items=3; + status[0].item_name = "cola"; + status[0].price = 230; + status[0].times_sold = 0; + status[1].item_name = "mate"; + status[1].price = 150; + status[1].times_sold = 0; + for (c = 2; c < MAX_ITEMS; ++c) + status[c].item_name = NULL; } -void load_state(){} +void load_state(){ + status[0].times_sold=23; + status[1].times_sold=42; +} void save_state(){} diff --git a/kasse.c b/kasse.c index 8112a5a..25afd6f 100644 --- a/kasse.c +++ b/kasse.c @@ -55,15 +55,6 @@ void buy(uc n) { int main() { static uc c; - /* TODO: remove */ - status[0].item_name = "cola"; - status[0].price = 230; - status[0].times_sold = 0; - status[1].item_name = "mate"; - status[1].price = 150; - status[0].times_sold = 0; - for (c = 2; c < MAX_ITEMS; ++c) - status[c].item_name = NULL; while (1) { /* Bildschirm anzeigen */ print_screen(); -- 2.39.5