From: "Cyberdivad" Newsgroups: comp.os.msdos.djgpp Subject: Re: make a faster blit (allegro) Date: Mon, 6 Mar 2000 19:26:52 -0000 Organization: Wanadoo, l'internet avec France Telecom Lines: 70 Message-ID: <8a0tfo$aaf$1@wanadoo.fr> References: <200003050219 DOT HAA01019 AT midpec DOT com> NNTP-Posting-Host: integ-quimper-1-1-180.abo.wanadoo.fr X-Trace: wanadoo.fr 952367416 10575 193.250.20.180 (6 Mar 2000 18:30:16 GMT) X-Complaints-To: abuse AT wanadoo DOT fr NNTP-Posting-Date: 6 Mar 2000 18:30:16 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi ! Here is an example of source with the project file for rhide. This example work only if you don't setup variables with values (like a=2;). In this example, this is not really a problem, but my program needs to assign values to var in header files. source of header f.h : #include #include #include "allegro.h" #ifndef FONC_H #define FONC_H // here int d_a=10; int d_b=11; extern int calcab(int a, int b); #endif ---------------- source of f.c : #include "fonc.h" int calcab(int a, int b) { return a*b+d_a; } -------------- source of main.c : include #include #include "allegro.h" #include "fonc.h" int calcabi(int a, int b) { return (d_a*a)+(d_b*b); } int main() { int r; allegro_init(); install_keyboard(); printf("\nBonjour !"); r=calcab(d_a,d_b)+calcabi(7,8); printf("%d*%d=%d",d_a,d_b,r); readkey(); set_gfx_mode(GFX_VGA, 320, 200, 0, 0); set_pallete(desktop_pallete); textout_centre(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, 255); readkey(); return 0; } --------end---------