Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
6021 leency 1
//CODED by Veliant, Leency, Nable, Pavelyakov. GNU GPL licence.
2
 
5598 pavelyakov 3
#ifndef INCLUDE_KOLIBRI_H
5582 pavelyakov 4
#define INCLUDE_KOLIBRI_H
5576 pavelyakov 5
 
5676 pavelyakov 6
#pragma option OST
7
#pragma option ON
8
#pragma option cri-
9
#pragma option -CPA
10
#initallvar 0
11
#jumptomain FALSE
12
 
3067 leency 13
#startaddress 0
5676 pavelyakov 14
 
3067 leency 15
#code32 TRUE
5676 pavelyakov 16
 
3067 leency 17
char   os_name[8]   = {'M','E','N','U','E','T','0','1'};
18
dword  os_version   = 0x00000001;
5648 pavelyakov 19
dword  start_addr   = #______INIT______;
20
dword  final_addr   = #______STOP______+32;
3363 leency 21
dword  alloc_mem    = MEMSIZE;
22
dword  x86esp_reg   = MEMSIZE;
3067 leency 23
dword  I_Param      = #param;
24
dword  I_Path       = #program_path;
25
char param[4096];
26
char program_path[4096];
27
 
6651 leency 28
#define bool      int
5883 pavelyakov 29
 
3363 leency 30
#define NULL      0
31
#define OLD      -1
32
#define true      1
33
#define false     0
34
 
6039 leency 35
//Process Events
4536 leency 36
#define evReDraw  1
37
#define evKey     2
38
#define evButton  3
6978 leency 39
#define evExit    4
5576 pavelyakov 40
#define evDesktop 5
3067 leency 41
#define evMouse   6
5576 pavelyakov 42
#define evIPC     7
4536 leency 43
#define evNetwork 8
5576 pavelyakov 44
#define evDebug   9
3067 leency 45
 
6978 leency 46
//Event mask bits for function 40
7031 leency 47
#define EVM_REDRAW                1b
48
#define EVM_KEY                  10b
49
#define EVM_BUTTON              100b
50
#define EVM_EXIT               1000b
51
#define EVM_BACKGROUND        10000b
52
#define EVM_MOUSE            100000b
53
#define EVM_IPC             1000000b
54
#define EVM_STACK          10000000b
55
#define EVM_DEBUG         100000000b
56
#define EVM_STACK2       1000000000b
6978 leency 57
#define EVM_MOUSE_FILTER  0x80000000
58
#define EVM_CURSOR_FILTER 0x40000000
59
 
3067 leency 60
//Button options
61
#define BT_DEL      0x80000000
62
#define BT_HIDE     0x40000000
63
#define BT_NOFRAME  0x20000000
64
 
7054 leency 65
#define CLOSE_BTN 1
66
 
3067 leency 67
//-------------------------------------------------------------------------
68
 
5674 pavelyakov 69
#include "../lib/system.h"
70
#include "../lib/mouse.h"
6285 leency 71
#include "../lib/keyboard.h"
5674 pavelyakov 72
 
6751 leency 73
inline fastcall dword calc(EAX) { return EAX; }
6742 leency 74
 
5477 leency 75
:struct raw_image {
76
	dword w, h, data;
77
};
78
 
3067 leency 79
//------------------------------------------------------------------------------
5582 pavelyakov 80
:dword wait_event_code;
3067 leency 81
inline fastcall dword WaitEvent()
82
{
83
	$mov eax,10
84
	$int 0x40
5576 pavelyakov 85
	wait_event_code = EAX;
5591 pavelyakov 86
	//if(wait_event_code==evMouse) MOUSE.get();
87
	//return wait_event_code;
3067 leency 88
}
89
 
90
inline fastcall dword CheckEvent()
91
{
92
	$mov eax,11
93
	$int 0x40
94
}
95
 
5576 pavelyakov 96
inline fastcall dword WaitEventTimeout(EBX)
3067 leency 97
{
98
	$mov eax,23
99
	$int 0x40
100
}
101
 
6978 leency 102
inline fastcall dword SetEventMask(EBX)
3067 leency 103
{
104
	$mov eax,40
105
	$int 0x40
106
}
107
 
108
 
5576 pavelyakov 109
inline fastcall pause(EBX)
3067 leency 110
{
111
	$mov eax, 5
112
	$int 0x40
113
}
114
 
