Phyzika Demo Library | |||||||||||||||||
| What is this library? | |||||||||||||||||
|
| This library is a collection of functions for demo programming. It's written in Assembly, and was put in functions for C. I guess you could easly take these functions and move them to Pascal, or any other language. | ||||||||||||||||
| What does it do? | |||||||||||||||||
|
|
Currently, only some 2D graphics. A list of prototypes follow:void setvideomode(int mode); void fillscreen(char color, int where); void putpixel(int x, int y, char color); void vsync(void); void flip(int dest, int src); void waitkey(void); void box(int x1, int y1, int x2, int y2, char color, int filled); This library supports virtual screens, though I have no idea on how I allocate a segment of memory, and store the segment number in an int. I could use help here :) The box function isn't commented, and can only do filled boxes. I got bored writing it, I'll fix it soon. This library doesn't do much, but it could be a good base. I pretty much abandoned it, the reason being I realised It's not going anywhere. 2D graphics arn't enough, and I don't know the math needed for 3D graphics. I can't really do sound functions, since I have no clue on how to program sound cards. I have a book on programming for SB, but it sux. So, this library is pretty much open to anybody to continue. Feel free to build on it, or use it in your programs, as long as credit is given. If you do anything with it, drop me a line :) Oh, and it's .cpp since I got no clue on how to write a .h :) | ||||||||||||||||
| How do I use it? | |||||||||||||||||
|
|
Here's a sample program:
#include "phyzika.cpp"
int main(void)
{
setvideomode(MCGA);
vsync();
fillscreen(BLUE, SCREEN);
vsync();
box(10,10,100,100,RED,1);
waitkey();
setvideomode(TEXT);
}
| ||||||||||||||||
| |||||||||||||||||
|
This page has been visited
|