Index: defines.h =================================================================== --- defines.h (revision 153) +++ defines.h (working copy) @@ -128,21 +128,11 @@ #define MAX_TRACERS 32 #define STREETS_DEBUG 1 -#define PI 3.1415926535897932384 +//#define PI 3.1415926535897932384 #endif #ifdef WIN32 -# ifdef RAYDLL -# ifdef MAIN_H -# define __global __declspec(dllimport) -# endif -# ifdef MAIN_C -# define __global __declspec(dllexport) -# endif -# else -# define __global -# endif #else // Not under WIN32 # ifdef LIBRAY // (See Makefile) # define __global Index: enemigos.h =================================================================== --- enemigos.h (revision 153) +++ enemigos.h (working copy) @@ -11,6 +11,7 @@ __global int enemy_get_status(int id); __global void enemy_load_sprite(int id); __global float enemy_get_level_percentage(void); +__global void destroy_enemy ( int a ); #endif Index: global.h =================================================================== --- global.h (revision 153) +++ global.h (working copy) @@ -1,3 +1,4 @@ #include "raydium/index.c" #include "defines.h" #include "timers.h" + Index: main.c =================================================================== --- main.c (revision 153) +++ main.c (working copy) @@ -10,7 +10,9 @@ raydium_init_args ( argc, argv ); //loading the configuration file + raydium_path_add("../versusrx"); raydium_init_load ( "versusrx.config" ); + raydium_path_add("../versusrx"); raydium_texture_filter_change ( "bilinear" ); raydium_texture_compression ( TRUE ); @@ -18,16 +20,29 @@ //withoutout this workaround raydium_ode_gravity_3f ( 0, 0, 0 ); + + //adding a new path for searching enemies + raydium_path_ext("../versusrx/data/textures/","tga"); + raydium_path_ext("../versusrx/data/fonts/","tga"); + raydium_path_ext("../versusrx/data/shaders/","vert"); + raydium_path_ext("../versusrx/data/shaders/","frag"); + raydium_path_ext("../versusrx/data/meshes/","tri"); + raydium_path_ext("../versusrx/data/themes/","gui"); + raydium_path_ext("../versusrx/data/particles/","prt"); + raydium_path_ext("../versusrx/data/cams/","cam"); + raydium_path_ext("../versusrx/data/sprites/","sprite"); + raydium_path_ext("../versusrx/data/music/","wav"); + raydium_path_ext("../versusrx/data/music/","ogg"); + raydium_path_ext("../versusrx/","tga"); + raydium_path_ext ( "../versusrx/data/levels/", "enemies" ); + raydium_path_ext ( "../versusrx/data/levels/", "terrain" ); + //preloading //preload_textures(); clean_sprites(); preload_sprites(); //preload_terrain_pieces(); - //adding a new path for searching enemies - raydium_path_ext ( "./data/levels/", "enemies" ); - raydium_path_ext ( "./data/levels/", "terrain" ); - //initializing type1_init(); init_shoots(); Index: police.c =================================================================== --- police.c (revision 153) +++ police.c (working copy) @@ -101,6 +101,12 @@ raydium_log ( "police destroyed" ); } +void police_change_status ( int policeid, int status ) +{ + police_status[policeid] = status; +} + + void process_police ( void ) { int a; @@ -135,10 +141,6 @@ } } -void police_change_status ( int policeid, int status ) -{ - police_status[policeid] = status; -} int police_get_status ( int id ) Index: streets.c =================================================================== --- streets.c (revision 153) +++ streets.c (working copy) @@ -68,23 +68,23 @@ } //MATH function to get the maximum of 2 values -float max ( float v1, float v2 ) +/*float max ( float v1, float v2 ) { if ( v1 >= v2 ) return v1; else return v2; } - +*/ //MATH function to get the maximum of 2 values -float min ( float v1, float v2 ) +/*float min ( float v1, float v2 ) { if ( v1 >= v2 ) return v2; else return v1; } - +*/ //INITS***************************************************** //Initialise crosses Index: type1.h =================================================================== --- type1.h (revision 153) +++ type1.h (working copy) @@ -5,16 +5,15 @@ */ #ifndef TYPE1_H #define TYPE1_H - -#include "global.h" +/* #include "police.h" #include "comic.h" #include "gameplay.h" #include "enemigos.h" #include "gui.h" -#include "menu.h" +#include "menu.h"*/ +#include "global.h" - //function to draw the water. //The param dir can be set to 1 if reverse direction is desired. __global int create_patera(void); @@ -26,7 +25,6 @@ __global void draw_beach1(int move); __global void init_enemies(void); __global void init_pateras(void); -__global void init_foes(void); __global void draw_pateras(void); __global void draw_shoots(void); __global void init_shoots(); @@ -38,6 +36,7 @@ __global void init_display1(void); __global void victory1(void); __global void switch_display1_pause(void); +__global void draw_clouds(float); #endif Index: type2.c =================================================================== --- type2.c (revision 153) +++ type2.c (working copy) @@ -54,6 +54,27 @@ static int toogle = 0; +void init_foes ( void ) +{ + int a; + + for ( a = 0;a < MAX_FOES;a++ ) + { + foes_sprite[a] = raydium_sprite_load ( "foe.sprite", ENEMIGO ); + raydium_sprite_move ( foes_sprite[a], 0, 0, 0.5 ); + } +} + +void preload_sprites2 ( void ) +{ + //pre-load of the sprites. It's before the callback, to avoid slow-downs + superdina = raydium_sprite_load ( "dinamizador.sprite", SUPERD ); + inmigrante = raydium_sprite_load ( "inmigrante.sprite", INMIGRANTE ); + //defining types + raydium_sprite_type[superdina] = TYPE_PLAYER; + raydium_sprite_type[inmigrante] = TYPE_INMIGRANTE; +} + //function to initialise all the elements of display 2 void init_display2 ( void ) { @@ -80,17 +101,6 @@ } - -void preload_sprites2 ( void ) -{ - //pre-load of the sprites. It's before the callback, to avoid slow-downs - superdina = raydium_sprite_load ( "dinamizador.sprite", SUPERD ); - inmigrante = raydium_sprite_load ( "inmigrante.sprite", INMIGRANTE ); - //defining types - raydium_sprite_type[superdina] = TYPE_PLAYER; - raydium_sprite_type[inmigrante] = TYPE_INMIGRANTE; -} - void preload_textures2 ( void ) { //preloading textures, to avoid slow-downs @@ -377,17 +387,6 @@ } } -void init_foes ( void ) -{ - int a; - - for ( a = 0;a < MAX_FOES;a++ ) - { - foes_sprite[a] = raydium_sprite_load ( "foe.sprite", ENEMIGO ); - raydium_sprite_move ( foes_sprite[a], 0, 0, 0.5 ); - } -} - void display2 ( void ) { //static counter for the secuences Index: type2.h =================================================================== --- type2.h (revision 153) +++ type2.h (working copy) @@ -11,6 +11,9 @@ __global void init_display2(void); __global void victory2(void); __global void preload_textures2(void); +__global void preload_sprites2 ( void ); +__global void load_goals ( char *cadena ); +__global void init_foes ( void ); #endif Index: versusrx.cbp =================================================================== --- versusrx.cbp (revision 0) +++ versusrx.cbp (revision 0) @@ -0,0 +1,215 @@ + + + + + +