source: abuse/trunk/src/imlib/video.cpp @ 534

Last change on this file since 534 was 534, checked in by Sam Hocevar, 11 years ago

imlib: remove a lot of dead code, especially from the linked list and
the WAV reader.

  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com or
8 *  Jonathan Clark.
9 */
10
11#include "config.h"
12
13#include <stdlib.h>
14
15#include "common.h"
16
17#include "image.h"
18#include "video.h"
19
20void update_dirty(image *im, int xoff, int yoff)
21{
22    // make sure the image has the ability to contain dirty areas
23    CHECK(im->m_special);
24
25    if(im->m_special->keep_dirt == 0)
26    {
27        put_image(im, xoff, yoff);
28    }
29    else
30    {
31        int count = im->m_special->dirties.Count();
32        dirty_rect *dr = (dirty_rect *)(im->m_special->dirties.first());
33        while(count > 0)
34        {
35            put_part_image(im, xoff + dr->dx1, yoff + dr->dy1,
36                           dr->dx1, dr->dy1, dr->dx2 + 1, dr->dy2 + 1);
37            dirty_rect *tmp = dr;
38            dr = (dirty_rect *)(dr->Next());
39            im->m_special->dirties.unlink(tmp);
40            delete tmp;
41            count--;
42        }
43    }
44
45    update_window_done();
46}
47
48void put_image(image * im, int x, int y)
49{
50    put_part_image(im, x, y, 0, 0, im->Size().x - 1, im->Size().y - 1);
51}
52
Note: See TracBrowser for help on using the repository browser.