Rev 7229 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7229 | Rev 7613 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | Memory Blocks for KolibriOS v1.1 |
2 | Memory Blocks for KolibriOS v1.11 |
3 | Leency&Veliant Edition |
3 | Leency&Veliant Edition |
4 | 2008-2017 |
4 | 2008-2019 |
5 | */ |
5 | */ |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | #define MEMSIZE 4096 * 15 |
7 | #define MEMSIZE 4096 * 15 |
8 | #include "..\lib\gui.h" |
8 | #include "..\lib\gui.h" |
Line 33... | Line 33... | ||
33 | #endif |
33 | #endif |
Line 34... | Line 34... | ||
34 | 34 | ||
35 | int bitstat[60], bitpict[60]; |
35 | int bitstat[60], bitpict[60]; |
36 | dword butonsx[60], butonsy[60]; |
36 | dword butonsx[60], butonsy[60]; |
37 | dword firstbit, secondbit; |
37 | dword firstbit, secondbit; |
Line 38... | Line 38... | ||
38 | int i, count, lang; |
38 | int count; |
39 | 39 | ||
40 | 40 | ||
Line 99... | Line 99... | ||
99 | } |
99 | } |
100 | break; |
100 | break; |
Line 101... | Line 101... | ||
101 | 101 | ||
102 | case evReDraw: |
102 | case evReDraw: |
103 | system.color.get(); |
103 | system.color.get(); |
- | 104 | DefineAndDrawWindow(215,100,CELL_SIZE+4*10 + 4 + 9,PANEL_Y+4+PANEL_H+skin_height, |
|
104 | DefineAndDrawWindow(215,100,CELL_SIZE+4*10 + 4 + 9,PANEL_Y + 4 + PANEL_H +skin_height,0x34,0xC0C0C0,"Memory Blocks",0); |
105 | 0x34,0xC0C0C0,"Memory Blocks",0); |
105 | GetProcessInfo(#Form, SelfInfo); |
106 | GetProcessInfo(#Form, SelfInfo); |
106 | Draw_Panel(); |
107 | Draw_Panel(); |
107 | Draw_Game_Pole(); |
108 | Draw_Game_Pole(); |
108 | break; |
109 | break; |
109 | } |
110 | } |
Line 110... | Line 111... | ||
110 | } |
111 | } |
111 | 112 | ||
112 | void NewGame() |
113 | void NewGame() |
- | 114 | { |
|
Line 113... | Line 115... | ||
113 | { |
115 | int off; |
114 | int off; |
116 | int i; |
115 | 117 | ||
116 | FOR (i = 0; i < 60; i++) |
118 | FOR (i = 0; i < 60; i++) |
117 | { |
119 | { |
Line 118... | Line 120... | ||
118 | bitpict[i] = 0; |
120 | bitstat[i] = 0; |
119 | bitpict[i] = 0; |
121 | bitpict[i] = 0; |
Line 126... | Line 128... | ||
126 | do off = random(60); while (bitpict[off] != 0); |
128 | do off = random(60); while (bitpict[off] != 0); |
127 | bitpict[off] = i; |
129 | bitpict[off] = i; |
128 | do off = random(60); while (bitpict[off] != 0); |
130 | do off = random(60); while (bitpict[off] != 0); |
129 | bitpict[off] = i; |
131 | bitpict[off] = i; |
130 | } |
132 | } |
- | 133 | Draw_Game_Pole(); |
|
- | 134 | Draw_Panel(); |
|
131 | } |
135 | } |
Line 132... | Line 136... | ||
132 | 136 | ||
133 | void ReDraw_Game_Button(int id) |
137 | void ReDraw_Game_Button(int id) |
134 | { |
138 | { |
Line 149... | Line 153... | ||
149 | } |
153 | } |
150 | } |
154 | } |
Line 151... | Line 155... | ||
151 | 155 | ||
152 | void Draw_Game_Pole() |
156 | void Draw_Game_Pole() |
- | 157 | { |
|
153 | { |
158 | int i; |
154 | byte j; |
159 | byte j; |
155 | for (j = 0; j < stolbcov; j++) for (i = 0; i < strok; i++) |
160 | for (j = 0; j < stolbcov; j++) for (i = 0; i < strok; i++) |
156 | { |
161 | { |
157 | butonsx[j*strok+i] = CELL_SIZE+4 * j + 4; //save coordinates to avoid their recalculation after |
162 | butonsx[j*strok+i] = CELL_SIZE+4 * j + 4; //save coordinates to avoid |
158 | butonsy[j*strok+i] = CELL_SIZE+4 * i + 4; |
163 | butonsy[j*strok+i] = CELL_SIZE+4 * i + 4; //their recalculation after |
159 | ReDraw_Game_Button(j*strok + i); |
164 | ReDraw_Game_Button(j*strok + i); |
160 | } |
165 | } |
Line 161... | Line 166... | ||
161 | } |
166 | } |