115
inline fastcall word GetButtonID()
116
{
117
	$mov eax,17
118
	$int  0x40
119
	$shr eax,8
120
}
121
 
122
inline fastcall dword GetFreeRAM()
123
{
124
	$mov eax, 18
125
	$mov ebx, 16
126
	$int 0x40
6980 leency 127
	//return eax = free RAM in Kb
3067 leency 128
}
129
 
6791 leency 130
inline fastcall dword LoadDriver(ECX) //ECX - èìÿ äðàéâåðà
3067 leency 131
{
132
	$mov eax, 68
133
	$mov ebx, 16
134
	$int 0x40
6791 leency 135
	//return 0 - íåóäà÷à, èíà÷å eax = õýíäë äðàéâåðà
3067 leency 136
}
137
 
6791 leency 138
inline fastcall dword RuleDriver(ECX) //óêàçàòåëü íà óïðàâëÿþùóþ ñòðóêòóðó
3067 leency 139
{
140
	$mov eax, 68
141
	$mov ebx, 17
142
	$int 0x40
6791 leency 143
	//return eax = îïðåäåëÿåòñÿ äðàéâåðîì
3067 leency 144
}
145
 
146
struct proc_info
147
{
148
	#define SelfInfo -1
149
	dword	use_cpu;
150
	word	pos_in_stack,num_slot,rezerv1;
4137 leency 151
	unsigned char name[11];
3067 leency 152
	char	rezerv2;
153
	dword	adress,use_memory,ID,left,top,width,height;
154
	word	status_slot,rezerv3;
155
	dword	work_left,work_top,work_width,work_height;
156
	char	status_window;
3107 leency 157
	dword   cwidth,cheight;
158
	byte    reserved[1024-71-8];
3067 leency 159
};
160
 
5576 pavelyakov 161
inline fastcall void GetProcessInfo(EBX, ECX)
3067 leency 162
{
163
	$mov eax,9;
164
	$int  0x40
3107 leency 165
	DSDWORD[EBX+71] = DSDWORD[EBX+42] - 9; //set cwidth
7051 leency 166
	DSDWORD[EBX+75] = DSDWORD[EBX+46] - skin_height - 4; //set cheight
3067 leency 167
}
168
 
169
inline fastcall int GetPointOwner( EBX, ECX) //ebx=m.x, ecx=m.y
170
{
171
	$mov eax,34
172
	$int 0x40
173
}
174
 
175
inline fastcall int GetProcessSlot( ECX)
176
{
177
	EAX = 18;
178
	EBX = 21;
179
	$int 0x40
180
}
181
 
182
inline fastcall int GetActiveProcess()
183
{
184
	EAX = 18;
185
	EBX = 7;
186
	$int 0x40
187
}
188
 
4081 leency 189
:int CheckActiveProcess(int Form_ID)
190
{
4166 leency 191
	int id9=GetProcessSlot(Form_ID);
192
	if (id9==GetActiveProcess()) return 1;
4081 leency 193
	return 0;
194
}
195
 
3114 leency 196
inline fastcall void ActivateWindow( ECX)
197
{
198
	EAX = 18;
199
	EBX = 3;
200
	$int 0x40
201
}
202
 
5421 leency 203
inline fastcall int MinimizeWindow()
204
{
205
	EAX = 18;
206
	EBX = 10;
207
	$int 0x40
208
}
209
 
5576 pavelyakov 210
inline fastcall int CreateThread(ECX,EDX)
3067 leency 211
{
212
	$mov eax,51
213
	$mov ebx,1
214
	$int 0x40
215
}
216
 
217
inline fastcall void SwitchToAnotherThread()
218
{
219
	$mov eax,68
220
	$mov ebx,1
221
	$int 0x40
222
}
223
 
3458 leency 224
inline fastcall int SendWindowMessage( ECX, EDX)
3444 leency 225
{
226
	$mov eax, 72
227
	$mov ebx, 1
228
	$int 0x40
229
}
230
 
3067 leency 231
inline fastcall int KillProcess( ECX)
232
{
233
	$mov eax,18;
234
	$mov ebx,18;
235
	$int 0x40
236
}
237
 
238
#define TURN_OFF 2
239
#define REBOOT 3
240
#define KERNEL 4
241
inline fastcall int ExitSystem( ECX)
242
{
243
	$mov eax, 18
244
	$mov ebx, 9
245
	$int 0x40
246
}
247
 
