Subversion Repositories Kolibri OS

Rev

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