cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/05/16:17:24

Message-ID: <37089FA2.4B718747@xoommail.com>
From: Ishpeck <ishpeck AT xoommail DOT com>
Organization: Lunaticnologies
X-Mailer: Mozilla 4.01 [en] (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: no pic with allegro bitmaps in a struct... (code)
X-Priority: 3 (Normal)
References: <7e8hkj$4ut$1 AT platane DOT wanadoo DOT fr>
X-Corel-MessageType: EMail
Lines: 79
NNTP-Posting-Host: 192.41.73.1
X-Trace: news6.ispnews.com 923311969 192.41.73.1 (Mon, 05 Apr 1999 07:32:49 EDT)
NNTP-Posting-Date: Mon, 05 Apr 1999 07:32:49 EDT
Date: Mon, 05 Apr 1999 05:33:54 -0600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Here's what I came up with:  In CC.C....

#include <stdio.h>
#include <conio.h>
#include <allegro.h>
#include "cc.h"
//#include <jgmod.h>
#include "vehicule.h"
#include "car.h"

vehicule_model car;

int main (void) {

 int truc;
 DATAFILE *datessai;

 //Affichage et premiŠre initialisation
 allegro_init();

 printf("Acid Course   V1.0         Copyright (C) 1999 par CORNU
Nicolas\n");
 printf("Fait … l'aide d'%s\n",allegro_id);
 printf("\n");

 affsys();
 affconf();

 //
**************************************************************************************
 // ********************     Initialisation du mode graphique   
*************************
 //
**************************************************************************************
 set_color_depth(16);
 set_gfx_mode(GFX_AUTODETECT,640,480,0,0);

 // Load datafile
 datessai = load_datafile("veh.dat");
 //
**************************************************************************************
 // ********************           D‚but du programme           
*************************
 //
**************************************************************************************
 clear_to_color(screen,RGB(255,255,128));
 

 ini_vehicule(car);

/*-=-*  Here you have to CAST the BITMAP *-=-*/
 blit((BITMAP *)datessai[essai].dat, car.sprite_def,0,0,0,0,64,64);
 blit(car.sprite_def, screen,0,0,200,200,64,64);
 rot_vehicule(car);
 //blit(car.sprite_rot[0], screen,0,0,100,100,64,64);

 rest(5000);

 allegro_exit();

}


CORNU.Nicolas wrote:
> 
> i can't display the pic on the screen
> 
> (see code)
> 
> --
> CORNU Nicolas
> E-mail: CORNU DOT Nicolas AT wanadoo DOT fr
> ICQ: 31463000
> Homepage: http://perso.wanadoo.fr/nicolas.cornu/Index.htm
> 
>                   Name: cc.zip
>    Part 1.2       Type: Zip Compressed Data
>                         (application/x-zip-compressed)
>               Encoding: x-uuencode

- Raw text -


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