'cnc_editor' small fix in button colors
git-svn-id: svn://kolibrios.org@7441 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
840f6b865f
commit
50c6905604
@ -77,7 +77,7 @@ start:
|
||||
mov [pb.height], dword 17
|
||||
mov [pb.max], dword 100;599
|
||||
mov [pb.min], dword 0 ;-397
|
||||
mov [pb.value], dword 50;-397
|
||||
mov [pb.value], dword 0 ;-397
|
||||
mov [pb.back_color], dword 00C8D0D4h
|
||||
mov [pb.progress_color], dword 8072B7EBh
|
||||
mov [pb.frame_color], dword 00406175h
|
||||
@ -151,30 +151,13 @@ mouse:
|
||||
call mouse_left_d
|
||||
jmp .end_l
|
||||
@@:
|
||||
;bt eax,0
|
||||
;jnc @f
|
||||
;mouse l. but. move
|
||||
;call mouse_left_m
|
||||
;jmp .end_l
|
||||
;@@:
|
||||
bt eax,16
|
||||
jnc .end_l
|
||||
;mouse l. but. up
|
||||
call mouse_left_u
|
||||
;jmp .end_l
|
||||
.end_l:
|
||||
;bt eax,9
|
||||
;jnc @f
|
||||
;mouse r. but. press
|
||||
;jmp .end_r
|
||||
;@@:
|
||||
;bt eax,1
|
||||
;jnc @f
|
||||
;mouse r. but. move
|
||||
;call mouse_right_m
|
||||
;jmp .end_r
|
||||
;@@:
|
||||
;.end_r:
|
||||
|
||||
|
||||
call buf_get_mouse_coord
|
||||
cmp eax,-1
|
||||
@ -298,8 +281,7 @@ proc buf_get_mouse_coord
|
||||
endp
|
||||
|
||||
align 4
|
||||
proc timer_funct
|
||||
pushad
|
||||
proc timer_funct uses eax ebx
|
||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||
mov [last_time],eax
|
||||
|
||||
@ -309,7 +291,6 @@ proc timer_funct
|
||||
stdcall draw_obj2d,ObjData
|
||||
stdcall [buf2d_draw], buf_0
|
||||
@@:
|
||||
popad
|
||||
ret
|
||||
endp
|
||||
|
||||
@ -559,11 +540,9 @@ but_open_file:
|
||||
jnz .end_open_file
|
||||
cmp ebx,0xffffffff
|
||||
je .end_open_file
|
||||
|
||||
mov [open_file_size],ebx
|
||||
mcall SF_SET_CAPTION,1,openfile_path
|
||||
|
||||
;---
|
||||
stdcall FileInit,[open_file_data],[open_file_size]
|
||||
stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
|
||||
stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥
|
||||
@ -610,8 +589,6 @@ proc but_restore_zoom
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
|
||||
;input:
|
||||
; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥
|
||||
;output:
|
||||
@ -1094,7 +1071,8 @@ thread_n_file:
|
||||
rb 2048
|
||||
stacktop:
|
||||
sys_path rb 1024
|
||||
file_name: rb 1024 ;4096
|
||||
file_name:
|
||||
rb 1024
|
||||
library_path rb 1024
|
||||
plugin_path rb 4096
|
||||
openfile_path rb 4096
|
||||
|
@ -4,7 +4,7 @@
|
||||
;add_object_in_list, (¢à¥¬. áâà.), (Object.FigData)
|
||||
; mov [Object.FigData], (tl_node_add(¢à¥¬. áâà.),tl_node_get_data)
|
||||
|
||||
;draw_fig2d_litl, ___, pobj, (Object.FigData), ___, ___, ___
|
||||
;draw_fig2d_litl, ___, pobj, (Object.FigData), fign, ___, ___, ___
|
||||
|
||||
struct Object
|
||||
OType dd ?
|
||||
@ -107,8 +107,8 @@ graf_margin_left dd 3 ;margin in pixels
|
||||
graf_margin_right dd 3+6 ;margin in pixels
|
||||
graf_margin_top dd 3+9 ;margin in pixels
|
||||
graf_margin_bot dd 3+9 ;margin in pixels
|
||||
png_data dd ?
|
||||
png_size dd ?
|
||||
data_printed dd ? ;ç¨á«® ¢ë¯®«¥ëå ª®¬ ¤
|
||||
data_all dd ? ;ç¨á«® ¢á¥å ª®¬ ¤
|
||||
|
||||
;global variables:
|
||||
ObjData Object
|
||||
@ -220,6 +220,8 @@ proc ObjectInit uses eax ebx ecx edi, pobj:dword, etxt:dword
|
||||
push ecx
|
||||
mov edi,eax
|
||||
xor eax,eax
|
||||
mov [data_all],eax ;å¨â஥ ç «ì®¥ ®¡ã«¥¨¥ áç¥â稪
|
||||
mov [data_printed],eax
|
||||
rep stosd ;clear memory
|
||||
pop ecx
|
||||
|
||||
@ -227,12 +229,19 @@ proc ObjectInit uses eax ebx ecx edi, pobj:dword, etxt:dword
|
||||
align 4
|
||||
.cycle0:
|
||||
stdcall FigureInit,edi
|
||||
mov eax,[edi]
|
||||
mov eax,[eax+Figure.PoiCount]
|
||||
or eax,eax
|
||||
jnz @f
|
||||
inc eax ;¬¨¨¬ã¬ 1- ª®¬ ¤
|
||||
@@:
|
||||
add [data_all],eax
|
||||
cmp esi,[etxt]
|
||||
jge .cycle0end
|
||||
add edi,4
|
||||
loop .cycle0
|
||||
.cycle0end:
|
||||
inc dword[ebx+Object.FigCount] ;???
|
||||
inc dword[ebx+Object.FigCount]
|
||||
or ecx,ecx
|
||||
jz @f
|
||||
;㬥ìè ¥¬ ®¡ê¥¬ ¯ ¬ï⨠¢ë¤¥«¥ë© ¤«ï ª®¬ ¤
|
||||
@ -242,6 +251,12 @@ align 4
|
||||
stdcall mem.ReAlloc,[ebx+Object.FigData],eax
|
||||
mov [ebx+Object.FigData],eax
|
||||
@@:
|
||||
;ãáâ ®¢ª áç¥â稪 ¨ ¯à®£à¥á¡ à 25 %
|
||||
mov eax,[data_all]
|
||||
mov [pb.max],eax
|
||||
shr eax,2
|
||||
mov [data_printed],eax
|
||||
mov [pb.value],eax
|
||||
|
||||
stdcall ObjCalculateScale,ebx
|
||||
|
||||
@ -896,6 +911,7 @@ endp
|
||||
align 4
|
||||
proc draw_obj2d, pobj:dword
|
||||
locals
|
||||
data_draw dd ?
|
||||
CentrX dd ?
|
||||
CentrY dd ?
|
||||
endl
|
||||
@ -934,9 +950,17 @@ pushad
|
||||
add edx,[graf_margin_left]
|
||||
add edx,[ebx+Object.MCentrX]
|
||||
mov [CentrX],edx
|
||||
mov dword[data_draw],0
|
||||
align 4
|
||||
.cycle0:
|
||||
stdcall draw_fig2d_litl, buf_0,ebx,[edi],0,edx,eax
|
||||
stdcall draw_fig2d_litl, buf_0,ebx,[edi],[data_draw],0,edx,eax
|
||||
mov esi,[edi]
|
||||
mov esi,[esi+Figure.PoiCount]
|
||||
or esi,esi
|
||||
jnz @f
|
||||
inc esi
|
||||
@@:
|
||||
add [data_draw],esi
|
||||
add edi,4
|
||||
loop .cycle0
|
||||
stdcall [buf2d_flip_v], buf_0
|
||||
@ -981,12 +1005,17 @@ endp
|
||||
|
||||
;input:
|
||||
; pbuf - pointer to buffer 2d
|
||||
; pobj - 㪠§ â¥«ì ®¡ê¥ªâ
|
||||
; pfig - 㪠§ ⥫ì 䨣ãàã
|
||||
; fign - ®¬¥à 䨣ãàë
|
||||
;description:
|
||||
; äãªæ¨ï ¤«ï à¨á®¢ ¨ï ®¡ê¥ªâ ¯® ç áâï¬
|
||||
align 4
|
||||
proc draw_fig2d_litl, pbuf:dword, pobj:dword, pfig:dword, Scale:dword, CentrX:dword, CentrY:dword
|
||||
proc draw_fig2d_litl, pbuf:dword, pobj:dword, pfig:dword, fign:dword,\
|
||||
Scale:dword, CentrX:dword, CentrY:dword
|
||||
locals
|
||||
PervX dd 0 ;pervios point coord X
|
||||
line_col dd ? ;figure color
|
||||
PervX dd 0 ;pervios point coord X
|
||||
PervY dd 0 ;pervios point coord Y
|
||||
GrafX dd ? ;active point coord X
|
||||
GrafY dd ? ;active point coord Y
|
||||
@ -1011,6 +1040,7 @@ pushad
|
||||
lea eax,[edx+Object.WScale]
|
||||
@@:
|
||||
fmul qword[eax]
|
||||
mov esi,[fign]
|
||||
align 4
|
||||
.cycle0:
|
||||
fld qword[edi+Point.CoordX]
|
||||
@ -1025,17 +1055,24 @@ align 4
|
||||
fistp dword[ebp-4]
|
||||
stdcall [buf2d_set_pixel], [pbuf], [GrafX],[GrafY], 0xff0000
|
||||
cmp ecx,[ebx+Figure.PoiCount]
|
||||
je @f
|
||||
stdcall [buf2d_line_sm], [pbuf], [PervX],[PervY], [GrafX],[GrafY], 0x80
|
||||
;sub esp,24
|
||||
;call [buf2d_line]
|
||||
stdcall [buf2d_line], [pbuf], [PervX],[PervY], [GrafX],[GrafY], 0x80
|
||||
@@:
|
||||
je .end0
|
||||
;®¯à¥¤¥«¥¨¥ 梥â
|
||||
cmp esi,[data_printed]
|
||||
jl @f
|
||||
mov [line_col],0x80 ;if not printed
|
||||
jmp .end1
|
||||
@@:
|
||||
mov [line_col],0xff0000 ;if was printed
|
||||
.end1:
|
||||
stdcall [buf2d_line_sm], [pbuf], [PervX],[PervY], [GrafX],[GrafY], [line_col]
|
||||
stdcall [buf2d_line], [pbuf], [PervX],[PervY], [GrafX],[GrafY], [line_col]
|
||||
.end0:
|
||||
mov eax,[GrafX]
|
||||
mov [PervX],eax
|
||||
mov eax,[GrafY]
|
||||
mov [PervY],eax
|
||||
add edi,sizeof.Point
|
||||
inc esi
|
||||
;;loop .cycle0
|
||||
dec ecx
|
||||
jnz .cycle0
|
||||
|
@ -14,7 +14,7 @@ include 'cnc_editor.inc'
|
||||
include '../../develop/info3ds/info_fun_float.inc'
|
||||
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
caption db 'CNC editor 24.09.18',0 ;¯®¤¯¨áì ®ª
|
||||
caption db 'CNC editor 08.10.18',0 ;¯®¤¯¨áì ®ª
|
||||
|
||||
run_file_70 FileInfoBlock
|
||||
|
||||
@ -321,7 +321,7 @@ pushad
|
||||
|
||||
; *** à¨á®¢ ¨¥ £« ¢®£® ®ª (¢ë¯®«ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
|
||||
mov edx,[sc.work]
|
||||
or edx,(3 shl 24)+0x10000000+0x20000000
|
||||
or edx,0x33000000
|
||||
mov edi,caption
|
||||
mcall SF_CREATE_WINDOW,(20 shl 16)+599,(20 shl 16)+415
|
||||
|
||||
@ -363,73 +363,54 @@ pushad
|
||||
.end0:
|
||||
|
||||
; *** ᮧ¤ ¨¥ ª®¯®ª ¯ ¥«ì ***
|
||||
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3,, [sc.work_button]
|
||||
|
||||
mov ebx,(30 shl 16)+20
|
||||
mov edx,4 ;0x4000000?
|
||||
int 0x40 ;open
|
||||
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button]
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,5
|
||||
int 0x40 ;save
|
||||
mcall ,,,4 ;open
|
||||
add ebx,25 shl 16
|
||||
mcall ,,,5 ;save
|
||||
|
||||
add ebx,30 shl 16
|
||||
mov edx,6
|
||||
int 0x40 ;captions on off
|
||||
mcall ,,,6 ;captions on off
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,7
|
||||
int 0x40 ;figure move up
|
||||
mcall ,,,7 ;figure move up
|
||||
add ebx,25 shl 16
|
||||
mov edx,8
|
||||
int 0x40 ;figure move down
|
||||
mcall ,,,8 ;figure move down
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,9
|
||||
int 0x40 ;sel points dlg
|
||||
mcall ,,,9 ;sel points dlg
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,10
|
||||
int 0x40 ;sel points move up
|
||||
mcall ,,,10 ;sel points move up
|
||||
add ebx,25 shl 16
|
||||
mov edx,11
|
||||
int 0x40 ;sel points move down
|
||||
mcall ,,,11 ;sel points move down
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,12
|
||||
int 0x40 ;align sel points left
|
||||
mcall ,,,12 ;align sel points left
|
||||
add ebx,25 shl 16
|
||||
mov edx,13
|
||||
int 0x40 ;align sel points right
|
||||
mcall ,,,13 ;align sel points right
|
||||
add ebx,25 shl 16
|
||||
mov edx,14
|
||||
int 0x40 ;align sel points top
|
||||
mcall ,,,14 ;align sel points top
|
||||
add ebx,25 shl 16
|
||||
mov edx,15
|
||||
int 0x40 ;align sel points bottom
|
||||
mcall ,,,15 ;align sel points bottom
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,16
|
||||
int 0x40 ;copy to clipboard
|
||||
mcall ,,,16 ;copy to clipboard
|
||||
add ebx,25 shl 16
|
||||
mov edx,17
|
||||
int 0x40 ;paste from clipboard
|
||||
mcall ,,,17 ;paste from clipboard
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,18
|
||||
int 0x40 ;sel points del
|
||||
mcall ,,,18 ;sel points del
|
||||
|
||||
add ebx,30 shl 16
|
||||
mov edx,19
|
||||
int 0x40 ;restore zoom
|
||||
mcall ,,,19 ;restore zoom
|
||||
|
||||
add ebx,30 shl 16
|
||||
mov edx,20
|
||||
int 0x40 ;.png
|
||||
mcall ,,,20 ;.png
|
||||
|
||||
add ebx,25 shl 16
|
||||
mov edx,21
|
||||
int 0x40 ;options scale
|
||||
mcall ,,,21 ;options scale
|
||||
|
||||
; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å ***
|
||||
mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;icon new
|
||||
|
@ -113,8 +113,6 @@ txt_rs db ')',0
|
||||
txt_len db ' len=',0
|
||||
txt_39 db 39,0
|
||||
|
||||
use_mem_array_figure equ 0 ;1 - ¨α―<EFBFBD>«μ§<EFBFBD>’ βμ €¨ ¬¨η₯αͺ¨© ¬ αα¨’ €«ο αβΰγͺβγΰ α <EFBFBD>―¨α ¨ο¬¨ 䨣γΰ
|
||||
|
||||
;᢮©á⢠¤«ï à¨á®¢ ¨ï â®ç¥ª
|
||||
PROP_BIT_SELECT equ 30 ;â®çª ¯®¤ ¢ë¤¥«¥¨¥¬
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user