Re: [cc65] TGI preview

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-11-13 14:07:48
On Fri, Nov 13, 2009 at 12:10:46AM -0800, Fatih Aygün wrote:
> Turns out that I was reusing a makefile intended to to test the 2-page modes
> which reserved more than twice the amount of memory than necessary. I can
> load 2 fonts at a time now and I'm only ~1K short now.

One problem with the current implemenation is that it tries to keep a uniform
interface to pixel and vector fonts. You call always the same functions
(tgi_textwidth and similar), but they behave differently depending on the font
set with tgi_textstyle. This is nice, but means that every program gets the
code for the bitmapped fonts and that for the vectorfonts - even if one of
both isn't used. I will have to come up with either some tricky constructors
or separate the functions. For the preview, that would mean quite a drop in
the memory requirements.

> Yes, I figured it out :) It seems that tgi_load_vectorfont doesn't clear the tgi_error
> status even if it succeeds.

Ok, I've fixed that. tgi_load_vectorfont will now clear the error code on
success and return TGI_ERR_NO_MEM if there is a problem with memory. When
working on the code, I've also removed the Atari specific error codes (but
kept TGI_ERR_NO_MEM). I've not fixed the TGI_ERR_NO_IOCB in the driver. Please
let me know what is the best replacement. 

Now, as I'm talking about it: We can also replace TGI_ERR_NO_MEM by
TGI_ERR_NO_RESOURCES and use that for out of memory/out of file handles or
whatever.

> ps: Why so low in 2007? :)

Greedy competitors started a marketing campaign against cc65 in this year:-)

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Nov 13 14:07:55 2009

This archive was generated by hypermail 2.1.8 : 2009-11-13 14:07:57 CET