From d9d603acd05a8ba7394fe997ab74ac25049de40e Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Mon, 27 Nov 2017 19:25:14 +0000 Subject: [PATCH] Fix skin.inc files, make them all the same. Rename all the me_skin.inc and my_skin.inc to skin.inc. Read BMP header size from file, don't hardcode. Make all the skins use the same skin.inc. Speed up compilation of skins. git-svn-id: svn://kolibrios.org@7119 a494cfbc-eb01-0410-851d-a64ba20cac60 --- skins/Leency/Blueberries/default.asm | 2 +- skins/Leency/KNX/default.asm | 2 +- skins/Leency/ObsidianOS/Tupfile.lua | 2 +- skins/Leency/ObsidianOS/default.asm | 2 +- skins/Leency/Shkvorka/default.asm | 2 +- skins/Leency/me_skin.inc | 235 ----------------- .../me_skin.inc => Leency/skin.inc} | 29 +-- .../1.5imple Alpha/1.5imple_Alpha.asm | 2 +- .../5imple Alpha/1.5imple Alpha/my_skin.inc | 235 ----------------- .../1.5imple Alpha/skin.inc} | 31 +-- .../2.5imple Alpha/2.5imple_Alpha.asm | 2 +- .../5imple Alpha/2.5imple Alpha/my_skin.inc | 235 ----------------- .../2.5imple Alpha/skin.inc} | 31 +-- .../3.5imple Alpha/3.5imple_Alpha.asm | 2 +- .../5imple Alpha/3.5imple Alpha/my_skin.inc | 235 ----------------- .../3.5imple Alpha/skin.inc} | 31 +-- skins/_old/Arena/default.asm | 2 +- skins/_old/Arena/me_skin.inc | 235 ----------------- skins/_old/Arena/skin.inc | 239 +++++++++++++++++ .../Black_lace/1.Black_lace/1.Black_lace.asm | 2 +- .../_old/Black_lace/1.Black_lace/me_skin.inc | 235 ----------------- skins/_old/Black_lace/1.Black_lace/skin.inc | 239 +++++++++++++++++ .../Black_lace/2.Black_lace/2.Black_lace.asm | 2 +- .../_old/Black_lace/2.Black_lace/me_skin.inc | 235 ----------------- skins/_old/Black_lace/2.Black_lace/skin.inc | 239 +++++++++++++++++ skins/_old/Blended/default.asm | 2 +- skins/_old/Blended/me_skin.inc | 235 ----------------- skins/_old/Blended/skin.inc | 239 +++++++++++++++++ skins/_old/Brick/1.Brick/brick.asm | 2 +- skins/_old/Brick/1.Brick/me_skin.inc | 235 ----------------- skins/_old/Brick/1.Brick/skin.inc | 239 +++++++++++++++++ .../BrownLustre/BrownLustre/BrownLustre.asm | 2 +- .../_old/BrownLustre/BrownLustre/me_skin.inc | 235 ----------------- skins/_old/BrownLustre/BrownLustre/skin.inc | 239 +++++++++++++++++ .../BrownLustre_2/BrownLustre_2.asm | 2 +- .../BrownLustre/BrownLustre_2/me_skin.inc | 235 ----------------- skins/_old/BrownLustre/BrownLustre_2/skin.inc | 239 +++++++++++++++++ skins/_old/Circles/1.Circles/1.Circles.asm | 2 +- skins/_old/Circles/1.Circles/my_skin.inc | 235 ----------------- skins/_old/Circles/1.Circles/skin.inc | 239 +++++++++++++++++ skins/_old/Circles/2.Circles/2.Circles.asm | 2 +- skins/_old/Circles/2.Circles/my_skin.inc | 235 ----------------- skins/_old/Circles/2.Circles/skin.inc | 239 +++++++++++++++++ skins/_old/Circles/3.Circles/3.Circles.asm | 2 +- skins/_old/Circles/3.Circles/my_skin.inc | 235 ----------------- skins/_old/Circles/3.Circles/skin.inc | 239 +++++++++++++++++ skins/_old/Circles/4.Circles/4.Circles.asm | 2 +- skins/_old/Circles/4.Circles/my_skin.inc | 235 ----------------- skins/_old/Circles/4.Circles/skin.inc | 239 +++++++++++++++++ skins/_old/CodeOpusC/Opus_A/Opus_A.asm | 2 +- skins/_old/CodeOpusC/Opus_A/my_skin.inc | 235 ----------------- skins/_old/CodeOpusC/Opus_A/skin.inc | 239 +++++++++++++++++ skins/_old/CodeOpusC/Opus_B/Opus_B.asm | 2 +- skins/_old/CodeOpusC/Opus_B/my_skin.inc | 235 ----------------- skins/_old/CodeOpusC/Opus_B/skin.inc | 239 +++++++++++++++++ skins/_old/CodeOpusC/Opus_D/Opus_D.asm | 2 +- skins/_old/CodeOpusC/Opus_D/my_skin.inc | 235 ----------------- skins/_old/CodeOpusC/Opus_D/skin.inc | 239 +++++++++++++++++ skins/_old/CodeOpusC/Opus_DA/Opus_DA.asm | 2 +- skins/_old/CodeOpusC/Opus_DA/my_skin.inc | 235 ----------------- skins/_old/CodeOpusC/Opus_DA/skin.inc | 239 +++++++++++++++++ skins/_old/CodeOpusC/Opus_G/Opus_G.asm | 2 +- skins/_old/CodeOpusC/Opus_G/my_skin.inc | 235 ----------------- skins/_old/CodeOpusC/Opus_G/skin.inc | 239 +++++++++++++++++ skins/_old/Crystal/default.asm | 2 +- skins/_old/Crystal/me_skin.inc | 235 ----------------- skins/_old/Crystal/skin.inc | 239 +++++++++++++++++ skins/_old/Cyclops/1.Cyclops/1.Cyclops.asm | 2 +- skins/_old/Cyclops/1.Cyclops/my_skin.inc | 235 ----------------- skins/_old/Cyclops/1.Cyclops/skin.inc | 239 +++++++++++++++++ skins/_old/Cyclops/2.Cyclops/2.Cyclops.asm | 2 +- skins/_old/Cyclops/2.Cyclops/my_skin.inc | 235 ----------------- skins/_old/Cyclops/2.Cyclops/skin.inc | 239 +++++++++++++++++ skins/_old/Dark_future/Dark_future.asm | 2 +- skins/_old/Dark_future/me_skin.inc | 235 ----------------- skins/_old/Dark_future/skin.inc | 239 +++++++++++++++++ .../Devil_skins/Blue_devil/Blue_devil.asm | 2 +- skins/_old/Devil_skins/Blue_devil/me_skin.inc | 235 ----------------- skins/_old/Devil_skins/Blue_devil/skin.inc | 239 +++++++++++++++++ .../Devil_skins/Green_devil/Green_devil.asm | 2 +- .../_old/Devil_skins/Green_devil/me_skin.inc | 235 ----------------- skins/_old/Devil_skins/Green_devil/skin.inc | 239 +++++++++++++++++ .../Devil_skins/Pink_devil/Pink_devil.asm | 2 +- skins/_old/Devil_skins/Pink_devil/me_skin.inc | 235 ----------------- skins/_old/Devil_skins/Pink_devil/skin.inc | 239 +++++++++++++++++ .../_old/Devil_skins/Red_devil/Red_devil.asm | 2 +- skins/_old/Devil_skins/Red_devil/me_skin.inc | 235 ----------------- skins/_old/Devil_skins/Red_devil/skin.inc | 239 +++++++++++++++++ .../Devil_skins/Violet_devil/Violet_devil.asm | 2 +- .../_old/Devil_skins/Violet_devil/me_skin.inc | 235 ----------------- skins/_old/Devil_skins/Violet_devil/skin.inc | 239 +++++++++++++++++ skins/_old/Eyes/Eyes.asm | 2 +- skins/_old/Eyes/my_skin.inc | 235 ----------------- skins/_old/Eyes/skin.inc | 239 +++++++++++++++++ skins/_old/Fever/Fever1 blue/Fever_blue.asm | 2 +- skins/_old/Fever/Fever1 blue/me_skin.inc | 235 ----------------- skins/_old/Fever/Fever1 blue/skin.inc | 239 +++++++++++++++++ skins/_old/Fever/Fever1 green/Fever_green.asm | 2 +- skins/_old/Fever/Fever1 green/me_skin.inc | 235 ----------------- skins/_old/Fever/Fever1 green/skin.inc | 239 +++++++++++++++++ skins/_old/Fever/Fever1 red/Fever_red.asm | 2 +- skins/_old/Fever/Fever1 red/me_skin.inc | 235 ----------------- skins/_old/Fever/Fever1 red/skin.inc | 239 +++++++++++++++++ skins/_old/Fever/Fever2 blue/Fever_blue.asm | 2 +- skins/_old/Fever/Fever2 blue/me_skin.inc | 235 ----------------- skins/_old/Fever/Fever2 blue/skin.inc | 239 +++++++++++++++++ skins/_old/Fever/Fever2 green/Fever_green.asm | 2 +- skins/_old/Fever/Fever2 green/me_skin.inc | 235 ----------------- skins/_old/Fever/Fever2 green/skin.inc | 239 +++++++++++++++++ skins/_old/Fever/Fever2 red/Fever_red.asm | 2 +- skins/_old/Fever/Fever2 red/me_skin.inc | 235 ----------------- skins/_old/Fever/Fever2 red/skin.inc | 239 +++++++++++++++++ skins/_old/Flowers/Flowers.asm | 2 +- skins/_old/Flowers/my_skin.inc | 235 ----------------- skins/_old/Flowers/skin.inc | 239 +++++++++++++++++ skins/_old/Flyght/Flyght.asm | 2 +- skins/_old/Flyght/me_skin.inc | 235 ----------------- skins/_old/Flyght/skin.inc | 239 +++++++++++++++++ skins/_old/Glass_lime/Glass_lime.asm | 2 +- skins/_old/Glass_lime/my_skin.inc | 235 ----------------- skins/_old/Glass_lime/skin.inc | 239 +++++++++++++++++ skins/_old/Grey/default.asm | 2 +- skins/_old/Grey/my_skin.inc | 235 ----------------- skins/_old/Grey/skin.inc | 239 +++++++++++++++++ skins/_old/Hearts/Hearts 3d/hearts_3d.asm | 2 +- skins/_old/Hearts/Hearts 3d/me_skin.inc | 235 ----------------- skins/_old/Hearts/Hearts 3d/skin.inc | 239 +++++++++++++++++ skins/_old/Hearts/Hearts flat/hearts_flat.asm | 2 +- skins/_old/Hearts/Hearts flat/me_skin.inc | 235 ----------------- skins/_old/Hearts/Hearts flat/skin.inc | 239 +++++++++++++++++ skins/_old/Leency/AreaO/default.asm | 2 +- skins/_old/Leency/AreaSq/default.asm | 2 +- skins/_old/Leency/L-Junior/DEFAULT.ASM | 2 +- skins/_old/Leency/Latte/default.asm | 2 +- skins/_old/Leency/Luna/default.asm | 2 +- skins/_old/Leency/Octo/default.asm | 2 +- skins/_old/Leency/Octo_flat/default.asm | 2 +- skins/_old/Leency/OpusN/OpusN.asm | 2 +- skins/_old/Leency/Sandwich/default.asm | 2 +- skins/_old/Leency/Yeah/default.asm | 2 +- skins/_old/Leency/me_skin.inc | 235 ----------------- skins/_old/Leency/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/1.MenuetOS/1/MenuetOS.asm | 2 +- skins/_old/MenuetOS/1.MenuetOS/1/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/1.MenuetOS/1/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/1.MenuetOS/2/MenuetOS.asm | 2 +- skins/_old/MenuetOS/1.MenuetOS/2/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/1.MenuetOS/2/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/2.MenuetOS/1/MenuetOS.asm | 2 +- skins/_old/MenuetOS/2.MenuetOS/1/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/2.MenuetOS/1/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/2.MenuetOS/2/MenuetOS.asm | 2 +- skins/_old/MenuetOS/2.MenuetOS/2/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/2.MenuetOS/2/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/3.MenuetOS/1/MenuetOS.asm | 2 +- skins/_old/MenuetOS/3.MenuetOS/1/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/3.MenuetOS/1/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/3.MenuetOS/2/MenuetOS.asm | 2 +- skins/_old/MenuetOS/3.MenuetOS/2/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/3.MenuetOS/2/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/4.MenuetOS/1/MenuetOS.asm | 2 +- skins/_old/MenuetOS/4.MenuetOS/1/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/4.MenuetOS/1/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/4.MenuetOS/2/MenuetOS.asm | 2 +- skins/_old/MenuetOS/4.MenuetOS/2/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/4.MenuetOS/2/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/5.MenuetOS/1/MenuetOS.asm | 2 +- skins/_old/MenuetOS/5.MenuetOS/1/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/5.MenuetOS/1/skin.inc | 239 +++++++++++++++++ skins/_old/MenuetOS/5.MenuetOS/2/MenuetOS.asm | 2 +- skins/_old/MenuetOS/5.MenuetOS/2/me_skin.inc | 235 ----------------- skins/_old/MenuetOS/5.MenuetOS/2/skin.inc | 239 +++++++++++++++++ skins/_old/MetalColor/MCBlue/MCBlue.asm | 2 +- skins/_old/MetalColor/MCBlue/my_skin.inc | 235 ----------------- skins/_old/MetalColor/MCBlue/skin.inc | 239 +++++++++++++++++ skins/_old/MetalColor/MCRed/MCRed.asm | 2 +- skins/_old/MetalColor/MCRed/my_skin.inc | 235 ----------------- skins/_old/MetalColor/MCRed/skin.inc | 239 +++++++++++++++++ .../1.MetalGearArrows/1.MetalGearArrows.asm | 2 +- .../1.MetalGearArrows/me_skin.inc | 235 ----------------- .../1.MetalGearArrows/skin.inc | 239 +++++++++++++++++ .../2.MetalGearArrows/2.MetalGearArrows.asm | 2 +- .../2.MetalGearArrows/me_skin.inc | 235 ----------------- .../2.MetalGearArrows/skin.inc | 239 +++++++++++++++++ .../3.MetalGearArrows/3.MetalGearArrows.asm | 2 +- .../3.MetalGearArrows/me_skin.inc | 235 ----------------- .../3.MetalGearArrows/skin.inc | 239 +++++++++++++++++ .../4.MetalGearArrows/4.MetalGearArrows.asm | 2 +- .../4.MetalGearArrows/me_skin.inc | 235 ----------------- .../4.MetalGearArrows/skin.inc | 239 +++++++++++++++++ skins/_old/MyTango/default.asm | 2 +- skins/_old/MyTango/my_skin.inc | 235 ----------------- skins/_old/MyTango/skin.inc | 239 +++++++++++++++++ skins/_old/Nature/Nature.asm | 2 +- skins/_old/Nature/Sandwich/src/default.asm | 2 +- skins/_old/Nature/Sandwich/src/me_skin.inc | 235 ----------------- skins/_old/Nature/Sandwich/src/skin.inc | 239 +++++++++++++++++ skins/_old/Nature/me_skin.inc | 235 ----------------- skins/_old/Nature/skin.inc | 239 +++++++++++++++++ skins/_old/Nova_skins/Nova_blue/Nova_blue.asm | 2 +- skins/_old/Nova_skins/Nova_blue/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_blue/skin.inc | 239 +++++++++++++++++ .../_old/Nova_skins/Nova_brown/Nova_brown.asm | 2 +- skins/_old/Nova_skins/Nova_brown/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_brown/skin.inc | 239 +++++++++++++++++ .../_old/Nova_skins/Nova_green/Nova_green.asm | 2 +- skins/_old/Nova_skins/Nova_green/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_green/skin.inc | 239 +++++++++++++++++ skins/_old/Nova_skins/Nova_grey/Nova_grey.asm | 2 +- skins/_old/Nova_skins/Nova_grey/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_grey/skin.inc | 239 +++++++++++++++++ skins/_old/Nova_skins/Nova_pink/Nova_pink.asm | 2 +- skins/_old/Nova_skins/Nova_pink/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_pink/skin.inc | 239 +++++++++++++++++ skins/_old/Nova_skins/Nova_red/Nova_red.asm | 2 +- skins/_old/Nova_skins/Nova_red/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_red/skin.inc | 239 +++++++++++++++++ .../Nova_skins/Nova_violet/Nova_violet.asm | 2 +- skins/_old/Nova_skins/Nova_violet/my_skin.inc | 235 ----------------- skins/_old/Nova_skins/Nova_violet/skin.inc | 239 +++++++++++++++++ skins/_old/OpusOs_Blue/OpusOs_Blue.asm | 2 +- skins/_old/OpusOs_Blue/my_skin.inc | 235 ----------------- skins/_old/OpusOs_Blue/skin.inc | 239 +++++++++++++++++ skins/_old/Orange_Silence/Orange_Silence.asm | 2 +- skins/_old/Orange_Silence/me_skin.inc | 235 ----------------- skins/_old/Orange_Silence/skin.inc | 239 +++++++++++++++++ skins/_old/Orange_aureole/me_skin.inc | 235 ----------------- skins/_old/Orange_aureole/orange_aureole.asm | 2 +- skins/_old/Orange_aureole/skin.inc | 239 +++++++++++++++++ skins/_old/Organics/Organics.asm | 2 +- skins/_old/Organics/my_skin.inc | 235 ----------------- skins/_old/Organics/skin.inc | 239 +++++++++++++++++ skins/_old/Rednex/Rednex.asm | 2 +- skins/_old/Rednex/my_skin.inc | 235 ----------------- skins/_old/Rednex/skin.inc | 239 +++++++++++++++++ skins/_old/RoboTech/BRoboTech/BRoboTech.asm | 2 +- skins/_old/RoboTech/BRoboTech/me_skin.inc | 235 ----------------- skins/_old/RoboTech/BRoboTech/skin.inc | 239 +++++++++++++++++ skins/_old/RoboTech/GRoboTech/GRoboTech.asm | 2 +- skins/_old/RoboTech/GRoboTech/me_skin.inc | 235 ----------------- skins/_old/RoboTech/GRoboTech/skin.inc | 239 +++++++++++++++++ skins/_old/Russia/me_skin.inc | 235 ----------------- skins/_old/Russia/russia.asm | 2 +- skins/_old/Russia/skin.inc | 239 +++++++++++++++++ skins/_old/Sad_grey/default.asm | 2 +- skins/_old/Sad_grey/me_skin.inc | 235 ----------------- skins/_old/Sad_grey/skin.inc | 239 +++++++++++++++++ skins/_old/SashSkinPack_1_1/Src/Aqua/Aqua.asm | 2 +- .../SashSkinPack_1_1/Src/Aqua/me_skin.inc | 235 ----------------- skins/_old/SashSkinPack_1_1/Src/Aqua/skin.inc | 239 +++++++++++++++++ skins/_old/SashSkinPack_1_1/Src/Cold/Cold.asm | 2 +- .../SashSkinPack_1_1/Src/Cold/me_skin.inc | 235 ----------------- skins/_old/SashSkinPack_1_1/Src/Cold/skin.inc | 239 +++++++++++++++++ .../_old/SashSkinPack_1_1/Src/Metal/Metal.asm | 2 +- .../SashSkinPack_1_1/Src/Metal/me_skin.inc | 235 ----------------- .../_old/SashSkinPack_1_1/Src/Metal/skin.inc | 239 +++++++++++++++++ skins/_old/Simple_gray/simple_gray.ASM | 2 +- skins/_old/Simple_gray/skin.inc | 239 +++++++++++++++++ skins/_old/StyleVista/vista/default.asm | 2 +- skins/_old/StyleVista/vista/me_skin.inc | 235 ----------------- skins/_old/StyleVista/vista/skin.inc | 239 +++++++++++++++++ skins/_old/StyleVista/vista_basic/default.asm | 2 +- skins/_old/StyleVista/vista_basic/me_skin.inc | 235 ----------------- skins/_old/StyleVista/vista_basic/skin.inc | 239 +++++++++++++++++ .../StyleVista/vista_basic_black/default.asm | 2 +- .../StyleVista/vista_basic_black/me_skin.inc | 235 ----------------- .../StyleVista/vista_basic_black/skin.inc | 239 +++++++++++++++++ skins/_old/StyleVista/vista_dark/default.asm | 2 +- skins/_old/StyleVista/vista_dark/me_skin.inc | 235 ----------------- skins/_old/StyleVista/vista_dark/skin.inc | 239 +++++++++++++++++ skins/_old/StyleXP/orqua/default.asm | 2 +- skins/_old/StyleXP/orqua/me_skin.inc | 235 ----------------- skins/_old/StyleXP/orqua/skin.inc | 239 +++++++++++++++++ skins/_old/StyleXP/panther/default.asm | 2 +- skins/_old/StyleXP/panther/me_skin.inc | 235 ----------------- skins/_old/StyleXP/panther/skin.inc | 239 +++++++++++++++++ skins/_old/StyleXP/wmpx/default.asm | 2 +- skins/_old/StyleXP/wmpx/me_skin.inc | 235 ----------------- skins/_old/StyleXP/wmpx/skin.inc | 239 +++++++++++++++++ skins/_old/Syllable/Syllable.asm | 2 +- skins/_old/Syllable/my_skin.inc | 235 ----------------- skins/_old/Syllable/skin.inc | 239 +++++++++++++++++ skins/_old/USSR/USSR.asm | 2 +- skins/_old/USSR/me_skin.inc | 235 ----------------- skins/_old/USSR/skin.inc | 239 +++++++++++++++++ skins/_old/USSR_2/1.USSR_2/1.USSR_2.asm | 2 +- skins/_old/USSR_2/1.USSR_2/me_skin.inc | 235 ----------------- skins/_old/USSR_2/1.USSR_2/skin.inc | 239 +++++++++++++++++ skins/_old/USSR_2/2.USSR_2/2.USSR_2.asm | 2 +- skins/_old/USSR_2/2.USSR_2/me_skin.inc | 235 ----------------- skins/_old/USSR_2/2.USSR_2/skin.inc | 239 +++++++++++++++++ skins/_old/Victory_1945/Victory_1945.asm | 2 +- skins/_old/Victory_1945/me_skin.inc | 235 ----------------- skins/_old/Victory_1945/skin.inc | 239 +++++++++++++++++ skins/_old/WIN311/Win311.asm | 2 +- skins/_old/WIN311/my_skin.inc | 235 ----------------- skins/_old/WIN311/skin.inc | 239 +++++++++++++++++ .../WinXP_Classic_black.asm | 2 +- .../WindowsXP/WinXP Classic black/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic black/skin.inc | 239 +++++++++++++++++ .../WinXP Classic blue/WinXP_Classic_blue.asm | 2 +- .../WindowsXP/WinXP Classic blue/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic blue/skin.inc | 239 +++++++++++++++++ .../WinXP_Classic_green.asm | 2 +- .../WindowsXP/WinXP Classic green/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic green/skin.inc | 239 +++++++++++++++++ .../WinXP_Classic_orange.asm | 2 +- .../WinXP Classic orange/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic orange/skin.inc | 239 +++++++++++++++++ .../WinXP Classic pink/WinXP_Classic_pink.asm | 2 +- .../WindowsXP/WinXP Classic pink/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic pink/skin.inc | 239 +++++++++++++++++ .../WinXP Classic red/WinXP_Classic_red.asm | 2 +- .../WindowsXP/WinXP Classic red/me_skin.inc | 235 ----------------- .../_old/WindowsXP/WinXP Classic red/skin.inc | 239 +++++++++++++++++ .../WinXP_Classic_violet.asm | 2 +- .../WinXP Classic violet/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic violet/skin.inc | 239 +++++++++++++++++ .../WinXP_Classic_yellow.asm | 2 +- .../WinXP Classic yellow/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Classic yellow/skin.inc | 239 +++++++++++++++++ .../WinXP Standard blue/WinXP_blue.asm | 2 +- .../WindowsXP/WinXP Standard blue/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Standard blue/skin.inc | 239 +++++++++++++++++ .../WinXP_olive_green.asm | 2 +- .../WinXP Standard olive_green/me_skin.inc | 235 ----------------- .../WinXP Standard olive_green/skin.inc | 239 +++++++++++++++++ .../WinXP Standard silver/WinXP_silver.asm | 2 +- .../WinXP Standard silver/me_skin.inc | 235 ----------------- .../WindowsXP/WinXP Standard silver/skin.inc | 239 +++++++++++++++++ skins/_old/bat/default.asm | 2 +- skins/_old/bat/me_skin.inc | 235 ----------------- skins/_old/bat/skin.inc | 239 +++++++++++++++++ skins/_old/blackskin/default.asm | 2 +- skins/_old/blackskin/me_skin.inc | 235 ----------------- skins/_old/blackskin/skin.inc | 239 +++++++++++++++++ skins/_old/cherry/default.asm | 2 +- skins/_old/cherry/me_skin.inc | 235 ----------------- skins/_old/cherry/skin.inc | 239 +++++++++++++++++ skins/_old/dark_night/default.asm | 2 +- skins/_old/dark_night/me_skin.inc | 235 ----------------- skins/_old/dark_night/skin.inc | 239 +++++++++++++++++ skins/_old/falloutskn/default.asm | 2 +- skins/_old/falloutskn/skin.inc | 239 +++++++++++++++++ skins/_old/first_skin/default.asm | 2 +- skins/_old/first_skin/skin.inc | 239 +++++++++++++++++ .../gliteskin/gliteskin_deepsky/default.asm | 2 +- .../gliteskin/gliteskin_deepsky/me_skin.inc | 235 ----------------- .../_old/gliteskin/gliteskin_deepsky/skin.inc | 239 +++++++++++++++++ .../gliteskin/gliteskin_glider/default.asm | 2 +- .../gliteskin/gliteskin_glider/me_skin.inc | 235 ----------------- .../_old/gliteskin/gliteskin_glider/skin.inc | 239 +++++++++++++++++ .../_old/gliteskin/gliteskin_red/default.asm | 2 +- .../_old/gliteskin/gliteskin_red/me_skin.inc | 235 ----------------- skins/_old/gliteskin/gliteskin_red/skin.inc | 239 +++++++++++++++++ skins/_old/gnome_style/gnome_blue/default.asm | 2 +- skins/_old/gnome_style/gnome_blue/me_skin.inc | 235 ----------------- skins/_old/gnome_style/gnome_blue/skin.inc | 239 +++++++++++++++++ .../_old/gnome_style/gnome_green/default.asm | 2 +- .../_old/gnome_style/gnome_green/me_skin.inc | 235 ----------------- skins/_old/gnome_style/gnome_green/skin.inc | 239 +++++++++++++++++ .../_old/gnome_style/gnome_ocean/default.asm | 2 +- .../_old/gnome_style/gnome_ocean/me_skin.inc | 235 ----------------- skins/_old/gnome_style/gnome_ocean/skin.inc | 239 +++++++++++++++++ .../_old/gnome_style/gnome_olive/default.asm | 2 +- .../_old/gnome_style/gnome_olive/me_skin.inc | 235 ----------------- skins/_old/gnome_style/gnome_olive/skin.inc | 239 +++++++++++++++++ .../_old/gnome_style/gnome_orange/default.asm | 2 +- .../_old/gnome_style/gnome_orange/me_skin.inc | 235 ----------------- skins/_old/gnome_style/gnome_orange/skin.inc | 239 +++++++++++++++++ skins/_old/gnome_style/gnome_red/default.asm | 2 +- skins/_old/gnome_style/gnome_red/me_skin.inc | 235 ----------------- skins/_old/gnome_style/gnome_red/skin.inc | 239 +++++++++++++++++ .../Humanoid_OSX_dark/default.asm | 2 +- .../Humanoid_OSX_dark/me_skin.inc | 235 ----------------- .../humanoid_OSX/Humanoid_OSX_dark/skin.inc | 239 +++++++++++++++++ .../Humanoid_OSX_dark_night/default.asm | 2 +- .../Humanoid_OSX_dark_night/me_skin.inc | 235 ----------------- .../Humanoid_OSX_dark_night/skin.inc | 239 +++++++++++++++++ .../humanoid_OSX_blue/default.asm | 2 +- .../humanoid_OSX_blue/me_skin.inc | 235 ----------------- .../humanoid_OSX/humanoid_OSX_blue/skin.inc | 239 +++++++++++++++++ .../humanoid_OSX_green/default.asm | 2 +- .../humanoid_OSX_green/me_skin.inc | 235 ----------------- .../humanoid_OSX/humanoid_OSX_green/skin.inc | 239 +++++++++++++++++ .../humanoid_OSX_orange/default.asm | 2 +- .../humanoid_OSX_orange/me_skin.inc | 235 ----------------- .../humanoid_OSX/humanoid_OSX_orange/skin.inc | 239 +++++++++++++++++ .../humanoid_OSX/humanoid_OSX_red/default.asm | 2 +- .../humanoid_OSX/humanoid_OSX_red/me_skin.inc | 235 ----------------- .../humanoid_OSX/humanoid_OSX_red/skin.inc | 239 +++++++++++++++++ .../humanoid_OSX_yellow/default.asm | 2 +- .../humanoid_OSX_yellow/me_skin.inc | 235 ----------------- .../humanoid_OSX/humanoid_OSX_yellow/skin.inc | 239 +++++++++++++++++ skins/_old/khrome2/default.asm | 2 +- skins/_old/khrome2/skin.inc | 239 +++++++++++++++++ skins/_old/lightskin/default.asm | 2 +- skins/_old/lightskin/me_skin.inc | 235 ----------------- skins/_old/lightskin/skin.inc | 239 +++++++++++++++++ skins/_old/macos_l/default.asm | 2 +- skins/_old/macos_l/me_skin.inc | 235 ----------------- skins/_old/macos_l/skin.inc | 239 +++++++++++++++++ skins/_old/mage-scroll/default.asm | 2 +- skins/_old/mage-scroll/me_skin.inc | 242 ------------------ skins/_old/mage-scroll/skin.inc | 239 +++++++++++++++++ skins/_old/mage-slot/default.asm | 2 +- skins/_old/mage-slot/me_skin.inc | 242 ------------------ skins/_old/mage-slot/skin.inc | 239 +++++++++++++++++ skins/_old/mage-teckno/default.asm | 2 +- skins/_old/mage-teckno/me_skin.inc | 242 ------------------ skins/_old/mage-teckno/skin.inc | 239 +++++++++++++++++ skins/_old/mist/default.asm | 2 +- skins/_old/mist/me_skin.inc | 235 ----------------- skins/_old/mist/skin.inc | 239 +++++++++++++++++ skins/_old/mist_color/default.asm | 2 +- skins/_old/mist_color/me_skin.inc | 235 ----------------- skins/_old/mist_color/skin.inc | 239 +++++++++++++++++ skins/_old/mursky/mursky.asm | 2 +- skins/_old/mursky/my_skin.inc | 235 ----------------- skins/_old/mursky/skin.inc | 239 +++++++++++++++++ skins/_old/mygrey/default.asm | 2 +- skins/_old/mygrey/me_skin.inc | 235 ----------------- skins/_old/mygrey/skin.inc | 239 +++++++++++++++++ skins/_old/myskin1/default.asm | 2 +- skins/_old/myskin1/me_skin.inc | 235 ----------------- skins/_old/myskin1/skin.inc | 239 +++++++++++++++++ skins/_old/myskin2/default.asm | 2 +- skins/_old/myskin2/me_skin.inc | 235 ----------------- skins/_old/myskin2/skin.inc | 239 +++++++++++++++++ skins/_old/myskin3/default.asm | 2 +- skins/_old/myskin3/me_skin.inc | 235 ----------------- skins/_old/myskin3/skin.inc | 239 +++++++++++++++++ skins/_old/myskin4/default.asm | 2 +- skins/_old/myskin4/me_skin.inc | 235 ----------------- skins/_old/myskin4/skin.inc | 239 +++++++++++++++++ skins/_old/neutral/neutral/default.asm | 2 +- skins/_old/neutral/neutral/me_skin.inc | 235 ----------------- skins/_old/neutral/neutral/skin.inc | 239 +++++++++++++++++ skins/_old/neutral/neutral_blue/default.asm | 2 +- skins/_old/neutral/neutral_blue/me_skin.inc | 235 ----------------- skins/_old/neutral/neutral_blue/skin.inc | 239 +++++++++++++++++ skins/_old/neutral/neutral_green/default.asm | 2 +- skins/_old/neutral/neutral_green/me_skin.inc | 235 ----------------- skins/_old/neutral/neutral_green/skin.inc | 239 +++++++++++++++++ skins/_old/neutral/neutral_lilac/default.asm | 2 +- skins/_old/neutral/neutral_lilac/me_skin.inc | 235 ----------------- skins/_old/neutral/neutral_lilac/skin.inc | 239 +++++++++++++++++ skins/_old/night/me_skin.inc | 235 ----------------- skins/_old/night/night.asm | 2 +- skins/_old/night/skin.inc | 239 +++++++++++++++++ skins/_old/nix/nix_big/my_skin.inc | 235 ----------------- skins/_old/nix/nix_big/nix_big.asm | 2 +- skins/_old/nix/nix_big/skin.inc | 239 +++++++++++++++++ skins/_old/nix/nix_medium/my_skin.inc | 235 ----------------- skins/_old/nix/nix_medium/nix_medium.asm | 2 +- skins/_old/nix/nix_medium/skin.inc | 239 +++++++++++++++++ skins/_old/nix/nix_small/my_skin.inc | 235 ----------------- skins/_old/nix/nix_small/nix_small.asm | 2 +- skins/_old/nix/nix_small/skin.inc | 239 +++++++++++++++++ skins/_old/panther/default.asm | 2 +- skins/_old/panther/me_skin.inc | 235 ----------------- skins/_old/panther/skin.inc | 239 +++++++++++++++++ skins/_old/plum/default.asm | 2 +- skins/_old/plum/me_skin.inc | 235 ----------------- skins/_old/plum/skin.inc | 239 +++++++++++++++++ skins/_old/sea/default.asm | 2 +- skins/_old/sea/me_skin.inc | 235 ----------------- skins/_old/sea/skin.inc | 239 +++++++++++++++++ skins/_old/skin_feol/default.asm | 2 +- skins/_old/skin_feol/me_skin.inc | 235 ----------------- skins/_old/skin_feol/skin.inc | 239 +++++++++++++++++ skins/_old/skin_feol_new/default.asm | 2 +- skins/_old/skin_feol_new/me_skin.inc | 235 ----------------- skins/_old/skin_feol_new/skin.inc | 239 +++++++++++++++++ skins/_old/skin_ser/default.asm | 2 +- skins/_old/skin_ser/me_skin.inc | 235 ----------------- skins/_old/skin_ser/skin.inc | 239 +++++++++++++++++ skins/_old/skin_vhl/default.asm | 2 +- skins/_old/skin_vhl/me_skin.inc | 235 ----------------- skins/_old/skin_vhl/skin.inc | 239 +++++++++++++++++ skins/_old/sshock/default.asm | 2 +- skins/_old/sshock/me_skin.inc | 242 ------------------ skins/_old/sshock/skin.inc | 239 +++++++++++++++++ skins/_old/stone/O'stone.asm | 2 +- skins/_old/stone/my_skin.inc | 235 ----------------- skins/_old/stone/skin.inc | 239 +++++++++++++++++ skins/_old/subsilv/default.asm | 2 +- skins/_old/subsilv/my_skin.inc | 235 ----------------- skins/_old/subsilv/skin.inc | 239 +++++++++++++++++ skins/_old/testtest/my_skin.inc | 235 ----------------- skins/_old/testtest/skin.inc | 239 +++++++++++++++++ skins/_old/testtest/testtest.asm | 8 +- skins/_old/vista/default.asm | 2 +- skins/_old/vista/my_skin.inc | 235 ----------------- skins/_old/vista/skin.inc | 239 +++++++++++++++++ skins/_old/win8/Default.skn.asm | 2 +- skins/_old/win8/me_skin.inc | 235 ----------------- skins/_old/win8/skin.inc | 239 +++++++++++++++++ skins/_old/winflat/default.asm | 2 +- skins/_old/winflat/my_skin.inc | 235 ----------------- skins/_old/winflat/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver1/my_skin.inc | 235 ----------------- skins/_old/zRiver/zRiver1/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver1/zRiver1.asm | 2 +- skins/_old/zRiver/zRiver2/my_skin.inc | 235 ----------------- skins/_old/zRiver/zRiver2/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver2/zRiver2.asm | 2 +- skins/_old/zRiver/zRiver3/my_skin.inc | 235 ----------------- skins/_old/zRiver/zRiver3/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver3/zRiver3.asm | 2 +- skins/_old/zRiver/zRiver4/my_skin.inc | 235 ----------------- skins/_old/zRiver/zRiver4/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver4/zRiver4.asm | 2 +- skins/_old/zRiver/zRiver5/my_skin.inc | 235 ----------------- skins/_old/zRiver/zRiver5/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver5/zRiver5.asm | 2 +- skins/_old/zRiver/zRiver6/my_skin.inc | 235 ----------------- skins/_old/zRiver/zRiver6/skin.inc | 239 +++++++++++++++++ skins/_old/zRiver/zRiver6/zRiver6.asm | 2 +- 519 files changed, 39915 insertions(+), 39291 deletions(-) delete mode 100644 skins/Leency/me_skin.inc rename skins/{_old/first_skin/me_skin.inc => Leency/skin.inc} (88%) delete mode 100644 skins/_old/5imple Alpha/1.5imple Alpha/my_skin.inc rename skins/_old/{Simple_gray/me_skin.inc => 5imple Alpha/1.5imple Alpha/skin.inc} (88%) delete mode 100644 skins/_old/5imple Alpha/2.5imple Alpha/my_skin.inc rename skins/_old/{falloutskn/me_skin.inc => 5imple Alpha/2.5imple Alpha/skin.inc} (88%) delete mode 100644 skins/_old/5imple Alpha/3.5imple Alpha/my_skin.inc rename skins/_old/{khrome2/me_skin.inc => 5imple Alpha/3.5imple Alpha/skin.inc} (88%) delete mode 100644 skins/_old/Arena/me_skin.inc create mode 100644 skins/_old/Arena/skin.inc delete mode 100644 skins/_old/Black_lace/1.Black_lace/me_skin.inc create mode 100644 skins/_old/Black_lace/1.Black_lace/skin.inc delete mode 100644 skins/_old/Black_lace/2.Black_lace/me_skin.inc create mode 100644 skins/_old/Black_lace/2.Black_lace/skin.inc delete mode 100644 skins/_old/Blended/me_skin.inc create mode 100644 skins/_old/Blended/skin.inc delete mode 100644 skins/_old/Brick/1.Brick/me_skin.inc create mode 100644 skins/_old/Brick/1.Brick/skin.inc delete mode 100644 skins/_old/BrownLustre/BrownLustre/me_skin.inc create mode 100644 skins/_old/BrownLustre/BrownLustre/skin.inc delete mode 100644 skins/_old/BrownLustre/BrownLustre_2/me_skin.inc create mode 100644 skins/_old/BrownLustre/BrownLustre_2/skin.inc delete mode 100644 skins/_old/Circles/1.Circles/my_skin.inc create mode 100644 skins/_old/Circles/1.Circles/skin.inc delete mode 100644 skins/_old/Circles/2.Circles/my_skin.inc create mode 100644 skins/_old/Circles/2.Circles/skin.inc delete mode 100644 skins/_old/Circles/3.Circles/my_skin.inc create mode 100644 skins/_old/Circles/3.Circles/skin.inc delete mode 100644 skins/_old/Circles/4.Circles/my_skin.inc create mode 100644 skins/_old/Circles/4.Circles/skin.inc delete mode 100644 skins/_old/CodeOpusC/Opus_A/my_skin.inc create mode 100644 skins/_old/CodeOpusC/Opus_A/skin.inc delete mode 100644 skins/_old/CodeOpusC/Opus_B/my_skin.inc create mode 100644 skins/_old/CodeOpusC/Opus_B/skin.inc delete mode 100644 skins/_old/CodeOpusC/Opus_D/my_skin.inc create mode 100644 skins/_old/CodeOpusC/Opus_D/skin.inc delete mode 100644 skins/_old/CodeOpusC/Opus_DA/my_skin.inc create mode 100644 skins/_old/CodeOpusC/Opus_DA/skin.inc delete mode 100644 skins/_old/CodeOpusC/Opus_G/my_skin.inc create mode 100644 skins/_old/CodeOpusC/Opus_G/skin.inc delete mode 100644 skins/_old/Crystal/me_skin.inc create mode 100644 skins/_old/Crystal/skin.inc delete mode 100644 skins/_old/Cyclops/1.Cyclops/my_skin.inc create mode 100644 skins/_old/Cyclops/1.Cyclops/skin.inc delete mode 100644 skins/_old/Cyclops/2.Cyclops/my_skin.inc create mode 100644 skins/_old/Cyclops/2.Cyclops/skin.inc delete mode 100644 skins/_old/Dark_future/me_skin.inc create mode 100644 skins/_old/Dark_future/skin.inc delete mode 100644 skins/_old/Devil_skins/Blue_devil/me_skin.inc create mode 100644 skins/_old/Devil_skins/Blue_devil/skin.inc delete mode 100644 skins/_old/Devil_skins/Green_devil/me_skin.inc create mode 100644 skins/_old/Devil_skins/Green_devil/skin.inc delete mode 100644 skins/_old/Devil_skins/Pink_devil/me_skin.inc create mode 100644 skins/_old/Devil_skins/Pink_devil/skin.inc delete mode 100644 skins/_old/Devil_skins/Red_devil/me_skin.inc create mode 100644 skins/_old/Devil_skins/Red_devil/skin.inc delete mode 100644 skins/_old/Devil_skins/Violet_devil/me_skin.inc create mode 100644 skins/_old/Devil_skins/Violet_devil/skin.inc delete mode 100644 skins/_old/Eyes/my_skin.inc create mode 100644 skins/_old/Eyes/skin.inc delete mode 100644 skins/_old/Fever/Fever1 blue/me_skin.inc create mode 100644 skins/_old/Fever/Fever1 blue/skin.inc delete mode 100644 skins/_old/Fever/Fever1 green/me_skin.inc create mode 100644 skins/_old/Fever/Fever1 green/skin.inc delete mode 100644 skins/_old/Fever/Fever1 red/me_skin.inc create mode 100644 skins/_old/Fever/Fever1 red/skin.inc delete mode 100644 skins/_old/Fever/Fever2 blue/me_skin.inc create mode 100644 skins/_old/Fever/Fever2 blue/skin.inc delete mode 100644 skins/_old/Fever/Fever2 green/me_skin.inc create mode 100644 skins/_old/Fever/Fever2 green/skin.inc delete mode 100644 skins/_old/Fever/Fever2 red/me_skin.inc create mode 100644 skins/_old/Fever/Fever2 red/skin.inc delete mode 100644 skins/_old/Flowers/my_skin.inc create mode 100644 skins/_old/Flowers/skin.inc delete mode 100644 skins/_old/Flyght/me_skin.inc create mode 100644 skins/_old/Flyght/skin.inc delete mode 100644 skins/_old/Glass_lime/my_skin.inc create mode 100644 skins/_old/Glass_lime/skin.inc delete mode 100644 skins/_old/Grey/my_skin.inc create mode 100644 skins/_old/Grey/skin.inc delete mode 100644 skins/_old/Hearts/Hearts 3d/me_skin.inc create mode 100644 skins/_old/Hearts/Hearts 3d/skin.inc delete mode 100644 skins/_old/Hearts/Hearts flat/me_skin.inc create mode 100644 skins/_old/Hearts/Hearts flat/skin.inc delete mode 100644 skins/_old/Leency/me_skin.inc create mode 100644 skins/_old/Leency/skin.inc delete mode 100644 skins/_old/MenuetOS/1.MenuetOS/1/me_skin.inc create mode 100644 skins/_old/MenuetOS/1.MenuetOS/1/skin.inc delete mode 100644 skins/_old/MenuetOS/1.MenuetOS/2/me_skin.inc create mode 100644 skins/_old/MenuetOS/1.MenuetOS/2/skin.inc delete mode 100644 skins/_old/MenuetOS/2.MenuetOS/1/me_skin.inc create mode 100644 skins/_old/MenuetOS/2.MenuetOS/1/skin.inc delete mode 100644 skins/_old/MenuetOS/2.MenuetOS/2/me_skin.inc create mode 100644 skins/_old/MenuetOS/2.MenuetOS/2/skin.inc delete mode 100644 skins/_old/MenuetOS/3.MenuetOS/1/me_skin.inc create mode 100644 skins/_old/MenuetOS/3.MenuetOS/1/skin.inc delete mode 100644 skins/_old/MenuetOS/3.MenuetOS/2/me_skin.inc create mode 100644 skins/_old/MenuetOS/3.MenuetOS/2/skin.inc delete mode 100644 skins/_old/MenuetOS/4.MenuetOS/1/me_skin.inc create mode 100644 skins/_old/MenuetOS/4.MenuetOS/1/skin.inc delete mode 100644 skins/_old/MenuetOS/4.MenuetOS/2/me_skin.inc create mode 100644 skins/_old/MenuetOS/4.MenuetOS/2/skin.inc delete mode 100644 skins/_old/MenuetOS/5.MenuetOS/1/me_skin.inc create mode 100644 skins/_old/MenuetOS/5.MenuetOS/1/skin.inc delete mode 100644 skins/_old/MenuetOS/5.MenuetOS/2/me_skin.inc create mode 100644 skins/_old/MenuetOS/5.MenuetOS/2/skin.inc delete mode 100644 skins/_old/MetalColor/MCBlue/my_skin.inc create mode 100644 skins/_old/MetalColor/MCBlue/skin.inc delete mode 100644 skins/_old/MetalColor/MCRed/my_skin.inc create mode 100644 skins/_old/MetalColor/MCRed/skin.inc delete mode 100644 skins/_old/MetalGearArrows/1.MetalGearArrows/me_skin.inc create mode 100644 skins/_old/MetalGearArrows/1.MetalGearArrows/skin.inc delete mode 100644 skins/_old/MetalGearArrows/2.MetalGearArrows/me_skin.inc create mode 100644 skins/_old/MetalGearArrows/2.MetalGearArrows/skin.inc delete mode 100644 skins/_old/MetalGearArrows/3.MetalGearArrows/me_skin.inc create mode 100644 skins/_old/MetalGearArrows/3.MetalGearArrows/skin.inc delete mode 100644 skins/_old/MetalGearArrows/4.MetalGearArrows/me_skin.inc create mode 100644 skins/_old/MetalGearArrows/4.MetalGearArrows/skin.inc delete mode 100644 skins/_old/MyTango/my_skin.inc create mode 100644 skins/_old/MyTango/skin.inc delete mode 100644 skins/_old/Nature/Sandwich/src/me_skin.inc create mode 100644 skins/_old/Nature/Sandwich/src/skin.inc delete mode 100644 skins/_old/Nature/me_skin.inc create mode 100644 skins/_old/Nature/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_blue/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_blue/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_brown/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_brown/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_green/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_green/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_grey/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_grey/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_pink/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_pink/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_red/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_red/skin.inc delete mode 100644 skins/_old/Nova_skins/Nova_violet/my_skin.inc create mode 100644 skins/_old/Nova_skins/Nova_violet/skin.inc delete mode 100644 skins/_old/OpusOs_Blue/my_skin.inc create mode 100644 skins/_old/OpusOs_Blue/skin.inc delete mode 100644 skins/_old/Orange_Silence/me_skin.inc create mode 100644 skins/_old/Orange_Silence/skin.inc delete mode 100644 skins/_old/Orange_aureole/me_skin.inc create mode 100644 skins/_old/Orange_aureole/skin.inc delete mode 100644 skins/_old/Organics/my_skin.inc create mode 100644 skins/_old/Organics/skin.inc delete mode 100644 skins/_old/Rednex/my_skin.inc create mode 100644 skins/_old/Rednex/skin.inc delete mode 100644 skins/_old/RoboTech/BRoboTech/me_skin.inc create mode 100644 skins/_old/RoboTech/BRoboTech/skin.inc delete mode 100644 skins/_old/RoboTech/GRoboTech/me_skin.inc create mode 100644 skins/_old/RoboTech/GRoboTech/skin.inc delete mode 100644 skins/_old/Russia/me_skin.inc create mode 100644 skins/_old/Russia/skin.inc delete mode 100644 skins/_old/Sad_grey/me_skin.inc create mode 100644 skins/_old/Sad_grey/skin.inc delete mode 100644 skins/_old/SashSkinPack_1_1/Src/Aqua/me_skin.inc create mode 100644 skins/_old/SashSkinPack_1_1/Src/Aqua/skin.inc delete mode 100644 skins/_old/SashSkinPack_1_1/Src/Cold/me_skin.inc create mode 100644 skins/_old/SashSkinPack_1_1/Src/Cold/skin.inc delete mode 100644 skins/_old/SashSkinPack_1_1/Src/Metal/me_skin.inc create mode 100644 skins/_old/SashSkinPack_1_1/Src/Metal/skin.inc create mode 100644 skins/_old/Simple_gray/skin.inc delete mode 100644 skins/_old/StyleVista/vista/me_skin.inc create mode 100644 skins/_old/StyleVista/vista/skin.inc delete mode 100644 skins/_old/StyleVista/vista_basic/me_skin.inc create mode 100644 skins/_old/StyleVista/vista_basic/skin.inc delete mode 100644 skins/_old/StyleVista/vista_basic_black/me_skin.inc create mode 100644 skins/_old/StyleVista/vista_basic_black/skin.inc delete mode 100644 skins/_old/StyleVista/vista_dark/me_skin.inc create mode 100644 skins/_old/StyleVista/vista_dark/skin.inc delete mode 100644 skins/_old/StyleXP/orqua/me_skin.inc create mode 100644 skins/_old/StyleXP/orqua/skin.inc delete mode 100644 skins/_old/StyleXP/panther/me_skin.inc create mode 100644 skins/_old/StyleXP/panther/skin.inc delete mode 100644 skins/_old/StyleXP/wmpx/me_skin.inc create mode 100644 skins/_old/StyleXP/wmpx/skin.inc delete mode 100644 skins/_old/Syllable/my_skin.inc create mode 100644 skins/_old/Syllable/skin.inc delete mode 100644 skins/_old/USSR/me_skin.inc create mode 100644 skins/_old/USSR/skin.inc delete mode 100644 skins/_old/USSR_2/1.USSR_2/me_skin.inc create mode 100644 skins/_old/USSR_2/1.USSR_2/skin.inc delete mode 100644 skins/_old/USSR_2/2.USSR_2/me_skin.inc create mode 100644 skins/_old/USSR_2/2.USSR_2/skin.inc delete mode 100644 skins/_old/Victory_1945/me_skin.inc create mode 100644 skins/_old/Victory_1945/skin.inc delete mode 100644 skins/_old/WIN311/my_skin.inc create mode 100644 skins/_old/WIN311/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic black/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic black/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic blue/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic blue/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic green/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic green/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic orange/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic orange/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic pink/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic pink/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic red/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic red/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic violet/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic violet/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Classic yellow/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Classic yellow/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Standard blue/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Standard blue/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Standard olive_green/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Standard olive_green/skin.inc delete mode 100644 skins/_old/WindowsXP/WinXP Standard silver/me_skin.inc create mode 100644 skins/_old/WindowsXP/WinXP Standard silver/skin.inc delete mode 100644 skins/_old/bat/me_skin.inc create mode 100644 skins/_old/bat/skin.inc delete mode 100644 skins/_old/blackskin/me_skin.inc create mode 100644 skins/_old/blackskin/skin.inc delete mode 100644 skins/_old/cherry/me_skin.inc create mode 100644 skins/_old/cherry/skin.inc delete mode 100644 skins/_old/dark_night/me_skin.inc create mode 100644 skins/_old/dark_night/skin.inc create mode 100644 skins/_old/falloutskn/skin.inc create mode 100644 skins/_old/first_skin/skin.inc delete mode 100644 skins/_old/gliteskin/gliteskin_deepsky/me_skin.inc create mode 100644 skins/_old/gliteskin/gliteskin_deepsky/skin.inc delete mode 100644 skins/_old/gliteskin/gliteskin_glider/me_skin.inc create mode 100644 skins/_old/gliteskin/gliteskin_glider/skin.inc delete mode 100644 skins/_old/gliteskin/gliteskin_red/me_skin.inc create mode 100644 skins/_old/gliteskin/gliteskin_red/skin.inc delete mode 100644 skins/_old/gnome_style/gnome_blue/me_skin.inc create mode 100644 skins/_old/gnome_style/gnome_blue/skin.inc delete mode 100644 skins/_old/gnome_style/gnome_green/me_skin.inc create mode 100644 skins/_old/gnome_style/gnome_green/skin.inc delete mode 100644 skins/_old/gnome_style/gnome_ocean/me_skin.inc create mode 100644 skins/_old/gnome_style/gnome_ocean/skin.inc delete mode 100644 skins/_old/gnome_style/gnome_olive/me_skin.inc create mode 100644 skins/_old/gnome_style/gnome_olive/skin.inc delete mode 100644 skins/_old/gnome_style/gnome_orange/me_skin.inc create mode 100644 skins/_old/gnome_style/gnome_orange/skin.inc delete mode 100644 skins/_old/gnome_style/gnome_red/me_skin.inc create mode 100644 skins/_old/gnome_style/gnome_red/skin.inc delete mode 100644 skins/_old/humanoid_OSX/Humanoid_OSX_dark/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/Humanoid_OSX_dark/skin.inc delete mode 100644 skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/skin.inc delete mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_blue/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_blue/skin.inc delete mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_green/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_green/skin.inc delete mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_orange/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_orange/skin.inc delete mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_red/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_red/skin.inc delete mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_yellow/me_skin.inc create mode 100644 skins/_old/humanoid_OSX/humanoid_OSX_yellow/skin.inc create mode 100644 skins/_old/khrome2/skin.inc delete mode 100644 skins/_old/lightskin/me_skin.inc create mode 100644 skins/_old/lightskin/skin.inc delete mode 100644 skins/_old/macos_l/me_skin.inc create mode 100644 skins/_old/macos_l/skin.inc delete mode 100644 skins/_old/mage-scroll/me_skin.inc create mode 100644 skins/_old/mage-scroll/skin.inc delete mode 100644 skins/_old/mage-slot/me_skin.inc create mode 100644 skins/_old/mage-slot/skin.inc delete mode 100644 skins/_old/mage-teckno/me_skin.inc create mode 100644 skins/_old/mage-teckno/skin.inc delete mode 100644 skins/_old/mist/me_skin.inc create mode 100644 skins/_old/mist/skin.inc delete mode 100644 skins/_old/mist_color/me_skin.inc create mode 100644 skins/_old/mist_color/skin.inc delete mode 100644 skins/_old/mursky/my_skin.inc create mode 100644 skins/_old/mursky/skin.inc delete mode 100644 skins/_old/mygrey/me_skin.inc create mode 100644 skins/_old/mygrey/skin.inc delete mode 100644 skins/_old/myskin1/me_skin.inc create mode 100644 skins/_old/myskin1/skin.inc delete mode 100644 skins/_old/myskin2/me_skin.inc create mode 100644 skins/_old/myskin2/skin.inc delete mode 100644 skins/_old/myskin3/me_skin.inc create mode 100644 skins/_old/myskin3/skin.inc delete mode 100644 skins/_old/myskin4/me_skin.inc create mode 100644 skins/_old/myskin4/skin.inc delete mode 100644 skins/_old/neutral/neutral/me_skin.inc create mode 100644 skins/_old/neutral/neutral/skin.inc delete mode 100644 skins/_old/neutral/neutral_blue/me_skin.inc create mode 100644 skins/_old/neutral/neutral_blue/skin.inc delete mode 100644 skins/_old/neutral/neutral_green/me_skin.inc create mode 100644 skins/_old/neutral/neutral_green/skin.inc delete mode 100644 skins/_old/neutral/neutral_lilac/me_skin.inc create mode 100644 skins/_old/neutral/neutral_lilac/skin.inc delete mode 100644 skins/_old/night/me_skin.inc create mode 100644 skins/_old/night/skin.inc delete mode 100644 skins/_old/nix/nix_big/my_skin.inc create mode 100644 skins/_old/nix/nix_big/skin.inc delete mode 100644 skins/_old/nix/nix_medium/my_skin.inc create mode 100644 skins/_old/nix/nix_medium/skin.inc delete mode 100644 skins/_old/nix/nix_small/my_skin.inc create mode 100644 skins/_old/nix/nix_small/skin.inc delete mode 100644 skins/_old/panther/me_skin.inc create mode 100644 skins/_old/panther/skin.inc delete mode 100644 skins/_old/plum/me_skin.inc create mode 100644 skins/_old/plum/skin.inc delete mode 100644 skins/_old/sea/me_skin.inc create mode 100644 skins/_old/sea/skin.inc delete mode 100644 skins/_old/skin_feol/me_skin.inc create mode 100644 skins/_old/skin_feol/skin.inc delete mode 100644 skins/_old/skin_feol_new/me_skin.inc create mode 100644 skins/_old/skin_feol_new/skin.inc delete mode 100644 skins/_old/skin_ser/me_skin.inc create mode 100644 skins/_old/skin_ser/skin.inc delete mode 100644 skins/_old/skin_vhl/me_skin.inc create mode 100644 skins/_old/skin_vhl/skin.inc delete mode 100644 skins/_old/sshock/me_skin.inc create mode 100644 skins/_old/sshock/skin.inc delete mode 100644 skins/_old/stone/my_skin.inc create mode 100644 skins/_old/stone/skin.inc delete mode 100644 skins/_old/subsilv/my_skin.inc create mode 100644 skins/_old/subsilv/skin.inc delete mode 100644 skins/_old/testtest/my_skin.inc create mode 100644 skins/_old/testtest/skin.inc delete mode 100644 skins/_old/vista/my_skin.inc create mode 100644 skins/_old/vista/skin.inc delete mode 100644 skins/_old/win8/me_skin.inc create mode 100644 skins/_old/win8/skin.inc delete mode 100644 skins/_old/winflat/my_skin.inc create mode 100644 skins/_old/winflat/skin.inc delete mode 100644 skins/_old/zRiver/zRiver1/my_skin.inc create mode 100644 skins/_old/zRiver/zRiver1/skin.inc delete mode 100644 skins/_old/zRiver/zRiver2/my_skin.inc create mode 100644 skins/_old/zRiver/zRiver2/skin.inc delete mode 100644 skins/_old/zRiver/zRiver3/my_skin.inc create mode 100644 skins/_old/zRiver/zRiver3/skin.inc delete mode 100644 skins/_old/zRiver/zRiver4/my_skin.inc create mode 100644 skins/_old/zRiver/zRiver4/skin.inc delete mode 100644 skins/_old/zRiver/zRiver5/my_skin.inc create mode 100644 skins/_old/zRiver/zRiver5/skin.inc delete mode 100644 skins/_old/zRiver/zRiver6/my_skin.inc create mode 100644 skins/_old/zRiver/zRiver6/skin.inc diff --git a/skins/Leency/Blueberries/default.asm b/skins/Leency/Blueberries/default.asm index 97c52055da..471443109d 100644 --- a/skins/Leency/Blueberries/default.asm +++ b/skins/Leency/Blueberries/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/Leency/KNX/default.asm b/skins/Leency/KNX/default.asm index 22e4a467e7..ad1358c1ff 100644 --- a/skins/Leency/KNX/default.asm +++ b/skins/Leency/KNX/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/Leency/ObsidianOS/Tupfile.lua b/skins/Leency/ObsidianOS/Tupfile.lua index 2da4aebce1..0464a49457 100644 --- a/skins/Leency/ObsidianOS/Tupfile.lua +++ b/skins/Leency/ObsidianOS/Tupfile.lua @@ -1,2 +1,2 @@ if tup.getconfig("NO_FASM") ~= "" then return end -tup.rule("default.asm", 'fasm "%f" "%o" ' .. tup.getconfig("KPACK_CMD"), "Shkvorka.skn") +tup.rule("default.asm", 'fasm "%f" "%o" ' .. tup.getconfig("KPACK_CMD"), "ObsidianOS.skn") diff --git a/skins/Leency/ObsidianOS/default.asm b/skins/Leency/ObsidianOS/default.asm index f702a21663..cbc0a4d6d0 100644 --- a/skins/Leency/ObsidianOS/default.asm +++ b/skins/Leency/ObsidianOS/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/Leency/Shkvorka/default.asm b/skins/Leency/Shkvorka/default.asm index df05837b40..926af86bde 100644 --- a/skins/Leency/Shkvorka/default.asm +++ b/skins/Leency/Shkvorka/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/Leency/me_skin.inc b/skins/Leency/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/Leency/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/first_skin/me_skin.inc b/skins/Leency/skin.inc similarity index 88% rename from skins/_old/first_skin/me_skin.inc rename to skins/Leency/skin.inc index 45292e7ff7..81a6bd8f3f 100644 --- a/skins/_old/first_skin/me_skin.inc +++ b/skins/Leency/skin.inc @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -100,25 +100,25 @@ macro BITMAP _name*,_fname* { local w,h,a,r,g,b virtual at 0 + _file equ _#_name + _file:: file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits align 4 label _name .width = w .height = h dd w,h - a=54+(w*3+(w mod 4))*(h-1) + a=hsize+(w*3+(w mod 4))*(h-1) size = $ repeat h repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 db r,g,b a=a+3 end repeat @@ -141,7 +141,7 @@ macro define_colors name,[col,val] macro SKIN_PARAMS [a] { common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz + local _height,_margins,_colors,_colors_1,_dtp __params__: forward match qq == ww,a @@ -173,12 +173,9 @@ macro SKIN_PARAMS [a] dd _height dw _margins dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz + dd @f - $ - 4 file _dtp + @@: } macro SKIN_BUTTONS [a] diff --git a/skins/_old/5imple Alpha/1.5imple Alpha/1.5imple_Alpha.asm b/skins/_old/5imple Alpha/1.5imple Alpha/1.5imple_Alpha.asm index 5f229fcc1a..ed8da30207 100644 --- a/skins/_old/5imple Alpha/1.5imple Alpha/1.5imple_Alpha.asm +++ b/skins/_old/5imple Alpha/1.5imple Alpha/1.5imple_Alpha.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/5imple Alpha/1.5imple Alpha/my_skin.inc b/skins/_old/5imple Alpha/1.5imple Alpha/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/5imple Alpha/1.5imple Alpha/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Simple_gray/me_skin.inc b/skins/_old/5imple Alpha/1.5imple Alpha/skin.inc similarity index 88% rename from skins/_old/Simple_gray/me_skin.inc rename to skins/_old/5imple Alpha/1.5imple Alpha/skin.inc index 365964eb38..81a6bd8f3f 100644 --- a/skins/_old/Simple_gray/me_skin.inc +++ b/skins/_old/5imple Alpha/1.5imple Alpha/skin.inc @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -100,25 +100,25 @@ macro BITMAP _name*,_fname* { local w,h,a,r,g,b virtual at 0 + _file equ _#_name + _file:: file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits align 4 label _name .width = w .height = h dd w,h - a=54+(w*3+(w mod 4))*(h-1) + a=hsize+(w*3+(w mod 4))*(h-1) size = $ repeat h repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 db r,g,b a=a+3 end repeat @@ -141,7 +141,7 @@ macro define_colors name,[col,val] macro SKIN_PARAMS [a] { common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz + local _height,_margins,_colors,_colors_1,_dtp __params__: forward match qq == ww,a @@ -173,12 +173,9 @@ macro SKIN_PARAMS [a] dd _height dw _margins dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz + dd @f - $ - 4 file _dtp + @@: } macro SKIN_BUTTONS [a] @@ -239,4 +236,4 @@ macro SKIN_BITMAPS [a] \} common dd 0 -} \ No newline at end of file +} diff --git a/skins/_old/5imple Alpha/2.5imple Alpha/2.5imple_Alpha.asm b/skins/_old/5imple Alpha/2.5imple Alpha/2.5imple_Alpha.asm index 20f0a7b79b..61cd405c6a 100644 --- a/skins/_old/5imple Alpha/2.5imple Alpha/2.5imple_Alpha.asm +++ b/skins/_old/5imple Alpha/2.5imple Alpha/2.5imple_Alpha.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/5imple Alpha/2.5imple Alpha/my_skin.inc b/skins/_old/5imple Alpha/2.5imple Alpha/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/5imple Alpha/2.5imple Alpha/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/falloutskn/me_skin.inc b/skins/_old/5imple Alpha/2.5imple Alpha/skin.inc similarity index 88% rename from skins/_old/falloutskn/me_skin.inc rename to skins/_old/5imple Alpha/2.5imple Alpha/skin.inc index 365964eb38..81a6bd8f3f 100644 --- a/skins/_old/falloutskn/me_skin.inc +++ b/skins/_old/5imple Alpha/2.5imple Alpha/skin.inc @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -100,25 +100,25 @@ macro BITMAP _name*,_fname* { local w,h,a,r,g,b virtual at 0 + _file equ _#_name + _file:: file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits align 4 label _name .width = w .height = h dd w,h - a=54+(w*3+(w mod 4))*(h-1) + a=hsize+(w*3+(w mod 4))*(h-1) size = $ repeat h repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 db r,g,b a=a+3 end repeat @@ -141,7 +141,7 @@ macro define_colors name,[col,val] macro SKIN_PARAMS [a] { common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz + local _height,_margins,_colors,_colors_1,_dtp __params__: forward match qq == ww,a @@ -173,12 +173,9 @@ macro SKIN_PARAMS [a] dd _height dw _margins dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz + dd @f - $ - 4 file _dtp + @@: } macro SKIN_BUTTONS [a] @@ -239,4 +236,4 @@ macro SKIN_BITMAPS [a] \} common dd 0 -} \ No newline at end of file +} diff --git a/skins/_old/5imple Alpha/3.5imple Alpha/3.5imple_Alpha.asm b/skins/_old/5imple Alpha/3.5imple Alpha/3.5imple_Alpha.asm index 1023193966..16194b5b40 100644 --- a/skins/_old/5imple Alpha/3.5imple Alpha/3.5imple_Alpha.asm +++ b/skins/_old/5imple Alpha/3.5imple Alpha/3.5imple_Alpha.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/5imple Alpha/3.5imple Alpha/my_skin.inc b/skins/_old/5imple Alpha/3.5imple Alpha/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/5imple Alpha/3.5imple Alpha/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/khrome2/me_skin.inc b/skins/_old/5imple Alpha/3.5imple Alpha/skin.inc similarity index 88% rename from skins/_old/khrome2/me_skin.inc rename to skins/_old/5imple Alpha/3.5imple Alpha/skin.inc index 365964eb38..81a6bd8f3f 100644 --- a/skins/_old/khrome2/me_skin.inc +++ b/skins/_old/5imple Alpha/3.5imple Alpha/skin.inc @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -100,25 +100,25 @@ macro BITMAP _name*,_fname* { local w,h,a,r,g,b virtual at 0 + _file equ _#_name + _file:: file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits align 4 label _name .width = w .height = h dd w,h - a=54+(w*3+(w mod 4))*(h-1) + a=hsize+(w*3+(w mod 4))*(h-1) size = $ repeat h repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 db r,g,b a=a+3 end repeat @@ -141,7 +141,7 @@ macro define_colors name,[col,val] macro SKIN_PARAMS [a] { common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz + local _height,_margins,_colors,_colors_1,_dtp __params__: forward match qq == ww,a @@ -173,12 +173,9 @@ macro SKIN_PARAMS [a] dd _height dw _margins dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz + dd @f - $ - 4 file _dtp + @@: } macro SKIN_BUTTONS [a] @@ -239,4 +236,4 @@ macro SKIN_BITMAPS [a] \} common dd 0 -} \ No newline at end of file +} diff --git a/skins/_old/Arena/default.asm b/skins/_old/Arena/default.asm index 8667162ab9..82e6163dec 100644 --- a/skins/_old/Arena/default.asm +++ b/skins/_old/Arena/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Arena/me_skin.inc b/skins/_old/Arena/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Arena/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Arena/skin.inc b/skins/_old/Arena/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Arena/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Black_lace/1.Black_lace/1.Black_lace.asm b/skins/_old/Black_lace/1.Black_lace/1.Black_lace.asm index 1e224a8231..63e6c7644d 100644 --- a/skins/_old/Black_lace/1.Black_lace/1.Black_lace.asm +++ b/skins/_old/Black_lace/1.Black_lace/1.Black_lace.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Black_lace/1.Black_lace/me_skin.inc b/skins/_old/Black_lace/1.Black_lace/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Black_lace/1.Black_lace/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Black_lace/1.Black_lace/skin.inc b/skins/_old/Black_lace/1.Black_lace/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Black_lace/1.Black_lace/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Black_lace/2.Black_lace/2.Black_lace.asm b/skins/_old/Black_lace/2.Black_lace/2.Black_lace.asm index cb12b81e87..ab789af4c3 100644 --- a/skins/_old/Black_lace/2.Black_lace/2.Black_lace.asm +++ b/skins/_old/Black_lace/2.Black_lace/2.Black_lace.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Black_lace/2.Black_lace/me_skin.inc b/skins/_old/Black_lace/2.Black_lace/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Black_lace/2.Black_lace/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Black_lace/2.Black_lace/skin.inc b/skins/_old/Black_lace/2.Black_lace/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Black_lace/2.Black_lace/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Blended/default.asm b/skins/_old/Blended/default.asm index 1fa76648af..b424755cfa 100644 --- a/skins/_old/Blended/default.asm +++ b/skins/_old/Blended/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Blended/me_skin.inc b/skins/_old/Blended/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Blended/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Blended/skin.inc b/skins/_old/Blended/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Blended/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Brick/1.Brick/brick.asm b/skins/_old/Brick/1.Brick/brick.asm index c91a16f1b7..e2915c4e58 100644 --- a/skins/_old/Brick/1.Brick/brick.asm +++ b/skins/_old/Brick/1.Brick/brick.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Brick/1.Brick/me_skin.inc b/skins/_old/Brick/1.Brick/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Brick/1.Brick/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Brick/1.Brick/skin.inc b/skins/_old/Brick/1.Brick/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Brick/1.Brick/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/BrownLustre/BrownLustre/BrownLustre.asm b/skins/_old/BrownLustre/BrownLustre/BrownLustre.asm index 01b8b3250b..46389d86ba 100644 --- a/skins/_old/BrownLustre/BrownLustre/BrownLustre.asm +++ b/skins/_old/BrownLustre/BrownLustre/BrownLustre.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/BrownLustre/BrownLustre/me_skin.inc b/skins/_old/BrownLustre/BrownLustre/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/BrownLustre/BrownLustre/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/BrownLustre/BrownLustre/skin.inc b/skins/_old/BrownLustre/BrownLustre/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/BrownLustre/BrownLustre/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/BrownLustre/BrownLustre_2/BrownLustre_2.asm b/skins/_old/BrownLustre/BrownLustre_2/BrownLustre_2.asm index 89949d8d41..3a1f624b41 100644 --- a/skins/_old/BrownLustre/BrownLustre_2/BrownLustre_2.asm +++ b/skins/_old/BrownLustre/BrownLustre_2/BrownLustre_2.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/BrownLustre/BrownLustre_2/me_skin.inc b/skins/_old/BrownLustre/BrownLustre_2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/BrownLustre/BrownLustre_2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/BrownLustre/BrownLustre_2/skin.inc b/skins/_old/BrownLustre/BrownLustre_2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/BrownLustre/BrownLustre_2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Circles/1.Circles/1.Circles.asm b/skins/_old/Circles/1.Circles/1.Circles.asm index 3c5e5c91b0..e9b3e63c31 100644 --- a/skins/_old/Circles/1.Circles/1.Circles.asm +++ b/skins/_old/Circles/1.Circles/1.Circles.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Circles/1.Circles/my_skin.inc b/skins/_old/Circles/1.Circles/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Circles/1.Circles/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Circles/1.Circles/skin.inc b/skins/_old/Circles/1.Circles/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Circles/1.Circles/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Circles/2.Circles/2.Circles.asm b/skins/_old/Circles/2.Circles/2.Circles.asm index 3c5e5c91b0..e9b3e63c31 100644 --- a/skins/_old/Circles/2.Circles/2.Circles.asm +++ b/skins/_old/Circles/2.Circles/2.Circles.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Circles/2.Circles/my_skin.inc b/skins/_old/Circles/2.Circles/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Circles/2.Circles/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Circles/2.Circles/skin.inc b/skins/_old/Circles/2.Circles/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Circles/2.Circles/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Circles/3.Circles/3.Circles.asm b/skins/_old/Circles/3.Circles/3.Circles.asm index 3c5e5c91b0..e9b3e63c31 100644 --- a/skins/_old/Circles/3.Circles/3.Circles.asm +++ b/skins/_old/Circles/3.Circles/3.Circles.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Circles/3.Circles/my_skin.inc b/skins/_old/Circles/3.Circles/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Circles/3.Circles/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Circles/3.Circles/skin.inc b/skins/_old/Circles/3.Circles/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Circles/3.Circles/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Circles/4.Circles/4.Circles.asm b/skins/_old/Circles/4.Circles/4.Circles.asm index 3c5e5c91b0..e9b3e63c31 100644 --- a/skins/_old/Circles/4.Circles/4.Circles.asm +++ b/skins/_old/Circles/4.Circles/4.Circles.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Circles/4.Circles/my_skin.inc b/skins/_old/Circles/4.Circles/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Circles/4.Circles/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Circles/4.Circles/skin.inc b/skins/_old/Circles/4.Circles/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Circles/4.Circles/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/CodeOpusC/Opus_A/Opus_A.asm b/skins/_old/CodeOpusC/Opus_A/Opus_A.asm index 33e8156423..73a8b6e4d2 100644 --- a/skins/_old/CodeOpusC/Opus_A/Opus_A.asm +++ b/skins/_old/CodeOpusC/Opus_A/Opus_A.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/CodeOpusC/Opus_A/my_skin.inc b/skins/_old/CodeOpusC/Opus_A/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/CodeOpusC/Opus_A/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/CodeOpusC/Opus_A/skin.inc b/skins/_old/CodeOpusC/Opus_A/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/CodeOpusC/Opus_A/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/CodeOpusC/Opus_B/Opus_B.asm b/skins/_old/CodeOpusC/Opus_B/Opus_B.asm index 8aeec97732..3f8a00d485 100644 --- a/skins/_old/CodeOpusC/Opus_B/Opus_B.asm +++ b/skins/_old/CodeOpusC/Opus_B/Opus_B.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/CodeOpusC/Opus_B/my_skin.inc b/skins/_old/CodeOpusC/Opus_B/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/CodeOpusC/Opus_B/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/CodeOpusC/Opus_B/skin.inc b/skins/_old/CodeOpusC/Opus_B/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/CodeOpusC/Opus_B/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/CodeOpusC/Opus_D/Opus_D.asm b/skins/_old/CodeOpusC/Opus_D/Opus_D.asm index 4b5a1d64b1..0136eaafd8 100644 --- a/skins/_old/CodeOpusC/Opus_D/Opus_D.asm +++ b/skins/_old/CodeOpusC/Opus_D/Opus_D.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/CodeOpusC/Opus_D/my_skin.inc b/skins/_old/CodeOpusC/Opus_D/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/CodeOpusC/Opus_D/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/CodeOpusC/Opus_D/skin.inc b/skins/_old/CodeOpusC/Opus_D/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/CodeOpusC/Opus_D/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/CodeOpusC/Opus_DA/Opus_DA.asm b/skins/_old/CodeOpusC/Opus_DA/Opus_DA.asm index 8490316c4b..fd73f25656 100644 --- a/skins/_old/CodeOpusC/Opus_DA/Opus_DA.asm +++ b/skins/_old/CodeOpusC/Opus_DA/Opus_DA.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/CodeOpusC/Opus_DA/my_skin.inc b/skins/_old/CodeOpusC/Opus_DA/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/CodeOpusC/Opus_DA/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/CodeOpusC/Opus_DA/skin.inc b/skins/_old/CodeOpusC/Opus_DA/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/CodeOpusC/Opus_DA/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/CodeOpusC/Opus_G/Opus_G.asm b/skins/_old/CodeOpusC/Opus_G/Opus_G.asm index 7c3b918e53..28419dd975 100644 --- a/skins/_old/CodeOpusC/Opus_G/Opus_G.asm +++ b/skins/_old/CodeOpusC/Opus_G/Opus_G.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/CodeOpusC/Opus_G/my_skin.inc b/skins/_old/CodeOpusC/Opus_G/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/CodeOpusC/Opus_G/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/CodeOpusC/Opus_G/skin.inc b/skins/_old/CodeOpusC/Opus_G/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/CodeOpusC/Opus_G/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Crystal/default.asm b/skins/_old/Crystal/default.asm index 0ba9566930..a5be0c0345 100644 --- a/skins/_old/Crystal/default.asm +++ b/skins/_old/Crystal/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Crystal/me_skin.inc b/skins/_old/Crystal/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Crystal/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Crystal/skin.inc b/skins/_old/Crystal/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Crystal/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Cyclops/1.Cyclops/1.Cyclops.asm b/skins/_old/Cyclops/1.Cyclops/1.Cyclops.asm index abfb4e28cb..851761c691 100644 --- a/skins/_old/Cyclops/1.Cyclops/1.Cyclops.asm +++ b/skins/_old/Cyclops/1.Cyclops/1.Cyclops.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Cyclops/1.Cyclops/my_skin.inc b/skins/_old/Cyclops/1.Cyclops/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Cyclops/1.Cyclops/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Cyclops/1.Cyclops/skin.inc b/skins/_old/Cyclops/1.Cyclops/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Cyclops/1.Cyclops/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Cyclops/2.Cyclops/2.Cyclops.asm b/skins/_old/Cyclops/2.Cyclops/2.Cyclops.asm index abfb4e28cb..851761c691 100644 --- a/skins/_old/Cyclops/2.Cyclops/2.Cyclops.asm +++ b/skins/_old/Cyclops/2.Cyclops/2.Cyclops.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Cyclops/2.Cyclops/my_skin.inc b/skins/_old/Cyclops/2.Cyclops/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Cyclops/2.Cyclops/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Cyclops/2.Cyclops/skin.inc b/skins/_old/Cyclops/2.Cyclops/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Cyclops/2.Cyclops/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Dark_future/Dark_future.asm b/skins/_old/Dark_future/Dark_future.asm index 23d8b54626..344849a054 100644 --- a/skins/_old/Dark_future/Dark_future.asm +++ b/skins/_old/Dark_future/Dark_future.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Dark_future/me_skin.inc b/skins/_old/Dark_future/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Dark_future/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Dark_future/skin.inc b/skins/_old/Dark_future/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Dark_future/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Devil_skins/Blue_devil/Blue_devil.asm b/skins/_old/Devil_skins/Blue_devil/Blue_devil.asm index 655186bbef..f11538722b 100644 --- a/skins/_old/Devil_skins/Blue_devil/Blue_devil.asm +++ b/skins/_old/Devil_skins/Blue_devil/Blue_devil.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Devil_skins/Blue_devil/me_skin.inc b/skins/_old/Devil_skins/Blue_devil/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Devil_skins/Blue_devil/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Devil_skins/Blue_devil/skin.inc b/skins/_old/Devil_skins/Blue_devil/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Devil_skins/Blue_devil/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Devil_skins/Green_devil/Green_devil.asm b/skins/_old/Devil_skins/Green_devil/Green_devil.asm index 21babd8716..fd9e45a80b 100644 --- a/skins/_old/Devil_skins/Green_devil/Green_devil.asm +++ b/skins/_old/Devil_skins/Green_devil/Green_devil.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Devil_skins/Green_devil/me_skin.inc b/skins/_old/Devil_skins/Green_devil/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Devil_skins/Green_devil/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Devil_skins/Green_devil/skin.inc b/skins/_old/Devil_skins/Green_devil/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Devil_skins/Green_devil/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Devil_skins/Pink_devil/Pink_devil.asm b/skins/_old/Devil_skins/Pink_devil/Pink_devil.asm index dca342d6d8..4e50183935 100644 --- a/skins/_old/Devil_skins/Pink_devil/Pink_devil.asm +++ b/skins/_old/Devil_skins/Pink_devil/Pink_devil.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Devil_skins/Pink_devil/me_skin.inc b/skins/_old/Devil_skins/Pink_devil/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Devil_skins/Pink_devil/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Devil_skins/Pink_devil/skin.inc b/skins/_old/Devil_skins/Pink_devil/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Devil_skins/Pink_devil/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Devil_skins/Red_devil/Red_devil.asm b/skins/_old/Devil_skins/Red_devil/Red_devil.asm index c7f63668e6..dcae28eddd 100644 --- a/skins/_old/Devil_skins/Red_devil/Red_devil.asm +++ b/skins/_old/Devil_skins/Red_devil/Red_devil.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Devil_skins/Red_devil/me_skin.inc b/skins/_old/Devil_skins/Red_devil/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Devil_skins/Red_devil/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Devil_skins/Red_devil/skin.inc b/skins/_old/Devil_skins/Red_devil/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Devil_skins/Red_devil/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Devil_skins/Violet_devil/Violet_devil.asm b/skins/_old/Devil_skins/Violet_devil/Violet_devil.asm index 60fd809d24..343f3b2bb1 100644 --- a/skins/_old/Devil_skins/Violet_devil/Violet_devil.asm +++ b/skins/_old/Devil_skins/Violet_devil/Violet_devil.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Devil_skins/Violet_devil/me_skin.inc b/skins/_old/Devil_skins/Violet_devil/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Devil_skins/Violet_devil/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Devil_skins/Violet_devil/skin.inc b/skins/_old/Devil_skins/Violet_devil/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Devil_skins/Violet_devil/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Eyes/Eyes.asm b/skins/_old/Eyes/Eyes.asm index bae10c9ff5..b2ddf9bf44 100644 --- a/skins/_old/Eyes/Eyes.asm +++ b/skins/_old/Eyes/Eyes.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Eyes/my_skin.inc b/skins/_old/Eyes/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Eyes/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Eyes/skin.inc b/skins/_old/Eyes/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Eyes/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Fever/Fever1 blue/Fever_blue.asm b/skins/_old/Fever/Fever1 blue/Fever_blue.asm index cc57c179b2..04509189fe 100644 --- a/skins/_old/Fever/Fever1 blue/Fever_blue.asm +++ b/skins/_old/Fever/Fever1 blue/Fever_blue.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Fever/Fever1 blue/me_skin.inc b/skins/_old/Fever/Fever1 blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Fever/Fever1 blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Fever/Fever1 blue/skin.inc b/skins/_old/Fever/Fever1 blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Fever/Fever1 blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Fever/Fever1 green/Fever_green.asm b/skins/_old/Fever/Fever1 green/Fever_green.asm index 07d3f9fd42..c146ec897e 100644 --- a/skins/_old/Fever/Fever1 green/Fever_green.asm +++ b/skins/_old/Fever/Fever1 green/Fever_green.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Fever/Fever1 green/me_skin.inc b/skins/_old/Fever/Fever1 green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Fever/Fever1 green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Fever/Fever1 green/skin.inc b/skins/_old/Fever/Fever1 green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Fever/Fever1 green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Fever/Fever1 red/Fever_red.asm b/skins/_old/Fever/Fever1 red/Fever_red.asm index 41a8058ee0..b94d7a9334 100644 --- a/skins/_old/Fever/Fever1 red/Fever_red.asm +++ b/skins/_old/Fever/Fever1 red/Fever_red.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Fever/Fever1 red/me_skin.inc b/skins/_old/Fever/Fever1 red/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Fever/Fever1 red/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Fever/Fever1 red/skin.inc b/skins/_old/Fever/Fever1 red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Fever/Fever1 red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Fever/Fever2 blue/Fever_blue.asm b/skins/_old/Fever/Fever2 blue/Fever_blue.asm index 84a73b097d..4f8554f877 100644 --- a/skins/_old/Fever/Fever2 blue/Fever_blue.asm +++ b/skins/_old/Fever/Fever2 blue/Fever_blue.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Fever/Fever2 blue/me_skin.inc b/skins/_old/Fever/Fever2 blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Fever/Fever2 blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Fever/Fever2 blue/skin.inc b/skins/_old/Fever/Fever2 blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Fever/Fever2 blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Fever/Fever2 green/Fever_green.asm b/skins/_old/Fever/Fever2 green/Fever_green.asm index c6bee95b1c..55183e5b1e 100644 --- a/skins/_old/Fever/Fever2 green/Fever_green.asm +++ b/skins/_old/Fever/Fever2 green/Fever_green.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Fever/Fever2 green/me_skin.inc b/skins/_old/Fever/Fever2 green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Fever/Fever2 green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Fever/Fever2 green/skin.inc b/skins/_old/Fever/Fever2 green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Fever/Fever2 green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Fever/Fever2 red/Fever_red.asm b/skins/_old/Fever/Fever2 red/Fever_red.asm index 662d0a1072..fe0bb33ba9 100644 --- a/skins/_old/Fever/Fever2 red/Fever_red.asm +++ b/skins/_old/Fever/Fever2 red/Fever_red.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Fever/Fever2 red/me_skin.inc b/skins/_old/Fever/Fever2 red/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Fever/Fever2 red/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Fever/Fever2 red/skin.inc b/skins/_old/Fever/Fever2 red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Fever/Fever2 red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Flowers/Flowers.asm b/skins/_old/Flowers/Flowers.asm index 9a9aca7309..75c7945063 100644 --- a/skins/_old/Flowers/Flowers.asm +++ b/skins/_old/Flowers/Flowers.asm @@ -1,7 +1,7 @@ ; -- ONLY FOR GIRLS -- -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Flowers/my_skin.inc b/skins/_old/Flowers/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Flowers/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Flowers/skin.inc b/skins/_old/Flowers/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Flowers/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Flyght/Flyght.asm b/skins/_old/Flyght/Flyght.asm index 1016e9216d..3c15958439 100644 --- a/skins/_old/Flyght/Flyght.asm +++ b/skins/_old/Flyght/Flyght.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Flyght/me_skin.inc b/skins/_old/Flyght/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Flyght/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Flyght/skin.inc b/skins/_old/Flyght/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Flyght/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Glass_lime/Glass_lime.asm b/skins/_old/Glass_lime/Glass_lime.asm index 0a698612f2..d727fa59db 100644 --- a/skins/_old/Glass_lime/Glass_lime.asm +++ b/skins/_old/Glass_lime/Glass_lime.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Glass_lime/my_skin.inc b/skins/_old/Glass_lime/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Glass_lime/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Glass_lime/skin.inc b/skins/_old/Glass_lime/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Glass_lime/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Grey/default.asm b/skins/_old/Grey/default.asm index f119a864c7..81efdf6fb6 100644 --- a/skins/_old/Grey/default.asm +++ b/skins/_old/Grey/default.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Grey/my_skin.inc b/skins/_old/Grey/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Grey/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Grey/skin.inc b/skins/_old/Grey/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Grey/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Hearts/Hearts 3d/hearts_3d.asm b/skins/_old/Hearts/Hearts 3d/hearts_3d.asm index a22ba21778..6e4cb2e43b 100644 --- a/skins/_old/Hearts/Hearts 3d/hearts_3d.asm +++ b/skins/_old/Hearts/Hearts 3d/hearts_3d.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Hearts/Hearts 3d/me_skin.inc b/skins/_old/Hearts/Hearts 3d/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Hearts/Hearts 3d/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Hearts/Hearts 3d/skin.inc b/skins/_old/Hearts/Hearts 3d/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Hearts/Hearts 3d/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Hearts/Hearts flat/hearts_flat.asm b/skins/_old/Hearts/Hearts flat/hearts_flat.asm index d33c592215..ff137bb5c9 100644 --- a/skins/_old/Hearts/Hearts flat/hearts_flat.asm +++ b/skins/_old/Hearts/Hearts flat/hearts_flat.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Hearts/Hearts flat/me_skin.inc b/skins/_old/Hearts/Hearts flat/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Hearts/Hearts flat/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Hearts/Hearts flat/skin.inc b/skins/_old/Hearts/Hearts flat/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Hearts/Hearts flat/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Leency/AreaO/default.asm b/skins/_old/Leency/AreaO/default.asm index d134c2a62b..57fef45ddf 100644 --- a/skins/_old/Leency/AreaO/default.asm +++ b/skins/_old/Leency/AreaO/default.asm @@ -1,4 +1,4 @@ -include '../me_skin.inc' +include '../skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/AreaSq/default.asm b/skins/_old/Leency/AreaSq/default.asm index 05245f9669..82ac9f8e87 100644 --- a/skins/_old/Leency/AreaSq/default.asm +++ b/skins/_old/Leency/AreaSq/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/L-Junior/DEFAULT.ASM b/skins/_old/Leency/L-Junior/DEFAULT.ASM index 50cb0a0d8b..fdd996fcb2 100644 --- a/skins/_old/Leency/L-Junior/DEFAULT.ASM +++ b/skins/_old/Leency/L-Junior/DEFAULT.ASM @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Leency/Latte/default.asm b/skins/_old/Leency/Latte/default.asm index 4088272b65..b15a962563 100644 --- a/skins/_old/Leency/Latte/default.asm +++ b/skins/_old/Leency/Latte/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/Luna/default.asm b/skins/_old/Leency/Luna/default.asm index 4ae3ab214d..c70f06b00b 100644 --- a/skins/_old/Leency/Luna/default.asm +++ b/skins/_old/Leency/Luna/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Leency/Octo/default.asm b/skins/_old/Leency/Octo/default.asm index 56e060b188..fe53274dce 100644 --- a/skins/_old/Leency/Octo/default.asm +++ b/skins/_old/Leency/Octo/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/Octo_flat/default.asm b/skins/_old/Leency/Octo_flat/default.asm index af0d150ae8..897179eead 100644 --- a/skins/_old/Leency/Octo_flat/default.asm +++ b/skins/_old/Leency/Octo_flat/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/OpusN/OpusN.asm b/skins/_old/Leency/OpusN/OpusN.asm index 12b328b062..8386c3e070 100644 --- a/skins/_old/Leency/OpusN/OpusN.asm +++ b/skins/_old/Leency/OpusN/OpusN.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Leency/Sandwich/default.asm b/skins/_old/Leency/Sandwich/default.asm index 2cd55874de..fa50622d9d 100644 --- a/skins/_old/Leency/Sandwich/default.asm +++ b/skins/_old/Leency/Sandwich/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/Yeah/default.asm b/skins/_old/Leency/Yeah/default.asm index 254bfffc69..11ced3f47e 100644 --- a/skins/_old/Leency/Yeah/default.asm +++ b/skins/_old/Leency/Yeah/default.asm @@ -1,4 +1,4 @@ -include '..\me_skin.inc' +include '..\skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Leency/me_skin.inc b/skins/_old/Leency/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Leency/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Leency/skin.inc b/skins/_old/Leency/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Leency/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/1.MenuetOS/1/MenuetOS.asm b/skins/_old/MenuetOS/1.MenuetOS/1/MenuetOS.asm index 3db7b92e9a..749c8baceb 100644 --- a/skins/_old/MenuetOS/1.MenuetOS/1/MenuetOS.asm +++ b/skins/_old/MenuetOS/1.MenuetOS/1/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/1.MenuetOS/1/me_skin.inc b/skins/_old/MenuetOS/1.MenuetOS/1/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/1.MenuetOS/1/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/1.MenuetOS/1/skin.inc b/skins/_old/MenuetOS/1.MenuetOS/1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/1.MenuetOS/1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/1.MenuetOS/2/MenuetOS.asm b/skins/_old/MenuetOS/1.MenuetOS/2/MenuetOS.asm index f10dcc33e2..7b2fa6889a 100644 --- a/skins/_old/MenuetOS/1.MenuetOS/2/MenuetOS.asm +++ b/skins/_old/MenuetOS/1.MenuetOS/2/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/1.MenuetOS/2/me_skin.inc b/skins/_old/MenuetOS/1.MenuetOS/2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/1.MenuetOS/2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/1.MenuetOS/2/skin.inc b/skins/_old/MenuetOS/1.MenuetOS/2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/1.MenuetOS/2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/2.MenuetOS/1/MenuetOS.asm b/skins/_old/MenuetOS/2.MenuetOS/1/MenuetOS.asm index e90062839e..fbb1a454b9 100644 --- a/skins/_old/MenuetOS/2.MenuetOS/1/MenuetOS.asm +++ b/skins/_old/MenuetOS/2.MenuetOS/1/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/2.MenuetOS/1/me_skin.inc b/skins/_old/MenuetOS/2.MenuetOS/1/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/2.MenuetOS/1/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/2.MenuetOS/1/skin.inc b/skins/_old/MenuetOS/2.MenuetOS/1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/2.MenuetOS/1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/2.MenuetOS/2/MenuetOS.asm b/skins/_old/MenuetOS/2.MenuetOS/2/MenuetOS.asm index e90062839e..fbb1a454b9 100644 --- a/skins/_old/MenuetOS/2.MenuetOS/2/MenuetOS.asm +++ b/skins/_old/MenuetOS/2.MenuetOS/2/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/2.MenuetOS/2/me_skin.inc b/skins/_old/MenuetOS/2.MenuetOS/2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/2.MenuetOS/2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/2.MenuetOS/2/skin.inc b/skins/_old/MenuetOS/2.MenuetOS/2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/2.MenuetOS/2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/3.MenuetOS/1/MenuetOS.asm b/skins/_old/MenuetOS/3.MenuetOS/1/MenuetOS.asm index 700b473422..51f88e8314 100644 --- a/skins/_old/MenuetOS/3.MenuetOS/1/MenuetOS.asm +++ b/skins/_old/MenuetOS/3.MenuetOS/1/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/3.MenuetOS/1/me_skin.inc b/skins/_old/MenuetOS/3.MenuetOS/1/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/3.MenuetOS/1/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/3.MenuetOS/1/skin.inc b/skins/_old/MenuetOS/3.MenuetOS/1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/3.MenuetOS/1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/3.MenuetOS/2/MenuetOS.asm b/skins/_old/MenuetOS/3.MenuetOS/2/MenuetOS.asm index 700b473422..51f88e8314 100644 --- a/skins/_old/MenuetOS/3.MenuetOS/2/MenuetOS.asm +++ b/skins/_old/MenuetOS/3.MenuetOS/2/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/3.MenuetOS/2/me_skin.inc b/skins/_old/MenuetOS/3.MenuetOS/2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/3.MenuetOS/2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/3.MenuetOS/2/skin.inc b/skins/_old/MenuetOS/3.MenuetOS/2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/3.MenuetOS/2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/4.MenuetOS/1/MenuetOS.asm b/skins/_old/MenuetOS/4.MenuetOS/1/MenuetOS.asm index 15d04592af..c26e59cb37 100644 --- a/skins/_old/MenuetOS/4.MenuetOS/1/MenuetOS.asm +++ b/skins/_old/MenuetOS/4.MenuetOS/1/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/4.MenuetOS/1/me_skin.inc b/skins/_old/MenuetOS/4.MenuetOS/1/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/4.MenuetOS/1/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/4.MenuetOS/1/skin.inc b/skins/_old/MenuetOS/4.MenuetOS/1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/4.MenuetOS/1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/4.MenuetOS/2/MenuetOS.asm b/skins/_old/MenuetOS/4.MenuetOS/2/MenuetOS.asm index ce0e547ed4..e530ca2240 100644 --- a/skins/_old/MenuetOS/4.MenuetOS/2/MenuetOS.asm +++ b/skins/_old/MenuetOS/4.MenuetOS/2/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/4.MenuetOS/2/me_skin.inc b/skins/_old/MenuetOS/4.MenuetOS/2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/4.MenuetOS/2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/4.MenuetOS/2/skin.inc b/skins/_old/MenuetOS/4.MenuetOS/2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/4.MenuetOS/2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/5.MenuetOS/1/MenuetOS.asm b/skins/_old/MenuetOS/5.MenuetOS/1/MenuetOS.asm index 0998f5f775..81f277995d 100644 --- a/skins/_old/MenuetOS/5.MenuetOS/1/MenuetOS.asm +++ b/skins/_old/MenuetOS/5.MenuetOS/1/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/5.MenuetOS/1/me_skin.inc b/skins/_old/MenuetOS/5.MenuetOS/1/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/5.MenuetOS/1/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/5.MenuetOS/1/skin.inc b/skins/_old/MenuetOS/5.MenuetOS/1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/5.MenuetOS/1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MenuetOS/5.MenuetOS/2/MenuetOS.asm b/skins/_old/MenuetOS/5.MenuetOS/2/MenuetOS.asm index 0998f5f775..81f277995d 100644 --- a/skins/_old/MenuetOS/5.MenuetOS/2/MenuetOS.asm +++ b/skins/_old/MenuetOS/5.MenuetOS/2/MenuetOS.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MenuetOS/5.MenuetOS/2/me_skin.inc b/skins/_old/MenuetOS/5.MenuetOS/2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MenuetOS/5.MenuetOS/2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MenuetOS/5.MenuetOS/2/skin.inc b/skins/_old/MenuetOS/5.MenuetOS/2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MenuetOS/5.MenuetOS/2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MetalColor/MCBlue/MCBlue.asm b/skins/_old/MetalColor/MCBlue/MCBlue.asm index e623bd726f..9839e167fe 100644 --- a/skins/_old/MetalColor/MCBlue/MCBlue.asm +++ b/skins/_old/MetalColor/MCBlue/MCBlue.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MetalColor/MCBlue/my_skin.inc b/skins/_old/MetalColor/MCBlue/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MetalColor/MCBlue/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MetalColor/MCBlue/skin.inc b/skins/_old/MetalColor/MCBlue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MetalColor/MCBlue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MetalColor/MCRed/MCRed.asm b/skins/_old/MetalColor/MCRed/MCRed.asm index 406355c26d..bd7360cd8b 100644 --- a/skins/_old/MetalColor/MCRed/MCRed.asm +++ b/skins/_old/MetalColor/MCRed/MCRed.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MetalColor/MCRed/my_skin.inc b/skins/_old/MetalColor/MCRed/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MetalColor/MCRed/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MetalColor/MCRed/skin.inc b/skins/_old/MetalColor/MCRed/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MetalColor/MCRed/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MetalGearArrows/1.MetalGearArrows/1.MetalGearArrows.asm b/skins/_old/MetalGearArrows/1.MetalGearArrows/1.MetalGearArrows.asm index f580796824..130d82e4e3 100644 --- a/skins/_old/MetalGearArrows/1.MetalGearArrows/1.MetalGearArrows.asm +++ b/skins/_old/MetalGearArrows/1.MetalGearArrows/1.MetalGearArrows.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MetalGearArrows/1.MetalGearArrows/me_skin.inc b/skins/_old/MetalGearArrows/1.MetalGearArrows/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MetalGearArrows/1.MetalGearArrows/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MetalGearArrows/1.MetalGearArrows/skin.inc b/skins/_old/MetalGearArrows/1.MetalGearArrows/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MetalGearArrows/1.MetalGearArrows/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MetalGearArrows/2.MetalGearArrows/2.MetalGearArrows.asm b/skins/_old/MetalGearArrows/2.MetalGearArrows/2.MetalGearArrows.asm index f8dfa162cb..f06fd9d2a6 100644 --- a/skins/_old/MetalGearArrows/2.MetalGearArrows/2.MetalGearArrows.asm +++ b/skins/_old/MetalGearArrows/2.MetalGearArrows/2.MetalGearArrows.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MetalGearArrows/2.MetalGearArrows/me_skin.inc b/skins/_old/MetalGearArrows/2.MetalGearArrows/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MetalGearArrows/2.MetalGearArrows/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MetalGearArrows/2.MetalGearArrows/skin.inc b/skins/_old/MetalGearArrows/2.MetalGearArrows/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MetalGearArrows/2.MetalGearArrows/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MetalGearArrows/3.MetalGearArrows/3.MetalGearArrows.asm b/skins/_old/MetalGearArrows/3.MetalGearArrows/3.MetalGearArrows.asm index 28ffe592d1..419206cf4f 100644 --- a/skins/_old/MetalGearArrows/3.MetalGearArrows/3.MetalGearArrows.asm +++ b/skins/_old/MetalGearArrows/3.MetalGearArrows/3.MetalGearArrows.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MetalGearArrows/3.MetalGearArrows/me_skin.inc b/skins/_old/MetalGearArrows/3.MetalGearArrows/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MetalGearArrows/3.MetalGearArrows/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MetalGearArrows/3.MetalGearArrows/skin.inc b/skins/_old/MetalGearArrows/3.MetalGearArrows/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MetalGearArrows/3.MetalGearArrows/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MetalGearArrows/4.MetalGearArrows/4.MetalGearArrows.asm b/skins/_old/MetalGearArrows/4.MetalGearArrows/4.MetalGearArrows.asm index 90fe6989dd..828277b3d2 100644 --- a/skins/_old/MetalGearArrows/4.MetalGearArrows/4.MetalGearArrows.asm +++ b/skins/_old/MetalGearArrows/4.MetalGearArrows/4.MetalGearArrows.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MetalGearArrows/4.MetalGearArrows/me_skin.inc b/skins/_old/MetalGearArrows/4.MetalGearArrows/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MetalGearArrows/4.MetalGearArrows/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MetalGearArrows/4.MetalGearArrows/skin.inc b/skins/_old/MetalGearArrows/4.MetalGearArrows/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MetalGearArrows/4.MetalGearArrows/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/MyTango/default.asm b/skins/_old/MyTango/default.asm index c1ea7c2fd5..4204234785 100644 --- a/skins/_old/MyTango/default.asm +++ b/skins/_old/MyTango/default.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/MyTango/my_skin.inc b/skins/_old/MyTango/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/MyTango/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/MyTango/skin.inc b/skins/_old/MyTango/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/MyTango/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nature/Nature.asm b/skins/_old/Nature/Nature.asm index 17c43fbb22..fbbc7ad83a 100644 --- a/skins/_old/Nature/Nature.asm +++ b/skins/_old/Nature/Nature.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nature/Sandwich/src/default.asm b/skins/_old/Nature/Sandwich/src/default.asm index e84bbe2cea..583091eaf5 100644 --- a/skins/_old/Nature/Sandwich/src/default.asm +++ b/skins/_old/Nature/Sandwich/src/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height diff --git a/skins/_old/Nature/Sandwich/src/me_skin.inc b/skins/_old/Nature/Sandwich/src/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nature/Sandwich/src/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nature/Sandwich/src/skin.inc b/skins/_old/Nature/Sandwich/src/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nature/Sandwich/src/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nature/me_skin.inc b/skins/_old/Nature/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nature/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nature/skin.inc b/skins/_old/Nature/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nature/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_blue/Nova_blue.asm b/skins/_old/Nova_skins/Nova_blue/Nova_blue.asm index 8b2be8e92c..2c97cd8232 100644 --- a/skins/_old/Nova_skins/Nova_blue/Nova_blue.asm +++ b/skins/_old/Nova_skins/Nova_blue/Nova_blue.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_blue/my_skin.inc b/skins/_old/Nova_skins/Nova_blue/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_blue/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_blue/skin.inc b/skins/_old/Nova_skins/Nova_blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_brown/Nova_brown.asm b/skins/_old/Nova_skins/Nova_brown/Nova_brown.asm index 247966e44f..24d8075dd6 100644 --- a/skins/_old/Nova_skins/Nova_brown/Nova_brown.asm +++ b/skins/_old/Nova_skins/Nova_brown/Nova_brown.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_brown/my_skin.inc b/skins/_old/Nova_skins/Nova_brown/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_brown/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_brown/skin.inc b/skins/_old/Nova_skins/Nova_brown/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_brown/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_green/Nova_green.asm b/skins/_old/Nova_skins/Nova_green/Nova_green.asm index 845ba55ec1..388605ff8c 100644 --- a/skins/_old/Nova_skins/Nova_green/Nova_green.asm +++ b/skins/_old/Nova_skins/Nova_green/Nova_green.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_green/my_skin.inc b/skins/_old/Nova_skins/Nova_green/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_green/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_green/skin.inc b/skins/_old/Nova_skins/Nova_green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_grey/Nova_grey.asm b/skins/_old/Nova_skins/Nova_grey/Nova_grey.asm index 3dc1e12cea..8c96e18ea1 100644 --- a/skins/_old/Nova_skins/Nova_grey/Nova_grey.asm +++ b/skins/_old/Nova_skins/Nova_grey/Nova_grey.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_grey/my_skin.inc b/skins/_old/Nova_skins/Nova_grey/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_grey/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_grey/skin.inc b/skins/_old/Nova_skins/Nova_grey/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_grey/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_pink/Nova_pink.asm b/skins/_old/Nova_skins/Nova_pink/Nova_pink.asm index 16e7743963..9f8137acfa 100644 --- a/skins/_old/Nova_skins/Nova_pink/Nova_pink.asm +++ b/skins/_old/Nova_skins/Nova_pink/Nova_pink.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_pink/my_skin.inc b/skins/_old/Nova_skins/Nova_pink/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_pink/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_pink/skin.inc b/skins/_old/Nova_skins/Nova_pink/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_pink/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_red/Nova_red.asm b/skins/_old/Nova_skins/Nova_red/Nova_red.asm index 741edafa2e..3d2aa4026e 100644 --- a/skins/_old/Nova_skins/Nova_red/Nova_red.asm +++ b/skins/_old/Nova_skins/Nova_red/Nova_red.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_red/my_skin.inc b/skins/_old/Nova_skins/Nova_red/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_red/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_red/skin.inc b/skins/_old/Nova_skins/Nova_red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Nova_skins/Nova_violet/Nova_violet.asm b/skins/_old/Nova_skins/Nova_violet/Nova_violet.asm index cd40d2286f..3119a44c35 100644 --- a/skins/_old/Nova_skins/Nova_violet/Nova_violet.asm +++ b/skins/_old/Nova_skins/Nova_violet/Nova_violet.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Nova_skins/Nova_violet/my_skin.inc b/skins/_old/Nova_skins/Nova_violet/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Nova_skins/Nova_violet/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Nova_skins/Nova_violet/skin.inc b/skins/_old/Nova_skins/Nova_violet/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Nova_skins/Nova_violet/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/OpusOs_Blue/OpusOs_Blue.asm b/skins/_old/OpusOs_Blue/OpusOs_Blue.asm index ce5d778ada..d25bdb080e 100644 --- a/skins/_old/OpusOs_Blue/OpusOs_Blue.asm +++ b/skins/_old/OpusOs_Blue/OpusOs_Blue.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/OpusOs_Blue/my_skin.inc b/skins/_old/OpusOs_Blue/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/OpusOs_Blue/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/OpusOs_Blue/skin.inc b/skins/_old/OpusOs_Blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/OpusOs_Blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Orange_Silence/Orange_Silence.asm b/skins/_old/Orange_Silence/Orange_Silence.asm index 3f1ddbcd4b..5e4f67704f 100644 --- a/skins/_old/Orange_Silence/Orange_Silence.asm +++ b/skins/_old/Orange_Silence/Orange_Silence.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Orange_Silence/me_skin.inc b/skins/_old/Orange_Silence/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Orange_Silence/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Orange_Silence/skin.inc b/skins/_old/Orange_Silence/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Orange_Silence/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Orange_aureole/me_skin.inc b/skins/_old/Orange_aureole/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Orange_aureole/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Orange_aureole/orange_aureole.asm b/skins/_old/Orange_aureole/orange_aureole.asm index 9e9f127875..4236ed730f 100644 --- a/skins/_old/Orange_aureole/orange_aureole.asm +++ b/skins/_old/Orange_aureole/orange_aureole.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Orange_aureole/skin.inc b/skins/_old/Orange_aureole/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Orange_aureole/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Organics/Organics.asm b/skins/_old/Organics/Organics.asm index 3879b16c69..7c1f13c82d 100644 --- a/skins/_old/Organics/Organics.asm +++ b/skins/_old/Organics/Organics.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Organics/my_skin.inc b/skins/_old/Organics/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Organics/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Organics/skin.inc b/skins/_old/Organics/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Organics/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Rednex/Rednex.asm b/skins/_old/Rednex/Rednex.asm index c51c1d88b6..037c821644 100644 --- a/skins/_old/Rednex/Rednex.asm +++ b/skins/_old/Rednex/Rednex.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Rednex/my_skin.inc b/skins/_old/Rednex/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Rednex/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Rednex/skin.inc b/skins/_old/Rednex/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Rednex/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/RoboTech/BRoboTech/BRoboTech.asm b/skins/_old/RoboTech/BRoboTech/BRoboTech.asm index 58c4cab94b..27e33aa4d5 100644 --- a/skins/_old/RoboTech/BRoboTech/BRoboTech.asm +++ b/skins/_old/RoboTech/BRoboTech/BRoboTech.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/RoboTech/BRoboTech/me_skin.inc b/skins/_old/RoboTech/BRoboTech/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/RoboTech/BRoboTech/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/RoboTech/BRoboTech/skin.inc b/skins/_old/RoboTech/BRoboTech/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/RoboTech/BRoboTech/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/RoboTech/GRoboTech/GRoboTech.asm b/skins/_old/RoboTech/GRoboTech/GRoboTech.asm index 1da80f4a74..8c8f305032 100644 --- a/skins/_old/RoboTech/GRoboTech/GRoboTech.asm +++ b/skins/_old/RoboTech/GRoboTech/GRoboTech.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/RoboTech/GRoboTech/me_skin.inc b/skins/_old/RoboTech/GRoboTech/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/RoboTech/GRoboTech/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/RoboTech/GRoboTech/skin.inc b/skins/_old/RoboTech/GRoboTech/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/RoboTech/GRoboTech/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Russia/me_skin.inc b/skins/_old/Russia/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Russia/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Russia/russia.asm b/skins/_old/Russia/russia.asm index 84ee1c2083..abe5bebccf 100644 --- a/skins/_old/Russia/russia.asm +++ b/skins/_old/Russia/russia.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Russia/skin.inc b/skins/_old/Russia/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Russia/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Sad_grey/default.asm b/skins/_old/Sad_grey/default.asm index a08abd301e..1c4649f4ad 100644 --- a/skins/_old/Sad_grey/default.asm +++ b/skins/_old/Sad_grey/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Sad_grey/me_skin.inc b/skins/_old/Sad_grey/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Sad_grey/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Sad_grey/skin.inc b/skins/_old/Sad_grey/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Sad_grey/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/SashSkinPack_1_1/Src/Aqua/Aqua.asm b/skins/_old/SashSkinPack_1_1/Src/Aqua/Aqua.asm index dbe346887e..67023f97ea 100644 --- a/skins/_old/SashSkinPack_1_1/Src/Aqua/Aqua.asm +++ b/skins/_old/SashSkinPack_1_1/Src/Aqua/Aqua.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/SashSkinPack_1_1/Src/Aqua/me_skin.inc b/skins/_old/SashSkinPack_1_1/Src/Aqua/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/SashSkinPack_1_1/Src/Aqua/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/SashSkinPack_1_1/Src/Aqua/skin.inc b/skins/_old/SashSkinPack_1_1/Src/Aqua/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/SashSkinPack_1_1/Src/Aqua/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/SashSkinPack_1_1/Src/Cold/Cold.asm b/skins/_old/SashSkinPack_1_1/Src/Cold/Cold.asm index 5751c9fee9..9d7079926f 100644 --- a/skins/_old/SashSkinPack_1_1/Src/Cold/Cold.asm +++ b/skins/_old/SashSkinPack_1_1/Src/Cold/Cold.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/SashSkinPack_1_1/Src/Cold/me_skin.inc b/skins/_old/SashSkinPack_1_1/Src/Cold/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/SashSkinPack_1_1/Src/Cold/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/SashSkinPack_1_1/Src/Cold/skin.inc b/skins/_old/SashSkinPack_1_1/Src/Cold/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/SashSkinPack_1_1/Src/Cold/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/SashSkinPack_1_1/Src/Metal/Metal.asm b/skins/_old/SashSkinPack_1_1/Src/Metal/Metal.asm index 6851b0b131..46a3f66689 100644 --- a/skins/_old/SashSkinPack_1_1/Src/Metal/Metal.asm +++ b/skins/_old/SashSkinPack_1_1/Src/Metal/Metal.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/SashSkinPack_1_1/Src/Metal/me_skin.inc b/skins/_old/SashSkinPack_1_1/Src/Metal/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/SashSkinPack_1_1/Src/Metal/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/SashSkinPack_1_1/Src/Metal/skin.inc b/skins/_old/SashSkinPack_1_1/Src/Metal/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/SashSkinPack_1_1/Src/Metal/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Simple_gray/simple_gray.ASM b/skins/_old/Simple_gray/simple_gray.ASM index c9d658ed8a..bffe289426 100644 --- a/skins/_old/Simple_gray/simple_gray.ASM +++ b/skins/_old/Simple_gray/simple_gray.ASM @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Simple_gray/skin.inc b/skins/_old/Simple_gray/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Simple_gray/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleVista/vista/default.asm b/skins/_old/StyleVista/vista/default.asm index 64c1a5929d..d288e5869b 100644 --- a/skins/_old/StyleVista/vista/default.asm +++ b/skins/_old/StyleVista/vista/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleVista/vista/me_skin.inc b/skins/_old/StyleVista/vista/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleVista/vista/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleVista/vista/skin.inc b/skins/_old/StyleVista/vista/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleVista/vista/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleVista/vista_basic/default.asm b/skins/_old/StyleVista/vista_basic/default.asm index 85743ddf4e..5d5f707d21 100644 --- a/skins/_old/StyleVista/vista_basic/default.asm +++ b/skins/_old/StyleVista/vista_basic/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleVista/vista_basic/me_skin.inc b/skins/_old/StyleVista/vista_basic/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleVista/vista_basic/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleVista/vista_basic/skin.inc b/skins/_old/StyleVista/vista_basic/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleVista/vista_basic/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleVista/vista_basic_black/default.asm b/skins/_old/StyleVista/vista_basic_black/default.asm index b10c4c872f..bf4ec822a9 100644 --- a/skins/_old/StyleVista/vista_basic_black/default.asm +++ b/skins/_old/StyleVista/vista_basic_black/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleVista/vista_basic_black/me_skin.inc b/skins/_old/StyleVista/vista_basic_black/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleVista/vista_basic_black/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleVista/vista_basic_black/skin.inc b/skins/_old/StyleVista/vista_basic_black/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleVista/vista_basic_black/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleVista/vista_dark/default.asm b/skins/_old/StyleVista/vista_dark/default.asm index 64c1a5929d..d288e5869b 100644 --- a/skins/_old/StyleVista/vista_dark/default.asm +++ b/skins/_old/StyleVista/vista_dark/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleVista/vista_dark/me_skin.inc b/skins/_old/StyleVista/vista_dark/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleVista/vista_dark/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleVista/vista_dark/skin.inc b/skins/_old/StyleVista/vista_dark/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleVista/vista_dark/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleXP/orqua/default.asm b/skins/_old/StyleXP/orqua/default.asm index f01dbf5212..0c31e94f48 100644 --- a/skins/_old/StyleXP/orqua/default.asm +++ b/skins/_old/StyleXP/orqua/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleXP/orqua/me_skin.inc b/skins/_old/StyleXP/orqua/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleXP/orqua/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleXP/orqua/skin.inc b/skins/_old/StyleXP/orqua/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleXP/orqua/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleXP/panther/default.asm b/skins/_old/StyleXP/panther/default.asm index fd9532330f..2372d35f0d 100644 --- a/skins/_old/StyleXP/panther/default.asm +++ b/skins/_old/StyleXP/panther/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleXP/panther/me_skin.inc b/skins/_old/StyleXP/panther/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleXP/panther/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleXP/panther/skin.inc b/skins/_old/StyleXP/panther/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleXP/panther/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/StyleXP/wmpx/default.asm b/skins/_old/StyleXP/wmpx/default.asm index 59c0648d30..da091d1847 100644 --- a/skins/_old/StyleXP/wmpx/default.asm +++ b/skins/_old/StyleXP/wmpx/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/StyleXP/wmpx/me_skin.inc b/skins/_old/StyleXP/wmpx/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/StyleXP/wmpx/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/StyleXP/wmpx/skin.inc b/skins/_old/StyleXP/wmpx/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/StyleXP/wmpx/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Syllable/Syllable.asm b/skins/_old/Syllable/Syllable.asm index 18d8b76af9..a2663182f4 100644 --- a/skins/_old/Syllable/Syllable.asm +++ b/skins/_old/Syllable/Syllable.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Syllable/my_skin.inc b/skins/_old/Syllable/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Syllable/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Syllable/skin.inc b/skins/_old/Syllable/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Syllable/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/USSR/USSR.asm b/skins/_old/USSR/USSR.asm index 1d82b53540..21e66eb1c6 100644 --- a/skins/_old/USSR/USSR.asm +++ b/skins/_old/USSR/USSR.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/USSR/me_skin.inc b/skins/_old/USSR/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/USSR/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/USSR/skin.inc b/skins/_old/USSR/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/USSR/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/USSR_2/1.USSR_2/1.USSR_2.asm b/skins/_old/USSR_2/1.USSR_2/1.USSR_2.asm index 766a0da66f..23012c159b 100644 --- a/skins/_old/USSR_2/1.USSR_2/1.USSR_2.asm +++ b/skins/_old/USSR_2/1.USSR_2/1.USSR_2.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/USSR_2/1.USSR_2/me_skin.inc b/skins/_old/USSR_2/1.USSR_2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/USSR_2/1.USSR_2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/USSR_2/1.USSR_2/skin.inc b/skins/_old/USSR_2/1.USSR_2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/USSR_2/1.USSR_2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/USSR_2/2.USSR_2/2.USSR_2.asm b/skins/_old/USSR_2/2.USSR_2/2.USSR_2.asm index 766a0da66f..23012c159b 100644 --- a/skins/_old/USSR_2/2.USSR_2/2.USSR_2.asm +++ b/skins/_old/USSR_2/2.USSR_2/2.USSR_2.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/USSR_2/2.USSR_2/me_skin.inc b/skins/_old/USSR_2/2.USSR_2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/USSR_2/2.USSR_2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/USSR_2/2.USSR_2/skin.inc b/skins/_old/USSR_2/2.USSR_2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/USSR_2/2.USSR_2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/Victory_1945/Victory_1945.asm b/skins/_old/Victory_1945/Victory_1945.asm index 63af254238..ebf0576c8c 100644 --- a/skins/_old/Victory_1945/Victory_1945.asm +++ b/skins/_old/Victory_1945/Victory_1945.asm @@ -1,7 +1,7 @@ ; Çäåëàíî êî äíþ ïîáåäû 9_ìàÿ, â ïàìÿòü î âñåõ òåõ, êòî îñâîáàæäàë Ðîññèþ îò ôàøèñòîâ. ; (Äàòà ñîçäàíèÿ - 3_ìàÿ_2009ã) -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/Victory_1945/me_skin.inc b/skins/_old/Victory_1945/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/Victory_1945/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/Victory_1945/skin.inc b/skins/_old/Victory_1945/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/Victory_1945/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WIN311/Win311.asm b/skins/_old/WIN311/Win311.asm index 88d3c16ce1..6a406cb560 100644 --- a/skins/_old/WIN311/Win311.asm +++ b/skins/_old/WIN311/Win311.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WIN311/my_skin.inc b/skins/_old/WIN311/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WIN311/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WIN311/skin.inc b/skins/_old/WIN311/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WIN311/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic black/WinXP_Classic_black.asm b/skins/_old/WindowsXP/WinXP Classic black/WinXP_Classic_black.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic black/WinXP_Classic_black.asm +++ b/skins/_old/WindowsXP/WinXP Classic black/WinXP_Classic_black.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic black/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic black/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic black/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic black/skin.inc b/skins/_old/WindowsXP/WinXP Classic black/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic black/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic blue/WinXP_Classic_blue.asm b/skins/_old/WindowsXP/WinXP Classic blue/WinXP_Classic_blue.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic blue/WinXP_Classic_blue.asm +++ b/skins/_old/WindowsXP/WinXP Classic blue/WinXP_Classic_blue.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic blue/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic blue/skin.inc b/skins/_old/WindowsXP/WinXP Classic blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic green/WinXP_Classic_green.asm b/skins/_old/WindowsXP/WinXP Classic green/WinXP_Classic_green.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic green/WinXP_Classic_green.asm +++ b/skins/_old/WindowsXP/WinXP Classic green/WinXP_Classic_green.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic green/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic green/skin.inc b/skins/_old/WindowsXP/WinXP Classic green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic orange/WinXP_Classic_orange.asm b/skins/_old/WindowsXP/WinXP Classic orange/WinXP_Classic_orange.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic orange/WinXP_Classic_orange.asm +++ b/skins/_old/WindowsXP/WinXP Classic orange/WinXP_Classic_orange.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic orange/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic orange/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic orange/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic orange/skin.inc b/skins/_old/WindowsXP/WinXP Classic orange/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic orange/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic pink/WinXP_Classic_pink.asm b/skins/_old/WindowsXP/WinXP Classic pink/WinXP_Classic_pink.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic pink/WinXP_Classic_pink.asm +++ b/skins/_old/WindowsXP/WinXP Classic pink/WinXP_Classic_pink.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic pink/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic pink/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic pink/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic pink/skin.inc b/skins/_old/WindowsXP/WinXP Classic pink/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic pink/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic red/WinXP_Classic_red.asm b/skins/_old/WindowsXP/WinXP Classic red/WinXP_Classic_red.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic red/WinXP_Classic_red.asm +++ b/skins/_old/WindowsXP/WinXP Classic red/WinXP_Classic_red.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic red/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic red/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic red/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic red/skin.inc b/skins/_old/WindowsXP/WinXP Classic red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic violet/WinXP_Classic_violet.asm b/skins/_old/WindowsXP/WinXP Classic violet/WinXP_Classic_violet.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic violet/WinXP_Classic_violet.asm +++ b/skins/_old/WindowsXP/WinXP Classic violet/WinXP_Classic_violet.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic violet/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic violet/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic violet/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic violet/skin.inc b/skins/_old/WindowsXP/WinXP Classic violet/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic violet/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Classic yellow/WinXP_Classic_yellow.asm b/skins/_old/WindowsXP/WinXP Classic yellow/WinXP_Classic_yellow.asm index a0ea23ab27..5a599f67d3 100644 --- a/skins/_old/WindowsXP/WinXP Classic yellow/WinXP_Classic_yellow.asm +++ b/skins/_old/WindowsXP/WinXP Classic yellow/WinXP_Classic_yellow.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Classic yellow/me_skin.inc b/skins/_old/WindowsXP/WinXP Classic yellow/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Classic yellow/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Classic yellow/skin.inc b/skins/_old/WindowsXP/WinXP Classic yellow/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Classic yellow/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Standard blue/WinXP_blue.asm b/skins/_old/WindowsXP/WinXP Standard blue/WinXP_blue.asm index f34c145704..382656f729 100644 --- a/skins/_old/WindowsXP/WinXP Standard blue/WinXP_blue.asm +++ b/skins/_old/WindowsXP/WinXP Standard blue/WinXP_blue.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Standard blue/me_skin.inc b/skins/_old/WindowsXP/WinXP Standard blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Standard blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Standard blue/skin.inc b/skins/_old/WindowsXP/WinXP Standard blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Standard blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Standard olive_green/WinXP_olive_green.asm b/skins/_old/WindowsXP/WinXP Standard olive_green/WinXP_olive_green.asm index 09b0ba8cf0..b5e30afe9e 100644 --- a/skins/_old/WindowsXP/WinXP Standard olive_green/WinXP_olive_green.asm +++ b/skins/_old/WindowsXP/WinXP Standard olive_green/WinXP_olive_green.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Standard olive_green/me_skin.inc b/skins/_old/WindowsXP/WinXP Standard olive_green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Standard olive_green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Standard olive_green/skin.inc b/skins/_old/WindowsXP/WinXP Standard olive_green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Standard olive_green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/WindowsXP/WinXP Standard silver/WinXP_silver.asm b/skins/_old/WindowsXP/WinXP Standard silver/WinXP_silver.asm index 27673b13ef..18e1e5cfe6 100644 --- a/skins/_old/WindowsXP/WinXP Standard silver/WinXP_silver.asm +++ b/skins/_old/WindowsXP/WinXP Standard silver/WinXP_silver.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/WindowsXP/WinXP Standard silver/me_skin.inc b/skins/_old/WindowsXP/WinXP Standard silver/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/WindowsXP/WinXP Standard silver/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/WindowsXP/WinXP Standard silver/skin.inc b/skins/_old/WindowsXP/WinXP Standard silver/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/WindowsXP/WinXP Standard silver/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/bat/default.asm b/skins/_old/bat/default.asm index 2a7646cfb9..b45e7d12db 100644 --- a/skins/_old/bat/default.asm +++ b/skins/_old/bat/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/bat/me_skin.inc b/skins/_old/bat/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/bat/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/bat/skin.inc b/skins/_old/bat/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/bat/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/blackskin/default.asm b/skins/_old/blackskin/default.asm index 0db250e535..0e7a062ab6 100644 --- a/skins/_old/blackskin/default.asm +++ b/skins/_old/blackskin/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/blackskin/me_skin.inc b/skins/_old/blackskin/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/blackskin/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/blackskin/skin.inc b/skins/_old/blackskin/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/blackskin/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/cherry/default.asm b/skins/_old/cherry/default.asm index df95cf9b57..f63f33ed42 100644 --- a/skins/_old/cherry/default.asm +++ b/skins/_old/cherry/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/cherry/me_skin.inc b/skins/_old/cherry/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/cherry/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/cherry/skin.inc b/skins/_old/cherry/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/cherry/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/dark_night/default.asm b/skins/_old/dark_night/default.asm index 6b418f61ac..f542857783 100644 --- a/skins/_old/dark_night/default.asm +++ b/skins/_old/dark_night/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/dark_night/me_skin.inc b/skins/_old/dark_night/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/dark_night/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/dark_night/skin.inc b/skins/_old/dark_night/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/dark_night/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/falloutskn/default.asm b/skins/_old/falloutskn/default.asm index c276dca871..f7bd2de806 100644 --- a/skins/_old/falloutskn/default.asm +++ b/skins/_old/falloutskn/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/falloutskn/skin.inc b/skins/_old/falloutskn/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/falloutskn/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/first_skin/default.asm b/skins/_old/first_skin/default.asm index a0d42fd487..3653249534 100644 --- a/skins/_old/first_skin/default.asm +++ b/skins/_old/first_skin/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/first_skin/skin.inc b/skins/_old/first_skin/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/first_skin/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gliteskin/gliteskin_deepsky/default.asm b/skins/_old/gliteskin/gliteskin_deepsky/default.asm index d3efb5183a..f93f4db547 100644 --- a/skins/_old/gliteskin/gliteskin_deepsky/default.asm +++ b/skins/_old/gliteskin/gliteskin_deepsky/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gliteskin/gliteskin_deepsky/me_skin.inc b/skins/_old/gliteskin/gliteskin_deepsky/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gliteskin/gliteskin_deepsky/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gliteskin/gliteskin_deepsky/skin.inc b/skins/_old/gliteskin/gliteskin_deepsky/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gliteskin/gliteskin_deepsky/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gliteskin/gliteskin_glider/default.asm b/skins/_old/gliteskin/gliteskin_glider/default.asm index 58bae48436..fd493349d8 100644 --- a/skins/_old/gliteskin/gliteskin_glider/default.asm +++ b/skins/_old/gliteskin/gliteskin_glider/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gliteskin/gliteskin_glider/me_skin.inc b/skins/_old/gliteskin/gliteskin_glider/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gliteskin/gliteskin_glider/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gliteskin/gliteskin_glider/skin.inc b/skins/_old/gliteskin/gliteskin_glider/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gliteskin/gliteskin_glider/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gliteskin/gliteskin_red/default.asm b/skins/_old/gliteskin/gliteskin_red/default.asm index e7b503f308..760f986cdf 100644 --- a/skins/_old/gliteskin/gliteskin_red/default.asm +++ b/skins/_old/gliteskin/gliteskin_red/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gliteskin/gliteskin_red/me_skin.inc b/skins/_old/gliteskin/gliteskin_red/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gliteskin/gliteskin_red/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gliteskin/gliteskin_red/skin.inc b/skins/_old/gliteskin/gliteskin_red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gliteskin/gliteskin_red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gnome_style/gnome_blue/default.asm b/skins/_old/gnome_style/gnome_blue/default.asm index 5e92ccdbaf..dac81d2c21 100644 --- a/skins/_old/gnome_style/gnome_blue/default.asm +++ b/skins/_old/gnome_style/gnome_blue/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gnome_style/gnome_blue/me_skin.inc b/skins/_old/gnome_style/gnome_blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gnome_style/gnome_blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gnome_style/gnome_blue/skin.inc b/skins/_old/gnome_style/gnome_blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gnome_style/gnome_blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gnome_style/gnome_green/default.asm b/skins/_old/gnome_style/gnome_green/default.asm index c451e56f33..2e672afbaf 100644 --- a/skins/_old/gnome_style/gnome_green/default.asm +++ b/skins/_old/gnome_style/gnome_green/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gnome_style/gnome_green/me_skin.inc b/skins/_old/gnome_style/gnome_green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gnome_style/gnome_green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gnome_style/gnome_green/skin.inc b/skins/_old/gnome_style/gnome_green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gnome_style/gnome_green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gnome_style/gnome_ocean/default.asm b/skins/_old/gnome_style/gnome_ocean/default.asm index 67bcf7a923..534ff67c93 100644 --- a/skins/_old/gnome_style/gnome_ocean/default.asm +++ b/skins/_old/gnome_style/gnome_ocean/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gnome_style/gnome_ocean/me_skin.inc b/skins/_old/gnome_style/gnome_ocean/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gnome_style/gnome_ocean/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gnome_style/gnome_ocean/skin.inc b/skins/_old/gnome_style/gnome_ocean/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gnome_style/gnome_ocean/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gnome_style/gnome_olive/default.asm b/skins/_old/gnome_style/gnome_olive/default.asm index 40719c834b..9a8fca18f8 100644 --- a/skins/_old/gnome_style/gnome_olive/default.asm +++ b/skins/_old/gnome_style/gnome_olive/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gnome_style/gnome_olive/me_skin.inc b/skins/_old/gnome_style/gnome_olive/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gnome_style/gnome_olive/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gnome_style/gnome_olive/skin.inc b/skins/_old/gnome_style/gnome_olive/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gnome_style/gnome_olive/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gnome_style/gnome_orange/default.asm b/skins/_old/gnome_style/gnome_orange/default.asm index 4f3312377b..e5497d86ab 100644 --- a/skins/_old/gnome_style/gnome_orange/default.asm +++ b/skins/_old/gnome_style/gnome_orange/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gnome_style/gnome_orange/me_skin.inc b/skins/_old/gnome_style/gnome_orange/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gnome_style/gnome_orange/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gnome_style/gnome_orange/skin.inc b/skins/_old/gnome_style/gnome_orange/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gnome_style/gnome_orange/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/gnome_style/gnome_red/default.asm b/skins/_old/gnome_style/gnome_red/default.asm index c52dee82d2..e9ed7a2608 100644 --- a/skins/_old/gnome_style/gnome_red/default.asm +++ b/skins/_old/gnome_style/gnome_red/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/gnome_style/gnome_red/me_skin.inc b/skins/_old/gnome_style/gnome_red/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/gnome_style/gnome_red/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/gnome_style/gnome_red/skin.inc b/skins/_old/gnome_style/gnome_red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/gnome_style/gnome_red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/Humanoid_OSX_dark/default.asm b/skins/_old/humanoid_OSX/Humanoid_OSX_dark/default.asm index 7ec86ec773..d872e1f35f 100644 --- a/skins/_old/humanoid_OSX/Humanoid_OSX_dark/default.asm +++ b/skins/_old/humanoid_OSX/Humanoid_OSX_dark/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/Humanoid_OSX_dark/me_skin.inc b/skins/_old/humanoid_OSX/Humanoid_OSX_dark/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/Humanoid_OSX_dark/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/Humanoid_OSX_dark/skin.inc b/skins/_old/humanoid_OSX/Humanoid_OSX_dark/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/Humanoid_OSX_dark/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/default.asm b/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/default.asm index b770b0954b..5e9bf7fde9 100644 --- a/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/default.asm +++ b/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/me_skin.inc b/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/skin.inc b/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/Humanoid_OSX_dark_night/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_blue/default.asm b/skins/_old/humanoid_OSX/humanoid_OSX_blue/default.asm index 981e2a8beb..8dd688d64a 100644 --- a/skins/_old/humanoid_OSX/humanoid_OSX_blue/default.asm +++ b/skins/_old/humanoid_OSX/humanoid_OSX_blue/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_blue/me_skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/humanoid_OSX_blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_blue/skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/humanoid_OSX_blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_green/default.asm b/skins/_old/humanoid_OSX/humanoid_OSX_green/default.asm index 981e2a8beb..8dd688d64a 100644 --- a/skins/_old/humanoid_OSX/humanoid_OSX_green/default.asm +++ b/skins/_old/humanoid_OSX/humanoid_OSX_green/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_green/me_skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/humanoid_OSX_green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_green/skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/humanoid_OSX_green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_orange/default.asm b/skins/_old/humanoid_OSX/humanoid_OSX_orange/default.asm index 981e2a8beb..8dd688d64a 100644 --- a/skins/_old/humanoid_OSX/humanoid_OSX_orange/default.asm +++ b/skins/_old/humanoid_OSX/humanoid_OSX_orange/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_orange/me_skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_orange/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/humanoid_OSX_orange/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_orange/skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_orange/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/humanoid_OSX_orange/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_red/default.asm b/skins/_old/humanoid_OSX/humanoid_OSX_red/default.asm index 981e2a8beb..8dd688d64a 100644 --- a/skins/_old/humanoid_OSX/humanoid_OSX_red/default.asm +++ b/skins/_old/humanoid_OSX/humanoid_OSX_red/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_red/me_skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_red/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/humanoid_OSX_red/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_red/skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_red/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/humanoid_OSX_red/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_yellow/default.asm b/skins/_old/humanoid_OSX/humanoid_OSX_yellow/default.asm index 981e2a8beb..8dd688d64a 100644 --- a/skins/_old/humanoid_OSX/humanoid_OSX_yellow/default.asm +++ b/skins/_old/humanoid_OSX/humanoid_OSX_yellow/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_yellow/me_skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_yellow/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/humanoid_OSX/humanoid_OSX_yellow/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/humanoid_OSX/humanoid_OSX_yellow/skin.inc b/skins/_old/humanoid_OSX/humanoid_OSX_yellow/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/humanoid_OSX/humanoid_OSX_yellow/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/khrome2/default.asm b/skins/_old/khrome2/default.asm index d63594cca1..5fc8de4712 100644 --- a/skins/_old/khrome2/default.asm +++ b/skins/_old/khrome2/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/khrome2/skin.inc b/skins/_old/khrome2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/khrome2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/lightskin/default.asm b/skins/_old/lightskin/default.asm index 0fa32676eb..db9ba222a5 100644 --- a/skins/_old/lightskin/default.asm +++ b/skins/_old/lightskin/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/lightskin/me_skin.inc b/skins/_old/lightskin/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/lightskin/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/lightskin/skin.inc b/skins/_old/lightskin/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/lightskin/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/macos_l/default.asm b/skins/_old/macos_l/default.asm index 4bf345e3ed..63de30ada8 100644 --- a/skins/_old/macos_l/default.asm +++ b/skins/_old/macos_l/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/macos_l/me_skin.inc b/skins/_old/macos_l/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/macos_l/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/macos_l/skin.inc b/skins/_old/macos_l/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/macos_l/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mage-scroll/default.asm b/skins/_old/mage-scroll/default.asm index c429b51353..d24349899d 100644 --- a/skins/_old/mage-scroll/default.asm +++ b/skins/_old/mage-scroll/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/mage-scroll/me_skin.inc b/skins/_old/mage-scroll/me_skin.inc deleted file mode 100644 index 365964eb38..0000000000 --- a/skins/_old/mage-scroll/me_skin.inc +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mage-scroll/skin.inc b/skins/_old/mage-scroll/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mage-scroll/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mage-slot/default.asm b/skins/_old/mage-slot/default.asm index 3b82e39aef..2a32773a24 100644 --- a/skins/_old/mage-slot/default.asm +++ b/skins/_old/mage-slot/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/mage-slot/me_skin.inc b/skins/_old/mage-slot/me_skin.inc deleted file mode 100644 index 365964eb38..0000000000 --- a/skins/_old/mage-slot/me_skin.inc +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mage-slot/skin.inc b/skins/_old/mage-slot/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mage-slot/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mage-teckno/default.asm b/skins/_old/mage-teckno/default.asm index 3569204520..c59a7f8cb8 100644 --- a/skins/_old/mage-teckno/default.asm +++ b/skins/_old/mage-teckno/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/mage-teckno/me_skin.inc b/skins/_old/mage-teckno/me_skin.inc deleted file mode 100644 index 365964eb38..0000000000 --- a/skins/_old/mage-teckno/me_skin.inc +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mage-teckno/skin.inc b/skins/_old/mage-teckno/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mage-teckno/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mist/default.asm b/skins/_old/mist/default.asm index 8ec0967fee..23505fa068 100644 --- a/skins/_old/mist/default.asm +++ b/skins/_old/mist/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/mist/me_skin.inc b/skins/_old/mist/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/mist/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mist/skin.inc b/skins/_old/mist/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mist/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mist_color/default.asm b/skins/_old/mist_color/default.asm index c0da98f1e4..d7d9e568c6 100644 --- a/skins/_old/mist_color/default.asm +++ b/skins/_old/mist_color/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/mist_color/me_skin.inc b/skins/_old/mist_color/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/mist_color/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mist_color/skin.inc b/skins/_old/mist_color/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mist_color/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mursky/mursky.asm b/skins/_old/mursky/mursky.asm index e6147ef216..c50d8fe7aa 100644 --- a/skins/_old/mursky/mursky.asm +++ b/skins/_old/mursky/mursky.asm @@ -2,7 +2,7 @@ ;; dunkaist, Mario | 2010 ;;--------------------------------------------------------------------- -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height, \ ; skin height diff --git a/skins/_old/mursky/my_skin.inc b/skins/_old/mursky/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/mursky/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mursky/skin.inc b/skins/_old/mursky/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mursky/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/mygrey/default.asm b/skins/_old/mygrey/default.asm index d976c3385e..2e7f9e9abb 100644 --- a/skins/_old/mygrey/default.asm +++ b/skins/_old/mygrey/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/mygrey/me_skin.inc b/skins/_old/mygrey/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/mygrey/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/mygrey/skin.inc b/skins/_old/mygrey/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/mygrey/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/myskin1/default.asm b/skins/_old/myskin1/default.asm index 83a3916446..8829a195b6 100644 --- a/skins/_old/myskin1/default.asm +++ b/skins/_old/myskin1/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/myskin1/me_skin.inc b/skins/_old/myskin1/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/myskin1/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/myskin1/skin.inc b/skins/_old/myskin1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/myskin1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/myskin2/default.asm b/skins/_old/myskin2/default.asm index 6bbd60e550..587242e1f9 100644 --- a/skins/_old/myskin2/default.asm +++ b/skins/_old/myskin2/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/myskin2/me_skin.inc b/skins/_old/myskin2/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/myskin2/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/myskin2/skin.inc b/skins/_old/myskin2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/myskin2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/myskin3/default.asm b/skins/_old/myskin3/default.asm index e4213e418f..322632e3ef 100644 --- a/skins/_old/myskin3/default.asm +++ b/skins/_old/myskin3/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/myskin3/me_skin.inc b/skins/_old/myskin3/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/myskin3/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/myskin3/skin.inc b/skins/_old/myskin3/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/myskin3/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/myskin4/default.asm b/skins/_old/myskin4/default.asm index 6a78ef4a16..c919d39d6c 100644 --- a/skins/_old/myskin4/default.asm +++ b/skins/_old/myskin4/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/myskin4/me_skin.inc b/skins/_old/myskin4/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/myskin4/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/myskin4/skin.inc b/skins/_old/myskin4/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/myskin4/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/neutral/neutral/default.asm b/skins/_old/neutral/neutral/default.asm index 8fe59ac44c..d8d2e7d03a 100644 --- a/skins/_old/neutral/neutral/default.asm +++ b/skins/_old/neutral/neutral/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/neutral/neutral/me_skin.inc b/skins/_old/neutral/neutral/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/neutral/neutral/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/neutral/neutral/skin.inc b/skins/_old/neutral/neutral/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/neutral/neutral/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/neutral/neutral_blue/default.asm b/skins/_old/neutral/neutral_blue/default.asm index ca53f81901..20e8a227db 100644 --- a/skins/_old/neutral/neutral_blue/default.asm +++ b/skins/_old/neutral/neutral_blue/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/neutral/neutral_blue/me_skin.inc b/skins/_old/neutral/neutral_blue/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/neutral/neutral_blue/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/neutral/neutral_blue/skin.inc b/skins/_old/neutral/neutral_blue/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/neutral/neutral_blue/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/neutral/neutral_green/default.asm b/skins/_old/neutral/neutral_green/default.asm index c1680a9015..7cebb3b4c3 100644 --- a/skins/_old/neutral/neutral_green/default.asm +++ b/skins/_old/neutral/neutral_green/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/neutral/neutral_green/me_skin.inc b/skins/_old/neutral/neutral_green/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/neutral/neutral_green/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/neutral/neutral_green/skin.inc b/skins/_old/neutral/neutral_green/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/neutral/neutral_green/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/neutral/neutral_lilac/default.asm b/skins/_old/neutral/neutral_lilac/default.asm index b6204b70eb..4f9ae135bc 100644 --- a/skins/_old/neutral/neutral_lilac/default.asm +++ b/skins/_old/neutral/neutral_lilac/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/neutral/neutral_lilac/me_skin.inc b/skins/_old/neutral/neutral_lilac/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/neutral/neutral_lilac/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/neutral/neutral_lilac/skin.inc b/skins/_old/neutral/neutral_lilac/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/neutral/neutral_lilac/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/night/me_skin.inc b/skins/_old/night/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/night/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/night/night.asm b/skins/_old/night/night.asm index 3700c3c6ce..9bf452facf 100644 --- a/skins/_old/night/night.asm +++ b/skins/_old/night/night.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/night/skin.inc b/skins/_old/night/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/night/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/nix/nix_big/my_skin.inc b/skins/_old/nix/nix_big/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/nix/nix_big/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/nix/nix_big/nix_big.asm b/skins/_old/nix/nix_big/nix_big.asm index 639f889a8b..99be99144d 100644 --- a/skins/_old/nix/nix_big/nix_big.asm +++ b/skins/_old/nix/nix_big/nix_big.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/nix/nix_big/skin.inc b/skins/_old/nix/nix_big/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/nix/nix_big/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/nix/nix_medium/my_skin.inc b/skins/_old/nix/nix_medium/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/nix/nix_medium/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/nix/nix_medium/nix_medium.asm b/skins/_old/nix/nix_medium/nix_medium.asm index 24d4a943f5..910bbaa1bc 100644 --- a/skins/_old/nix/nix_medium/nix_medium.asm +++ b/skins/_old/nix/nix_medium/nix_medium.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/nix/nix_medium/skin.inc b/skins/_old/nix/nix_medium/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/nix/nix_medium/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/nix/nix_small/my_skin.inc b/skins/_old/nix/nix_small/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/nix/nix_small/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/nix/nix_small/nix_small.asm b/skins/_old/nix/nix_small/nix_small.asm index ba3c958a32..ff6ce41364 100644 --- a/skins/_old/nix/nix_small/nix_small.asm +++ b/skins/_old/nix/nix_small/nix_small.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/nix/nix_small/skin.inc b/skins/_old/nix/nix_small/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/nix/nix_small/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/panther/default.asm b/skins/_old/panther/default.asm index 74f173568e..b7fc1748ae 100644 --- a/skins/_old/panther/default.asm +++ b/skins/_old/panther/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/panther/me_skin.inc b/skins/_old/panther/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/panther/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/panther/skin.inc b/skins/_old/panther/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/panther/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/plum/default.asm b/skins/_old/plum/default.asm index df95cf9b57..f63f33ed42 100644 --- a/skins/_old/plum/default.asm +++ b/skins/_old/plum/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/plum/me_skin.inc b/skins/_old/plum/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/plum/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/plum/skin.inc b/skins/_old/plum/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/plum/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/sea/default.asm b/skins/_old/sea/default.asm index 5acade86e3..0bbf6a1cd8 100644 --- a/skins/_old/sea/default.asm +++ b/skins/_old/sea/default.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/sea/me_skin.inc b/skins/_old/sea/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/sea/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/sea/skin.inc b/skins/_old/sea/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/sea/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/skin_feol/default.asm b/skins/_old/skin_feol/default.asm index a779a221bb..d92aeefb6c 100644 --- a/skins/_old/skin_feol/default.asm +++ b/skins/_old/skin_feol/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/skin_feol/me_skin.inc b/skins/_old/skin_feol/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/skin_feol/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/skin_feol/skin.inc b/skins/_old/skin_feol/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/skin_feol/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/skin_feol_new/default.asm b/skins/_old/skin_feol_new/default.asm index 72a58619f3..1c01cdf167 100644 --- a/skins/_old/skin_feol_new/default.asm +++ b/skins/_old/skin_feol_new/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/skin_feol_new/me_skin.inc b/skins/_old/skin_feol_new/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/skin_feol_new/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/skin_feol_new/skin.inc b/skins/_old/skin_feol_new/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/skin_feol_new/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/skin_ser/default.asm b/skins/_old/skin_ser/default.asm index 6b8b20caad..7b62472cf6 100644 --- a/skins/_old/skin_ser/default.asm +++ b/skins/_old/skin_ser/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/skin_ser/me_skin.inc b/skins/_old/skin_ser/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/skin_ser/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/skin_ser/skin.inc b/skins/_old/skin_ser/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/skin_ser/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/skin_vhl/default.asm b/skins/_old/skin_vhl/default.asm index 844bd4b139..d199d32476 100644 --- a/skins/_old/skin_vhl/default.asm +++ b/skins/_old/skin_vhl/default.asm @@ -1,4 +1,4 @@ -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/skin_vhl/me_skin.inc b/skins/_old/skin_vhl/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/skin_vhl/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/skin_vhl/skin.inc b/skins/_old/skin_vhl/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/skin_vhl/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/sshock/default.asm b/skins/_old/sshock/default.asm index d24c44823d..869fc24dfb 100644 --- a/skins/_old/sshock/default.asm +++ b/skins/_old/sshock/default.asm @@ -5,7 +5,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/sshock/me_skin.inc b/skins/_old/sshock/me_skin.inc deleted file mode 100644 index 365964eb38..0000000000 --- a/skins/_old/sshock/me_skin.inc +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/sshock/skin.inc b/skins/_old/sshock/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/sshock/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/stone/O'stone.asm b/skins/_old/stone/O'stone.asm index bc20c591f0..988529aeac 100644 --- a/skins/_old/stone/O'stone.asm +++ b/skins/_old/stone/O'stone.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/stone/my_skin.inc b/skins/_old/stone/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/stone/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/stone/skin.inc b/skins/_old/stone/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/stone/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/subsilv/default.asm b/skins/_old/subsilv/default.asm index abc23db822..0026aaea5c 100644 --- a/skins/_old/subsilv/default.asm +++ b/skins/_old/subsilv/default.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/subsilv/my_skin.inc b/skins/_old/subsilv/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/subsilv/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/subsilv/skin.inc b/skins/_old/subsilv/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/subsilv/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/testtest/my_skin.inc b/skins/_old/testtest/my_skin.inc deleted file mode 100644 index 0a5d237018..0000000000 --- a/skins/_old/testtest/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=0x7A+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} diff --git a/skins/_old/testtest/skin.inc b/skins/_old/testtest/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/testtest/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/testtest/testtest.asm b/skins/_old/testtest/testtest.asm index f76c241846..d797646db2 100644 --- a/skins/_old/testtest/testtest.asm +++ b/skins/_old/testtest/testtest.asm @@ -2,11 +2,11 @@ ;; dunkaist, Mario | 2010 ;;--------------------------------------------------------------------- -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height, \ ; skin height - margins = [5:1:1:1], \ ; margins [left:top:right:bottom] + margins = [5:1:1:1], \ ; margins [left:top:right:bottom] colors \ active = [ \ binner = 0xff0000: \ ; border inner color @@ -18,10 +18,10 @@ SKIN_PARAMS \ bouter = 0x00ff00: \ ; border outer color bframe = 0xff0000], \ ; border frame color \ - dtp = 'testtest.dtp' ; dtp colors + dtp = 'testtest.dtp' ; dtp colors SKIN_BUTTONS \ - close = [-23:2][20:107], \ ; buttons coordinates + close = [-23:2][20:107], \ ; buttons coordinates minimize = [-43:2][20:107] ; [left:top][width:height] SKIN_BITMAPS \ diff --git a/skins/_old/vista/default.asm b/skins/_old/vista/default.asm index f5ffd65d7e..25bd9862cd 100644 --- a/skins/_old/vista/default.asm +++ b/skins/_old/vista/default.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/vista/my_skin.inc b/skins/_old/vista/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/vista/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/vista/skin.inc b/skins/_old/vista/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/vista/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/win8/Default.skn.asm b/skins/_old/win8/Default.skn.asm index 6ea974ec5e..89241416a3 100644 --- a/skins/_old/win8/Default.skn.asm +++ b/skins/_old/win8/Default.skn.asm @@ -1,6 +1,6 @@ ;SKIN (.SKN) - COMPILE WITH FASM -include 'me_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/win8/me_skin.inc b/skins/_old/win8/me_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/win8/me_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/win8/skin.inc b/skins/_old/win8/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/win8/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/winflat/default.asm b/skins/_old/winflat/default.asm index c838218ad7..10a3c1173f 100644 --- a/skins/_old/winflat/default.asm +++ b/skins/_old/winflat/default.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/winflat/my_skin.inc b/skins/_old/winflat/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/winflat/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/winflat/skin.inc b/skins/_old/winflat/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/winflat/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver1/my_skin.inc b/skins/_old/zRiver/zRiver1/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/zRiver/zRiver1/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/zRiver/zRiver1/skin.inc b/skins/_old/zRiver/zRiver1/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/zRiver/zRiver1/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver1/zRiver1.asm b/skins/_old/zRiver/zRiver1/zRiver1.asm index f9d56de96c..547faa2228 100644 --- a/skins/_old/zRiver/zRiver1/zRiver1.asm +++ b/skins/_old/zRiver/zRiver1/zRiver1.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/zRiver/zRiver2/my_skin.inc b/skins/_old/zRiver/zRiver2/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/zRiver/zRiver2/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/zRiver/zRiver2/skin.inc b/skins/_old/zRiver/zRiver2/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/zRiver/zRiver2/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver2/zRiver2.asm b/skins/_old/zRiver/zRiver2/zRiver2.asm index 6a4870d0b4..7811f65e3d 100644 --- a/skins/_old/zRiver/zRiver2/zRiver2.asm +++ b/skins/_old/zRiver/zRiver2/zRiver2.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/zRiver/zRiver3/my_skin.inc b/skins/_old/zRiver/zRiver3/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/zRiver/zRiver3/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/zRiver/zRiver3/skin.inc b/skins/_old/zRiver/zRiver3/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/zRiver/zRiver3/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver3/zRiver3.asm b/skins/_old/zRiver/zRiver3/zRiver3.asm index 5cfe836b2a..f24de193eb 100644 --- a/skins/_old/zRiver/zRiver3/zRiver3.asm +++ b/skins/_old/zRiver/zRiver3/zRiver3.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/zRiver/zRiver4/my_skin.inc b/skins/_old/zRiver/zRiver4/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/zRiver/zRiver4/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/zRiver/zRiver4/skin.inc b/skins/_old/zRiver/zRiver4/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/zRiver/zRiver4/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver4/zRiver4.asm b/skins/_old/zRiver/zRiver4/zRiver4.asm index 0b43117f1f..0e6a0cb592 100644 --- a/skins/_old/zRiver/zRiver4/zRiver4.asm +++ b/skins/_old/zRiver/zRiver4/zRiver4.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/zRiver/zRiver5/my_skin.inc b/skins/_old/zRiver/zRiver5/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/zRiver/zRiver5/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/zRiver/zRiver5/skin.inc b/skins/_old/zRiver/zRiver5/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/zRiver/zRiver5/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver5/zRiver5.asm b/skins/_old/zRiver/zRiver5/zRiver5.asm index 7967cbb89b..5e0dc49c22 100644 --- a/skins/_old/zRiver/zRiver5/zRiver5.asm +++ b/skins/_old/zRiver/zRiver5/zRiver5.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height diff --git a/skins/_old/zRiver/zRiver6/my_skin.inc b/skins/_old/zRiver/zRiver6/my_skin.inc deleted file mode 100644 index ccbb3c191c..0000000000 --- a/skins/_old/zRiver/zRiver6/my_skin.inc +++ /dev/null @@ -1,235 +0,0 @@ -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/skins/_old/zRiver/zRiver6/skin.inc b/skins/_old/zRiver/zRiver6/skin.inc new file mode 100644 index 0000000000..81a6bd8f3f --- /dev/null +++ b/skins/_old/zRiver/zRiver6/skin.inc @@ -0,0 +1,239 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; +;; Distributed under terms of the GNU General Public License ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + _file equ _#_name + _file:: + file _fname + end virtual + load w dword from _file:_bmp.i.biWidth + load h dword from _file:_bmp.i.biHeight + load hsize dword from _file:_bmp.h.bfOffBits + align 4 + label _name + .width = w + .height = h + dd w,h + a=hsize+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + load r from _file:a+0 + load g from _file:a+1 + load b from _file:a+2 + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + dd @f - $ - 4 + file _dtp + @@: +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} diff --git a/skins/_old/zRiver/zRiver6/zRiver6.asm b/skins/_old/zRiver/zRiver6/zRiver6.asm index 08922d5f6e..18830b9c29 100644 --- a/skins/_old/zRiver/zRiver6/zRiver6.asm +++ b/skins/_old/zRiver/zRiver6/zRiver6.asm @@ -1,4 +1,4 @@ -include 'my_skin.inc' +include 'skin.inc' SKIN_PARAMS \ height = bmp_base.height,\ ; skin height