Message-ID: <386A6841.712EC74F@tiscalinet.it> Date: Wed, 29 Dec 1999 21:00:02 +0100 From: Night Walker X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Dj Delorie Subject: Allegro: load_datafile is SLOW!!! Content-Type: multipart/mixed; boundary="------------C569D275B7F1CDF0FB2D6DDD" Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------C569D275B7F1CDF0FB2D6DDD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm trying to load a 1.167.727 bytes datafile, containing 3 compiled sprites at 24bpp. The datafile isn't compressed, it contains properties for NAME and image offsets. Simply loading the datafile in a binary ram-buffer takes less than a second on my AMD-K5 100Mhz, 32Mb Ram. I tried on another machine, an INTEL P90 with 32Mb Ram. The Result is the same: ether under W95 and plain DOS it takes about 3 minutes to load it (however it is loaded perfectly). Changing color depth or color conversion has no effect. The attached code is compilable and (at least on my machine) shows off the error. Another question: I used _install_irq() to install my own keyboard interrupt handler function, but after 16 keystrokes the PC Speaker begins to beep every keystroke. I think that this should be a full-keyboard-buffer warning. How can I override/disable it? Thanx for the help. --------------C569D275B7F1CDF0FB2D6DDD Content-Type: text/plain; charset=us-ascii; name="Code.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Code.c" #include int main() { DATAFILE *obj; COMPILED_SPRITE *menu; allegro_init(); install_timer(); printf("\nSetting color depth..."); set_color_depth(16); printf("\nLoading datafile..."); set_color_conversion(COLORCONV_NONE); obj = load_datafile("menu.dat"); if(!obj) { printf("\nCannot open DAT file"); return 0; } } --------------C569D275B7F1CDF0FB2D6DDD--