//----------------------------------------------------------------------------------- // File: main.c *** GEMS *** // Description: The 2nd Game Programmed using the NET YAROZE whilst learning C // // Version: 1.1 // // Date: 22nd AUGUST 1999 // // Time Spent so far: 2 Weeks (about 30 Hours) // // Notes: I've just learned how to spread source code over several seperate // files so this program should be easier to follow than my other's. // I've also been learning about "for loops", "switch statements" and // "structs" so these are used quite a lot in this program, even though // some may be pointless. I'm getting the hang of this C stuff at last! // ( If I could only the PSX was as easy! ) // // Thanks: Herbert Schildt (again): For his excellent Programming books // Santos Rouge: For his RougePad.h file (I'll write my own soon) // SCEE: What an ace Machine! (roll on NGPS) // EDGE MAGAZINE: For it's excellent supplement on Getting into the // Games Industry. // // Net Yaroze Site Members: How I would have managed without all the // free source code and help I'll never know. // // Comments: This game is a Tetris style game which currently requires you to clear // the screen of all it's gems. Later versions will include a "Magic Gem" // which you have to dig out, a 2 Player mode and other options. I'll // also be including title screens, an options screen, and sound. // // The CheckForLine() routines need re-writing. // Lots of comments required in source files // //----------------------------------------------------------------------------------- //------------------------- // Includes //------------------------- #include <__rts_info_t__.h> // #include // Standard PSX Libs #include "red_control.h" #include "yellow_control.h" #include "blue_control.h" #include "green_control.h" #include "grid_control.h" #include "RougePad.h" //--------------------- // General Defines //--------------------- // Total Sprites Defines #define SPRITE_CNT (256) // Screen Defines #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 // Game Control Defines #define GEM_DROPPING 1 #define GEM_NOT_DROPPING 0 #define RUN_GAME 0 #define STOP_GAME 1 // Game Control Variables int GemDropState = GEM_NOT_DROPPING; int GameState = RUN_GAME; int DropGemPosition; // Ordering Table Length Defines #define OT_LENGTH (4) // ----------------------------------------------- // Initialise Structures // ----------------------------------------------- // Ordering table 1 variables GsOT WorldOT[2]; GsOT_TAG OTTags[2][1<