248
inline fastcall ExitProcess()
249
{
250
	$mov eax,-1;
251
	$int 0x40
252
}
253
 
254
//------------------------------------------------------------------------------
255
 
6563 leency 256
inline fastcall void SetCurDir( ECX)
257
{
258
  EAX=30;
259
  EBX=1;
260
  $int 0x40
261
}
6504 punk_joker 262
 
263
 
6791 leency 264
//eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus)
6662 leency 265
#define SYS_LANG_ENG 1
266
#define SYS_LANG_FIN 2
267
#define SYS_LANG_GER 3
268
#define SYS_LANG_RUS 4
3067 leency 269
inline fastcall int GetSystemLanguage()
270
{
271
	EAX = 26;
272
	EBX = 5;
273
	$int 0x40
274
}
275
 
276
inline fastcall GetSkinHeight()
277
{
278
	$push ebx
279
	$mov  eax,48
280
	$mov  ebx,4
281
	$int 0x40
282
	$pop  ebx
283
}
284
 
285
inline fastcall void SetSystemSkin( ECX)
286
{
287
	EAX = 48;
288
	EBX = 8;
289
	$int 0x40
290
}
291
 
292
inline fastcall int GetScreenWidth()
293
{
294
	$mov eax, 14
295
	$int 0x40
296
	$shr eax, 16
297
}
298
 
299
inline fastcall int GetScreenHeight()
300
{
301
	$mov eax, 14
302
	$int 0x40
303
	$and eax,0x0000FFFF
304
}
305
 
5421 leency 306
inline fastcall int GetClientTop()
307
{
308
	$mov eax, 48
309
	$mov ebx, 5
310
	$int 0x40
6058 leency 311
	$mov eax, ebx
312
	$shr eax, 16
5421 leency 313
}
314
 
315
inline fastcall int GetClientHeight()
316
{
317
	$mov eax, 48
318
	$mov ebx, 5
319
	$int 0x40
6058 leency 320
	$mov eax, ebx
5421 leency 321
}
322
 
3067 leency 323
inline fastcall dword LoadLibrary( ECX)
324
{
325
	$mov eax, 68
326
	$mov ebx, 19
327
	$int  0x40
328
}
329
 
330
inline fastcall int TestBit( EAX, CL)
331
{
332
	$shr eax,cl
333
	$and eax,1
334
}
335
 
336
//------------------------------------------------------------------------------
337
 
6746 leency 338
:void DefineAndDrawWindow(dword _x, _y, _w, _h, _window_type, _bgcolor, _title, _flags)
3067 leency 339
{
340
	EAX = 12;              // function 12:tell os about windowdraw
341
	EBX = 1;
342
	$int 0x40
343
 
5576 pavelyakov 344
	$xor EAX,EAX
6746 leency 345
	EBX = _x << 16 + _w;
346
	ECX = _y << 16 + _h;
347
	EDX = _window_type << 24 | _bgcolor;
348
	EDI = _title;
349
	ESI = _flags;
3067 leency 350
	$int 0x40
351
 
6742 leency 352
 
3067 leency 353
	EAX = 12;              // function 12:tell os about windowdraw
354
	EBX = 2;
355
	$int 0x40
356
}
357
 
358
inline fastcall MoveSize( EBX,ECX,EDX,ESI)
359
{
360
	$mov eax, 67
361
	$int 0x40
362
}
363
 
364
inline fastcall void DrawTitle( ECX)
365
{
366
	EAX = 71;
367
	EBX = 1;
368
	$int 0x40;
369
}
370
 
6794 leency 371
// @EDX is a process id, -1 for self
6791 leency 372
// @ESI is a new LayerBehaviour
373
// @RETURN: EAX, 0 is fail, 1 is success
6794 leency 374
#define ZPOS_DESKTOP     -2
375
#define ZPOS_ALWAYS_BACK -1
376
#define ZPOS_NORMAL      0
377
#define ZPOS_ALWAYS_TOP  1
6791 leency 378
inline fastcall dword SetWindowLayerBehaviour(EDX, ESI)
379
{
380
	EAX = 18;
381
	EBX = 25;
382
	ECX = 2;
383
	$int 64
384
}
385
 
