[Xmltools-development] xmltools2/xmltools/tests Makefile graphics.h racecore.h track.c track.h track
Status: Beta
Brought to you by:
nik_89
|
From: um, r. <sm...@us...> - 2004-11-14 14:53:05
|
Update of /cvsroot/xmltools/xmltools2/xmltools/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9496 Modified Files: Makefile graphics.h racecore.h track.c track.h Removed Files: track_1-2.bmp trackdemo.bmp Log Message: .bmp removed unused files graphics.h added constants to help draw cars racecore nothing new, file just got touched track removed xml junk, made calls into persist to save/load the map --- track_1-2.bmp DELETED --- Index: track.h =================================================================== RCS file: /cvsroot/xmltools/xmltools2/xmltools/tests/track.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** track.h 17 Oct 2004 16:41:29 -0000 1.6 --- track.h 14 Nov 2004 14:52:54 -0000 1.7 *************** *** 11,14 **** --- 11,17 ---- #define TRACK_HEIGHT 5 + #define TRACK_START_X 3 + #define TRACK_START_Y 4 + #define OFFSET_RAIL1 42 #define OFFSET_RAIL2 57 Index: graphics.h =================================================================== RCS file: /cvsroot/xmltools/xmltools2/xmltools/tests/graphics.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** graphics.h 17 Oct 2004 06:07:29 -0000 1.5 --- graphics.h 14 Nov 2004 14:52:54 -0000 1.6 *************** *** 22,30 **** #define TRACK_YOFFSET 38 extern void Graphics_DebugCircle(); extern void Graphics_DrawTile(int x, int y, int index); ! extern void Graphics_DrawCar(int x, int y, int car, int rotation, int color); extern void Graphics_DrawBackground(void); extern void Graphics_DrawFlag(void); --- 22,34 ---- #define TRACK_YOFFSET 38 + #define CARS_TILES_WIDE 16 + #define CARS_TILES_HIGH 2 + extern void Graphics_DebugCircle(); extern void Graphics_DrawTile(int x, int y, int index); ! extern void Graphics_DrawCar(int x, int y, int player, int rotation, ! int transparent); extern void Graphics_DrawBackground(void); extern void Graphics_DrawFlag(void); *************** *** 32,36 **** extern void Graphics_ClearScreen(void); extern void Graphics_UpdateScreen(void); - extern int Graphics_SetCarColor(int R, int G, int B); /* these return 0 on success and 1 on failure */ --- 36,39 ---- Index: Makefile =================================================================== RCS file: /cvsroot/xmltools/xmltools2/xmltools/tests/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 14 Nov 2004 12:04:00 -0000 1.6 --- Makefile 14 Nov 2004 14:52:53 -0000 1.7 *************** *** 6,10 **** ifeq ($(opt),yes) ! CFLAGS = -s -O2 -fomit-frame-pointer -DNDEBUG endif --- 6,10 ---- ifeq ($(opt),yes) ! CFLAGS = -Wall -s -O2 -fomit-frame-pointer -DNDEBUG endif Index: racecore.h =================================================================== RCS file: /cvsroot/xmltools/xmltools2/xmltools/tests/racecore.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** racecore.h 17 Oct 2004 19:50:58 -0000 1.3 --- racecore.h 14 Nov 2004 14:52:54 -0000 1.4 *************** *** 16,19 **** --- 16,20 ---- extern int state; + void Editor_MouseDown(int x, int y, int button); void Editor_MouseUp(int x, int y, int button); --- trackdemo.bmp DELETED --- Index: track.c =================================================================== RCS file: /cvsroot/xmltools/xmltools2/xmltools/tests/track.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** track.c 14 Nov 2004 12:00:26 -0000 1.8 --- track.c 14 Nov 2004 14:52:54 -0000 1.9 *************** *** 77,82 **** /* track start is assumed to be in the center of the screen going from * left to right. */ ! int x = 3; ! int y = 4; int isvalid = 1; int direction = 1; /* clockwise from top */ --- 77,82 ---- /* track start is assumed to be in the center of the screen going from * left to right. */ ! int x = TRACK_START_X; ! int y = TRACK_START_Y; int isvalid = 1; int direction = 1; /* clockwise from top */ *************** *** 96,100 **** { /* see if we have got back to the start */ ! if (x == 3 && y == 4) { break; --- 96,100 ---- { /* see if we have got back to the start */ ! if (x == TRACK_START_X && y == TRACK_START_Y) { break; *************** *** 114,117 **** --- 114,118 ---- { memset(mytrack, 0, sizeof(unsigned char) * TRACK_WIDTH * TRACK_HEIGHT); + Track_SetTile(TRACK_START_X, TRACK_START_Y, TT_HORIZONTAL); } *************** *** 121,126 **** int Track_Init() { ! memset(mytrack, 0, sizeof(unsigned char) * TRACK_WIDTH * TRACK_HEIGHT); ! Track_SetTile(3, 4, TT_HORIZONTAL); /* track start */ #ifdef CFG_PERSISTENT_TRACK --- 122,126 ---- int Track_Init() { ! Track_Clear(); #ifdef CFG_PERSISTENT_TRACK |