}
void
- Renderer::draw_text(const DrawingRequest& request)
- {
- const TextRequest* textrequest = (TextRequest*) request.request_data;
-
- textrequest->font->draw(this, textrequest->text, request.pos,
- textrequest->alignment, request.drawing_effect, request.alpha);
- }
-
- void
Renderer::draw_filled_rect(const DrawingRequest& request)
{
const FillRectRequest* fillrectrequest
// copy array line-by-line
for (int i = 0; i < SCREEN_HEIGHT; i++) {
char* src = pixels + (3 * SCREEN_WIDTH * (SCREEN_HEIGHT - i - 1));
+ if(SDL_MUSTLOCK(shot_surf))
+ {
+ SDL_LockSurface(shot_surf);
+ }
char* dst = ((char*)shot_surf->pixels) + i * shot_surf->pitch;
memcpy(dst, src, 3 * SCREEN_WIDTH);
+ if(SDL_MUSTLOCK(shot_surf))
+ {
+ SDL_UnlockSurface(shot_surf);
+ }
}
// free array