Rev 1632 | Rev 6342 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1632 | Rev 1643 | ||
---|---|---|---|
1 | ;---------------------------------------------------------- |
1 | ;---------------------------------------------------------- |
2 | ;--------change size of memory which use program----------- |
2 | ;--------change size of memory which use program----------- |
3 | ;---------------------------------------------------------- |
3 | ;---------------------------------------------------------- |
4 | ;GetMemory: |
- | |
5 | ; pushad |
- | |
6 | ; mov eax,64 |
- | |
7 | ; mov ebx,1 |
- | |
8 | ; mov ecx,[Picture_SizeX] |
- | |
9 | ; mov edx,[Picture_SizeY] |
- | |
10 | ; imul ecx,edx |
- | |
11 | ; lea ecx,[ecx+ecx*2] |
- | |
12 | ; lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5 |
- | |
13 | ; add ecx,[ScreenPointer] |
- | |
14 | ; add ecx,(1200*1000)*3+50*(20*20*3)+500000+16000+0x4000 ; 4192384 |
- | |
15 | ; add ecx,[extended_memory] |
- | |
16 | ; mcall |
- | |
17 | ; test eax,eax |
- | |
18 | ; jz have_new_memory |
- | |
19 | ; mov esi,sound_havent_memory |
- | |
20 | ; call sound |
- | |
21 | ; jmp still |
- | |
22 | ;have_new_memory: |
- | |
23 | ; popad |
- | |
24 | ; ret |
- | |
25 | - | ||
26 | GetMemory: |
4 | GetMemory: |
27 | pushad |
5 | pusha |
28 | mov ecx,[Picture_SizeX] |
6 | mov ecx,[Picture_SizeX] |
29 | mov edx,[Picture_SizeY] |
7 | mov edx,[Picture_SizeY] |
30 | imul ecx,edx |
8 | imul ecx,edx |
31 | lea ecx,[ecx+ecx*2] |
9 | lea ecx,[ecx+ecx*2] |
32 | lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5 |
10 | lea ecx,[ecx+ecx*4] ;(Picture_SizeX*Picture_SizeY*3)*5 |
33 | add ecx,(1200*1000)*3+50*(20*20*3)+500000+16000+0x4000 ; 4192384 |
11 | add ecx,(1200*1000)*3+50*(20*20*3)+500000+16000+0x4000 ; 4192384 |
34 | mcall 68,20,,[ScreenPointer] |
12 | mcall 68,20,,[ScreenPointer] |
35 | test eax,eax |
13 | test eax,eax |
36 | jnz have_new_memory |
14 | jnz have_new_memory |
37 | mov esi,sound_havent_memory |
15 | mov esi,sound_havent_memory |
38 | call sound |
16 | call sound |
39 | pushad |
17 | popa |
- | 18 | add esp,4 |
|
40 | jmp still |
19 | jmp still |
41 | 20 | ||
42 | have_new_memory: |
21 | have_new_memory: |
43 | mov [ScreenPointer],eax |
22 | mov [ScreenPointer],eax |
44 | call prepare_data_pointers |
23 | call prepare_data_pointers |
45 | popad |
24 | popa |
46 | ret |
25 | ret |
47 | ;--------------------------------------------------------- |
26 | ;--------------------------------------------------------- |
48 | prepare_data_pointers: |
27 | prepare_data_pointers: |
49 | mov eax,[Picture_SizeX] |
28 | mov eax,[Picture_SizeX] |
50 | mov ebx,[Picture_SizeY] |
29 | mov ebx,[Picture_SizeY] |
51 | imul eax,ebx |
30 | imul eax,ebx |
52 | lea eax,[eax+eax*2] |
31 | lea eax,[eax+eax*2] |
53 | mov ebx,[ScreenPointer] |
32 | mov ebx,[ScreenPointer] |
54 | add ebx,(1200*1000*3)+50*(20*20*3)+500000 |
33 | add ebx,(1200*1000*3)+50*(20*20*3)+500000 |
55 | 34 | ||
56 | mov [PointerToPicture],ebx |
35 | mov [PointerToPicture],ebx |
57 | mov [PointerToCopyPicture],ebx |
36 | mov [PointerToCopyPicture],ebx |
58 | mov [PointerToCopyPicture2],ebx |
37 | mov [PointerToCopyPicture2],ebx |
59 | mov [PointerToEditBufer],ebx |
38 | mov [PointerToEditBufer],ebx |
60 | mov [PointerToSpriteBufer],ebx |
39 | mov [PointerToSpriteBufer],ebx |
61 | 40 | ||
62 | add [PointerToCopyPicture],eax |
41 | add [PointerToCopyPicture],eax |
63 | 42 | ||
64 | add [PointerToCopyPicture2],eax |
43 | add [PointerToCopyPicture2],eax |
65 | add [PointerToCopyPicture2],eax |
44 | add [PointerToCopyPicture2],eax |
66 | 45 | ||
67 | add [PointerToEditBufer],eax |
46 | add [PointerToEditBufer],eax |
68 | add [PointerToEditBufer],eax |
47 | add [PointerToEditBufer],eax |
69 | add [PointerToEditBufer],eax |
48 | add [PointerToEditBufer],eax |
70 | 49 | ||
71 | add [PointerToSpriteBufer],eax |
50 | add [PointerToSpriteBufer],eax |
72 | add [PointerToSpriteBufer],eax |
51 | add [PointerToSpriteBufer],eax |
73 | add [PointerToSpriteBufer],eax |
52 | add [PointerToSpriteBufer],eax |
74 | add [PointerToSpriteBufer],eax |
53 | add [PointerToSpriteBufer],eax |
- | 54 | ||
- | 55 | mov eax,[ScreenPointer] |
|
- | 56 | add eax,(1200*100*3)+50*(20*20*3)+1 |
|
- | 57 | mov [PointerToPalette],eax |
|
- | 58 | ||
- | 59 | mov eax,[ScreenPointer] |
|
- | 60 | add eax,(1200*1000)*3+50*(20*20*3)+8 |
|
- | 61 | mov [ReserveArray],eax |
|
75 | ret |
62 | ret |
76 | ;--------------------------------------------------------- |
63 | ;--------------------------------------------------------- |