From: matze Date: Sat, 28 Jul 2007 18:13:53 +0000 (+0000) Subject: git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@12 af93e077-1a23-4f1e-9cbe... X-Git-Tag: rgb2rv6~97 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=27e71a2848d182812faa818b9381ec97c482bbfc;p=c128-kasse git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@12 af93e077-1a23-4f1e-9cbe-9382a9d578f5 --- 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();