delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/16/02:22:36

From: Konstanty <M DOT Bialkowski AT mailbox DOT uq DOT edu DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: allegro datafiles won't work
Date: Wed, 15 Apr 1998 10:12:24 +1000
Organization: University of Queensland
Lines: 50
Message-ID: <3533FB67.3D1A0769@mailbox.uq.edu.au>
References: <1998041420115800 DOT QAA26920 AT ladder01 DOT news DOT aol DOT com>
Reply-To: M DOT Bialkowski AT mailbox DOT uq DOT edu DOT au
NNTP-Posting-Host: csmbialk.staff.uq.edu.au
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Is your contents of "game.h" right? MAIN_BMP might be defined as the wrong thing
inside "game.h".

TackMast wrote:

> the datafiles still won't work for me in allegro. it seems to not be able to
> find the datafile, even though there seems to be nothing wrong with my code.
> somebody please help, i just can't figure out why this won't work. could it be
> an improper djgpp or allegro installation? or might it be because i have
> windows 95? heres the code:
>
> #include <stdio.h>
> #include <stdlib.h>
>
> #include "allegro.h"
>
> #include "game.h"
>
> main()
> {
> DATAFILE *data;
>
> allegro_init();
> install_keyboard();
> install_timer();
>
> data = load_datafile("game.dat");
> if(!data){
>   allegro_exit();
>   printf("datafile not loaded properly\n");
>   return -1;
> }
>
> set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0);
>
> blit(data[MAIN_BMP].dat, screen, 0, 0, 0, 0, 320, 200);
>
> readkey();
>
> return 0;
> }
>
> is there anything wrong with it? BTW, when i compile it into an executable i
> recieve no errors, and when i run the executable it just sits there with the
> cursor, looking like something needs to be  typed in but when you type anything
> in it does nothing, not even display the text you type. what is wrong??? please
> help



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019