Subversion Repositories Kolibri OS

Rev

Rev 180 | Rev 485 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 heavyiron 1
;*******************************************************
2
;**************GRAPHICS EDITOR ANIMAGE *****************
3
;*******************************************************
180 heavyiron 4
 
255 heavyiron 5
 
6
; version 1.1  year      9.12.2006
7
 
8
; AUTORS:
9
; programming by andrew_programmer
10
; design      by golus
11
 
180 heavyiron 12
use32
13
org 0x0
14
 
255 heavyiron 15
      db  'MENUET01'
16
      dd  0x1
17
      dd  START
18
      dd  I_END
19
      dd  0x19000;100 kb
20
      dd  0x19000;
21
      dd  parameters,0x0
22
 
23
 
180 heavyiron 24
  include 'giflib.inc'
25
  include 'bmplib.inc'
26
  include 'dialog.inc'
27
  include 'dialog2.inc'
28
  include 'design.inc'
29
  include 'graphlib.inc'
255 heavyiron 30
 
31
  include 'cursors.inc'
32
 
33
  include 'load_from_parameters.inc'
34
 
180 heavyiron 35
START:
36
 
37
;--------------------------------------------------------
38
;---------------set events mask--------------------------
39
;--------------------------------------------------------
40
   mov eax,40
41
   mov ebx,1100111b
42
   int 0x40
43
;---------------------------------------------------------
255 heavyiron 44
;-----------------------init data-------------------------
180 heavyiron 45
;---------------------------------------------------------
255 heavyiron 46
   include 'init_data.inc'
180 heavyiron 47
;----------------------------------------------------------
48
;--------get memory and draw window of program-------------
49
;----------------------------------------------------------
50
   call GetMemory
51
   call cleare_work_arrea
52
   call load_icons
255 heavyiron 53
 
54
   ;load cursors
55
   mov eax,CursorsID
56
   call load_cursors
57
 
180 heavyiron 58
   call drawwin
255 heavyiron 59
;---------------------------------------------------------
60
;---------Check loading of file from psrsmeters-----------
61
;---------------------------------------------------------
62
 
63
   mov eax,parameters
64
   mov ebx,file_path
65
   call check_loading_from_parameters
66
 
180 heavyiron 67
;----------------------------------------------------------
68
;---------------------MAIN LOOP----------------------------
69
;----------------------------------------------------------
255 heavyiron 70
 
180 heavyiron 71
   still:
72
 
73
   call event
74
 
75
   cmp eax,1
76
   jne no_redraw_window
255 heavyiron 77
 
180 heavyiron 78
   call drawwin
79
   jmp still
255 heavyiron 80
 
180 heavyiron 81
   no_redraw_window:
255 heavyiron 82
 
83
   cmp eax,2
84
   je keys
85
 
180 heavyiron 86
   cmp eax,3
87
   je buttons
255 heavyiron 88
 
180 heavyiron 89
   cmp eax,6
90
   je mouse
91
 
92
   jmp still
93
;---------------------------------------------------------
94
;---------------------------------------------------------
95
;---------------------------------------------------------
96
 
255 heavyiron 97
   include 'events.inc'
98
   include 'events_of_window.inc'
99
   include 'events_of_keys.inc'
100
   include 'events_of_buttons.inc'
101
   include 'events_of_mouse.inc'
102
   include 'panel_engen.inc'
103
   include 'screen.inc'
104
   include 'menu_instruments.inc'
105
   include 'icons_instruments.inc'
106
   include 'icons.inc'
107
   include 'sprites.inc'
108
   include 'string.inc'
109
   include 'palette.inc'
110
   include 'files.inc'
111
   include 'time.inc'
112
   include 'memory.inc'
180 heavyiron 113
 
114
;-----------------------------------------------------------
255 heavyiron 115
;------------variables and data of program------------------
180 heavyiron 116
;-----------------------------------------------------------
117
 
255 heavyiron 118
CursorsID	     rd 10
180 heavyiron 119
 
255 heavyiron 120
parameters           rb 257
180 heavyiron 121
 
255 heavyiron 122
file_path:
123
times 1024+16	     db 0
180 heavyiron 124
 
125
time		     dd 0
126
sound_havent_memory  db 150,64,0
127
PosX		     dd 0
128
PosY		     dd 0
255 heavyiron 129
PointerToIcons	     dd 0
180 heavyiron 130
ScreenPointer	     dd 0
131
PointerToPicture     dd 0
132
PointerToCopyPicture dd 0
133
PointerToCopyPicture2 dd 0
134
PointerToEditBufer   dd 0
135
PointerToSpriteBufer dd 0
136
PointerToPalette     dd 0
137
Color		     dd 0
138
Number_Brush	     dd 0
139
Brush_SizeX	     dd 0
140
Brush_SizeY	     dd 0
141
Current_instrument   dd 0
255 heavyiron 142
Last_instrument      dd 0
180 heavyiron 143
Activate_instrument  db 0
144
SColor		     dd 0
145
OldX		     dd 0
146
OldY		     dd 0
147
 
