diff --git a/programs/system/skincfg/trunk/skincfg.asm b/programs/system/skincfg/trunk/skincfg.asm index fd9fa0e285..ffea9d6f16 100644 --- a/programs/system/skincfg/trunk/skincfg.asm +++ b/programs/system/skincfg/trunk/skincfg.asm @@ -97,7 +97,7 @@ win: ;--------------------------------------------------------------------- START: ; start of execution ;--------------------------------------------------------------------- - mcall 68,11 + mcall SF_SYS_MISC,SSF_HEAP_INIT test eax,eax jz close @@ -118,14 +118,11 @@ load_libraries l_libs_start,end_l_libs stdcall string.length, app_param add eax, app_param mov ecx, [eax-4] + or ecx, 0x20202000 ;letters to lowercase cmp ecx, '.skn' je load_skin_from_param - cmp ecx, '.SKN' - je load_skin_from_param cmp ecx, '.dtp' je load_dtp_from_param - cmp ecx, '.DTP' - je load_dtp_from_param jmp no_param load_dtp_from_param: @@ -139,7 +136,7 @@ load_skin_from_param: jmp skin_path_ready no_param: - mcall 48,3,color_table,4*10 ; get current colors + mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,color_table,4*10 ; get current colors call load_skin_file.2 skin_path_ready: @@ -166,7 +163,7 @@ red: call draw_window ; at first, draw the window ;--------------------------------------------------------------------- still: - mcall 10 ; wait here for event + mcall SF_WAIT_EVENT dec eax ; redraw request ? jz red @@ -180,11 +177,11 @@ still: jmp still ;--------------------------------------------------------------------- key: ; key - mcall 2 ; just read it and ignore + mcall SF_GET_KEY jmp still ;--------------------------------------------------------------------- button: ; button - mcall 17 ; get id + mcall SF_GET_BUTTON cmp ah,12 ; load file jne no_load @@ -204,7 +201,7 @@ no_save: cmp ah,14 ; set 3d buttons jne no_3d - mcall 48,1,1 + mcall SF_STYLE_SETTINGS,SSF_SET_BUTTON_STYLE,1 invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 1 jmp doapply ;-------------------------------------- @@ -213,10 +210,10 @@ no_3d: jne no_flat invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 0 - mcall 48, 1, 0 + mcall SF_STYLE_SETTINGS,SSF_SET_BUTTON_STYLE, 0 ;-------------------------------------- doapply: - mcall 48, 0, 0 + mcall SF_STYLE_SETTINGS,SSF_APPLY, 0 jmp still ;-------------------------------------- no_flat: @@ -224,7 +221,7 @@ no_flat: jne no_apply ;-------------------------------------- apply_direct: - mcall 48,2,color_table,10*4 + mcall SF_STYLE_SETTINGS,SSF_SET_COLORS,color_table,10*4 jmp doapply ;-------------------------------------- no_apply: @@ -242,7 +239,7 @@ no_load_skin: cmp [skin_info],0 je no_apply_skin - mcall 48,8,skin_info + mcall SF_STYLE_SETTINGS,SSF_SET_SKIN,skin_info call draw_window jmp still ;-------------------------------------- @@ -317,7 +314,7 @@ load_dtp_file: mov dword [ebx+8], eax ; offset (high dword) mov dword [ebx+12], 40 ; read colors file: 4*10 bytes mov dword [ebx+16], color_table ; address - mcall 70 + mcall SF_FILE ret ;--------------------------------------------------------------------- load_skin_file: @@ -343,7 +340,7 @@ load_skin_file: mov dword [ebx+8], eax ; offset (high dword) mov dword [ebx+12], 32*1024 ; read: max 32 KBytes mov dword [ebx+16], file_load_area ; address - mcall 70 + mcall SF_FILE mov esi, file_load_area @@ -400,7 +397,7 @@ save_file: and [ebx+8],eax ; (reserved) mov [ebx+12],dword 10*4 ; bytes to write mov [ebx+16],dword color_table ; address - mcall 70 + mcall SF_FILE ret ;--------------------------------------------------------------------- draw_button_row: @@ -470,8 +467,8 @@ newcol: ;---------------------------------------------------------------------- draw_PathShow: pusha - mcall 13,,,0xffffff - mcall 13,,,0xffffff + mcall SF_DRAW_RECT,,,0xffffff + mcall SF_DRAW_RECT,,,0xffffff ; draw for PathShow push dword PathShow_data_1 call [PathShow_draw] @@ -485,10 +482,10 @@ draw_PathShow: ; ******* WINDOW DEFINITIONS AND DRAW ******** ; ********************************************* draw_window: - mcall 12,1 - mcall 48,3,app_colours,10*4 - mcall 14 - mcall 48,4 + mcall SF_REDRAW,SSF_BEGIN_DRAW + mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,app_colours,10*4 + mcall SF_GET_SCREEN_SIZE + mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT mov [current_skin_high],eax ; DRAW WINDOW xor eax,eax ; function 0 : define and draw window @@ -499,7 +496,7 @@ draw_window: add ecx,[current_skin_high] mcall ,<110, win.w>,,,,title - mcall 9,procinfo,-1 + mcall SF_THREAD_INFO,procinfo,-1 mov eax,[procinfo+70] ;status of window test eax,100b @@ -519,20 +516,20 @@ draw_window: ;----------------------------------- ; select color DTP frame ; LOAD BUTTON ; button 12 - mcall 8,,,12,[w_work_button] + mcall SF_DEFINE_BUTTON,,,12,[w_work_button] ; SAVE BUTTON add ebx,(load_w+2)*65536-load_w+save_w inc edx mcall ; button 13 ; APPLY BUTTON mov ebx,(frame_1.x + frame_1.w - apply_w - 15)*65536+apply_w - mcall 8,,,16 ; button 17 + mcall SF_DEFINE_BUTTON,,,16 ; button 17 ; select color DTP button text - mcall 4,,[w_work_button_text],t1,t1.size + mcall SF_DRAW_TEXT,,[w_work_button_text],t1,t1.size ;----------------------------------- ; select skin frame ; LOAD SKIN BUTTON ; button 17 - mcall 8,,,17,[w_work_button] + mcall SF_DEFINE_BUTTON,,,17,[w_work_button] ; 3D mov ebx,(frame_2.x+155)*65536+34 mcall ,,,14 ; button 14 @@ -544,7 +541,7 @@ draw_window: mov ebx,(frame_2.x + frame_2.w - apply_w -15)*65536+apply_w mcall ,,,18 ; button 18 ; select skin button text - mcall 4,,[w_work_button_text],t2,t2.size + mcall SF_DRAW_TEXT,,[w_work_button_text],t2,t2.size ;----------------------------------- call draw_button_row call draw_button_row_of_texts @@ -576,7 +573,7 @@ draw_window: call draw_skin @@: .end: - mcall 12,2 + mcall SF_REDRAW,SSF_END_DRAW ret ;----------------------------------------------------------------------------- include 'drawskin.inc'