-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 2D Yaroze Development Library v1.0.0 High performance macros & functions Developed & compiled by Harvey Cotton Copyright © 1999/2000 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ------------ INTRODUCTION ------------ Welcome. This library is designed to cover all aspects of developing a 2d game for the Sony Net Yaroze. It is designed to be both easy to use and efficient, since the overall design emphasis is on performance. The library is divided into several sections: Graphics - 2D graphics functions and rendering. Math - Lots of fast math functions including trigonometry and fast squareroot, etc. Collision detection - A full complement of 2d collision and clipping tests. Sound - A basic template for implementing sound effects in your game. Control pad - Complete support for both control pads. --------------- GETTING STARTED --------------- Before writing your game, remember: * Modify the "Defines" section of lib2d.h according to your requirements. * You must set the correct screen dimensions, since these are referenced throughout the library. * Finally, remember that when your game is finished, comment out the DEBUG and recompile. * Add the appropriate lib2d.o to your MAKEFILE. * Practice makes perfect. Below is a quick sample of what your main.c should look like. It really doesn't get any easier than this I'm afraid. /************************************************************/ #include // Standard Yaroze library #include "lib2d.h" // This library void main () { GsSPRITE ship; // Your ship sprite InitialiseGraphics(MODE_PAL); // Initialises everything from font to control pad LoadTexture(SHIP_TIM); // Load sprite into video ram InitialiseSprite(&ship,SHIP_TIM,160,128); // Initialise sprite printf("Library usage demo. Press any button to start...\n"); // Quick message while(PadRead()==0); // Wait for the user to press a button using an independant pad test do { /***** User input *****/ MainPadRead(); // Reads pad input into global variables (transparent from user!!) if (CheckButtonPressed(PADLup)) ship.y--; // If user holds up button, ship moves up if (CheckButtonPressed(PADLdown)) ship.y++; // If user holds down button, ship moves down if (CheckButtonTapped(PADLleft)) ship.x--; // If user taps left button, ship moves left if (CheckButtonTapped(PADLright)) ship.x++; // If user taps right button, ship moves right /***** Rendering cycle *****/ RenderPrepare(); // Prepare ordering tables and stuff DrawSprite(&ship,0); // Send your object to ordering tables with 0 priority RenderFinish(); // Draw everything and swap screen } while(!CheckButtonPressed(PADLselect+PADLstart)) // Loop until user presses SELECT and START } /************************************************************/ Reference regarding the usage of the library functions and macros can be found inside in lib2d.h and lib2d.c. ------- UPDATES ------- Version 1.0.0 - First release. ------- CONTACT ------- Any problems, queries, mistakes or if you'd like to see support for anything added don't hestitate to e-mail at harvey.c@lineone.net. E-mail is checked almost everyday. ---------- DISCLAIMER ---------- Under no circumstances will Harvey Cotton be liable for any damages or losses arising from the use or misuse of this software. If you use this software, you agree to these terms.