From 2c289a33524b8d46c7acc857b49fe03e970229bc Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 29 May 2020 22:24:39 +0000 Subject: [PATCH] fix skins.inc path git-svn-id: svn://kolibrios.org@8008 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/TWB/TWB.c | 2 +- programs/cmm/TWB/{img_cache.h => img.h} | 38 ++++++------------------- skins/Leency/Luna/default.asm | 2 +- 3 files changed, 10 insertions(+), 32 deletions(-) rename programs/cmm/TWB/{img_cache.h => img.h} (61%) 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 61% 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