Subversion Repositories Kolibri OS

Rev

Rev 6327 | Rev 6352 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6327 Rev 6342
Line -... Line 1...
-
 
1
mem_screen equ 1200*1000*3 ;à §¬¥à ¯ ¬ï⨠¤«ï ®¡« á⨠íªà ­ 
-
 
2
mem_panel_b equ 50*(20*20*3) ;à §¬¥à ¯ ¬ï⨠¤«ï ¯ ­¥«¨ ¨­áâà㬥­â®¢
-
 
3
mem_flood_f equ 500000 ;à §¬¥à ¡ãä¥à  ¤«ï § «¨¢ª¨,   â ª¦¥ ¤«ï ¯ «¨âàë
-
 
4
 
-
 
5
;----------------------------------------------------------
1
;----------------------------------------------------------
6
;--------change size of memory which use program-----------
2
;--------change size of memory which use program-----------
7
;----------------------------------------------------------
3
;----------------------------------------------------------
8
GetMemory:
4
GetMemory:
9
	pusha
5
	pusha
10
	mov	ecx,[Picture_SizeX]
6
	mov	ecx,[Picture_SizeX]
11
	mov	edx,[Picture_SizeY]
7
	mov	edx,[Picture_SizeY]
12
	imul	ecx,edx
8
	imul	ecx,edx
13
	lea	ecx,[ecx+ecx*2]
9
	lea	ecx,[ecx+ecx*2]
14
	lea	ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5
10
	lea	ecx,[ecx+ecx*4]		;(Picture_SizeX*Picture_SizeY*3)*5
15
	add	ecx,mem_screen+mem_panel_b+mem_flood_f
11
	add	ecx,(1200*1000)*3+50*(20*20*3)+500000+16000+0x4000 ; 4192384
16
	mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[ScreenPointer]
12
	mcall	68,20,,[ScreenPointer]
17
	test eax,eax
13
	test	eax,eax
18
	jnz	have_new_memory
14
	jnz	have_new_memory
19
	mov	esi,sound_havent_memory
15
	mov	esi,sound_havent_memory
20
	call	sound
16
	call	sound
21
	popa
17
	popa
22
	add	esp,4
Line 28... Line 33...
28
	mov	eax,[Picture_SizeX]
33
	mov	ebx,[Picture_SizeY]
29
	mov	ebx,[Picture_SizeY]
34
	imul	eax,ebx
30
	imul	eax,ebx
35
	lea	eax,[eax+eax*2]
31
	lea	eax,[eax+eax*2]
36
	mov	ebx,[ScreenPointer]
32
	mov	ebx,[ScreenPointer]
37
	add	ebx,mem_screen+mem_panel_b+mem_flood_f
33
	add	ebx,(1200*1000*3)+50*(20*20*3)+500000
38
 
Line 34... Line 39...
34
 
39
	mov	[PointerToPicture],ebx
35
	mov	[PointerToPicture],ebx
40
	mov	[PointerToCopyPicture],ebx
36
	mov	[PointerToCopyPicture],ebx
41
	mov	[PointerToCopyPicture2],ebx
37
	mov	[PointerToCopyPicture2],ebx
42
	mov	[PointerToEditBufer],ebx
Line 49... Line 54...
49
 
54
	shl eax,2
50
	shl eax,2
55
	add	[PointerToSpriteBufer],eax
Line 51... Line 56...
51
	add	[PointerToSpriteBufer],eax
56
 
52
 
57
	mov	eax,[ScreenPointer]
53
	mov	eax,[ScreenPointer]
58
	add	eax,mem_screen+mem_panel_b
54
	add	eax,(1200*1000*3)+50*(20*20*3)+1
-
 
55
	mov	[PointerToPalette],eax
-
 
56
 
-
 
57
	mov	eax,[ScreenPointer]
59
	mov	[PointerToPalette],eax
58
	add	eax,(1200*1000*3)+50*(20*20*3)+8
60
	mov	[ReserveArray],eax
59
	mov	[ReserveArray],eax
61
	ret
60
	ret
62
;---------------------------------------------------------