Dec 072017
 
See explosions on screen with c source, excellent graphics demo.
File EXPLOD.ZIP from The Programmer’s Corner in
Category C Source Code
See explosions on screen with c source, excellent graphics demo.
File Name File Size Zip Size Zip Type
EXPA.ASM 12449 2954 deflated
EXPLOD.C 19226 4950 deflated
EXPLOD.DOC 2846 1353 deflated
EXPLOD.EXE 13631 8542 deflated
MAKEDLC.BAT 40 36 deflated
MAKETC.BAT 40 36 deflated

Download File EXPLOD.ZIP Here

Contents of the EXPLOD.DOC file


NAME
EXPLOD 1.1 - a simple fireworks program for the CGA or HGC

This is a simple fireworks program that is a spinoff of some
explosion handling routines for a game I am working on.

FILES
explod.doc- this file
explod.exe- packed executable
explod.c- main source file
expa.asm- graphics support routines

HOW TO RUN
The following instructions will be displayed briefly when the
program is run without any parameters. They will not be displayed
if parameters are given.

Usage: explod
Parameters can be one of
-v :Select video type. '-vc' for CGA, '-vh' for HGC
Default is auto-detect (but must specify for EGA/VGA)
-s : = # of simultaneous explosions. Default 10
-x : = Explosion X size. Defaults: CGA=127, HGC=150
-y : = Explosion Y size. Defaults: CGA=50, HGC=90
-p : = #pts/explosion. Max 300. Defaults: CGA=120 HGC=160
-t : = Trail length. Default: 5
-d : = Delay factor. Default: 0
-g : = Gravity. Defaults: CGA=1500, HGC=2000
-w : = Wind (horiz accel). Default: 0
Examples:
explod (for 8MHz 8088 XT with CGA or HGC card)
explod -vc -s5 -t3 (for 4.77MHz XT with EGA card in CGA mode)
explod -t10 -s15 (for 8MHz 80186 XT with HGC)
explod -p300 -x200 -y120 -s6 -d10 (for 8 Mhz AT with HGC)

Press ESCAPE to return to DOS

HOW TO COMPILE
As distributed, the code is compilable with Turbo C and MASM using
the MAKETC.BAT file (TC 1.5 and MASM 5.0 were used, but other versions
should work as well).

The code was developed with Datalight C 2.20 and Arrowsoft ASM 1.00d.
To compile in this environment, comment out the 'TURBOC equ 1' line and
uncomment the 'DLC equ 1' line in EXPA.ASM, and then run MAKEDLC.BAT.

To use with other compilers, the segment and group names should be
redefined according to the compiler's manual. A generic command
sequence to make the executable would be:

masm /mx expa ;
cc explod.c expa.obj

BUGS
Explosions "wrap around" on the four edges of the screen. A few
lines of address checking code in _gr_frplot can eliminate this,
but I didn't put them in because they would slow down the animation
somewhat (and every bit of speed counts on slow XTs).

AUTHOR
Dennis Lo
4516 Albert St.
Burnaby, B.C.
Canada V5C 2G5

[email protected]

The executable and source code may be freely distributed and used,
provided that my name remains in the source code, and that modified
versions of the source and executable are clearly distinguished
from the original.


 December 7, 2017  Add comments

Leave a Reply