Rev 6352 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6352 | Rev 6357 | ||
---|---|---|---|
1 | mem_screen equ 1200*1000*3 ;à §¬¥à ¯ ¬ï⨠¤«ï ®¡« á⨠íªà |
1 | mem_screen equ 1200*1000*3 ;à §¬¥à ¯ ¬ï⨠¤«ï ®¡« á⨠íªà |
2 | mem_panel_b equ 50*(20*20*3) ;à §¬¥à ¯ ¬ï⨠¤«ï ¯ ¥«¨ ¨áâà㬥⮢ |
2 | mem_panel_b equ 50*(20*20*3) ;à §¬¥à ¯ ¬ï⨠¤«ï ¯ ¥«¨ ¨áâà㬥⮢ |
3 | mem_flood_f equ 500000 ;à §¬¥à ¡ãä¥à ¤«ï § «¨¢ª¨, â ª¦¥ ¤«ï ¯ «¨âàë |
3 | mem_flood_f equ 500000 ;à §¬¥à ¡ãä¥à ¤«ï § «¨¢ª¨, â ª¦¥ ¤«ï ¯ «¨âàë |
4 | 4 | ||
5 | ;---------------------------------------------------------- |
5 | ;---------------------------------------------------------- |
6 | ;--------change size of memory which use program----------- |
6 | ;--------change size of memory which use program----------- |
7 | ;---------------------------------------------------------- |
7 | ;---------------------------------------------------------- |
8 | GetMemory: |
8 | GetMemory: |
9 | pusha |
9 | pusha |
10 | mov ecx,[Picture_SizeX] |
10 | mov ecx,[Picture_SizeX] |
11 | mov edx,[Picture_SizeY] |
11 | mov edx,[Picture_SizeY] |
12 | imul ecx,edx |
12 | imul ecx,edx |
13 | lea ecx,[ecx+ecx*2] |
13 | lea ecx,[ecx+ecx*2] |
14 | lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5 |
14 | lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5 |
15 | add ecx,mem_screen+mem_panel_b+mem_flood_f |
15 | add ecx,mem_screen+mem_panel_b+mem_flood_f |
16 | mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[ScreenPointer] |
16 | mcall SF_SYS_MISC,SSF_MEM_REALLOC,,[ScreenPointer] |
17 | test eax,eax |
17 | test eax,eax |
18 | jnz have_new_memory |
18 | jnz have_new_memory |
19 | mov esi,sound_havent_memory |
19 | mov esi,sound_havent_memory |
20 | call sound |
20 | call sound |
21 | popa |
21 | popa |
22 | add esp,4 |
22 | add esp,4 |
23 | jmp still |
23 | jmp still |
24 | 24 | ||
25 | have_new_memory: |
25 | have_new_memory: |
26 | mov [ScreenPointer],eax |
26 | mov [ScreenPointer],eax |
27 | call prepare_data_pointers |
27 | call prepare_data_pointers |
28 | popa |
28 | popa |
29 | ret |
29 | ret |
30 | ;--------------------------------------------------------- |
30 | ;--------------------------------------------------------- |
31 | prepare_data_pointers: |
31 | prepare_data_pointers: |
32 | mov eax,[Picture_SizeX] |
32 | mov eax,[Picture_SizeX] |
33 | mov ebx,[Picture_SizeY] |
33 | mov ebx,[Picture_SizeY] |
34 | imul eax,ebx |
34 | imul eax,ebx |
35 | lea eax,[eax+eax*2] |
35 | lea eax,[eax+eax*2] |
36 | mov ebx,[ScreenPointer] |
36 | mov ebx,[ScreenPointer] |
37 | add ebx,mem_screen+mem_panel_b+mem_flood_f |
37 | add ebx,mem_screen+mem_panel_b+mem_flood_f |
38 | 38 | ||
39 | mov [PointerToPicture],ebx |
39 | mov [PointerToPicture],ebx |
40 | mov [PointerToCopyPicture],ebx |
40 | mov [PointerToCopyPicture],ebx |
41 | mov [PointerToCopyPicture2],ebx |
41 | mov [PointerToCopyPicture2],ebx |
42 | mov [PointerToEditBufer],ebx |
42 | mov [PointerToEditBufer],ebx |
43 | mov [PointerToSpriteBufer],ebx |
43 | mov [PointerToSpriteBufer],ebx |
44 | 44 | ||
45 | add [PointerToCopyPicture],eax |
45 | add [PointerToCopyPicture],eax |
46 | 46 | ||
47 | add [PointerToCopyPicture2],eax |
47 | add [PointerToCopyPicture2],eax |
48 | add [PointerToCopyPicture2],eax |
48 | add [PointerToCopyPicture2],eax |
49 | 49 | ||
50 | add [PointerToEditBufer],eax |
50 | add [PointerToEditBufer],eax |
51 | add [PointerToEditBufer],eax |
51 | add [PointerToEditBufer],eax |
52 | add [PointerToEditBufer],eax |
52 | add [PointerToEditBufer],eax |
53 | 53 | ||
54 | shl eax,2 |
54 | shl eax,2 |
55 | add [PointerToSpriteBufer],eax |
55 | add [PointerToSpriteBufer],eax |
56 | 56 | ||
57 | mov eax,[ScreenPointer] |
57 | mov eax,[ScreenPointer] |
58 | add eax,mem_screen+mem_panel_b |
58 | add eax,mem_screen+mem_panel_b |
59 | mov [PointerToPalette],eax |
59 | mov [PointerToPalette],eax |
60 | mov [ReserveArray],eax |
60 | mov [ReserveArray],eax |
61 | 61 | ||
62 | ;®¡ã«¥¨¥ áªà®««¨£ |
62 | call scrollbar_move_00 ;®¡ã«¥¨¥ áªà®««¨£ |
63 | and [PosX],0 |
- | |
64 | and [PosY],0 |
- | |
65 | mov [Scroll1CoordinatX],9 ;8+1 |
- | |
66 | mov [Scroll2CoordinatY],89 ;20+15+1+50+3 |
- | |
67 | ret |
63 | ret |
68 | ;--------------------------------------------------------- |
64 | ;--------------------------------------------------------- |