diff --git a/project/jni/application/pachi/src/fx.h b/project/jni/application/pachi/src/fx.h index 1fad74c2a..0cc7f45fc 100644 --- a/project/jni/application/pachi/src/fx.h +++ b/project/jni/application/pachi/src/fx.h @@ -26,7 +26,7 @@ void respawn() // rutina que hace reaparecer a Pachi if((P_scansrect[a].yR_gamearea_y)) { SDL_BlitSurface(player,&P_srcscan[a],screen,&P_scansrect[a]); - SDL_UpdateRect(screen,P_scansrect[a].x,P_scansrect[a].y,P_scansrect[a].w,P_scansrect[a].h); + //SDL_UpdateRect(screen,P_scansrect[a].x,P_scansrect[a].y,P_scansrect[a].w,P_scansrect[a].h); } } if(scanpos_yformat,0,0,0)); print_text(font,screen,16,16,140,90,"LOADING GAME DATA... PLEASE WAIT"); - SDL_UpdateRect(screen,140,90,520,16); + //SDL_UpdateRect(screen,140,90,520,16); + SDL_Flip(screen); SDL_FreeSurface(font); setgame(); @@ -283,7 +285,7 @@ void print_timer() else print_text(font,screen,16,16,352,564,"%d:0%d",minutes,seconds); - SDL_UpdateRect(screen,224,544,208,40); + //SDL_UpdateRect(screen,224,544,208,40); } void do_gametimer() @@ -342,6 +344,7 @@ void chk_sequence() void game_loop() { + print_room(); delta_time(); do_gametimer(); // esta rutina decrementa e imprime el timer play_music(); @@ -354,5 +357,6 @@ void game_loop() print_player(); chk_sequence(); // esta rutina se fija cual es el proximo objeto de la sequencia (Bomb Jack feature) chk_state(); // esta rutina chequea si el personaje se murio, o si paso de nivel + SDL_Flip(screen); SDL_Delay(1); } diff --git a/project/jni/application/pachi/src/init.h b/project/jni/application/pachi/src/init.h index febbcee92..9eedb4c98 100644 --- a/project/jni/application/pachi/src/init.h +++ b/project/jni/application/pachi/src/init.h @@ -33,7 +33,7 @@ void initsdl() SDL_WM_SetIcon(SDL_LoadBMP(DATADIR"/Tgfx/icon.bmp"),NULL); fullscreen=0; - screen = SDL_SetVideoMode(screen_w,screen_h,screen_bpp, /*SDL_HWSURFACE|SDL_DOUBLEBUF*/ SDL_SWSURFACE ); // TODO: fix HW surfaces + screen = SDL_SetVideoMode(screen_w,screen_h,screen_bpp, SDL_HWSURFACE|SDL_DOUBLEBUF /* SDL_SWSURFACE */ ); if (screen == NULL) { fprintf(stderr, "Can't set the video mode. Quitting.\nError; %s\n", SDL_GetError()); diff --git a/project/jni/application/pachi/src/monsters.h b/project/jni/application/pachi/src/monsters.h index 72f21d482..5d8d57ebf 100644 --- a/project/jni/application/pachi/src/monsters.h +++ b/project/jni/application/pachi/src/monsters.h @@ -208,8 +208,8 @@ void print_monsters() SDL_BlitSurface(screenbak, &oldmonsterpos, screen, &oldmonsterposreal); SDL_BlitSurface(monsters, &monstersrc, screen, &monsterposreal); - SDL_UpdateRect(screen,oldmonsterposreal.x,oldmonsterposreal.y,M_w,M_h); - SDL_UpdateRect(screen,monsterposreal.x,monsterposreal.y,M_w,M_h); + //SDL_UpdateRect(screen,oldmonsterposreal.x,oldmonsterposreal.y,M_w,M_h); + //SDL_UpdateRect(screen,monsterposreal.x,monsterposreal.y,M_w,M_h); } } } diff --git a/project/jni/application/pachi/src/output.h b/project/jni/application/pachi/src/output.h index 8dc9c2589..0d358ea7b 100644 --- a/project/jni/application/pachi/src/output.h +++ b/project/jni/application/pachi/src/output.h @@ -93,7 +93,8 @@ void print_credits() SDL_SetColorKey(creditsbuffer, SDL_SRCCOLORKEY, SDL_MapRGB(creditsbuffer->format, 0, 255, 0)); SDL_SetAlpha(creditsbuffer, SDL_SRCALPHA, 128); SDL_BlitSurface(creditsbuffer, &cbuffer1, screen, &creditspos); - SDL_UpdateRect(screen,100,100,600,400); + //SDL_UpdateRect(screen,100,100,600,400); + SDL_Flip(screen); SDL_Delay(50); linegone++; @@ -140,7 +141,7 @@ void print_monitor() print_text(scorefont,screen,16,16,30,528, "LIVES:%d", mplayer[dificulty].lives); print_text(scorefont,screen,16,16,30,546, "STAGE:%d", stage); print_text(scorefont,screen,16,16,30,564, "ITEMS:%d/%d",mplayer[dificulty].objects,mstage[stage-1].objects); - SDL_UpdateRect(screen, 30, 482, 500, 100); + //SDL_UpdateRect(screen, 30, 482, 500, 100); } void blinkscreen(int R,int G, int B, int A) @@ -207,7 +208,7 @@ void print_room() } SDL_BlitSurface(screen,&gamearea,screenbak,NULL); print_monitor(); //imprime la informacion del jugador (vidas, puntos, etc) - SDL_Flip(screen); + //SDL_Flip(screen); } void showcode(char *str) @@ -220,7 +221,8 @@ void showcode(char *str) code.x=280; code.y=220;code.w=240;code.h=50; print_text(scorefont,screen,16,16,code.x+8,code.y+7,"STAGE CODE IS:"); print_text(scorefont1,screen,16,16,code.x+90,code.y+27,"%s",str); - SDL_UpdateRect(screen, code.x, code.y, code.w, code.h); + //SDL_UpdateRect(screen, code.x, code.y, code.w, code.h); + SDL_Flip(screen); escape_exit=0; while(escape_exit==0) { @@ -242,6 +244,7 @@ void fadesurface(SDL_Surface *surface, int x, int y, int speed) float alpha=0; while(alpha<255) { + //SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); delta_time(); SDL_SetAlpha(surface, SDL_SRCALPHA, int(alpha)); SDL_BlitSurface(surface, NULL, screen, &dst); @@ -257,6 +260,7 @@ void fadesurface(SDL_Surface *surface, int x, int y, int speed) float intro_blit(SDL_Surface *surface, int x, int y, int w, int h, float blit_alpha, int speed, int back) { SDL_Rect dst; + //SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format,0,0,0)); dst.x=x; dst.y=y; dst.w=w; dst.h=h; int alpha=int(blit_alpha); SDL_SetAlpha(surface, SDL_SRCALPHA, alpha); diff --git a/project/jni/application/pachi/src/player.h b/project/jni/application/pachi/src/player.h index 3fb4edf62..cb01013f4 100644 --- a/project/jni/application/pachi/src/player.h +++ b/project/jni/application/pachi/src/player.h @@ -345,8 +345,8 @@ void print_player() playersrc.h = mplayer[dificulty].h; SDL_BlitSurface(player, &playersrc, screen, &playerposreal); - SDL_UpdateRect(screen,oldplayerposreal.x,oldplayerposreal.y,P_w,oldplayerpos.h); - SDL_UpdateRect(screen,playerposreal.x,playerposreal.y,mplayer[dificulty].w,mplayer[dificulty].h); + //SDL_UpdateRect(screen,oldplayerposreal.x,oldplayerposreal.y,P_w,oldplayerpos.h); + //SDL_UpdateRect(screen,playerposreal.x,playerposreal.y,mplayer[dificulty].w,mplayer[dificulty].h); } void animateplayer() diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c index 1ead2a51b..0559bd9cd 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c @@ -699,6 +699,7 @@ static void ANDROID_UpdateRects(_THIS, int numrects, SDL_Rect *rects) { //__android_log_print(ANDROID_LOG_INFO, "libSDL", "ANDROID_UpdateRects()"); // Used only in single-buffer mode + //if( SDL_CurrentVideoSurface && !(SDL_CurrentVideoSurface->flags & SDL_HWSURFACE) ) ANDROID_FlipHWSurface(this, SDL_CurrentVideoSurface); }