Ignore:
Timestamp:
Apr 18, 2011, 3:03:48 PM (11 years ago)
Author:
Sam Hocevar
Message:

cache: fix a crash caused by empty SFX objects being reused for other
purposes but still being deleted later on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/cache.h

    r494 r503  
    4747
    4848    int get_filenumber(char const *filename);
    49     uint32_t get_crc(int32_t filenumber, int &failed);
    50     void set_crc(int32_t filenumber, uint32_t crc);
    51     char *get_filename(int32_t filenumber);
     49    uint32_t get_crc(int filenumber, int &failed);
     50    void set_crc(int filenumber, uint32_t crc);
     51    char *get_filename(int filenumber);
    5252    void clean_up();
    5353    int total_filenames() { return total_files; }
     
    9090
    9191    int16_t lcache_number;
    92     int32_t alloc_id();
     92
     93    int AllocId();
    9394    void locate(CacheItem *i, int local_only = 0); // set up file and offset for this item
    9495    void normalize();
     
    108109    int in_use() { if (used) { used = 0; return 1; } else return 0; }
    109110    int full() { if (ful) { ful = 0; return 1; } else return 0; }
    110     int32_t reg_object(char const *filename, void *object, int type,
    111                        int rm_dups); // lisp object
    112     int32_t reg(char const *filename, char const *name, int type = -1,
     111    int reg_object(char const *filename, LObject *object, int type,
     112                   int rm_dups); // lisp object
     113    int reg(char const *filename, char const *name, int type = -1,
    113114                int rm_dups = 0); // returns id to item
    114     int32_t reg_lisp_block(Cell *block);
    115115    int loaded(int id);
    116116    void unreg(int id);
     
    123123    part_frame *part(int id);
    124124    sound_effect *sfx(int id);
    125     Cell *lblock(int id);
     125    LObject *lblock(int id);
    126126    char_tint *ctint(int id);
    127127
Note: See TracChangeset for help on using the changeset viewer.