void super_blit(SuperBlitable *superb, SDL_Surface *dest, int x, int y, int angle) { SDL_Surface *s_final; Uint32 curr_spec = get_spec(); if ((superb->last_spec != curr_spec) || \ (superb->curr_flag != SB_CF_NORMAL)) { SDL_Surface *s_n_spec; Uint8 sr, sg, sb; SDL_GetRGB(curr_spec, get_spec_fmt(), &sr, &sg, &sb); SDL_FreeSurface(superb->curr); superb->curr = SDL_DisplayFormatAlpha(superb->orig); s_n_spec = SDL_ConvertSurface(superb->spec, superb->spec->format, 0); change_style(s_n_spec, SDL_MapRGB(s_n_spec->format, sr, sg, sb)); change_spec(superb->curr, s_n_spec); set_alpha_channel(superb->curr, superb->alph); SDL_FreeSurface(s_n_spec); superb->curr_flag = SB_CF_NORMAL; } s_final = rotozoomSurface(superb->curr, angle, 1, 0); center_blit(s_final, dest, x, y); SDL_FreeSurface(s_final); }
void dash_pressed() { change_style(Line_style::dash); hide_menu(); }
void dot_pressed() { change_style(Line_style::dot); hide_menu(); }
void solid_pressed() { change_style(Line_style::solid); hide_menu(); }