6735 leency 386
:void WriteTextB(dword x,y,byte fontType, dword color, str_offset)
3067 leency 387
{
388
	EAX = 4;
389
	EBX = x<<16+y;
390
	ECX = fontType<<24+color;
6735 leency 391
	EDX = str_offset;
3363 leency 392
	ESI = 0;
3067 leency 393
	$int 0x40;
3107 leency 394
	$add ebx, 1<<16
395
	$int 0x40
3067 leency 396
}
397
 
6735 leency 398
:void WriteText(dword x,y,byte fontType, dword color, str_offset)
3107 leency 399
{
400
	EAX = 4;
401
	EBX = x<<16+y;
402
	ECX = fontType<<24+color;
6735 leency 403
	EDX = str_offset;
3107 leency 404
	$int 0x40;
405
}
406
 
6742 leency 407
:dword WriteBufText(dword x,y,byte fontType, dword color, str_offset, buf_offset)
3467 leency 408
{
409
	EAX = 4;
410
	EBX = x<<16+y;
411
	ECX = fontType<<24+color;
6742 leency 412
	EDX = str_offset;
413
	EDI = buf_offset;
3467 leency 414
	$int 0x40;
415
}
416
 
6742 leency 417
:void WriteNumber(dword x,y,byte fontType, dword color, count, number_or_offset)
3067 leency 418
{
419
	EAX = 47;
420
	EBX = count<<16;
6735 leency 421
	ECX = number_or_offset;
3067 leency 422
	EDX = x<<16+y;
423
	ESI = fontType<<24+color;
424
	$int 0x40;
425
}
426
 
6735 leency 427
:void CopyScreen(dword dst_offset, x, y, w, h)
3067 leency 428
{
429
  EAX = 36;
6735 leency 430
  EBX = dst_offset;
3363 leency 431
  ECX = w << 16 + h;
3067 leency 432
  EDX = x << 16 + y;
433
  $int  0x40;
434
}
435
 
6791 leency 436
:dword GetPixelColorFromScreen(dword _x, _y)
3067 leency 437
{
6791 leency 438
	EAX = 35;
439
	EBX = _y * screen.width + _x;
440
	$int 64
3067 leency 441
}
442
 
7089 leency 443
#define DRAW_DESKTOP_BG_TILE 1
444
#define DRAW_DESKTOP_BG_STRETCH 2
7160 leency 445
:void SetBackgroundImage(dword w,h, image, mode)
7089 leency 446
{
447
	$mov     eax,15      // SF_BACKGROUND_SET 15 - work with desktop background graphics
448
	$mov     ebx,4       // SSF_MODE_BG 4 - set drawing mode for the background
449
	$mov     ecx,mode    // drawing mode - tile (1), stretch (2)
450
	$int     64
451
 
452
	$mov     eax,15      // SF_BACKGROUND_SET 15 - work with desktop background graphics
453
	$mov     ebx,1       // SSF_SIZE_BG=1 - set a size of the background image
454
	$mov     ecx,w       // width
455
	$mov     edx,h       // height
456
	$int     64
457
 
458
	$mov     eax,15      // SF_BACKGROUND_SET 15 - work with desktop background graphics
459
	$mov     ebx,5       // SSF_IMAGE_BG=5 - put block of pixels on the background image
460
	$mov     ecx,image   // pointer to the data in the format BBGGRRBBGGRR...
461
	$mov     edx,0       // offset in data of the background image
462
	ESI      = 3*w*h;    // size of data in bytes = 3 * number of pixels
463
	$int     64
464
 
465
	$mov     eax,15      // SF_BACKGROUND_SET 15 - work with desktop background graphics
466
	$mov     ebx,3       // SSF_REDRAW_BG=3 - redraw background
467
	$int     64
468
}
469
 
6735 leency 470
:void _PutImage(dword x,y, w,h, data_offset)
3067 leency 471
{
472
	EAX = 7;
6735 leency 473
	EBX = data_offset;
3067 leency 474
	ECX = w<<16+h;
475
	EDX = x<<16+y;
476
	$int 0x40
477
}
478
 
7163 leency 479
:void PutPaletteImage(dword inbuf,w,h,x,y,bits,pal)
3067 leency 480
{
481
	EAX = 65;
7163 leency 482
	EBX = inbuf;
3067 leency 483
	ECX = w<<16+h;
484
	EDX = x<<16+y;
7163 leency 485
	ESI = bits;
486
	EDI = pal;
3067 leency 487
	EBP = 0;
488
	$int 0x40
6742 leency 489
}
3067 leency 490
 
