2016-03-15 23:30:18 +01: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 15:50:24 +01:00
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
;--------change size of memory which use program-----------
|
|
|
|
|
;----------------------------------------------------------
|
|
|
|
|
GetMemory:
|
2010-10-04 22:40:19 +02:00
|
|
|
|
pusha
|
2010-09-30 15:20:36 +02:00
|
|
|
|
mov ecx,[Picture_SizeX]
|
|
|
|
|
mov edx,[Picture_SizeY]
|
|
|
|
|
imul ecx,edx
|
|
|
|
|
lea ecx,[ecx+ecx*2]
|
2016-03-15 23:30:18 +01: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 15:20:36 +02:00
|
|
|
|
jnz have_new_memory
|
|
|
|
|
mov esi,sound_havent_memory
|
|
|
|
|
call sound
|
2010-10-04 22:40:19 +02:00
|
|
|
|
popa
|
|
|
|
|
add esp,4
|
2010-09-30 15:20:36 +02:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
have_new_memory:
|
|
|
|
|
mov [ScreenPointer],eax
|
|
|
|
|
call prepare_data_pointers
|
2010-10-04 22:40:19 +02:00
|
|
|
|
popa
|
2010-09-30 15:20:36 +02: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-15 23:30:18 +01:00
|
|
|
|
add ebx,mem_screen+mem_panel_b+mem_flood_f
|
2010-09-30 15:20:36 +02:00
|
|
|
|
|
|
|
|
|
mov [PointerToPicture],ebx
|
|
|
|
|
mov [PointerToCopyPicture],ebx
|
|
|
|
|
mov [PointerToCopyPicture2],ebx
|
|
|
|
|
mov [PointerToEditBufer],ebx
|
|
|
|
|
mov [PointerToSpriteBufer],ebx
|
2006-12-29 15:50:24 +01:00
|
|
|
|
|
2010-09-30 15:20:36 +02:00
|
|
|
|
add [PointerToCopyPicture],eax
|
2006-12-29 15:50:24 +01:00
|
|
|
|
|
2010-09-30 15:20:36 +02:00
|
|
|
|
add [PointerToCopyPicture2],eax
|
|
|
|
|
add [PointerToCopyPicture2],eax
|
2006-12-29 15:50:24 +01:00
|
|
|
|
|
2010-09-30 15:20:36 +02:00
|
|
|
|
add [PointerToEditBufer],eax
|
|
|
|
|
add [PointerToEditBufer],eax
|
|
|
|
|
add [PointerToEditBufer],eax
|
2006-12-29 15:50:24 +01:00
|
|
|
|
|
2016-03-12 12:05:16 +01:00
|
|
|
|
shl eax,2
|
2010-09-30 15:20:36 +02:00
|
|
|
|
add [PointerToSpriteBufer],eax
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
|
|
mov eax,[ScreenPointer]
|
2016-03-15 23:30:18 +01:00
|
|
|
|
add eax,mem_screen+mem_panel_b
|
2010-10-04 22:40:19 +02:00
|
|
|
|
mov [PointerToPalette],eax
|
|
|
|
|
mov [ReserveArray],eax
|
2016-03-16 14:23:19 +01:00
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD>㫥<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
and [PosX],0
|
|
|
|
|
and [PosY],0
|
|
|
|
|
mov [Scroll1CoordinatX],9 ;8+1
|
|
|
|
|
mov [Scroll2CoordinatY],89 ;20+15+1+50+3
|
2010-09-30 15:20:36 +02:00
|
|
|
|
ret
|
|
|
|
|
;---------------------------------------------------------
|