From: Ingo Ruhnke Date: Mon, 22 Mar 2004 15:52:35 +0000 (+0000) Subject: - removed NO_UPDATE and let the default argument handle it X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=554496a10625d28314195fecb656c8d5cb80cbb9;p=supertux.git - removed NO_UPDATE and let the default argument handle it SVN-Revision: 323 --- diff --git a/src/badguy.cpp b/src/badguy.cpp index 50295116a..cff478921 100644 --- a/src/badguy.cpp +++ b/src/badguy.cpp @@ -377,15 +377,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_bsod_left[(frame / 5) % 4], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_bsod_right[(frame / 5) % 4], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } else if (pbad->dying == DYING_FALLING) @@ -396,15 +394,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_bsod_falling_left, pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_bsod_falling_right, pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } else if (pbad->dying == DYING_SQUISHED) @@ -415,15 +411,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_bsod_squished_left, pbad->base.x - scroll_x, - pbad->base.y + 24, - NO_UPDATE); + pbad->base.y + 24); } else { texture_draw(&img_bsod_squished_right, pbad->base.x - scroll_x, - pbad->base.y + 24, - NO_UPDATE); + pbad->base.y + 24); } } } @@ -443,15 +437,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_laptop_left[(frame / 5) % 3], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_laptop_right[(frame / 5) % 3], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } else @@ -462,15 +454,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_laptop_flat_left, pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_laptop_flat_right, pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } } @@ -482,15 +472,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_laptop_falling_left, pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_laptop_falling_right, pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } } @@ -502,15 +490,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_money_left[0], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_money_right[0], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } else @@ -519,15 +505,13 @@ void badguy_draw(bad_guy_type* pbad) { texture_draw(&img_money_left[1], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } else { texture_draw(&img_money_right[1], pbad->base.x - scroll_x, - pbad->base.y, - NO_UPDATE); + pbad->base.y); } } } diff --git a/src/button.cpp b/src/button.cpp index c13439e2f..873354d3c 100644 --- a/src/button.cpp +++ b/src/button.cpp @@ -87,9 +87,9 @@ void button_draw(button_type* pbutton) fillrect(pbutton->x+1,pbutton->y+1,pbutton->w-2,pbutton->h-2,175,175,175,200); if(pbutton->bkgd != NULL) { - texture_draw(pbutton->bkgd,pbutton->x,pbutton->y,NO_UPDATE); + texture_draw(pbutton->bkgd,pbutton->x,pbutton->y); } - texture_draw(&pbutton->icon,pbutton->x,pbutton->y,NO_UPDATE); + texture_draw(&pbutton->icon,pbutton->x,pbutton->y); if(pbutton->show_info) { char str[80]; @@ -99,9 +99,9 @@ void button_draw(button_type* pbutton) i = pbutton->w + strlen(pbutton->info) * white_small_text.w; if(pbutton->info) - text_draw(&white_small_text, pbutton->info, i + pbutton->x - strlen(pbutton->info) * white_small_text.w, pbutton->y, 1, NO_UPDATE); + text_draw(&white_small_text, pbutton->info, i + pbutton->x - strlen(pbutton->info) * white_small_text.w, pbutton->y, 1); sprintf(str,"(%s)", SDL_GetKeyName(pbutton->shortcut)); - text_draw(&white_small_text, str, i + pbutton->x - strlen(str) * white_small_text.w, pbutton->y + white_small_text.h+2, 1, NO_UPDATE); + text_draw(&white_small_text, str, i + pbutton->x - strlen(str) * white_small_text.w, pbutton->y + white_small_text.h+2, 1); } if(pbutton->state == BUTTON_PRESSED) fillrect(pbutton->x,pbutton->y,pbutton->w,pbutton->h,75,75,75,200); diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 8b362f380..618a4d398 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -76,13 +76,13 @@ void levelintro(void) clearscreen(0, 0, 0); sprintf(str, "LEVEL %d", level); - text_drawf(&blue_text, str, 0, 200, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&blue_text, str, 0, 200, A_HMIDDLE, A_TOP, 1); sprintf(str, "%s", current_level.name.c_str()); - text_drawf(&gold_text, str, 0, 224, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, 224, A_HMIDDLE, A_TOP, 1); sprintf(str, "TUX x %d", tux.lives); - text_drawf(&white_text, str, 0, 256, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&white_text, str, 0, 256, A_HMIDDLE, A_TOP, 1); flipscreen(); @@ -465,15 +465,15 @@ void game_draw(void) if (tux.dying && (frame % 4) == 0) clearscreen(255, 255, 255); else if(timer_check(&super_bkgd_timer)) - texture_draw(&img_super_bkgd, 0, 0, NO_UPDATE); + texture_draw(&img_super_bkgd, 0, 0); else { /* Draw the real background */ if(current_level.bkgd_image[0] != '\0') { s = (int)scroll_x / 30; - texture_draw_part(&img_bkgd,s,0,0,0,img_bkgd.w - s, img_bkgd.h, NO_UPDATE); - texture_draw_part(&img_bkgd,0,0,screen->w - s ,0,s,img_bkgd.h, NO_UPDATE); + texture_draw_part(&img_bkgd,s,0,0,0,img_bkgd.w - s, img_bkgd.h); + texture_draw_part(&img_bkgd,0,0,screen->w - s ,0,s,img_bkgd.h); } else { @@ -561,7 +561,7 @@ void game_draw(void) fillrect(i % 2 ? (pause_menu_frame * i)%screen->w : -((pause_menu_frame * i)%screen->w) ,(i*20+pause_menu_frame)%screen->h,screen->w,10,20,20,20, rand() % 20 + 1); } fillrect(0,0,screen->w,screen->h,rand() % 50, rand() % 50, rand() % 50, 128); - text_drawf(&blue_text, "PAUSE - Press 'P' To Play", 0, 230, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&blue_text, "PAUSE - Press 'P' To Play", 0, 230, A_HMIDDLE, A_TOP, 1); } if(show_menu) @@ -1296,62 +1296,62 @@ void drawshape(float x, float y, unsigned char c) int z; if (c == 'X' || c == 'x') - texture_draw(&img_brick[0], x, y, NO_UPDATE); + texture_draw(&img_brick[0], x, y); else if (c == 'Y' || c == 'y') - texture_draw(&img_brick[1], x, y, NO_UPDATE); + texture_draw(&img_brick[1], x, y); else if (c == 'A' || c =='B' || c == '!') - texture_draw(&img_box_full, x, y, NO_UPDATE); + texture_draw(&img_box_full, x, y); else if (c == 'a') - texture_draw(&img_box_empty, x, y, NO_UPDATE); + texture_draw(&img_box_empty, x, y); else if (c >= 'C' && c <= 'F') - texture_draw(&img_cloud[0][c - 'C'], x, y, NO_UPDATE); + texture_draw(&img_cloud[0][c - 'C'], x, y); else if (c >= 'c' && c <= 'f') - texture_draw(&img_cloud[1][c - 'c'], x, y, NO_UPDATE); + texture_draw(&img_cloud[1][c - 'c'], x, y); else if (c >= 'G' && c <= 'J') - texture_draw(&img_bkgd_tile[0][c - 'G'], x, y, NO_UPDATE); + texture_draw(&img_bkgd_tile[0][c - 'G'], x, y); else if (c >= 'g' && c <= 'j') - texture_draw(&img_bkgd_tile[1][c - 'g'], x, y, NO_UPDATE); + texture_draw(&img_bkgd_tile[1][c - 'g'], x, y); else if (c == '#') - texture_draw(&img_solid[0], x, y, NO_UPDATE); + texture_draw(&img_solid[0], x, y); else if (c == '[') - texture_draw(&img_solid[1], x, y, NO_UPDATE); + texture_draw(&img_solid[1], x, y); else if (c == '=') - texture_draw(&img_solid[2], x, y, NO_UPDATE); + texture_draw(&img_solid[2], x, y); else if (c == ']') - texture_draw(&img_solid[3], x, y, NO_UPDATE); + texture_draw(&img_solid[3], x, y); else if (c == '$') { z = (frame / 2) % 6; if (z < 4) - texture_draw(&img_distro[z], x, y, NO_UPDATE); + texture_draw(&img_distro[z], x, y); else if (z == 4) - texture_draw(&img_distro[2], x, y, NO_UPDATE); + texture_draw(&img_distro[2], x, y); else if (z == 5) - texture_draw(&img_distro[1], x, y, NO_UPDATE); + texture_draw(&img_distro[1], x, y); } else if (c == '^') { z = (frame / 3) % 3; - texture_draw(&img_waves[z], x, y, NO_UPDATE); + texture_draw(&img_waves[z], x, y); } else if (c == '*') - texture_draw(&img_poletop, x, y, NO_UPDATE); + texture_draw(&img_poletop, x, y); else if (c == '|') { - texture_draw(&img_pole, x, y, NO_UPDATE); + texture_draw(&img_pole, x, y); } else if (c == '\\') { z = (frame / 3) % 2; - texture_draw(&img_flag[z], x + 16, y, NO_UPDATE); + texture_draw(&img_flag[z], x + 16, y); } else if (c == '&') - texture_draw(&img_water, x, y, NO_UPDATE); + texture_draw(&img_water, x, y); } @@ -1586,43 +1586,43 @@ void drawstatus(void) int i; sprintf(str, "%d", score); - text_draw(&white_text, "SCORE", 0, 0, 1, NO_UPDATE); - text_draw(&gold_text, str, 96, 0, 1, NO_UPDATE); + text_draw(&white_text, "SCORE", 0, 0, 1); + text_draw(&gold_text, str, 96, 0, 1); if(st_gl_mode != ST_GL_TEST) { sprintf(str, "%d", hs_score); - text_draw(&white_text, "HIGH", 0, 20, 1, NO_UPDATE); - text_draw(&gold_text, str, 96, 20, 1, NO_UPDATE); + text_draw(&white_text, "HIGH", 0, 20, 1); + text_draw(&gold_text, str, 96, 20, 1); } else { - text_draw(&white_text,"Press ESC To Return",0,20,1, NO_UPDATE); + text_draw(&white_text,"Press ESC To Return",0,20,1); } if (timer_get_left(&time_left) > TIME_WARNING || (frame % 10) < 5) { sprintf(str, "%d", timer_get_left(&time_left) / 1000 ); - text_draw(&white_text, "TIME", 224, 0, 1, NO_UPDATE); - text_draw(&gold_text, str, 304, 0, 1, NO_UPDATE); + text_draw(&white_text, "TIME", 224, 0, 1); + text_draw(&gold_text, str, 304, 0, 1); } sprintf(str, "%d", distros); - text_draw(&white_text, "DISTROS", screen->h, 0, 1, NO_UPDATE); - text_draw(&gold_text, str, 608, 0, 1, NO_UPDATE); + text_draw(&white_text, "DISTROS", screen->h, 0, 1); + text_draw(&gold_text, str, 608, 0, 1); - text_draw(&white_text, "LIVES", screen->h, 20, 1, NO_UPDATE); + text_draw(&white_text, "LIVES", screen->h, 20, 1); if(show_fps) { sprintf(str, "%2.1f", fps_fps); - text_draw(&white_text, "FPS", screen->h, 40, 1, NO_UPDATE); - text_draw(&gold_text, str, screen->h + 60, 40, 1, NO_UPDATE); + text_draw(&white_text, "FPS", screen->h, 40, 1); + text_draw(&gold_text, str, screen->h + 60, 40, 1); } for(i=0; i < tux.lives; ++i) { - texture_draw(&tux_life,565+(18*i),20,NO_UPDATE); + texture_draw(&tux_life,565+(18*i),20); } } @@ -1633,13 +1633,13 @@ void drawendscreen(void) clearscreen(0, 0, 0); - text_drawf(&blue_text, "GAMEOVER", 0, 200, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&blue_text, "GAMEOVER", 0, 200, A_HMIDDLE, A_TOP, 1); sprintf(str, "SCORE: %d", score); - text_drawf(&gold_text, str, 0, 224, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, 224, A_HMIDDLE, A_TOP, 1); sprintf(str, "DISTROS: %d", distros); - text_drawf(&gold_text, str, 0, 256, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, 256, A_HMIDDLE, A_TOP, 1); flipscreen(); SDL_Delay(2000); @@ -1651,13 +1651,13 @@ void drawresultscreen(void) clearscreen(0, 0, 0); - text_drawf(&blue_text, "Result:", 0, 200, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&blue_text, "Result:", 0, 200, A_HMIDDLE, A_TOP, 1); sprintf(str, "SCORE: %d", score); - text_drawf(&gold_text, str, 0, 224, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, 224, A_HMIDDLE, A_TOP, 1); sprintf(str, "DISTROS: %d", distros); - text_drawf(&gold_text, str, 0, 256, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, 256, A_HMIDDLE, A_TOP, 1); flipscreen(); SDL_Delay(2000); diff --git a/src/intro.cpp b/src/intro.cpp index 0edd17a14..151723333 100644 --- a/src/intro.cpp +++ b/src/intro.cpp @@ -132,7 +132,7 @@ int intro(void) texture_draw(&tux_sit, 270, 400, UPDATE); texture_draw(&gown_sit, 320, 400, UPDATE); - text_drawf(&white_text, intro_text[0], 0, -8, A_HMIDDLE, A_BOTTOM, 0, NO_UPDATE); + text_drawf(&white_text, intro_text[0], 0, -8, A_HMIDDLE, A_BOTTOM, 0); } @@ -142,14 +142,14 @@ int intro(void) /* Helicopter begins to fly in: */ erasecenteredtext(&white_text, intro_text[0], 454, &bkgd, NO_UPDATE, 1); - text_drawf(&white_text, intro_text[1], 0,-8, A_HMIDDLE, A_BOTTOM, 0, NO_UPDATE); + text_drawf(&white_text, intro_text[1], 0,-8, A_HMIDDLE, A_BOTTOM, 0); } if (timer_get_gone(&timer) >= 2000 && timer_get_gone(&timer) < 4000) { /* Helicopter flying in: */ - texture_draw_part(&bkgd,0,32, 0, 32, screen->w, (copter[0].h), NO_UPDATE); + texture_draw_part(&bkgd,0,32, 0, 32, screen->w, (copter[0].h)); texture_draw(&copter[i % 2], (float)(timer_get_gone(&timer) - 2000) / 5 - (copter[0].w), 32, @@ -180,9 +180,9 @@ int intro(void) if (timer_get_gone(&timer) >= 4000 && timer_get_gone(&timer) < 8000) { /* Helicopter sits: */ - texture_draw_part(&bkgd,0,32, 0, 32, screen->w, (copter[0].h), NO_UPDATE); + texture_draw_part(&bkgd,0,32, 0, 32, screen->w, (copter[0].h)); - texture_draw(&copter[i % 2], 400 - (copter[0].w), 32, NO_UPDATE); + texture_draw(&copter[i % 2], 400 - (copter[0].w), 32); update_rect(screen, 0, 32, screen->w, (copter[0].h)); } @@ -196,7 +196,7 @@ int intro(void) erasecenteredtext(&white_text, intro_text[1], 454, &bkgd, UPDATE, 1); - text_drawf(&white_text, intro_text[2], 0,-8, A_HMIDDLE, A_BOTTOM, 0, NO_UPDATE); + text_drawf(&white_text, intro_text[2], 0,-8, A_HMIDDLE, A_BOTTOM, 0); } @@ -208,7 +208,7 @@ int intro(void) 310, 32 + (copter[0].h), 310, 32 + (copter[0].h), (gown_upset.w) + 20, - 376 + (gown_upset.h) - (copter[0].h), NO_UPDATE); + 376 + (gown_upset.h) - (copter[0].h)); for (j = 0; j < (gown_upset.sdl_surface -> w); j++) @@ -226,7 +226,7 @@ int intro(void) dest.w = src.w; dest.h = src.h; - texture_draw_part(&gown_upset,src.x,src.y,dest.x,dest.y,dest.w,dest.h,NO_UPDATE); + texture_draw_part(&gown_upset,src.x,src.y,dest.x,dest.y,dest.w,dest.h); height[j] = 400 + rand() % 10 - (int)(300. * ((float)(timer_get_gone(&timer) - 5000)/(float)3000.)); if(height[j] < 105) @@ -247,7 +247,7 @@ int intro(void) 310, 32 + (copter[0].h), 310, 32 + (copter[0].h), (gown_upset.w) + 20, - 368 + (gown_upset.h) - (copter[0].h), NO_UPDATE); + 368 + (gown_upset.h) - (copter[0].h)); ++scene; /* Tux gets mad! */ @@ -255,7 +255,7 @@ int intro(void) texture_draw(&tux_mad, 270, 400, UPDATE); erasecenteredtext(&white_text, intro_text[2], 454, &bkgd, UPDATE, 1); - text_drawf(&white_text, intro_text[3], 0,-8, A_HMIDDLE, A_BOTTOM, 0, NO_UPDATE); + text_drawf(&white_text, intro_text[3], 0,-8, A_HMIDDLE, A_BOTTOM, 0); } @@ -263,7 +263,7 @@ int intro(void) { /* Helicopter starting to speed off: */ - texture_draw_part(&bkgd, 0, 32, 0, 32, screen->w, (copter_squish.h), NO_UPDATE); + texture_draw_part(&bkgd, 0, 32, 0, 32, screen->w, (copter_squish.h)); texture_draw(&copter_squish, 400 - (copter[0].w), 32, @@ -277,7 +277,7 @@ int intro(void) { /* Helicopter speeding off: */ - texture_draw_part(&bkgd, 0, 32, 0, 32, screen->w, (copter_stretch.h), NO_UPDATE); + texture_draw_part(&bkgd, 0, 32, 0, 32, screen->w, (copter_stretch.h)); texture_draw(&copter_stretch, (timer_get_gone(&timer) - 8250) /*(i - (8250 / FPS)) * 30*/ + 400 - (copter[0].w), diff --git a/src/leveleditor.cpp b/src/leveleditor.cpp index 6e8bbab68..3cc6cc777 100644 --- a/src/leveleditor.cpp +++ b/src/leveleditor.cpp @@ -737,7 +737,7 @@ void le_drawinterface() } if(le_selection_mode == CURSOR) - texture_draw(&le_selection, cursor_x - pos_x, cursor_y, NO_UPDATE); + texture_draw(&le_selection, cursor_x - pos_x, cursor_y); else if(le_selection_mode == SQUARE) { int w, h; @@ -758,24 +758,24 @@ void le_drawinterface() switch(le_current_tile) { case 'B': - texture_draw(&img_mints, 19 * 32, 14 * 32, NO_UPDATE); + texture_draw(&img_mints, 19 * 32, 14 * 32); break; case '!': - texture_draw(&img_golden_herring,19 * 32, 14 * 32, NO_UPDATE); + texture_draw(&img_golden_herring,19 * 32, 14 * 32); break; case 'x': case 'y': case 'A': - texture_draw(&img_distro[(le_frame / 5) % 4], 19 * 32, 14 * 32, NO_UPDATE); + texture_draw(&img_distro[(le_frame / 5) % 4], 19 * 32, 14 * 32); break; case '0': - texture_draw(&img_bsod_left[(le_frame / 5) % 4],19 * 32, 14 * 32, NO_UPDATE); + texture_draw(&img_bsod_left[(le_frame / 5) % 4],19 * 32, 14 * 32); break; case '1': - texture_draw(&img_laptop_left[(le_frame / 5) % 3],19 * 32, 14 * 32, NO_UPDATE); + texture_draw(&img_laptop_left[(le_frame / 5) % 3],19 * 32, 14 * 32); break; case '2': - texture_draw(&img_money_left[0],19 * 32, 14 * 32, NO_UPDATE); + texture_draw(&img_money_left[0],19 * 32, 14 * 32); break; default: break; @@ -801,16 +801,16 @@ void le_drawinterface() button_panel_draw(&le_bad_panel); sprintf(str, "%d/%d", le_level,le_level_subset.levels); - text_drawf(&white_text, str, -8, 16, A_RIGHT, A_TOP, 1, NO_UPDATE); + text_drawf(&white_text, str, -8, 16, A_RIGHT, A_TOP, 1); - text_draw(&white_small_text, "F1 for Help", 10, 430, 1, NO_UPDATE); + text_draw(&white_small_text, "F1 for Help", 10, 430, 1); } else { if(show_menu == false) - text_draw(&white_small_text, "No Level Subset loaded - Press ESC and choose one in the menu", 10, 430, 1, NO_UPDATE); + text_draw(&white_small_text, "No Level Subset loaded - Press ESC and choose one in the menu", 10, 430, 1); else - text_draw(&white_small_text, "No Level Subset loaded", 10, 430, 1, NO_UPDATE); + text_draw(&white_small_text, "No Level Subset loaded", 10, 430, 1); } } @@ -823,8 +823,8 @@ void le_drawlevel() if(le_current_level->bkgd_image[0] != '\0') { s = pos_x / 30; - texture_draw_part(&img_bkgd,s,0,0,0,img_bkgd.w - s - 32, img_bkgd.h, NO_UPDATE); - texture_draw_part(&img_bkgd,0,0,screen->w - s - 32 ,0,s,img_bkgd.h, NO_UPDATE); + texture_draw_part(&img_bkgd,s,0,0,0,img_bkgd.w - s - 32, img_bkgd.h); + texture_draw_part(&img_bkgd,0,0,screen->w - s - 32 ,0,s,img_bkgd.h); } else { @@ -843,15 +843,15 @@ void le_drawlevel() switch(le_current_level->tiles[y][x + (int)(pos_x/32)]) { case 'B': - texture_draw(&img_mints, x * 32 - ((int)pos_x % 32), y*32, NO_UPDATE); + texture_draw(&img_mints, x * 32 - ((int)pos_x % 32), y*32); break; case '!': - texture_draw(&img_golden_herring, x * 32 - ((int)pos_x % 32), y*32, NO_UPDATE); + texture_draw(&img_golden_herring, x * 32 - ((int)pos_x % 32), y*32); break; case 'x': case 'y': case 'A': - texture_draw(&img_distro[(frame / 5) % 4], x * 32 - ((int)pos_x % 32), y*32, NO_UPDATE); + texture_draw(&img_distro[(frame / 5) % 4], x * 32 - ((int)pos_x % 32), y*32); break; default: break; @@ -863,17 +863,17 @@ void le_drawlevel() { /* to support frames: img_bsod_left[(frame / 5) % 4] */ if(bad_guys[i].kind == BAD_BSOD) - texture_draw(&img_bsod_left[(le_frame / 5) % 4], bad_guys[i].base.x - pos_x, bad_guys[i].base.y, NO_UPDATE); + texture_draw(&img_bsod_left[(le_frame / 5) % 4], bad_guys[i].base.x - pos_x, bad_guys[i].base.y); else if(bad_guys[i].kind == BAD_LAPTOP) - texture_draw(&img_laptop_left[(le_frame / 5) % 3], bad_guys[i].base.x - pos_x, bad_guys[i].base.y, NO_UPDATE); + texture_draw(&img_laptop_left[(le_frame / 5) % 3], bad_guys[i].base.x - pos_x, bad_guys[i].base.y); else if (bad_guys[i].kind == BAD_MONEY) - texture_draw(&img_money_left[(le_frame / 5) % 2], bad_guys[i].base.x - pos_x, bad_guys[i].base.y, NO_UPDATE); + texture_draw(&img_money_left[(le_frame / 5) % 2], bad_guys[i].base.x - pos_x, bad_guys[i].base.y); } /* Draw the player: */ /* for now, the position is fixed at (0, 240) */ - texture_draw(&tux_right[(frame / 5) % 3], 0 - pos_x, 240, NO_UPDATE); + texture_draw(&tux_right[(frame / 5) % 3], 0 - pos_x, 240); } void le_checkevents() @@ -1061,9 +1061,9 @@ void le_checkevents() char str[1024]; int d = 0; sprintf(str,"Level %d doesn't exist.",le_level+1); - text_drawf(&white_text,str,0,-18,A_HMIDDLE,A_VMIDDLE,2,NO_UPDATE); - text_drawf(&white_text,"Do you want to create it?",0,0,A_HMIDDLE,A_VMIDDLE,2,NO_UPDATE); - text_drawf(&red_text,"(Y)es/(N)o",0,20,A_HMIDDLE,A_VMIDDLE,2,NO_UPDATE); + text_drawf(&white_text,str,0,-18,A_HMIDDLE,A_VMIDDLE,2); + text_drawf(&white_text,"Do you want to create it?",0,0,A_HMIDDLE,A_VMIDDLE,2); + text_drawf(&red_text,"(Y)es/(N)o",0,20,A_HMIDDLE,A_VMIDDLE,2); flipscreen(); while(d == 0) { @@ -1438,12 +1438,12 @@ void le_showhelp() }; - text_drawf(&blue_text, "- Help -", 0, 30, A_HMIDDLE, A_TOP, 2, NO_UPDATE); + text_drawf(&blue_text, "- Help -", 0, 30, A_HMIDDLE, A_TOP, 2); for(i = 0; i < sizeof(text)/sizeof(char *); i++) - text_draw(&white_small_text, text[i], 5, 80+(i*12), 1, NO_UPDATE); + text_draw(&white_small_text, text[i], 5, 80+(i*12), 1); - text_drawf(&gold_text, "Press Any Key to Continue", 0, 440, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&gold_text, "Press Any Key to Continue", 0, 440, A_HMIDDLE, A_TOP, 1); flipscreen(); diff --git a/src/player.cpp b/src/player.cpp index 906a2b21c..5b2d4a9de 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -624,14 +624,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&cape_right[frame % 2], - pplayer->base.x- scroll_x, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x, pplayer->base.y); } else { texture_draw(&cape_left[frame % 2], - pplayer->base.x- scroll_x, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x, pplayer->base.y); } } @@ -640,11 +638,11 @@ void player_draw(player_type* pplayer) { if (pplayer->dir == RIGHT) { - texture_draw(&tux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE); + texture_draw(&tux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y); } else { - texture_draw(&tux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE); + texture_draw(&tux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y); } } else @@ -653,11 +651,11 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { - texture_draw(&firetux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE); + texture_draw(&firetux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y); } else { - texture_draw(&firetux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE); + texture_draw(&firetux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y); } } } @@ -670,14 +668,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&bigcape_right[frame % 2], - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&bigcape_left[frame % 2], - pplayer->base.x-scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x-scroll_x - 8, pplayer->base.y); } } @@ -692,14 +688,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&bigtux_right[pplayer->frame], - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&bigtux_left[pplayer->frame], - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } } else @@ -707,14 +701,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&bigtux_right_jump, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&bigtux_left_jump, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } } } @@ -723,14 +715,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&skidtux_right, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&skidtux_left, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } } } @@ -738,13 +728,11 @@ void player_draw(player_type* pplayer) { if (pplayer->dir == RIGHT) { - texture_draw(&ducktux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16, - NO_UPDATE); + texture_draw(&ducktux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16); } else { - texture_draw(&ducktux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16, - NO_UPDATE); + texture_draw(&ducktux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16); } } } @@ -761,14 +749,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&bigfiretux_right[pplayer->frame], - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&bigfiretux_left[pplayer->frame], - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } } else @@ -776,14 +762,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&bigfiretux_right_jump, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&bigfiretux_left_jump, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } } } @@ -792,14 +776,12 @@ void player_draw(player_type* pplayer) if (pplayer->dir == RIGHT) { texture_draw(&skidfiretux_right, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } else { texture_draw(&skidfiretux_left, - pplayer->base.x- scroll_x - 8, pplayer->base.y, - NO_UPDATE); + pplayer->base.x- scroll_x - 8, pplayer->base.y); } } } @@ -807,13 +789,11 @@ void player_draw(player_type* pplayer) { if (pplayer->dir == RIGHT) { - texture_draw(&duckfiretux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16, - NO_UPDATE); + texture_draw(&duckfiretux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16); } else { - texture_draw(&duckfiretux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16, - NO_UPDATE); + texture_draw(&duckfiretux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16); } } } diff --git a/src/title.cpp b/src/title.cpp index bfa539d67..e2799565e 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -47,18 +47,18 @@ void draw_background() { /* Draw the title background: */ - texture_draw_bg(&bkg_title, NO_UPDATE); + texture_draw_bg(&bkg_title); /* Animate title screen: */ pict = (frame / 5) % 3; if (pict == 0) - texture_draw_part(&bkg_title, 560, 270, 560, 270, 80, 75, NO_UPDATE); + texture_draw_part(&bkg_title, 560, 270, 560, 270, 80, 75); else if (pict == 1) - texture_draw(&anim1, 560, 270, NO_UPDATE); + texture_draw(&anim1, 560, 270); else if (pict == 2) - texture_draw(&anim2, 560, 270, NO_UPDATE); + texture_draw(&anim2, 560, 270); } /* --- TITLE SCREEN --- */ @@ -93,7 +93,7 @@ int title(void) frame = 0; /* Draw the title background: */ - texture_draw_bg(&bkg_title, NO_UPDATE); + texture_draw_bg(&bkg_title); load_hs(); @@ -143,9 +143,9 @@ int title(void) /* Draw the high score: */ sprintf(str, "High score: %d", hs_score); - text_drawf(&gold_text, str, 0, -40, A_HMIDDLE, A_BOTTOM, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, -40, A_HMIDDLE, A_BOTTOM, 1); sprintf(str, "by %s", hs_name); - text_drawf(&gold_text, str, 0, -20, A_HMIDDLE, A_BOTTOM, 1, NO_UPDATE); + text_drawf(&gold_text, str, 0, -20, A_HMIDDLE, A_BOTTOM, 1); /* Don't draw menu, if quit is true */ if(show_menu && !quit) @@ -163,19 +163,19 @@ int title(void) subset.load(level_subsets.item[0]); while(!done) { - texture_draw(&img_choose_subset,(screen->w - img_choose_subset.w) / 2, 0, NO_UPDATE); + texture_draw(&img_choose_subset,(screen->w - img_choose_subset.w) / 2, 0); if(level_subsets.num_items != 0) { - texture_draw(&subset.image,(screen->w - subset.image.w) / 2 + 25,78,NO_UPDATE); + texture_draw(&subset.image,(screen->w - subset.image.w) / 2 + 25,78); if(level_subsets.num_items > 1) { if(i > 0) - texture_draw(&arrow_left,(screen->w / 2) - ((subset.title.length()+2)*16)/2,20,NO_UPDATE); + texture_draw(&arrow_left,(screen->w / 2) - ((subset.title.length()+2)*16)/2,20); if(i < level_subsets.num_items-1) - texture_draw(&arrow_right,(screen->w / 2) + ((subset.description.length())*16)/2,20,NO_UPDATE); + texture_draw(&arrow_right,(screen->w / 2) + ((subset.description.length())*16)/2,20); } - text_drawf(&gold_text, subset.title.c_str(), 0, 20, A_HMIDDLE, A_TOP, 1, NO_UPDATE); - text_drawf(&gold_text, subset.description.c_str(), 20, -20, A_HMIDDLE, A_BOTTOM, 1, NO_UPDATE); + text_drawf(&gold_text, subset.title.c_str(), 0, 20, A_HMIDDLE, A_TOP, 1); + text_drawf(&gold_text, subset.description.c_str(), 20, -20, A_HMIDDLE, A_BOTTOM, 1); } updatescreen(); SDL_Delay(50); @@ -362,7 +362,7 @@ void display_credits() draw_background(); - text_drawf(&white_big_text, "- Credits -", 0, screen->h-scroll, A_HMIDDLE, A_TOP, 2, NO_UPDATE); + text_drawf(&white_big_text, "- Credits -", 0, screen->h-scroll, A_HMIDDLE, A_TOP, 2); for(i = 0, n = 0, d = 0; i < length; i++,n++,d++) { @@ -371,18 +371,18 @@ void display_credits() else { if(names.item[i][0] == ' ') - text_drawf(&white_small_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll-10, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&white_small_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll-10, A_HMIDDLE, A_TOP, 1); else if(names.item[i][0] == ' ') - text_drawf(&white_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&white_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll, A_HMIDDLE, A_TOP, 1); else if(names.item[i+1][0] == '-' || names.item[i][0] == '-') - text_drawf(&white_big_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll, A_HMIDDLE, A_TOP, 3, NO_UPDATE); + text_drawf(&white_big_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll, A_HMIDDLE, A_TOP, 3); else - text_drawf(&blue_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll, A_HMIDDLE, A_TOP, 1, NO_UPDATE); + text_drawf(&blue_text, names.item[i], 0, 60+screen->h+(n*18)+(d*18)-scroll, A_HMIDDLE, A_TOP, 1); } } - texture_draw_part(&bkg_title, 0, 0, 0, 0, 640, 130, NO_UPDATE); + texture_draw_part(&bkg_title, 0, 0, 0, 0, 640, 130); flipscreen(); diff --git a/src/world.cpp b/src/world.cpp index 6bbbfe92a..632800a14 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -41,8 +41,7 @@ void bouncy_distro_draw(bouncy_distro_type* pbouncy_distro) { texture_draw(&img_distro[0], pbouncy_distro->base.x - scroll_x, - pbouncy_distro->base.y, - NO_UPDATE); + pbouncy_distro->base.y); } void broken_brick_init(broken_brick_type* pbroken_brick, float x, float y, float xm, float ym) @@ -77,7 +76,7 @@ SDL_Rect src, dest; dest.w = 16; dest.h = 16; - texture_draw_part(&img_brick[0],src.x,src.y,dest.x,dest.y,dest.w,dest.h,NO_UPDATE); + texture_draw_part(&img_brick[0],src.x,src.y,dest.x,dest.y,dest.w,dest.h); } void bouncy_brick_init(bouncy_brick_type* pbouncy_brick, float x, float y) @@ -128,7 +127,7 @@ void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick) else { s = (int)scroll_x / 30; - texture_draw_part(&img_bkgd,dest.x + s,dest.y,dest.x,dest.y,dest.w,dest.h,NO_UPDATE); + texture_draw_part(&img_bkgd,dest.x + s,dest.y,dest.x,dest.y,dest.w,dest.h); } drawshape(pbouncy_brick->base.x - scroll_x, @@ -158,6 +157,6 @@ void floating_score_draw(floating_score_type* pfloating_score) { char str[10]; sprintf(str, "%d", pfloating_score->value); - text_draw(&gold_text, str, (int)pfloating_score->base.x + 16 - strlen(str) * 8, (int)pfloating_score->base.y, 1, NO_UPDATE); + text_draw(&gold_text, str, (int)pfloating_score->base.x + 16 - strlen(str) * 8, (int)pfloating_score->base.y, 1); }