491
inline fastcall void PutPixel( EBX,ECX,EDX)
492
{
493
  EAX=1;
494
  $int 0x40
495
}
496
 
6742 leency 497
:void DrawBar(dword x,y,w,h,color)
3067 leency 498
{
3225 leency 499
	if (h<=0) || (h>60000) || (w<=0) || (w>60000) return; //bad boy :)
3067 leency 500
	EAX = 13;
501
	EBX = x<<16+w;
502
	ECX = y<<16+h;
6742 leency 503
	EDX = color;
6058 leency 504
	$int 0x40
3067 leency 505
}
506
 
507
void DefineButton(dword x,y,w,h,EDX,ESI)
508
{
3107 leency 509
	EAX = 8;
510
	$push edx
511
	EDX += BT_DEL;
512
	$int 0x40;
513
	$pop edx
3067 leency 514
	EBX = x<<16+w;
515
	ECX = y<<16+h;
516
	$int 0x40
517
}
518
 
5582 pavelyakov 519
inline RefreshWindow(dword ID_REFRESH,ID_ACTIVE)
520
{
521
	EAX = 18;
522
	EBX = 22;
523
	ECX = 3;
524
	EDX = ID_REFRESH;
525
	$int 0x40
526
	EAX = 18;
527
	EBX = 3;
528
	EDX = ID_ACTIVE;
529
	$int 0x40
530
}
531
 
6742 leency 532
:void UnsafeDefineButton(dword x,y,w,h,id,color)
3107 leency 533
{
534
	EAX = 8;
535
	EBX = x<<16+w;
536
	ECX = y<<16+h;
6742 leency 537
	EDX = id;
538
	ESI = color;
3107 leency 539
	$int 0x40
540
}
541
 
7160 leency 542
:void DefineDragableWindow(dword _x, _y, _w, _h)
6791 leency 543
{
544
	DefineAndDrawWindow(_x, _y, _w, _h, 0x41,0x000000,NULL,0b);
545
}
546
 
547
:void EventDragWindow()
548
{
549
	dword tmp_x,tmp_y;
550
	dword z1,z2;
551
	tmp_x = mouse.x;
552
	tmp_y = mouse.y;
553
	do {
554
		mouse.get();
555
		if (tmp_x!=mouse.x) || (tmp_y!=mouse.y)
556
		{
557
			z1 = Form.left + mouse.x - tmp_x;
558
			z2 = Form.top + mouse.y - tmp_y;
559
			if(z1<=10) || (z1>20000) z1=0; else if(z1>screen.width-Form.width-10)z1=screen.width-Form.width;
560
			if(z2<=10) || (z2>20000) z2=0; else if(z2>screen.height-Form.height-10)z2=screen.height-Form.height;
561
			MoveSize(z1 , z2, OLD, OLD);
562
			draw_window();
563
		}
564
		pause(1);
565
	} while (mouse.lkm);
566
}
567
 
568
:void DefineHiddenButton(dword _x, _y, _w, _h, _id)
569
{
570
	DefineButton(_x, _y, _w, _h, _id + BT_HIDE, 0);
571
}
572
 
3067 leency 573
inline fastcall void DeleteButton( EDX)
574
{
575
	EAX = 8;
576
	EDX += BT_DEL;
5630 leency 577
	$int 0x40
5548 leency 578
}
579
 
580
inline fastcall dword GetStartTime()
581
{
582
	$mov eax,26
583
	$mov ebx,9
584
	$int 0x40
5575 pavelyakov 585
}
586
 