148
MouseX		     dd 0
149
MouseY		     dd 0
150
Window_SizeX	     dd 0
151
Window_SizeY	     dd 0
152
Window_CordinatX     dd 0
153
Window_CordinatY     dd 0
154
Picture_SizeX	     dd 0
155
Picture_SizeY	     dd 0
156
ScreenX 	     dd 0
157
ScreenY 	     dd 0
158
WorkScreen_SizeX     dd 0
159
WorkScreen_SizeY     dd 0
160
MaxWorkScreen_SizeX  dd 0
161
MaxWorkScreen_SizeY  dd 0
162
k		     dd 0
163
IPC_table	     rd 256
164
ReserveArray	     dd 0
165
register	     dd 0
166
CounterX	     dd 0
167
CounterY	     dd 0
168
OffsetYPicture	     dd 0
169
OffsetYWorkScreen    dd 0
170
OffsetYBigPixel      dd 0
171
 
172
Icon_X		     dd 0
173
Icon_Y		     dd 0
174
counter 	     dd 0
175
counter2	     dd 0
176
Icon_text_x	     dd 0
177
Icon_text_y	     dd 0
178
Panel_flag	     db 0
179
counter_menu	     dd 0
180
menu_coordinat_x     dd 0
181
menu_size_x	     dd 0
182
menu_counter	     dd 0
183
counter_11	     dd 0
184
number_panel	     dd 0
185
number_menu	     dd 0
186
 
187
Scroll1CoordinatX    dd 0
188
Scroll1CoordinatY    dd 0
189
Scroll1MaxSizeX      dd 0
190
Scroll1MaxSizeY      dd 0
191
Scroll1SizeX	     dd 0
192
Scroll1FreeX	     dd 0
193
 
194
Scroll2CoordinatX    dd 0
195
Scroll2CoordinatY    dd 0
196
Scroll2MaxSizeX      dd 0
197
Scroll2MaxSizeY      dd 0
198
Scroll2SizeY	     dd 0
199
Scroll2FreeY	     dd 0
200
 
201
extended_memory      dd 0
202
type		     dw 0
203
x		     dd 0
204
y		     dd 0
205
save_flag	     db 0
206
exit_from_work_arrea db 0
207
 
208
Radius		     dd 0
209
Dx_		     dd 0
210
Dy_		     dd 0
211
line_width	     dd 0
212
lastik_is_active     db 0
213
a_ellips	     dd 0
214
b_ellips	     dd 0
215
instrument_used      db 0
216
used_OldX	     dd 0
217
used_OldY	     dd 0
218
rectangular_shade_x  dd 0
219
rectangular_shade_y  dd 0
220
crossing_old_x	     dd 0
221
crossing_old_y	     dd 0
222
crossing	     dd 0
223
finishing_crossing   dd 0
224
number_undo	     dd 0
225
DrawSprite_flag      db 0
226
Paste_flag	     db 0
227
SpriteSizeX	     dd 0
228
SpriteSizeY	     dd 0
229
SpriteCoordinatX     dd 0
230
SpriteCoordinatY     dd 0
231
SpriteOldCoordinatX  dd 0
232
SpriteOldCoordinatY  dd 0
233
 
255 heavyiron 234
   include 'panel_data.inc'
235
   include 'palitra256.inc'
236
   include 'brushes.inc'
237
   include 'spray.inc'
238
   include 'width_lines.inc'
180 heavyiron 239
;----------------------------------------------------------
255 heavyiron 240
;-------------------ICON"S picture-------------------------
180 heavyiron 241
;----------------------------------------------------------
255 heavyiron 242
dd 0
180 heavyiron 243
 
255 heavyiron 244
panel_picture:
245
file 'panel_buttons.gif'
180 heavyiron 246
 
255 heavyiron 247
;****************cursors******************
248
brush_cursor:
249
file 'brush.cur'
180 heavyiron 250
 
255 heavyiron 251
flood_fill_cursor:
252
file 'flood_fill.cur'
180 heavyiron 253
 
255 heavyiron 254
lastik_cursor:
255
file 'lastik.cur'
180 heavyiron 256
 
255 heavyiron 257
other_cursor:
258
file 'other.cur'
180 heavyiron 259
 
255 heavyiron 260
pencil_cursor:
261
file 'pencil.cur'
180 heavyiron 262
 
255 heavyiron 263
pipette_cursor:
264
file 'pipette.cur'
180 heavyiron 265
 
255 heavyiron 266
spray_cursor:
267
file 'spray.cur'
180 heavyiron 268
 
255 heavyiron 269
zoom_cursor:
270
file 'zoom.cur'
180 heavyiron 271
 
272
;----------------------------------------------------------
273
 
274
I_END:
275