Umm. I'm not familiar with Hyper-C, but if it's anywhere _near_ usual
C packages, shouldn't that be "int f;"??
Just my 0.02.
Soenke
--
===========================================================================
I live with amnesia, dancing with the ! Soenke Behrens
shadows of my memory. ! Tumblinger 54/205
! 80337 Muenchen
HyperC is quite near to K&R. File handling is not part of the C
language and thus library-dependent.
In fact, FILE is #defined as int in the original distribution, I've
redefined it as char for my personal use (the libraries use the ProDOS
8 file descriptors which are byte-sized).
As to the original question... I use my own graphics routines, so I
can't tell exactly what is wrong. Behaviour of this code is however
very dependent on code&data placement in memory (controlled by
some linker options). Memory below the first hires page is used by OPSYS
resp. the Opix kernel. You try to load the shape tables to 0x6000,
so I guess you want to use both hires pages (0x2000-0x5fff). You
must thus make sure all program sections (text, data, bss) cause no
memory conflict. If you use the default linker options, they will
conflict, causing unpredictable results.
I'd rather recommend to use a global or local static byte array to
hold the shape tables, so the compiler/linker will care for proper
memory allocation.
Btw, it would also be advisable to close the file before returning.
- Wulf
--
______________________________________________________
| |
| Wulf Hofbauer | zcaa...@rpool1.rus.uni-stuttgart.de |
| |