Subversion Repositories Kolibri OS

Rev

Rev 6327 | Rev 6352 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6327 Rev 6342
-
 
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
18
	add	esp,4
23
	jmp	still
19
	jmp	still
24
 
20
 
25
have_new_memory:
21
have_new_memory:
26
	mov	[ScreenPointer],eax
22
	mov	[ScreenPointer],eax
27
	call	prepare_data_pointers
23
	call	prepare_data_pointers
28
	popa
24
	popa
29
	ret
25
	ret
30
;---------------------------------------------------------
26
;---------------------------------------------------------
31
prepare_data_pointers:
27
prepare_data_pointers:
32
	mov	eax,[Picture_SizeX]
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
 
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
38
	mov	[PointerToEditBufer],ebx
43
	mov	[PointerToSpriteBufer],ebx
39
	mov	[PointerToSpriteBufer],ebx
44
 
40
 
45
	add	[PointerToCopyPicture],eax
41
	add	[PointerToCopyPicture],eax
46
 
42
 
47
	add	[PointerToCopyPicture2],eax
43
	add	[PointerToCopyPicture2],eax
48
	add	[PointerToCopyPicture2],eax
44
	add	[PointerToCopyPicture2],eax
49
 
45
 
50
	add	[PointerToEditBufer],eax
46
	add	[PointerToEditBufer],eax
51
	add	[PointerToEditBufer],eax
47
	add	[PointerToEditBufer],eax
52
	add	[PointerToEditBufer],eax
48
	add	[PointerToEditBufer],eax
53
 
49
 
54
	shl eax,2
50
	shl eax,2
55
	add	[PointerToSpriteBufer],eax
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
59
	mov	[PointerToPalette],eax
55
	mov	[PointerToPalette],eax
60
	mov	[ReserveArray],eax
56
 
-
 
57
	mov	eax,[ScreenPointer]
-
 
58
	add	eax,(1200*1000*3)+50*(20*20*3)+8
-
 
59
	mov	[ReserveArray],eax
61
	ret
60
	ret
62
;---------------------------------------------------------
61
;---------------------------------------------------------
-