aboutsummaryrefslogtreecommitdiff
path: root/src/codepage.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-03-21 15:35:43 +0000
committerIan C <ianc@noddybox.co.uk>2016-03-21 15:35:43 +0000
commit7c361248bba7799400dee7b7b1dc33f5dadcf3a4 (patch)
tree88437733db07e1c919d3a8385d17304610e80147 /src/codepage.c
parent765c8e3f85b172a155a9172ec3bc8a6fb965f671 (diff)
Added initial version of T64 output driver.
Diffstat (limited to 'src/codepage.c')
-rw-r--r--src/codepage.c25
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
*/