Ignore:
Timestamp:
Mar 18, 2008, 12:05:08 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • Cleaned up cache.cpp.
  • Renamed stupid "cash" variable into "cache".
  • Rename cache_list and crc_manager into CacheList? and CrcManager?.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/loader2.cpp

    r66 r123  
    149149        if (sd.entries[i]->type==SPEC_FORETILE)
    150150        {
    151           foretiles[fon]=cash.reg(filename,sd.entries[i]->name);
     151          foretiles[fon]=cache.reg(filename,sd.entries[i]->name);
    152152          fon++;
    153153          nforetiles++;
     
    155155        if (sd.entries[i]->type==SPEC_BACKTILE)
    156156        {
    157           backtiles[bon]=cash.reg(filename,sd.entries[i]->name);
     157          backtiles[bon]=cache.reg(filename,sd.entries[i]->name);
    158158          bon++;
    159159          nbacktiles++;
     
    252252              {
    253253                dprintf("Warning : background tile %d redefined\n",num);
    254                 cash.unreg(backtiles[num]);
     254                cache.unreg(backtiles[num]);
    255255              }
    256               backtiles[num]=cash.reg(fn,spe->name,SPEC_BACKTILE);           
     256              backtiles[num]=cache.reg(fn,spe->name,SPEC_BACKTILE);           
    257257            }
    258258            break;
     
    263263              {
    264264                dprintf("Warning : foreground tile %d redefined\n",num);
    265                 cash.unreg(foretiles[num]);
     265                cache.unreg(foretiles[num]);
    266266              }
    267               foretiles[num]=cash.reg(fn,spe->name,SPEC_FORETILE);
     267              foretiles[num]=cache.reg(fn,spe->name,SPEC_FORETILE);
    268268            }
    269269            break;
     
    334334  char const *cs;
    335335
    336   c_mouse1=cash.reg("art/dev.spe","c_mouse1",SPEC_IMAGE,0);
    337   c_mouse2=cash.reg("art/dev.spe","c_mouse2",SPEC_IMAGE,0);
    338   c_normal=cash.reg("art/dev.spe","c_normal",SPEC_IMAGE,0);
    339   c_target=cash.reg("art/dev.spe","c_target",SPEC_IMAGE,0);
     336  c_mouse1=cache.reg("art/dev.spe","c_mouse1",SPEC_IMAGE,0);
     337  c_mouse2=cache.reg("art/dev.spe","c_mouse2",SPEC_IMAGE,0);
     338  c_normal=cache.reg("art/dev.spe","c_normal",SPEC_IMAGE,0);
     339  c_target=cache.reg("art/dev.spe","c_target",SPEC_IMAGE,0);
    340340
    341341
     
    357357    char nm[10];
    358358    sprintf(nm,"l%d",z);
    359     light_buttons[z]=cash.reg("art/dev.spe",nm,SPEC_IMAGE,0);
     359    light_buttons[z]=cache.reg("art/dev.spe",nm,SPEC_IMAGE,0);
    360360  }
    361361
     
    372372    ff="art/frame.spe";
    373373
    374   ok_button   =      cash.reg(ff,"dev_ok",SPEC_IMAGE);
    375   cancel_button  =   cash.reg(ff,"cancel",SPEC_IMAGE);
    376 
    377 //  clouds      =      cash.reg(ff,"clouds",SPEC_IMAGE);
    378 
    379   lower_volume=      cash.reg(ff,"lower_volume",SPEC_IMAGE);
    380   raise_volume=      cash.reg(ff,"raise_volume",SPEC_IMAGE);
    381   music_button=      cash.reg(ff,"music",SPEC_IMAGE);
    382   sfx_button=        cash.reg(ff,"sound_fx",SPEC_IMAGE);
    383   record_button=     cash.reg(ff,"record",SPEC_IMAGE); 
    384   play_button=       cash.reg(ff,"play",SPEC_IMAGE);
    385   window_colors=     cash.reg(ff,"window_colors",SPEC_IMAGE);
    386   pause_image=       cash.reg(ff,"pause_image",SPEC_IMAGE);
    387   vmm_image=         cash.reg(ff,"vmm",SPEC_IMAGE);
    388   border_tile=       cash.reg(ff,"border_tile",SPEC_IMAGE);
    389   window_texture=    cash.reg(ff,"window_texture",SPEC_IMAGE);
     374  ok_button   =      cache.reg(ff,"dev_ok",SPEC_IMAGE);
     375  cancel_button  =   cache.reg(ff,"cancel",SPEC_IMAGE);
     376
     377//  clouds      =      cache.reg(ff,"clouds",SPEC_IMAGE);
     378
     379  lower_volume=      cache.reg(ff,"lower_volume",SPEC_IMAGE);
     380  raise_volume=      cache.reg(ff,"raise_volume",SPEC_IMAGE);
     381  music_button=      cache.reg(ff,"music",SPEC_IMAGE);
     382  sfx_button=        cache.reg(ff,"sound_fx",SPEC_IMAGE);
     383  record_button=     cache.reg(ff,"record",SPEC_IMAGE); 
     384  play_button=       cache.reg(ff,"play",SPEC_IMAGE);
     385  window_colors=     cache.reg(ff,"window_colors",SPEC_IMAGE);
     386  pause_image=       cache.reg(ff,"pause_image",SPEC_IMAGE);
     387  vmm_image=         cache.reg(ff,"vmm",SPEC_IMAGE);
     388  border_tile=       cache.reg(ff,"border_tile",SPEC_IMAGE);
     389  window_texture=    cache.reg(ff,"window_texture",SPEC_IMAGE);
    390390 
    391391
     
    405405      int i=0;
    406406      for (;v;v=CDR(v),i++)
    407         help_screens[i]=cash.reg(ff,lstring_value(CAR(v)),SPEC_IMAGE);     
     407        help_screens[i]=cache.reg(ff,lstring_value(CAR(v)),SPEC_IMAGE);     
    408408    }
    409409    else
     
    424424
    425425  if (DEFINEDP(symbol_value(l_title_screen)))
    426     title_screen=cash.reg_object(NULL,symbol_value(l_title_screen),SPEC_IMAGE,1);
     426    title_screen=cache.reg_object(NULL,symbol_value(l_title_screen),SPEC_IMAGE,1);
    427427  else title_screen=-1;
    428428
    429429  if (DEFINEDP(symbol_value(l_cdc_logo)))
    430     cdc_logo=cash.reg_object(NULL,symbol_value(l_cdc_logo),SPEC_IMAGE,1);
     430    cdc_logo=cache.reg_object(NULL,symbol_value(l_cdc_logo),SPEC_IMAGE,1);
    431431  else cdc_logo=-1;
    432432 
     
    452452  ERROR(big_font_pict!=-1 || small_font_pict!=-1,
    453453        "No font loaded (use load_big_font or load_small_font)!");
    454   f_wid=cash.foret(foretiles[0])->im->width();
    455   f_hi=cash.foret(foretiles[0])->im->height();
    456   b_wid=cash.backt(backtiles[0])->im->width();
    457   b_hi=cash.backt(backtiles[0])->im->height();
     454  f_wid=cache.foret(foretiles[0])->im->width();
     455  f_hi=cache.foret(foretiles[0])->im->height();
     456  b_wid=cache.backt(backtiles[0])->im->width();
     457  b_hi=cache.backt(backtiles[0])->im->height();
    458458
    459459#if 0
Note: See TracChangeset for help on using the changeset viewer.