Rev 1951 | Rev 2163 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1951 | Rev 2000 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | k_background: |
2 | k_background: |
3 | test dword [status],8 |
3 | test dword [status],8 |
4 | jnz still |
4 | jnz still |
5 | or dword [status],8 |
5 | or dword [status],8 |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | call get_memory_for_tread_stack |
7 | call get_memory_for_thread_stack |
8 | mov [thread_stack_4],eax |
8 | mov [thread_stack_4],eax |
9 | mcall 51,1,thread4 ;, thread_stack_4 |
9 | mcall 51,1,thread4 ;, thread_stack_4 |
10 | jmp still |
10 | jmp still |
11 | ;--------------------------------------------------------------------- |
11 | ;--------------------------------------------------------------------- |
Line 14... | Line 14... | ||
14 | mov eax,[ebx+30] |
14 | mov eax,[ebx+30] |
15 | mov [PID4],eax |
15 | mov [PID4],eax |
16 | mcall 40, 0x27 |
16 | mcall 40, 0x27 |
17 | .red: |
17 | .red: |
18 | call .draw_window |
18 | call .draw_window |
19 | - | ||
20 | .still: |
19 | .still: |
21 | - | ||
22 | mov eax,10 ; wait here for event |
20 | mov eax,10 ; wait here for event |
23 | mcall |
21 | mcall |
Line 24... | Line 22... | ||
24 | 22 | ||
25 | cmp eax,1 ; redraw request ? |
23 | cmp eax,1 ; redraw request ? |
- | 24 | je .red |
|
26 | je .red |
25 | |
27 | cmp eax,2 ; key in buffer ? |
26 | cmp eax,2 ; key in buffer ? |
- | 27 | je .key |
|
28 | je .key |
28 | |
29 | cmp eax,3 ; button in buffer ? |
29 | cmp eax,3 ; button in buffer ? |
- | 30 | je .button |
|
30 | je .button |
31 | |
31 | cmp eax,6 ; mouse in buffer ? |
32 | cmp eax,6 ; mouse in buffer ? |
32 | je .mouse |
- | |
Line -... | Line 33... | ||
- | 33 | je .mouse |
|
- | 34 | ||
33 | jmp .still |
35 | jmp .still |
34 | 36 | ;--------------------------------------------------------------------- |
|
35 | .mouse: |
37 | .mouse: |
Line 36... | Line 38... | ||
36 | push dword option_boxes_bcgr |
38 | push dword option_boxes_bcgr |
37 | call [option_box_mouse] |
39 | call [option_box_mouse] |
38 | 40 | ||
39 | cmp [option_group1],op1 |
41 | cmp [option_group1],op1 |
- | 42 | jne @f |
|
40 | jne @f |
43 | mov [bgrmode],dword 1 |
41 | mov [bgrmode],dword 1 |
44 | jmp .still |
42 | jmp .still |
45 | ;--------------------------------------------------------------------- |
43 | @@: |
- | |
- | 46 | @@: |
|
44 | mov [bgrmode],dword 2 |
47 | mov [bgrmode],dword 2 |
45 | jmp .still |
48 | jmp .still |
46 | 49 | ;--------------------------------------------------------------------- |
|
47 | .key: |
50 | .key: |
- | 51 | mcall |
|
48 | mcall |
52 | cmp ah,27 |
49 | cmp ah,27 |
53 | je .close |
- | 54 | ||
50 | je .close |
55 | cmp ah,13 |
51 | cmp ah,13 |
56 | je .kok |
- | 57 | ||
52 | je .kok |
58 | cmp ah,178 ;up |
53 | cmp ah,178 ;up |
59 | jne .nofup |
54 | jne .nofup |
60 | |
55 | cmp dword [bgrmode],1 |
61 | cmp dword [bgrmode],1 |
56 | je .fdn |
62 | je .fdn |
- | 63 | .fup: |
|
57 | .fup: |
64 | dec dword [bgrmode] |
58 | dec dword [bgrmode] |
65 | jmp .flagcont |
59 | jmp .flagcont |
66 | ;--------------------------------------------------------------------- |
- | 67 | .nofup: |
|
60 | .nofup: |
68 | cmp ah,177 ;down |
61 | cmp ah,177 ;down |
69 | jne .still |
62 | jne .still |
70 | |
63 | cmp dword [bgrmode],2 |
71 | cmp dword [bgrmode],4 |
64 | je .fup |
72 | je .fup |
65 | .fdn: |
73 | .fdn: |
66 | inc dword [bgrmode] |
74 | inc dword [bgrmode] |
- | 75 | .flagcont: |
|
67 | .flagcont: |
76 | cmp [bgrmode],dword 1 |
68 | cmp [bgrmode],dword 1 |
77 | jne @f |
69 | jne @f |
78 | |
- | 79 | mov [option_group1],op1 |
|
70 | mov [option_group1],op1 |
80 | call .draw_opt_boxes |
- | 81 | jmp .still |
|
- | 82 | ;--------------------------------------------------------------------- |
|
- | 83 | @@: |
|
71 | call .draw_opt_boxes |
84 | cmp [bgrmode],dword 2 |
72 | jmp .still |
85 | jne @f |
73 | @@: |
86 | |
- | 87 | mov [option_group1],op2 |
|
- | 88 | call .draw_opt_boxes |
|
- | 89 | jmp .still |
|
- | 90 | ;--------------------------------------------------------------------- |
|
Line -... | Line 91... | ||
- | 91 | @@: |
|
- | 92 | cmp [bgrmode],dword 3 |
|
- | 93 | jne @f |
|
- | 94 | ||
74 | mov [option_group1],op2 |
95 | mov [option_group1],op3 |
- | 96 | call .draw_opt_boxes |
|
- | 97 | jmp .still |
|
- | 98 | ;--------------------------------------------------------------------- |
|
- | 99 | @@: |
|
75 | call .draw_opt_boxes |
100 | mov [option_group1],op4 |
76 | jmp .still |
101 | call .draw_opt_boxes |
77 | 102 | jmp .still |
|
Line 78... | Line 103... | ||
78 | 103 | ;--------------------------------------------------------------------- |
|
Line 92... | Line 117... | ||
92 | mcall |
117 | mcall |
93 | .noclose: |
118 | .noclose: |
94 | .kok: |
119 | .kok: |
95 | call background |
120 | call background |
96 | jmp .close |
121 | jmp .close |
97 | - | ||
- | 122 | ;--------------------------------------------------------------------- |
|
98 | ; ********************************************* |
123 | ; ********************************************* |
99 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
124 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
100 | ; ********************************************* |
125 | ; ********************************************* |
101 | - | ||
102 | - | ||
103 | .draw_window: |
126 | .draw_window: |
104 | mcall 12,1 |
127 | mcall 12,1 |
105 | ; DRAW WINDOW |
- | |
106 | xor eax,eax ; function 0 : define and draw window |
- | |
107 | mov ebx,100*65536+200 ; [x start] *65536 + [x size] |
- | |
108 | mov ecx,100*65536+100 ; [y start] *65536 + [y size] |
- | |
109 | mov edx,0x03909090 ; color of work area RRGGBB,8->color gl |
- | |
110 | mcall |
- | |
111 | - | ||
112 | mov eax,8 |
128 | xor eax,eax |
113 | mov ebx,70*65536+40 |
- | |
114 | mov ecx,70*65536+20 |
- | |
115 | mov edx,4 |
129 | xor esi,esi |
116 | mov esi,0xdddddd |
- | |
117 | mcall |
- | |
118 | - | ||
119 | ; WINDOW LABEL |
- | |
120 | mcall 71,1, labelt4 |
130 | mcall ,<100,200>,<100,200>,0x13909090,,labelt4 |
121 | - | ||
122 | mov eax,4 ; function 4 : write text to window |
131 | mcall 8,<70,40>,<110,20>,4,0xdddddd |
123 | mov ebx,46*65536+28 ; [x start] *65536 + [y start] |
- | |
124 | mov ecx,0xffffff |
- | |
125 | mov edx, bgrdtext |
- | |
126 | mov esi, bgrdtext.size |
132 | mcall 4,<46,28>,0xffffff,bgrdtext,bgrdtext.size |
127 | mcall |
- | |
128 | add ebx,40*65536+48 |
133 | add ebx,40*65536+88 |
129 | mov edx, ok_btn |
134 | xor ecx,ecx |
130 | mov esi, ok_btn.size ;2 |
135 | mcall ,,,ok_btn,ok_btn.size |
131 | mov ecx,0 |
- | |
132 | mcall |
- | |
133 | - | ||
134 | call .draw_opt_boxes |
136 | call .draw_opt_boxes |
135 | ; mcall 47,0x80000,[PID4],<200, 5>,0xffffff |
137 | ; mcall 47,0x80000,[PID4],<200, 5>,0xffffff |
136 | mcall 12,2 |
138 | mcall 12,2 |
137 | - | ||
138 | ret |
139 | ret |
139 | ;--------------------------------------------------------------------- |
140 | ;--------------------------------------------------------------------- |
140 | .draw_opt_boxes: |
141 | .draw_opt_boxes: |
141 | push dword option_boxes_bcgr |
142 | push dword option_boxes_bcgr |
142 | call [option_box_draw] |
143 | call [option_box_draw] |