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:
|
|
|
|
width dw ?
|
|
|
|
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
|
|
|
|
.y = 220
|
|
|
|
.width = 420
|
|
|
|
.height = 50
|
|
|
|
;--------------------------------------
|
|
|
|
frame_2:
|
|
|
|
.x = 5
|
|
|
|
.y = 280
|
|
|
|
.width = 420
|
|
|
|
.height = 50
|
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
|
|
|
|
mov edi,skin_info
|
|
|
|
mov esi,default_skin
|
2010-09-09 22:58:26 +02:00
|
|
|
xor eax,eax
|
|
|
|
cld
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
stosb
|
|
|
|
test eax,eax
|
|
|
|
jnz @b
|
2020-05-17 15:31:17 +02:00
|
|
|
|
|
|
|
mov edi,dtp_name
|
2010-09-09 22:58:26 +02:00
|
|
|
mov esi,default_dtp
|
|
|
|
xor eax,eax
|
|
|
|
cld
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
stosb
|
|
|
|
test eax,eax
|
|
|
|
jnz @b
|
|
|
|
;---------------------------------------------------------------------
|
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:
|
|
|
|
mov edi,dtp_name
|
|
|
|
mov esi,app_param
|
2010-09-09 22:58:26 +02:00
|
|
|
xor eax,eax
|
|
|
|
cld
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
stosb
|
2020-05-17 15:31:17 +02:00
|
|
|
test eax,eax
|
|
|
|
jnz @b
|
|
|
|
call load_dtp_file.1
|
|
|
|
jmp skin_path_ready
|
|
|
|
|
|
|
|
load_skin_from_param:
|
|
|
|
mov edi,skin_info
|
|
|
|
mov esi,app_param
|
|
|
|
xor eax,eax
|
|
|
|
cld
|
|
|
|
@@:
|
|
|
|
lodsb
|
|
|
|
stosb
|
|
|
|
test eax,eax
|
|
|
|
jnz @b
|
|
|
|
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:
|
|
|
|
mov edx,0x60000000 + 31 ; BUTTON ROW
|
|
|
|
mov ebx,220*65536+14
|
|
|
|
mov ecx,10*65536+14
|
|
|
|
mov eax,8
|
|
|
|
;-----------------------------------
|
|
|
|
.newb:
|
|
|
|
mcall
|
|
|
|
add ecx,20*65536
|
|
|
|
inc edx
|
|
|
|
cmp edx,0x60000000 + 40
|
|
|
|
jbe .newb
|
2013-02-24 20:52:43 +01:00
|
|
|
ret
|
2013-04-01 00:26:30 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
draw_button_row_of_texts:
|
|
|
|
mov ebx,240*65536+13 ; ROW OF TEXTS
|
|
|
|
mov ecx,[w_work_text]
|
|
|
|
mov edx,text
|
|
|
|
mov esi,32
|
|
|
|
mov eax,4
|
|
|
|
;-----------------------------------
|
|
|
|
.newline:
|
|
|
|
mcall
|
|
|
|
add ebx,20
|
|
|
|
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
|
2013-04-01 00:26:30 +02:00
|
|
|
mov ebx,220*65536+14
|
|
|
|
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
|
|
|
|
|
2013-04-01 00:26:30 +02:00
|
|
|
add ecx,20*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
|
2013-04-01 00:26:30 +02:00
|
|
|
mcall 13,<frame_1.x+5,frame_1.width-15>,<frame_1.y+7,15>,0xffffff
|
|
|
|
mcall 13,<frame_2.x+5,frame_2.width-15>,<frame_2.y+7,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
|
|
|
|
mov ecx,50 shl 16 + 346
|
|
|
|
add ecx,[current_skin_high]
|
|
|
|
mcall ,<110,440>,,,,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
|
2016-01-06 02:22:41 +01:00
|
|
|
mcall 8,<frame_1.x+10,load_w>,<frame_1.y+25,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
|
|
|
|
mov ebx,(frame_1.x + frame_1.width - apply_w - 15)*65536+apply_w
|
|
|
|
mcall 8,,,16 ; button 17
|
|
|
|
; select color DTP button text
|
2016-01-06 02:22:41 +01:00
|
|
|
mcall 4,<frame_1.x+16,frame_1.y+31>,[w_work_button_text],t1,t1.size
|
2013-04-01 00:26:30 +02:00
|
|
|
;-----------------------------------
|
|
|
|
; select skin frame
|
|
|
|
; LOAD SKIN BUTTON ; button 17
|
2016-01-06 02:22:41 +01:00
|
|
|
mcall 8,<frame_2.x+10,load_w>,<frame_2.y+25,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
|
2013-04-01 00:26:30 +02:00
|
|
|
mov ebx,(frame_2.x + frame_2.width - apply_w -15)*65536+apply_w
|
|
|
|
mcall ,,,18 ; button 18
|
|
|
|
; select skin button text
|
2016-01-06 02:22:41 +01:00
|
|
|
mcall 4,<frame_2.x+16,frame_2.y+31>,[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
|
|
|
;-----------------------------------
|
2013-04-16 03:27:22 +02:00
|
|
|
mov [frame_data.x],dword frame_1.x shl 16+frame_1.width
|
|
|
|
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]
|
|
|
|
;-----------------------------------
|
|
|
|
mov [frame_data.x],dword frame_2.x shl 16+frame_2.width
|
|
|
|
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
|
|
|
;-----------------------------------------------------------------------------
|