diff options
author | Ian C <ianc@noddybox.co.uk> | 2016-03-21 15:35:43 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2016-03-21 15:35:43 +0000 |
commit | 7c361248bba7799400dee7b7b1dc33f5dadcf3a4 (patch) | |
tree | 88437733db07e1c919d3a8385d17304610e80147 /src/codepage.c | |
parent | 765c8e3f85b172a155a9172ec3bc8a6fb965f671 (diff) |
Added initial version of T64 output driver.
Diffstat (limited to 'src/codepage.c')
-rw-r--r-- | src/codepage.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/codepage.c b/src/codepage.c index 0083947..4cbc1bc 100644 --- a/src/codepage.c +++ b/src/codepage.c @@ -33,15 +33,6 @@ /* ---------------------------------------- TYPES */ -typedef enum -{ - CP_ASCII, - CP_ZX81, - CP_SPECTRUM, - CP_CBM -} Codepage; - - typedef struct { int code; @@ -254,6 +245,22 @@ int CodepageConvert(int code) } +int CodeFromNative(Codepage page, int code) +{ + int f; + + for(f = 0; cp_table[page][f].code; f++) + { + if (cp_table[page][f].code == code) + { + return cp_table[page][f].result; + } + } + + return 0; +} + + /* vim: ai sw=4 ts=8 expandtab */ |