5606 pavelyakov 587
:dword X_EventRedrawWindow,Y_EventRedrawWindow;
588
:void _EventRedrawWindow()
589
{
590
	loop()switch(WaitEvent())
591
	{
592
		case evReDraw:
6747 leency 593
			DefineAndDrawWindow(X_EventRedrawWindow,Y_EventRedrawWindow,100,1,0x34,0xFFFFFF,NULL,0);
5606 pavelyakov 594
			pause(10);
595
			ExitProcess();
596
			break;
597
	}
598
}
5760 pavelyakov 599
:char REDRAW_BUFF_EVENT_[4096];
5606 pavelyakov 600
:void EventRedrawWindow(dword x,y)
601
{
602
	X_EventRedrawWindow = x;
603
	Y_EventRedrawWindow = y;
5760 pavelyakov 604
	CreateThread(#_EventRedrawWindow,#REDRAW_BUFF_EVENT_+4092);
5606 pavelyakov 605
}
606
 
7089 leency 607
:struct rect
5576 pavelyakov 608
{
6285 leency 609
	dword x,y,w,h;
6738 leency 610
	void set_size();
6285 leency 611
};
612
 
7089 leency 613
:void rect::set_size(dword _x, _y, _w, _h)
5576 pavelyakov 614
{
6285 leency 615
	x=_x;
616
	y=_y;
617
	w=_w;
618
	h=_h;
5576 pavelyakov 619
}
620
 
5582 pavelyakov 621
:struct _screen
622
{
623
	dword width,height;
624
} screen;
625
 
6041 leency 626
:byte skin_height;
5582 pavelyakov 627
 
5640 pavelyakov 628
:void DrawDate(dword x, y, color, in_date)
629
{
630
	EDI = in_date;
631
	EAX = 47;
632
	EBX = 2<<16;
633
	EDX = x<<16+y;
6280 punk_joker 634
	ESI = 0x90<<24+color;
5640 pavelyakov 635
	ECX = EDI.date.day;
636
	$int 0x40;
6285 leency 637
	EDX += 20<<16;
5640 pavelyakov 638
	ECX = EDI.date.month;
639
	$int 0x40;
6285 leency 640
	EDX += 20<<16;
5640 pavelyakov 641
	EBX = 4<<16;
642
	ECX = EDI.date.year;
643
	$int 0x40;
6285 leency 644
	DrawBar(x+17,y+10,2,2,color);
645
	DrawBar(x+37,y+10,2,2,color);
5640 pavelyakov 646
}
647
 
5646 pavelyakov 648
:void __path_name__(dword BUF,PATH)
649
{
650
	dword beg = PATH;
651
	dword pos = PATH;
652
	dword sav = PATH;
653
	dword i;
654
	while(DSBYTE[pos])
655
	{
656
		if(DSBYTE[pos]=='/')sav = pos;
657
		pos++;
658
	}
659
	i = sav-beg;
660
	while(i)
661
	{
662
		DSBYTE[BUF] = DSBYTE[beg];
663
		beg++;
664
		BUF++;
665
		i--;
666
	}
667
	/*while(DSBYTE[beg])
668
	{
669
		DSBYTE[BUF1] = DSBYTE[beg];
670
		beg++;
671
		BUF1++;
672
	}*/
673
	//DSBYTE[BUF1] = 0;
674
	DSBYTE[BUF] = 0;
675
}
5648 pavelyakov 676
char __BUF_DIR__[4096];
677
:struct SELF
678
{
679
	dword dir;
680
	dword file;
681
	dword path;
682
} self;
5646 pavelyakov 683
 
6791 leency 684
dword __generator;  // random number generator - äëÿ ãåíåðàöèè ñëó÷àéíûõ ÷èñåë
5575 pavelyakov 685
 
5582 pavelyakov 686
:dword program_path_length;
5576 pavelyakov 687
 
5575 pavelyakov 688
//The initialization of the initial data before running
5648 pavelyakov 689
void ______INIT______()
5575 pavelyakov 690
{
6761 leency 691
	//if (program_path[0]!='/') I_Path++;
6759 leency 692
 
5648 pavelyakov 693
	self.dir = #__BUF_DIR__;
694
	self.file = 0;
695
	self.path = I_Path;
696
	__path_name__(#__BUF_DIR__,I_Path);
5646 pavelyakov 697
 
6041 leency 698
	skin_height   = GetSkinHeight();
6771 leency 699
	screen.width  = GetScreenWidth()+1;
700
	screen.height = GetScreenHeight()+1;
5582 pavelyakov 701
 
5996 leency 702
	DOUBLE_CLICK_DELAY = GetMouseDoubleClickDelay();
5575 pavelyakov 703
	__generator = GetStartTime();
5651 pavelyakov 704
 
6021 leency 705
	mem_init();
5651 pavelyakov 706
 
6735 leency 707
 
5575 pavelyakov 708
	main();
5933 pavelyakov 709
	ExitProcess();
5598 pavelyakov 710
}
5648 pavelyakov 711
______STOP______:
6021 leency 712
#endif
713
 
714
#ifndef INCLUDE_MEM_H
715
#include "../lib/mem.h"
716
#endif
6058 leency 717
 
718
#ifndef INCLUDE_DEBUG_H
719
#include "../lib/debug.h"
720
#endif