diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index 69e04c50d2..d0a83c1427 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -2,7 +2,7 @@ #include "..\TWB\anchors.h" #include "..\TWB\parse_tag.h" #include "..\TWB\special.h" -#include "..\TWB\img_cache.h" +#include "..\TWB\img.h" #include "..\TWB\tag_list.h" dword page_bg; dword link_color_default; diff --git a/programs/cmm/TWB/img_cache.h b/programs/cmm/TWB/img.h similarity index 62% rename from programs/cmm/TWB/img_cache.h rename to programs/cmm/TWB/img.h index d6db1d24c5..0b534e9943 100644 --- a/programs/cmm/TWB/img_cache.h +++ b/programs/cmm/TWB/img.h @@ -1,37 +1,15 @@ -struct s_image +struct img { - dword *image; - char path[4096]; + collection src; + collection_img data; + collection_int xywh; + drop(); }; -s_image pics[100]; //pics = mem_Alloc( 100*sizeof(s_image) ); - -struct ImageCache { - int pics_count; - void Free(); - int GetImage(); - void Images(); -}; - -void ImageCache::Free() +void img::drop() { - for ( ; pics_count>0; pics_count--) - { - if (pics[pics_count].image) img_destroy stdcall (pics[pics_count].image); - pics[pics_count].path = NULL; - } -} - -int ImageCache::GetImage(dword i_path) -{ - int i; - return 0; - for (i=0; i<=pics_count; i++) if (!strcmp(#pics[i].path, i_path)) return i; //image exists - // Load image and add it to Cache - pics_count++; - //pics[pics_count].image = load_EEERRRR_image(i_path); - //strcpy(#pics[pics_count].path, i_path); - return pics_count; + src.drop(); + data.drop(); } diff --git a/skins/Leency/Luna/default.asm b/skins/Leency/Luna/default.asm index bd6f8dccf7..ee74898973 100644 --- a/skins/Leency/Luna/default.asm +++ b/skins/Leency/Luna/default.asm @@ -1,4 +1,4 @@ -include '..\skin.inc' +include '../../skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height