Build Capital Quest for CoCo 3 with maps and emulator tests
This commit is contained in:
commit
9f7d6f4786
44 files changed
+6238
No files matched your search
@@ -0,0 +1,6 @@
|
||||
extern const unsigned char national_spans[];
|
||||
extern const unsigned national_offsets[51];
|
||||
extern const unsigned char northeast_spans[];
|
||||
extern const unsigned northeast_offsets[51];
|
||||
extern const unsigned char hawaii_spans[];
|
||||
extern const unsigned hawaii_offsets[51];
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef QUIZ_H
|
||||
#define QUIZ_H
|
||||
#define STATE_COUNT 50
|
||||
#define ANSWER_SIZE 40
|
||||
typedef unsigned char U8;
|
||||
typedef struct { const char *code; const char *name; const char *capital; } State;
|
||||
extern const State states[50];
|
||||
extern U8 order[50], options[4], question, score, corrections;
|
||||
extern U8 answered[50], correct[50], corrected[50];
|
||||
extern char responses[50][ANSWER_SIZE];
|
||||
extern unsigned random_state;
|
||||
void quiz_start(unsigned seed);
|
||||
unsigned quiz_random(unsigned bound);
|
||||
void quiz_options(U8 state);
|
||||
void normalize(const char *in, char *out);
|
||||
/* 2 exact/alias, 1 near, 0 wrong (including a different known capital). */
|
||||
U8 classify(U8 state, const char *answer);
|
||||
void quiz_record(U8 state, const char *answer, U8 right, U8 spelling);
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef UI_H
|
||||
#define UI_H
|
||||
#include "quiz.h"
|
||||
void text(unsigned x,unsigned y,const char *s,U8 color);
|
||||
void frame(const char *label);
|
||||
void show_map(U8 state);
|
||||
U8 next_key(void);
|
||||
void release_keys(void);
|
||||
void close_input(void);
|
||||
extern unsigned entropy;
|
||||
#endif
|
||||
Reference in new issue
Block a user