2006-01-03 10:43:31 +01:00
|
|
|
;
|
2006-03-04 12:44:33 +01:00
|
|
|
; UNIFORM WINDOW COLOURS & SKIN
|
2006-01-03 10:43:31 +01:00
|
|
|
;
|
|
|
|
; Compile with FASM for Menuet
|
|
|
|
;
|
|
|
|
; < russian edition by Ivan Poddubny >
|
2006-03-04 12:44:33 +01:00
|
|
|
; < skin selection by Mike Semenyako >
|
2013-04-01 00:26:30 +02:00
|
|
|
;******************************************************************************
|
|
|
|
; last update: 01/04/2013
|
|
|
|
; written by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; changes: select colors with ColorDialog
|
|
|
|
; some redesign of the look of the program
|
|
|
|
;******************************************************************************
|
2010-09-09 22:58:26 +02:00
|
|
|
; last update: 10/09/2010
|
|
|
|
; written by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; changes: select path with OpenDialog
|
2006-01-03 10:43:31 +01:00
|
|
|
;******************************************************************************
|
2013-02-24 20:52:43 +01:00
|
|
|
use32
|
|
|
|
org 0
|
|
|
|
db 'MENUET01' ; identifier
|
|
|
|
dd 1 ; header version
|
|
|
|
dd START ; start address
|
2013-04-01 00:26:30 +02:00
|
|
|
dd IM_END ; file size
|
|
|
|
dd I_END ; memory
|
2013-02-24 20:52:43 +01:00
|
|
|
dd stacktop ; stack pointer
|
2020-05-17 15:31:17 +02:00
|
|
|
dd app_param ; parameters
|
2013-02-24 20:52:43 +01:00
|
|
|
dd cur_dir_path ; path to file
|
|
|
|
|
2010-09-09 22:58:26 +02:00
|
|
|
include 'lang.inc'
|
2019-04-24 14:52:10 +02:00
|
|
|
include '../../../proc32.inc'
|
2010-11-15 19:47:23 +01:00
|
|
|
include '../../../config.inc' ;for nightbuild
|
2010-09-09 22:58:26 +02:00
|
|
|
include '../../../macros.inc'
|
2020-05-17 15:31:17 +02:00
|
|
|
include '../../../string.inc'
|
2019-04-24 14:52:10 +02:00
|
|
|
include '../../../dll.inc'
|
2010-09-09 22:58:26 +02:00
|
|
|
include 'kglobals.inc'
|
|
|
|
include 'unpacker.inc'
|
|
|
|
include '../../../develop/libraries/box_lib/load_lib.mac'
|
|
|
|
@use_library
|
2006-01-03 10:43:31 +01:00
|
|
|
;******************************************************************************
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------
|
2006-03-04 12:44:33 +01:00
|
|
|
struct SKIN_HEADER
|
2007-05-10 15:48:35 +02:00
|
|
|
ident dd ?
|
|
|
|
version dd ?
|
|
|
|
params dd ?
|
|
|
|
buttons dd ?
|
|
|
|
bitmaps dd ?
|
2006-03-04 12:44:33 +01:00
|
|
|
ends
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------
|
2006-03-04 12:44:33 +01:00
|
|
|
struct SKIN_PARAMS
|
2007-05-10 15:48:35 +02:00
|
|
|
skin_height dd ?
|
|
|
|
margin.right dw ?
|
|
|
|
margin.left dw ?
|
|
|
|
margin.bottom dw ?
|
|
|
|
margin.top dw ?
|
|
|
|
colors.inner dd ?
|
|
|
|
colors.outer dd ?
|
|
|
|
colors.frame dd ?
|
|
|
|
colors_1.inner dd ?
|
|
|
|
colors_1.outer dd ?
|
|
|
|
colors_1.frame dd ?
|
|
|
|
dtp.size dd ?
|
|
|
|
dtp.data db 40 dup (?)
|
2006-03-04 12:44:33 +01:00
|
|
|
ends
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------
|
2006-03-04 12:44:33 +01:00
|
|
|
struct SKIN_BUTTONS
|
2007-05-10 15:48:35 +02:00
|
|
|
type dd ?
|
|
|
|
pos:
|
|
|
|
left dw ?
|
|
|
|
top dw ?
|
|
|
|
size:
|
2021-07-04 12:44:36 +02:00
|
|
|
w dw ?
|
2007-05-10 15:48:35 +02:00
|
|
|
height dw ?
|
2006-03-04 12:44:33 +01:00
|
|
|
ends
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------
|
2006-03-04 12:44:33 +01:00
|
|
|
struct SKIN_BITMAPS
|
2007-05-10 15:48:35 +02:00
|
|
|
kind dw ?
|
|
|
|
type dw ?
|
|
|
|
_data dd ?
|
2006-03-04 12:44:33 +01:00
|
|
|
ends
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------
|
|
|
|
frame_1:
|
|
|
|
.x = 5
|
2021-07-04 12:44:36 +02:00
|
|
|
.y = area.y + area.height + 20
|
|
|
|
.w = area.w + 217
|
|
|
|
.height = 65
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------
|
|
|
|
frame_2:
|
2021-07-04 12:44:36 +02:00
|
|
|
.x = frame_1.x
|
|
|
|
.y = frame_1.y + frame_1.height + 20
|
|
|
|
.w = frame_1.w
|
|
|
|
.height = frame_1.height
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
win:
|
|
|
|
.w = frame_2.w + frame_2.x + frame_2.x + 9
|
|
|
|
.h = frame_2.y + frame_2.height + 10
|
2013-02-24 20:52:43 +01:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
START: ; start of execution
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
mcall 68,11
|
|
|
|
|
|
|
|
test eax,eax
|
|
|
|
jz close
|
|
|
|
|
2019-04-24 14:52:10 +02:00
|
|
|
stdcall dll.Load,LibIniImportTable
|
2010-09-09 22:58:26 +02:00
|
|
|
load_libraries l_libs_start,end_l_libs
|
|
|
|
|
|
|
|
;if return code =-1 then exit, else nornary work
|
|
|
|
inc eax
|
|
|
|
test eax,eax
|
|
|
|
jz close
|
|
|
|
;---------------------------------------------------------------------
|
2020-05-17 15:31:17 +02:00
|
|
|
; set default pathes
|
2020-05-17 17:52:41 +02:00
|
|
|
stdcall string.copy, default_skin, skin_info
|
|
|
|
stdcall string.copy, default_dtp, dtp_name
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
2020-05-17 15:31:17 +02:00
|
|
|
; check app param
|
|
|
|
stdcall string.length, app_param
|
|
|
|
add eax, app_param
|
|
|
|
mov ecx, [eax-4]
|
|
|
|
cmp ecx, '.skn'
|
|
|
|
je load_skin_from_param
|
|
|
|
cmp ecx, '.dtp'
|
|
|
|
jne no_param
|
|
|
|
|
|
|
|
load_dtp_from_param:
|
2020-05-17 17:52:41 +02:00
|
|
|
stdcall string.copy, app_param, dtp_name
|
2020-05-17 15:31:17 +02:00
|
|
|
call load_dtp_file.1
|
|
|
|
jmp skin_path_ready
|
|
|
|
|
|
|
|
load_skin_from_param:
|
2020-05-17 17:52:41 +02:00
|
|
|
stdcall string.copy, app_param, skin_info
|
2020-05-17 15:31:17 +02:00
|
|
|
call load_skin_file.2
|
|
|
|
jmp skin_path_ready
|
|
|
|
|
|
|
|
no_param:
|
|
|
|
mcall 48,3,color_table,4*10 ; get current colors
|
|
|
|
call load_skin_file.2
|
|
|
|
|
2010-09-09 22:58:26 +02:00
|
|
|
skin_path_ready:
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
;OpenDialog initialisation
|
2013-02-24 20:52:43 +01:00
|
|
|
push dword OpenDialog_data
|
|
|
|
call [OpenDialog_Init]
|
2010-09-09 22:58:26 +02:00
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
push dword OpenDialog_data2
|
|
|
|
call [OpenDialog_Init]
|
2013-04-01 00:26:30 +02:00
|
|
|
;--------------------------------------------------------------------
|
|
|
|
;init_ColorDialog ColorDialog_data
|
|
|
|
push dword ColorDialog_data
|
|
|
|
call [ColorDialog_Init]
|
|
|
|
;--------------------------------------------------------------------
|
2010-09-09 22:58:26 +02:00
|
|
|
; prepare for PathShow
|
|
|
|
push dword PathShow_data_1
|
|
|
|
call [PathShow_prepare]
|
|
|
|
|
|
|
|
push dword PathShow_data_2
|
|
|
|
call [PathShow_prepare]
|
2013-02-24 20:52:43 +01:00
|
|
|
;---------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
red:
|
2013-02-24 20:52:43 +01:00
|
|
|
call draw_window ; at first, draw the window
|
|
|
|
;---------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
still:
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall 10 ; wait here for event
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
dec eax ; redraw request ?
|
|
|
|
jz red
|
2013-04-01 00:26:30 +02:00
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
dec eax ; key in buffer ?
|
|
|
|
jz key
|
2013-04-01 00:26:30 +02:00
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
dec eax ; button in buffer ?
|
|
|
|
jz button
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
key: ; key
|
|
|
|
mcall 2 ; just read it and ignore
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
button: ; button
|
|
|
|
mcall 17 ; get id
|
|
|
|
|
|
|
|
cmp ah,12 ; load file
|
|
|
|
jne no_load
|
|
|
|
|
2020-05-17 15:31:17 +02:00
|
|
|
call load_dtp_file
|
2013-02-24 20:52:43 +01:00
|
|
|
call draw_window
|
|
|
|
jmp still
|
|
|
|
;--------------------------------------
|
|
|
|
no_load:
|
|
|
|
cmp ah,13 ; save file
|
|
|
|
jne no_save
|
|
|
|
|
|
|
|
call save_file
|
|
|
|
jmp still
|
|
|
|
;--------------------------------------
|
|
|
|
no_save:
|
|
|
|
cmp ah,14 ; set 3d buttons
|
|
|
|
jne no_3d
|
|
|
|
|
|
|
|
mcall 48,1,1
|
2019-04-24 14:52:10 +02:00
|
|
|
invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 1
|
2013-02-24 20:52:43 +01:00
|
|
|
jmp doapply
|
|
|
|
;--------------------------------------
|
|
|
|
no_3d:
|
|
|
|
cmp ah,15 ; set flat buttons
|
|
|
|
jne no_flat
|
|
|
|
|
2019-04-24 14:52:10 +02:00
|
|
|
invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 0
|
2013-02-24 20:52:43 +01:00
|
|
|
mcall 48, 1, 0
|
|
|
|
;--------------------------------------
|
|
|
|
doapply:
|
|
|
|
mcall 48, 0, 0
|
|
|
|
jmp still
|
|
|
|
;--------------------------------------
|
|
|
|
no_flat:
|
|
|
|
cmp ah,16 ; apply
|
|
|
|
jne no_apply
|
|
|
|
;--------------------------------------
|
|
|
|
apply_direct:
|
|
|
|
mcall 48,2,color_table,10*4
|
|
|
|
jmp doapply
|
|
|
|
;--------------------------------------
|
|
|
|
no_apply:
|
|
|
|
cmp ah,17 ; load skin file
|
|
|
|
jne no_load_skin
|
|
|
|
|
|
|
|
call load_skin_file
|
|
|
|
call draw_window
|
|
|
|
jmp still
|
|
|
|
;--------------------------------------
|
|
|
|
no_load_skin:
|
|
|
|
cmp ah,18 ; apply skin
|
|
|
|
jne no_apply_skin
|
|
|
|
|
|
|
|
cmp [skin_info],0
|
|
|
|
je no_apply_skin
|
|
|
|
|
|
|
|
mcall 48,8,skin_info
|
|
|
|
call draw_window
|
|
|
|
jmp still
|
|
|
|
;--------------------------------------
|
|
|
|
no_apply_skin:
|
|
|
|
cmp ah,31
|
|
|
|
jb no_new_colour
|
|
|
|
|
|
|
|
cmp ah,41
|
|
|
|
jg no_new_colour
|
|
|
|
|
2013-04-01 00:26:30 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.start_ColorDialog:
|
|
|
|
push dword ColorDialog_data
|
|
|
|
call [ColorDialog_Start]
|
|
|
|
; 2 - use another method/not found program
|
|
|
|
cmp [ColorDialog_data.status],2
|
|
|
|
je still
|
|
|
|
; 1 - OK, color selected
|
|
|
|
cmp [ColorDialog_data.status],1
|
|
|
|
jne still
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
shr eax,8
|
|
|
|
sub eax,31
|
|
|
|
shl eax,2
|
2013-04-01 00:26:30 +02:00
|
|
|
mov ebx,[ColorDialog_data.color]
|
|
|
|
and ebx,0xffffff ; temporary for ColorDialog!!!!!!!!!!
|
2013-02-24 20:52:43 +01:00
|
|
|
mov [eax+color_table],ebx
|
|
|
|
cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN'
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
mov edi,[not_packed_area+SKIN_HEADER.params]
|
|
|
|
mov dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx
|
|
|
|
call draw_skin
|
|
|
|
;--------------------------------------
|
|
|
|
@@:
|
|
|
|
call draw_colours
|
|
|
|
jmp still
|
|
|
|
;--------------------------------------
|
|
|
|
no_new_colour:
|
|
|
|
cmp ah,1 ; terminate
|
|
|
|
jnz noid1
|
|
|
|
;--------------------------------------
|
|
|
|
close:
|
|
|
|
or eax,-1
|
|
|
|
mcall
|
|
|
|
;--------------------------------------
|
|
|
|
noid1:
|
|
|
|
jmp still
|
|
|
|
;---------------------------------------------------------------------
|
2020-05-17 15:31:17 +02:00
|
|
|
load_dtp_file:
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; invoke OpenDialog
|
|
|
|
mov [OpenDialog_data.type],dword 0
|
2013-02-24 20:52:43 +01:00
|
|
|
push dword OpenDialog_data
|
|
|
|
call [OpenDialog_Start]
|
2010-09-09 22:58:26 +02:00
|
|
|
cmp [OpenDialog_data.status],1
|
|
|
|
je .1
|
|
|
|
ret
|
|
|
|
.1:
|
|
|
|
; prepare for PathShow
|
|
|
|
push dword PathShow_data_1
|
|
|
|
call [PathShow_prepare]
|
|
|
|
|
|
|
|
call draw_PathShow
|
|
|
|
;---------------------------------------------------------------------
|
2020-05-17 15:31:17 +02:00
|
|
|
.2:
|
2013-02-24 20:52:43 +01:00
|
|
|
xor eax, eax
|
|
|
|
mov ebx, read_info
|
|
|
|
mov dword [ebx], eax ; subfunction: read
|
|
|
|
mov dword [ebx+4], eax ; offset (low dword)
|
|
|
|
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
|
|
|
|
ret
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
2006-03-04 12:44:33 +01:00
|
|
|
load_skin_file:
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; invoke OpenDialog
|
2013-02-24 20:52:43 +01:00
|
|
|
push dword OpenDialog_data2
|
|
|
|
call [OpenDialog_Start]
|
2010-09-09 22:58:26 +02:00
|
|
|
cmp [OpenDialog_data2.status],1
|
|
|
|
je .1
|
|
|
|
ret
|
|
|
|
.1:
|
|
|
|
; prepare for PathShow
|
|
|
|
push dword PathShow_data_2
|
|
|
|
call [PathShow_prepare]
|
|
|
|
|
|
|
|
call draw_PathShow
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.2:
|
2013-02-24 20:52:43 +01:00
|
|
|
xor eax,eax
|
|
|
|
mov ebx,read_info2
|
|
|
|
mov dword [ebx], eax ; subfunction: read
|
|
|
|
mov dword [ebx+4], eax ; offset (low dword)
|
|
|
|
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
|
|
|
|
|
|
|
|
mov esi, file_load_area
|
|
|
|
|
|
|
|
cmp dword [esi], 'KPCK'
|
|
|
|
jnz notpacked
|
|
|
|
|
|
|
|
cmp dword [esi+4], 32*1024 ; max 32 KBytes
|
|
|
|
ja doret
|
|
|
|
|
|
|
|
push unpack_area
|
|
|
|
push esi
|
|
|
|
call unpack
|
|
|
|
mov esi,unpack_area
|
|
|
|
;--------------------------------------
|
2007-05-10 14:29:08 +02:00
|
|
|
notpacked:
|
2013-02-24 20:52:43 +01:00
|
|
|
cmp [esi+SKIN_HEADER.ident],dword 'SKIN'
|
|
|
|
jne doret
|
|
|
|
|
|
|
|
mov edi,not_packed_area
|
|
|
|
mov ecx,0x8000/4
|
|
|
|
rep movsd
|
|
|
|
|
|
|
|
mov ebp,not_packed_area
|
|
|
|
mov esi,[ebp+SKIN_HEADER.params]
|
|
|
|
add esi,ebp
|
|
|
|
lea esi,[esi+SKIN_PARAMS.dtp.data]
|
|
|
|
mov edi,color_table
|
|
|
|
mov ecx,10
|
|
|
|
rep movsd
|
|
|
|
;--------------------------------------
|
|
|
|
doret:
|
|
|
|
ret
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
save_file:
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
; invoke OpenDialog
|
|
|
|
mov [OpenDialog_data.type],dword 1
|
2013-02-24 20:52:43 +01:00
|
|
|
push dword OpenDialog_data
|
|
|
|
call [OpenDialog_Start]
|
2010-09-09 22:58:26 +02:00
|
|
|
cmp [OpenDialog_data.status],1
|
|
|
|
je .1
|
|
|
|
ret
|
|
|
|
.1:
|
|
|
|
; prepare for PathShow
|
|
|
|
push dword PathShow_data_1
|
|
|
|
call [PathShow_prepare]
|
|
|
|
|
|
|
|
call draw_PathShow
|
|
|
|
;---------------------------------------------------------------------
|
2013-02-24 20:52:43 +01:00
|
|
|
xor eax,eax
|
|
|
|
mov ebx,write_info
|
|
|
|
mov [ebx],dword 2 ; subfunction: write
|
|
|
|
and [ebx+4],eax ; (reserved)
|
|
|
|
and [ebx+8],eax ; (reserved)
|
|
|
|
mov [ebx+12],dword 10*4 ; bytes to write
|
|
|
|
mov [ebx+16],dword color_table ; address
|
|
|
|
mcall 70
|
|
|
|
ret
|
2010-09-09 22:58:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
2013-04-01 00:26:30 +02:00
|
|
|
draw_button_row:
|
2021-07-04 12:44:36 +02:00
|
|
|
mov edx,0x40000000 + 31 ; BUTTON ROW
|
|
|
|
mov ebx,(area.w+18)*65536+29
|
|
|
|
mov ecx,9*65536+15
|
2013-04-01 00:26:30 +02:00
|
|
|
mov eax,8
|
|
|
|
;-----------------------------------
|
|
|
|
.newb:
|
|
|
|
mcall
|
2021-07-04 12:44:36 +02:00
|
|
|
add ecx,22*65536
|
2013-04-01 00:26:30 +02:00
|
|
|
inc edx
|
2021-07-04 12:44:36 +02:00
|
|
|
cmp edx,0x40000000 + 40
|
2013-04-01 00:26:30 +02:00
|
|
|
jbe .newb
|
2013-02-24 20:52:43 +01:00
|
|
|
ret
|
2013-04-01 00:26:30 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
draw_button_row_of_texts:
|
2021-07-04 12:44:36 +02:00
|
|
|
mov ebx,(area.w+49)*65536+9 ; ROW OF TEXTS
|
2013-04-01 00:26:30 +02:00
|
|
|
mov ecx,[w_work_text]
|
2021-07-04 12:44:36 +02:00
|
|
|
add ecx,0x10000000
|
2013-04-01 00:26:30 +02:00
|
|
|
mov edx,text
|
|
|
|
mov esi,32
|
|
|
|
mov eax,4
|
|
|
|
;-----------------------------------
|
|
|
|
.newline:
|
|
|
|
mcall
|
2021-07-04 12:44:36 +02:00
|
|
|
add ebx,22
|
2013-04-01 00:26:30 +02:00
|
|
|
add edx,32
|
|
|
|
cmp [edx],byte 'x'
|
|
|
|
jne .newline
|
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
draw_colours:
|
2013-02-24 20:52:43 +01:00
|
|
|
pusha
|
|
|
|
mov esi,color_table
|
2021-07-04 12:44:36 +02:00
|
|
|
mov ebx,(area.w+19)*65536+28
|
2013-04-01 00:26:30 +02:00
|
|
|
mov ecx,10*65536+14
|
|
|
|
mov eax,13
|
2013-04-16 03:27:22 +02:00
|
|
|
mov [frame_data.draw_text_flag],dword 0
|
2013-02-24 20:52:43 +01:00
|
|
|
;--------------------------------------
|
|
|
|
newcol:
|
|
|
|
mov edx,[esi]
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall
|
2013-04-16 03:27:22 +02:00
|
|
|
|
|
|
|
push ebx ecx
|
|
|
|
|
|
|
|
sub ebx,2 shl 16
|
|
|
|
add bx,4
|
|
|
|
sub ecx,2 shl 16
|
|
|
|
add cx,4
|
|
|
|
|
|
|
|
mov [frame_data.x],ebx
|
|
|
|
mov [frame_data.y],ecx
|
|
|
|
|
|
|
|
push dword frame_data
|
|
|
|
call [Frame_draw]
|
|
|
|
|
|
|
|
pop ecx ebx
|
|
|
|
|
2021-07-04 12:44:36 +02:00
|
|
|
add ecx,22*65536
|
2013-02-24 20:52:43 +01:00
|
|
|
add esi,4
|
2013-04-01 00:26:30 +02:00
|
|
|
cmp esi,color_table+4*9
|
2013-02-24 20:52:43 +01:00
|
|
|
jbe newcol
|
2006-01-03 10:43:31 +01:00
|
|
|
|
2013-02-24 20:52:43 +01:00
|
|
|
popa
|
|
|
|
ret
|
2011-08-18 22:07:22 +02:00
|
|
|
;----------------------------------------------------------------------
|
2010-09-09 22:58:26 +02:00
|
|
|
draw_PathShow:
|
|
|
|
pusha
|
2021-07-04 12:44:36 +02:00
|
|
|
mcall 13,<frame_1.x+10,frame_1.w-25>,<frame_1.y+16,15>,0xffffff
|
|
|
|
mcall 13,<frame_2.x+10,frame_2.w-25>,<frame_2.y+16,15>,0xffffff
|
2010-09-09 22:58:26 +02:00
|
|
|
; draw for PathShow
|
|
|
|
push dword PathShow_data_1
|
|
|
|
call [PathShow_draw]
|
|
|
|
|
|
|
|
push dword PathShow_data_2
|
|
|
|
call [PathShow_draw]
|
|
|
|
popa
|
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
; *********************************************
|
|
|
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
|
|
|
; *********************************************
|
|
|
|
draw_window:
|
2011-08-18 22:07:22 +02:00
|
|
|
mcall 12,1
|
|
|
|
mcall 48,3,app_colours,10*4
|
|
|
|
mcall 14
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall 48,4
|
|
|
|
mov [current_skin_high],eax
|
2011-08-18 22:07:22 +02:00
|
|
|
; DRAW WINDOW
|
|
|
|
xor eax,eax ; function 0 : define and draw window
|
|
|
|
xor esi,esi
|
|
|
|
mov edx,[w_work] ; color of work area RRGGBB,8->color
|
2013-04-01 00:26:30 +02:00
|
|
|
or edx,0x34000000
|
2021-07-04 12:44:36 +02:00
|
|
|
mov ecx,50 shl 16 + win.h
|
2013-04-01 00:26:30 +02:00
|
|
|
add ecx,[current_skin_high]
|
2021-07-04 12:44:36 +02:00
|
|
|
mcall ,<110, win.w>,,,,title
|
2011-08-18 22:07:22 +02:00
|
|
|
|
|
|
|
mcall 9,procinfo,-1
|
|
|
|
|
|
|
|
mov eax,[procinfo+70] ;status of window
|
|
|
|
test eax,100b
|
|
|
|
jne .end
|
2013-02-24 20:52:43 +01:00
|
|
|
|
2013-04-01 00:26:30 +02:00
|
|
|
;if lang eq ru
|
2006-03-04 12:44:33 +01:00
|
|
|
load_w = (5*2+6*9)
|
|
|
|
save_w = (5*2+6*9)
|
|
|
|
flat_w = (5*2+6*7)
|
|
|
|
apply_w = (5*2+6*9)
|
2013-04-01 00:26:30 +02:00
|
|
|
;else
|
|
|
|
; load_w = (5*2+6*6)
|
|
|
|
; save_w = (5*2+6*8)
|
|
|
|
; flat_w = (5*2+6*4)
|
|
|
|
; apply_w = (5*2+6*7)
|
|
|
|
;end if
|
|
|
|
;-----------------------------------
|
|
|
|
; select color DTP frame
|
|
|
|
; LOAD BUTTON ; button 12
|
2021-07-04 12:44:36 +02:00
|
|
|
mcall 8,<frame_1.x+10,load_w>,<frame_1.y+38,18>,12,[w_work_button]
|
2011-08-18 22:07:22 +02:00
|
|
|
; SAVE BUTTON
|
|
|
|
add ebx,(load_w+2)*65536-load_w+save_w
|
|
|
|
inc edx
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall ; button 13
|
|
|
|
; APPLY BUTTON
|
2021-07-04 12:44:36 +02:00
|
|
|
mov ebx,(frame_1.x + frame_1.w - apply_w - 15)*65536+apply_w
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall 8,,,16 ; button 17
|
|
|
|
; select color DTP button text
|
2021-07-04 12:44:36 +02:00
|
|
|
mcall 4,<frame_1.x+16,frame_1.y+44>,[w_work_button_text],t1,t1.size
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------
|
|
|
|
; select skin frame
|
|
|
|
; LOAD SKIN BUTTON ; button 17
|
2021-07-04 12:44:36 +02:00
|
|
|
mcall 8,<frame_2.x+10,load_w>,<frame_2.y+38,18>,17,[w_work_button]
|
2011-08-18 22:07:22 +02:00
|
|
|
; 3D
|
2013-04-01 00:26:30 +02:00
|
|
|
mov ebx,(frame_2.x+155)*65536+34
|
|
|
|
mcall ,,,14 ; button 14
|
2011-08-18 22:07:22 +02:00
|
|
|
; FLAT
|
2013-04-01 00:26:30 +02:00
|
|
|
add ebx,36*65536-34+flat_w
|
2011-08-18 22:07:22 +02:00
|
|
|
inc edx
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall ; button 15
|
2011-08-18 22:07:22 +02:00
|
|
|
; APPLY SKIN BUTTON
|
2021-07-04 12:44:36 +02:00
|
|
|
mov ebx,(frame_2.x + frame_2.w - apply_w -15)*65536+apply_w
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall ,,,18 ; button 18
|
|
|
|
; select skin button text
|
2021-07-04 12:44:36 +02:00
|
|
|
mcall 4,<frame_2.x+16,frame_2.y+44>,[w_work_button_text],t2,t2.size
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------
|
|
|
|
call draw_button_row
|
|
|
|
call draw_button_row_of_texts
|
|
|
|
call draw_colours
|
2011-08-18 22:07:22 +02:00
|
|
|
;-----------------------------------
|
2021-07-04 12:44:36 +02:00
|
|
|
mov [frame_data.x],dword frame_1.x shl 16+frame_1.w
|
2013-04-16 03:27:22 +02:00
|
|
|
mov [frame_data.y],dword frame_1.y shl 16+frame_1.height
|
|
|
|
mov [frame_data.text_pointer],dword select_dtp_text
|
|
|
|
mov eax,[w_work]
|
|
|
|
mov [frame_data.font_backgr_color],eax
|
|
|
|
mov eax,[w_work_text]
|
|
|
|
mov [frame_data.font_color],eax
|
|
|
|
mov [frame_data.draw_text_flag],dword 1
|
2013-04-01 00:26:30 +02:00
|
|
|
|
2013-04-16 03:27:22 +02:00
|
|
|
push dword frame_data
|
|
|
|
call [Frame_draw]
|
|
|
|
;-----------------------------------
|
2021-07-04 12:44:36 +02:00
|
|
|
mov [frame_data.x],dword frame_2.x shl 16+frame_2.w
|
2013-04-16 03:27:22 +02:00
|
|
|
mov [frame_data.y],dword frame_2.y shl 16+frame_2.height
|
|
|
|
mov [frame_data.text_pointer],dword select_skin_text
|
|
|
|
|
|
|
|
push dword frame_data
|
|
|
|
call [Frame_draw]
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------
|
|
|
|
call draw_PathShow
|
2011-08-18 22:07:22 +02:00
|
|
|
;-----------------------------------
|
|
|
|
cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN'
|
|
|
|
jne @f
|
|
|
|
call draw_skin
|
|
|
|
@@:
|
|
|
|
.end:
|
|
|
|
mcall 12,2
|
|
|
|
ret
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
include 'drawskin.inc'
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
; DATA AREA
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
include 'idata.inc'
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
IM_END:
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
include 'udata.inc'
|
|
|
|
;-----------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
I_END:
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------------------------------------------------
|