delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/24/07:52:05

From: Waldemar Schultz <schultz AT ma DOT tum DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Code: Projectile Bouncing off walls
Date: Mon, 24 Jan 2000 11:41:15 +0100
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 78
Message-ID: <388C2C4B.851A5F30@ma.tum.de>
References: <3888F4D3 DOT 5EDC8FBC AT geocities DOT com> <bn6i8scpf5dsbkr7pj20cfj7mu3sg90a18 AT 4ax DOT com>
NNTP-Posting-Host: pcritter10.mathematik.tu-muenchen.de
Mime-Version: 1.0
X-Trace: wsc10.lrz-muenchen.de 948710481 11861 131.159.69.74 (24 Jan 2000 10:41:21 GMT)
X-Complaints-To: news AT lrz-muenchen DOT de
NNTP-Posting-Date: 24 Jan 2000 10:41:21 GMT
X-Mailer: Mozilla 4.7 [de] (Win98; I)
X-Accept-Language: de,en,en-US
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick schrieb:
> 
> On Fri, 21 Jan 2000 19:07:47 -0500, Sahab Yazdani
> <beyonder69 AT geocities DOT com> wrote:
> 
> >Hello I have written a simple trajectory calcutation system using
> >Velocity, Angle, wind and gravity. Now lets say I want to make the
> >projectile bounce off the wall.. How would I go about doing this???
> 
> Here's an Allegro program in which the mouse controls the wind, and
> the pointer bounces off the screen edges and is attracted to the
> bottom.
> 
> /**************************************\
> * DJTESTS.C                            *
> * Test DJGPP properties                *
> * By Damian Yerrick                    *
> \**************************************/
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <conio.h>
> #include <dos.h>
> #include <mem.h>
> 
> #include <allegro.h>
> 
> /* DY_action_proc() ********************
>  * By Damian Yerrick
>  * Inherits from d_button_proc()
>  * Declare this control as D_EXIT in your dialog item list.
>  *
>  * When clicked, this button calls the function in dp2:
>  *   int foobar(DIALOG *d);
>  * Then it un-highlights the button and returns what the callback
> returned.
>  */

----------snip
   install_mouse();
>   puts("Loading");
>   fnt1 = load_datafile("FNT1.DAT");
>   if(!fnt1)
>   {
>     allegro_exit();
>     return 253;
>   }
>   if(set_gfx_mode(GFX_VGA, 320, 200, 0, 0))
>   {
>     unload_datafile(fnt1);
>     allegro_exit();
>     return 252;
>   }
> 
>   set_palette(desktop_palette);
> 
> //  dlg[4].dp2 = fnt1[SMALL_FNT].dat;
> 
>   ret = do_dialog(dlg, -1);
> 
>   show_mouse(NULL);
>   fade_out(2);
> 
>   allegro_exit();
>   return ret;
> }
> 
> int main(void)
> {
>   return TestGUI();
> }
> 
> --
> Damian Yerrick  http://yerricde.tripod.com/
> View full sig at http://www.rose-hulman.edu/~yerricde/sig.html
> Comment on story ideas at http://home1.gte.net/frodo/quickjot.html

where to get the file "fnt1.dat" please ?

- Raw text -


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