kolibrios/programs/media/animage/trunk/memory.inc
IgorA 22762353bf fix scroll bars positions where redraw window
git-svn-id: svn://kolibrios.org@6352 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-03-16 13:23:19 +00:00

69 lines
1.8 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
;®¡­ã«¥­¨¥ áªà®««¨­£ 
and [PosX],0
and [PosY],0
mov [Scroll1CoordinatX],9 ;8+1
mov [Scroll2CoordinatY],89 ;20+15+1+50+3
ret
;---------------------------------------------------------