From a4b6b6004a874f07c828ecd340af2bad9c69ca2c Mon Sep 17 00:00:00 2001
From: "ol.sc"
Date: Tue, 3 May 2011 21:28:20 +0000
Subject: [PATCH] Removed tgi_load() and all corresponding infrastructure. The
idea behind tgi_load() was to be able to describe a TGI mode in a
target-neutral way by resolution and colordepth. However it turned out that
there arn't any cc65 targets sharing any resolution. As a result the only
working target-independent approach for a TGI program is to call
tgi_loaddriver(tgi_stddrv); and then look up the resolution provided - and to
adapt to that resolution.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5021 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
include/tgi/tgi-kernel.h | 3 ---
libsrc/tgi/Makefile | 1 -
libsrc/tgi/tgi_map_mode.s | 54 ---------------------------------------
3 files changed, 58 deletions(-)
delete mode 100644 libsrc/tgi/tgi_map_mode.s
diff --git a/include/tgi/tgi-kernel.h b/include/tgi/tgi-kernel.h
index 755e49b50..d6d58a85c 100644
--- a/include/tgi/tgi-kernel.h
+++ b/include/tgi/tgi-kernel.h
@@ -65,9 +65,6 @@ extern unsigned tgi_aspectratio;/* Aspect ratio as fixed point 8.8 */
-const char* __fastcall__ tgi_map_mode (unsigned char mode);
-/* Map a tgi mode to a driver name. Returns NULL if no driver available. */
-
int __fastcall__ tgi_imulround (int rhs, int lhs);
/* Helper function for functions using sine/cosine: Multiply two values, one
* being an 8.8 fixed point one, and return the rounded and scaled result.
diff --git a/libsrc/tgi/Makefile b/libsrc/tgi/Makefile
index 923d844a3..904c61212 100644
--- a/libsrc/tgi/Makefile
+++ b/libsrc/tgi/Makefile
@@ -66,7 +66,6 @@ S_OBJS = tgi-kernel.o \
tgi_line.o \
tgi_linepop.o \
tgi_lineto.o \
- tgi_map_mode.o \
tgi_outcode.o \
tgi_outtext.o \
tgi_outtextxy.o \
diff --git a/libsrc/tgi/tgi_map_mode.s b/libsrc/tgi/tgi_map_mode.s
deleted file mode 100644
index d6a5f64dc..000000000
--- a/libsrc/tgi/tgi_map_mode.s
+++ /dev/null
@@ -1,54 +0,0 @@
-;
-; Ullrich von Bassewitz, 31.05.2002
-;
-; const char* __fastcall__ tgi_map_mode (unsigned char mode);
-; /* Map tgi mode codes to driver names */
-;
-
- .export _tgi_map_mode
- .import _tgi_mode_table
- .import return0
- .importzp tmp1
-
-;----------------------------------------------------------------------------
-; BEWARE: The current implementation of tgi_map_mode does not work with tables
-; larger that 255 bytes!
-
-.code
-
-.proc _tgi_map_mode
-
- sta tmp1 ; Save mode
- ldy #$00
-
-@L0: lda _tgi_mode_table,y
- beq NotFound ; Branch if mode code zero
- cmp tmp1
- beq Found
-
-; Skip the name
-
-@L1: iny
- lda _tgi_mode_table,y
- bne @L1 ; Loop until end marker found
- iny ; Skip end marker
- bne @L0 ; Branch always
-
-; Mode not found
-
-NotFound:
- jmp return0
-
-; Mode found
-
-Found: tya
- ldx #>_tgi_mode_table
- sec ; Account for the mode byte
- adc #<_tgi_mode_table ; Return pointer to file name
- bcc @L1
- inx
-@L1: rts
-
-.endproc
-
-