]> git.sur5r.net Git - c128-kasse/commitdiff
git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@12 af93e077-1a23-4f1e-9cbe...
authormatze <matze@af93e077-1a23-4f1e-9cbe-9382a9d578f5>
Sat, 28 Jul 2007 18:13:53 +0000 (18:13 +0000)
committermatze <matze@af93e077-1a23-4f1e-9cbe-9382a9d578f5>
Sat, 28 Jul 2007 18:13:53 +0000 (18:13 +0000)
config.c
kasse.c

index 259e937e97c1408e4cc2941d47f7171490536d58..681f2ff1fc23419275718a554bfd0da0c3dce075 100644 (file)
--- 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 8112a5a71c71b5d38f9e3832d27fbcf2a4da8edb..25afd6f2c476e8d6c92adaa205f696a34b477373 100644 (file)
--- 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();