Ignore:
Timestamp:
May 16, 2011, 2:37:23 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: clean up the Sprite class and get rid of the dead sprite
controller code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/sprite.h

    r555 r669  
    1111#ifndef __SPRITE_HPP
    1212#define __SPRITE_HPP
     13
    1314#include "image.h"
    1415#include "linked.h"
    1516
    16 class sprite : public linked_node
     17class Sprite : public linked_node
    1718{
    1819public:
    19   image *visual,*screen,*save;
    20   int x,y;
    21   sprite(image *Screen, image *Visual, int X, int Y);
    22   void get_background();
    23   void restore_background();
    24   void draw();
    25   void change_visual(image *Visual, int delete_old=0);
    26   ~sprite();
    27 } ;
     20    Sprite(image *screen, image *visual, vec2i pos);
     21    ~Sprite();
    2822
    29 class sprite_controller
    30 {
    31 public :
    32   linked_list sprites;
    33   void add_sprite(sprite *sp);
    34   void remove_sprites();
    35   void get_backgrounds();
    36   void put_sprites();
    37   void bring_front(sprite *sp);
    38   void delete_sprite(sprite *sp);
    39 } ;
     23    void SetVisual(image *visual, int delete_old = 0);
     24
     25    image *m_visual, *m_screen, *m_save;
     26
     27private:
     28    vec2i m_pos;
     29};
     30
    4031#endif
    4132
Note: See TracChangeset for help on using the changeset viewer.