From: "Andrei 'old boy' Ellman" Newsgroups: comp.os.msdos.programmer,comp.os.msdos.djgpp,comp.graphics.algorithms,rec.games.programmer Subject: AllegroPak 1.0 beta 1a Date: Sat, 01 Nov 1997 03:41:05 +0100 Organization: Heslington Toast Parlour, Yorkshire Message-ID: <345A96C1.C2B5FED9@xs4all.nl> NNTP-Posting-Host: asd12-16.dial.xs4all.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 103 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have just released an update to AllegroPak. The current version (1.0 beta 1a) can be obtained from AllegroPak's homepage at: http://www.xs4all.nl/~ellman/ae-a/wacko/allegro/AllegroPak.html You can also download compiled executable demos made with AllegroPak and find out more about AllegroPak at this URL. If you are using AllegroPak with Allegro 3.0 WIP, you will have to read the documentation for how to change asmdef.h. AllegroPak can be used without any modifications with Allegro 2.2. In case you don't already know, AllegroPak is a collection of extra C functions for use with the Allegro library. Most of them are to do with Z-buffering, but there are also some general-purpose 3D and non-3D functions. The main features of this package are Z-buffered versions of all of Allegro's polygon-rendering modes (including two new ones which are affine and perspective-correct texture-mapping that is both masked and lit) and z-buffered sprites (both flat ones and ones with depth-maps). I was originally hoping that this was going to be part of Allegro, but Shawn was worried about Allegro getting too big, and wanted me to support greater colour-depths. Since then, I have learned that it would have been better to re-write Allegro's polygon drawers from scratch instead of hack Allegro's, so one of these days, I may give this a complete overhaul (that is assuming there isn't a really good freeware 3D engine for DJGPP by the time I get round to it). I have however in the mean time decided to release what I have done so far instead of let it lie in a forgotten corner of my Hard-Drive. I would really appreciate feedback on this, and Shawn is still welcome to harvest parts of this code and include it with Allegro. My code and it's demos have the following low-level features: + Z-buffering added to all of Allegro's polygon drawing modes + The inclusion of polygon rendering modes: POLYTYPE_ATEX_MASK_LIT and POLYTYPE_PTEX_MASK_LIT (z-buffered only) + 3D sprites (both with and without depth-maps). These sprites can be zoomed, rotated, drawn translucent or lit (you can even z-zoom and transparent z-blit the 3D sprite in one command). On a slightly higher level it has: + Light-sourced gouraud shaded objects (with vertex-normals) drawn with Allegro's polygon drawer (this is done in one of the demos). + Real-time (almost) light-sourced texture-mapped Z-buffered sphere rendering. + Fog Shading (this is done in one of the demos). + Full viewing-volume (fustrum) 3D polygon clipping (clips polygons to the X=Z, X=-Z, Y=Z, Y=-Z and near Z=K planes). + Miscellaneous 3D Functions (mostly for converting between Cartesian and Polar coordinates in 3D space). + RGB <-> HSV functions that actually work, as well as RGB <-> HLS functions. All features are fully documented (there is full documentation, and although the sourcecode is heavily commented, the documentation is sufficient), and there's even an explanation of how some of the code works in the demos. AllegroPak has it's own homepage at: http://www.xs4all.nl/~ellman/ae-a/wacko/allegro/AllegroPak.html There, you can download AllegroPak, view the current bugslist (if you find a bug not on the list, then please report it to me), the TODO list, see what has been written with AllegroPak (so far, just one set of demos which is the compiled AllegroPak examples), and find out when AllegroPak has been updated. Anyway, here is a summary of the changes from version 1.0 beta 1 to version 1.0 beta 1a: + Included instructions on how to get AllegroPak to work with Allegro 3.0 WIP (it works fine with Allegro 2.2). + Corrected the spelling of frustum (was spelled 'fustrum') and longitude (was spelled 'longtitude'). If you have written any code that uses these functions, then you will have to change the spelling in your code (this isn't too hard if your text-editor has a search-and-replace function). + sphere_f() checks to see if the pointer to the rotation matrix is NULL before it converts the rotation matrix to the format required by sphere(). This means that sphere_f() no longer crashes under DOS. + Documentation contains required and recommended setup. + The documentation now explains how masked areas are handled in flat zprites, and how to simulate masks in zprites. + In SPH_DEMO, a bug is fixed that meant the light-sphere got drawn once per other sphere instead of once per frame. + In SPH_DEMO, the spheres are now depth-sorted so that the frontmost gets drawn first. This reduces the average number of times a pixel's light and texture must be re-calculated (in Z-buffered systems, drawing the frontmost object first is generally a good idea). The speed improvements are most noticed when using fancy lighting and texturing modes. + Better feedback in 3DSPDEMO. + In the demos, you can now access the display of the key commands by pressing F12. AE. -- Andrei Ellman - URL: http://www.xs4all.nl/~ellman/ae-a - ae1 AT york DOT ac DOT uk "All I wanna do is have some fun :-) || ae-a AT minster DOT york DOT ac DOT uk I've got the feeling I'm not the only one" || mailto:ellman AT xs4all DOT nl -- Sheryl Crow :-) || It's what you make of it.