Path: chuka.playstation.co.uk!news From: "Omar" Newsgroups: scee.yaroze.freetalk.english Subject: game freezes Date: Sat, 27 Jul 2002 00:39:19 -0400 Organization: PlayStation Net Yaroze (SCEE) Lines: 129 Message-ID: NNTP-Posting-Host: AC89F813.ipt.aol.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 hello comrades, for some unknown reason, when i try to put one of the following lines of code, my game completely freezes. this line: if(padd&PADLdown) printf("hi\n"); caused siocons to start lising all of the yaroze devices (memory card, controllers, etc.) and said that they were not valid devices, or something like that. another time, it simply gave me a black screen. this line: if(padd&PADLdown) arrow.x++; which is supposed to move a sprite, gave me a black screen and hung the game. now, i tried moving these lines of code in different places during my main loop. the line of code which prints "hi" runs fine, but only at the beginning of the program. however, the line which moves the sprite hangs the program no matter where it is in the code. i haven't a single clue as to what's going on. below is the code for my main( ) function. you'll see the two problematic lines of code commented out towards the bottom. --omar metwally /**** MAIN FUNCTION ****/ int main( void ) { int x; InitGraphics(); InitCoordinates(); CreateDynamicTMD(); CreateTMD( &obj.obj, &obj.coord, tmd_addr ); CreateTMD( &car.obj, &car.coord, CAR_DATA ); CreateTMD( &point.obj, &point.coord, POINT_DATA ); CreateTMD( &test.obj, &test.coord, TEST_DATA ); CreateTMD( &car2.obj, &car2.coord, CAR2_DATA ); InitTex(SANDTEX_DATA); InitObject2D( (u_long*)MAIN_L_DATA, &main_l, (1<<24), -170, -125, 160, 240, 0, 0 ); InitObject2D( (u_long*)MAIN_R_DATA, &main_r, (1<<24), -10, -125, 160, 240, 0, 0 ); InitObject2D( (u_long*)ARROW_DATA, &arrow, (1<<24), -160, -9, 16, 15, 0, 0 ); InitObject2D( (u_long*)NEXT_DATA, &next_l, (1<<24), -160, 40, 70, 60, 0, 60 ); InitObject2D( (u_long*)NEXT_DATA, &next_r, (1<<24), 80, 40, 70, 60, 0, 0 ); InitObject2D( (u_long*)TEXT_DATA, &egypt, (0<<24), -76, -25, 76, 16, 0, 7 ); InitObject2D( (u_long*)TEXT_DATA, &italia, (0<<24), -76, 0, 88, 16, 0, 29 ); InitObject2D( (u_long*)TEXT_DATA, &pause, (0<<24), -76, 0, 88, 16, 0, 51 ); InitObject2D( (u_long*)TEXT_DATA, &p1_wins, (0<<24), -76, 0, 112, 16, 0, 73 ); InitObject2D( (u_long*)TEXT_DATA, &cpu_wins, (0<<24), -76, 0, 127, 16, 0, 96 ); InitObject2D( (u_long*)TEXT_DATA, &three, (0<<24), -100, 130, 36, 16, 0, 121 ); InitObject2D( (u_long*)TEXT_DATA, &two, (0<<24), -100, 130, 36, 16, 42, 121 ); InitObject2D( (u_long*)TEXT_DATA, &one, (0<<24), -100, 130, 36, 16, 85, 121 ); InitObject2D( (u_long*)TEXT_DATA, &go, (0<<24), -100, 130, 36, 16, 126, 121 ); InitView(); InitLights(); InitGrid(); InitCar( &car_obj[0], 100, 1, 1, 0, (1<<12)/10 ); InitCar( &car_obj[1], 100, 1, 1, 0, (1<<12)/10 ); obj.obj.attribute |= GsDIV4; //4<<9 // main while loop while((!(padd&PADselect)) || (!(padd&PADstart)) ) { padd=(~(*(bb0+3) | *(bb0+2) << 8)); //read pad 1 padd2=(~(*(bb1+3) | *(bb1+2) << 8)); //read pad 2 DebugMenu(); PrintText(); if(game_mode==0) MenuSystem(); if(debugmode==0) MovePointer(); ChooseCar(); if( (debugmode==2) && (game_mode==6) ) { CarMotion( &car_obj[0], &car.coord, &car.vector ); //CarMotion( &car_obj[1], &car2.coord, &car2.vector ); TestBoundary( &car.coord ); //TestBoundary( &car2.coord ); LimitBoundary( 1, &car.coord, &car_obj[0], &status, &reset ); //LimitBoundary( 1, &car2.coord, &car_obj[1], &status2, &reset2 ); } FindCoordinates(); //draw fog #ifdef FOG GsSetFogParam(&fog); #endif //if(padd&PADLdown) printf("hi\n"); //if(padd&PADLdown) arrow.x++; //rotate matrices using UpdateCoordinates() UpdateCoordinates( &obj.vector, &obj.coord ); UpdateCoordinates( &car.vector, &car.coord ); UpdateCoordinates( &car2.vector, &car2.coord ); UpdateCoordinates( &point.vector, &point.coord ); UpdateCoordinates( &test.vector, &test.coord ); DrawScreen(); } //end while loop DeInit(); return(0); }// end main