Subversion Repositories Kolibri OS

Rev

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