{
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)
{
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)
{
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);
}
}
}
{
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
{
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);
}
}
}
{
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);
}
}
}
{
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
{
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);
}
}
}
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];
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);
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();
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
{
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)
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);
}
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);
}
}
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);
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);
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);
}
/* 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,
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));
}
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);
}
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++)
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)
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! */
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);
}
{
/* 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,
{
/* 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),
}
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;
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;
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);
}
}
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
{
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;
{
/* 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()
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)
{
};
- 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();
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);
}
}
{
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
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);
}
}
}
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);
}
}
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
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);
}
}
}
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);
}
}
}
{
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);
}
}
}
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
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);
}
}
}
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);
}
}
}
{
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);
}
}
}
{
/* 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 --- */
frame = 0;
/* Draw the title background: */
- texture_draw_bg(&bkg_title, NO_UPDATE);
+ texture_draw_bg(&bkg_title);
load_hs();
/* 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)
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);
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++)
{
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();
{
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)
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)
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,
{
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);
}