From 97a56cdcbeec2a086cfc7f03cfec35a1ff512d2d Mon Sep 17 00:00:00 2001 From: sECuRE Date: Sat, 28 Jul 2007 19:47:31 +0000 Subject: [PATCH] fixes git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@20 af93e077-1a23-4f1e-9cbe-9382a9d578f5 --- Makefile | 2 +- config.c | 8 ++++++-- config.h | 2 +- kasse.c | 7 ++++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ede4b6a..2bedcd7 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ cc65 -t c128 $< ca65 -t c128 $$(basename $< .c).s -all: config.o kasse.o credit_manager.o general.o +all: config.o kasse.o cl65 -t c128 *.o -o kasse test: config.o test.o diff --git a/config.c b/config.c index fd8b2e3..fd2f87e 100644 --- a/config.c +++ b/config.c @@ -40,6 +40,9 @@ void load_config() { #else +void load_config() { +} + void load_items() { uc c; num_items=2; @@ -49,7 +52,8 @@ void load_items() { strcpy(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() { @@ -64,4 +68,4 @@ void save_state() { } void save_credits() {} -#endif \ No newline at end of file +#endif diff --git a/config.h b/config.h index effaa31..cc42d6e 100644 --- a/config.h +++ b/config.h @@ -28,7 +28,7 @@ struct credits_t { }; #define MAX_CREDIT_ITEMS 75 -extern struct credits_t *credits; +extern struct credits_t credits[MAX_CREDIT_ITEMS+1]; /* Lädt Dinge wie die Druckeradresse */ void load_config(); diff --git a/kasse.c b/kasse.c index 582adb9..8943723 100644 --- a/kasse.c +++ b/kasse.c @@ -5,7 +5,7 @@ #include "general.h" #include "config.h" #include "kasse.h" -#include "credit_manager.h" +//#include "credit_manager.h" // drucker 4 oder 5 // graphic 4,0,10 @@ -70,12 +70,13 @@ int main() { /* Konfigurationsdatei laden */ load_config(); /* Einträge (=Getränke) laden */ - load_items(); +#if 0 /* Zustand laden */ load_state(); /* Guthaben laden */ load_credits(); +#endif while (1) { /* Bildschirm anzeigen */ print_screen(); @@ -97,7 +98,7 @@ int main() { getchar(); } else if (c == 'g') { /* Guthabenverwalter aufrufen */ - credit_manager(); +// credit_manager(); } else if (c == 'q') break; } -- 2.39.5