2016-03-16 01:30:18 +03:00
|
|
|
|
|
|
|
|
|
mem_screen equ 1200*1000*3 ;ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>࠭<EFBFBD>
|
|
|
|
|
mem_panel_b equ 50*(20*20*3) ;ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㬥<EFBFBD>⮢
|
|
|
|
|
mem_flood_f equ 500000 ;ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> ⠪<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2006-12-29 17:50:24 +03:00
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
;--------change size of memory which use program-----------
|
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
GetMemory:
|
2010-10-05 00:40:19 +04:00
|
|
|
|
pusha
|
2010-09-30 17:20:36 +04:00
|
|
|
|
mov ecx,[Picture_SizeX]
|
|
|
|
|
mov edx,[Picture_SizeY]
|
|
|
|
|
imul ecx,edx
|
|
|
|
|
lea ecx,[ecx+ecx*2]
|
2016-03-16 01:30:18 +03:00
|
|
|
|
lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5
|
|
|
|
|
add ecx,mem_screen+mem_panel_b+mem_flood_f
|
|
|
|
|
mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[ScreenPointer]
|
|
|
|
|
test eax,eax
|
2010-09-30 17:20:36 +04:00
|
|
|
|
jnz have_new_memory
|
|
|
|
|
mov esi,sound_havent_memory
|
|
|
|
|
call sound
|
2010-10-05 00:40:19 +04:00
|
|
|
|
popa
|
|
|
|
|
add esp,4
|
2010-09-30 17:20:36 +04:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
have_new_memory:
|
|
|
|
|
mov [ScreenPointer],eax
|
|
|
|
|
call prepare_data_pointers
|
2010-10-05 00:40:19 +04:00
|
|
|
|
popa
|
2010-09-30 17:20:36 +04:00
|
|
|
|
ret
|
|
|
|
|
;---------------------------------------------------------
|
|
|
|
|
prepare_data_pointers:
|
|
|
|
|
mov eax,[Picture_SizeX]
|
|
|
|
|
mov ebx,[Picture_SizeY]
|
|
|
|
|
imul eax,ebx
|
|
|
|
|
lea eax,[eax+eax*2]
|
|
|
|
|
mov ebx,[ScreenPointer]
|
2016-03-16 01:30:18 +03:00
|
|
|
|
add ebx,mem_screen+mem_panel_b+mem_flood_f
|
2010-09-30 17:20:36 +04:00
|
|
|
|
|
|
|
|
|
mov [PointerToPicture],ebx
|
|
|
|
|
mov [PointerToCopyPicture],ebx
|
|
|
|
|
mov [PointerToCopyPicture2],ebx
|
|
|
|
|
mov [PointerToEditBufer],ebx
|
|
|
|
|
mov [PointerToSpriteBufer],ebx
|
2006-12-29 17:50:24 +03:00
|
|
|
|
|
2010-09-30 17:20:36 +04:00
|
|
|
|
add [PointerToCopyPicture],eax
|
2006-12-29 17:50:24 +03:00
|
|
|
|
|
2010-09-30 17:20:36 +04:00
|
|
|
|
add [PointerToCopyPicture2],eax
|
|
|
|
|
add [PointerToCopyPicture2],eax
|
2006-12-29 17:50:24 +03:00
|
|
|
|
|
2010-09-30 17:20:36 +04:00
|
|
|
|
add [PointerToEditBufer],eax
|
|
|
|
|
add [PointerToEditBufer],eax
|
|
|
|
|
add [PointerToEditBufer],eax
|
2006-12-29 17:50:24 +03:00
|
|
|
|
|
2016-03-12 14:05:16 +03:00
|
|
|
|
shl eax,2
|
2010-09-30 17:20:36 +04:00
|
|
|
|
add [PointerToSpriteBufer],eax
|
2010-10-05 00:40:19 +04:00
|
|
|
|
|
|
|
|
|
mov eax,[ScreenPointer]
|
2016-03-16 01:30:18 +03:00
|
|
|
|
add eax,mem_screen+mem_panel_b
|
2010-10-05 00:40:19 +04:00
|
|
|
|
mov [PointerToPalette],eax
|
|
|
|
|
mov [ReserveArray],eax
|
2010-09-30 17:20:36 +04:00
|
|
|
|
ret
|
|
|
|
|
;---------------------------------------------------------
|