kolibrios/programs/media/animage/trunk/memory.inc
IgorA 6f44ae55dd fix interface calculating,
fix scroll broken in 6352,
fix keyboard function

git-svn-id: svn://kolibrios.org@6357 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-03-19 09:57:37 +00:00

65 lines
1.7 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mem_screen equ 1200*1000*3 ;à §¬¥à ¯ ¬ï⨠¤«ï ®¡« á⨠íªà ­ 
mem_panel_b equ 50*(20*20*3) ;à §¬¥à ¯ ¬ï⨠¤«ï ¯ ­¥«¨ ¨­áâà㬥­â®¢
mem_flood_f equ 500000 ;à §¬¥à ¡ãä¥à  ¤«ï § «¨¢ª¨,   â ª¦¥ ¤«ï ¯ «¨âàë
;----------------------------------------------------------
;--------change size of memory which use program-----------
;----------------------------------------------------------
GetMemory:
pusha
mov ecx,[Picture_SizeX]
mov edx,[Picture_SizeY]
imul ecx,edx
lea ecx,[ecx+ecx*2]
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
jnz have_new_memory
mov esi,sound_havent_memory
call sound
popa
add esp,4
jmp still
have_new_memory:
mov [ScreenPointer],eax
call prepare_data_pointers
popa
ret
;---------------------------------------------------------
prepare_data_pointers:
mov eax,[Picture_SizeX]
mov ebx,[Picture_SizeY]
imul eax,ebx
lea eax,[eax+eax*2]
mov ebx,[ScreenPointer]
add ebx,mem_screen+mem_panel_b+mem_flood_f
mov [PointerToPicture],ebx
mov [PointerToCopyPicture],ebx
mov [PointerToCopyPicture2],ebx
mov [PointerToEditBufer],ebx
mov [PointerToSpriteBufer],ebx
add [PointerToCopyPicture],eax
add [PointerToCopyPicture2],eax
add [PointerToCopyPicture2],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
add [PointerToEditBufer],eax
shl eax,2
add [PointerToSpriteBufer],eax
mov eax,[ScreenPointer]
add eax,mem_screen+mem_panel_b
mov [PointerToPalette],eax
mov [ReserveArray],eax
call scrollbar_move_00 ;®¡­ã«¥­¨¥ áªà®««¨­£ 
ret
;---------------------------------------------------------