Rev 4195 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4195 | Rev 4198 | ||
---|---|---|---|
1 | n_main: |
1 | n_main: |
2 | mov dword[nwin.width], 67 |
2 | mov dword[nwin.width], 67 |
3 | mov dword[nwin.height], 16 |
3 | mov dword[nwin.height], 16 |
4 | 4 | ||
5 | mov dword[nwin.bgwidth], 66 |
5 | mov dword[nwin.bgwidth], 66 |
6 | mov dword[nwin.bgheight], 1 |
6 | mov dword[nwin.bgheight], 1 |
7 | 7 | ||
8 | cmp dword[dock_items.location], 1 |
8 | cmp dword[dock_items.location], 1 |
9 | je .top |
9 | je .top |
10 | cmp dword[dock_items.location], 4 |
10 | cmp dword[dock_items.location], 4 |
11 | je .right |
11 | je .right |
12 | cmp dword[dock_items.location], 3 |
12 | cmp dword[dock_items.location], 3 |
13 | je .bottom |
13 | je .bottom |
14 | jmp .left |
14 | jmp .left |
15 | 15 | ||
16 | .top: |
16 | .top: |
17 | mov eax, [win.height_opn] |
17 | mov eax, [win.height_opn] |
18 | mov [nwin.y], eax |
18 | mov [nwin.y], eax |
19 | 19 | ||
20 | mov dword[nwin.bgx], 1 |
20 | mov dword[nwin.bgx], 1 |
21 | 21 | ||
22 | jmp @f |
22 | jmp @f |
23 | 23 | ||
24 | .left: |
24 | .left: |
25 | mov eax, [win.width_opn] |
25 | mov eax, [win.width_opn] |
26 | mov [nwin.x], eax |
26 | mov [nwin.x], eax |
27 | 27 | ||
28 | mov dword[nwin.bgy], 1 |
28 | mov dword[nwin.bgy], 1 |
29 | mov dword[nwin.bgwidth], 1 |
29 | mov dword[nwin.bgwidth], 1 |
30 | mov eax, [nwin.height] |
30 | mov eax, [nwin.height] |
31 | dec eax |
31 | dec eax |
32 | mov dword[nwin.bgheight], eax |
32 | mov dword[nwin.bgheight], eax |
33 | 33 | ||
34 | jmp @f |
34 | jmp @f |
35 | 35 | ||
36 | .bottom: |
36 | .bottom: |
37 | mov eax, [win.y_opn] |
37 | mov eax, [win.y_opn] |
38 | sub eax, 16 |
38 | sub eax, 17 |
39 | mov [nwin.y], eax |
39 | mov [nwin.y], eax |
40 | 40 | ||
41 | mov dword[nwin.bgx], 1 |
41 | mov dword[nwin.bgx], 1 |
42 | mov eax, [nwin.height] |
42 | mov eax, [nwin.height] |
- | 43 | ||
- | 44 | mov eax, [nwin.height] |
|
43 | mov [nwin.bgy], eax |
45 | mov [nwin.bgy], eax |
44 | 46 | ||
45 | jmp @f |
47 | jmp @f |
46 | 48 | ||
47 | .right: |
49 | .right: |
48 | mov eax, [win.x_opn] |
50 | mov eax, [win.x_opn] |
49 | sub eax, 67 |
51 | sub eax, 68 |
50 | mov [nwin.x], eax |
52 | mov [nwin.x], eax |
51 | 53 | ||
52 | mov eax, [nwin.width] |
54 | mov eax, [nwin.width] |
53 | mov [nwin.bgx], eax |
55 | mov [nwin.bgx], eax |
54 | mov dword[nwin.bgy], 1 |
56 | mov dword[nwin.bgy], 1 |
55 | mov dword[nwin.bgwidth], 1 |
57 | mov dword[nwin.bgwidth], 1 |
56 | mov eax, [nwin.height] |
58 | mov eax, [nwin.height] |
57 | dec eax |
59 | dec eax |
58 | mov dword[nwin.bgheight], eax |
60 | mov dword[nwin.bgheight], eax |
59 | 61 | ||
60 | @@: |
62 | @@: |
61 | 63 | ||
62 | mcall 40, 1b |
64 | mcall 40, 1b |
63 | 65 | ||
64 | mcall 9, win.procinfo, -1 |
66 | mcall 9, win.procinfo, -1 |
65 | mov ecx, [win.procinfo + 30] |
67 | mov ecx, [win.procinfo + 30] |
66 | mcall 18, 21 |
68 | mcall 18, 21 |
67 | and eax, 0xFFFF |
69 | and eax, 0xFFFF |
68 | mov [nwin.sid], eax |
70 | mov [nwin.sid], eax |
69 | ;------------------------------------------------------------------------------- |
71 | ;------------------------------------------------------------------------------- |
70 | n_main_loop: |
72 | n_main_loop: |
71 | mcall 23, 1 |
73 | mcall 23, 1 |
72 | 74 | ||
73 | cmp eax, EV_IDLE |
75 | cmp eax, EV_IDLE |
74 | je n_event_idle |
76 | je n_event_idle |
75 | cmp eax, EV_REDRAW |
77 | cmp eax, EV_REDRAW |
76 | je n_event_redraw |
78 | je n_event_redraw |
77 | 79 | ||
78 | jmp n_main_loop |
80 | jmp n_main_loop |
79 | ;------------------------------------------------------------------------------- |
81 | ;------------------------------------------------------------------------------- |
80 | n_event_idle: |
82 | n_event_idle: |
81 | cmp byte[nwin.close], 1 |
83 | cmp byte[nwin.close], 1 |
82 | jne @f |
84 | jne @f |
83 | 85 | ||
84 | mcall 13, <0, [win.width]>, <[win.height], 1>, [color.frame] |
86 | mcall 13, <0, [win.width]>, <[win.height], 1>, [color.frame] |
85 | 87 | ||
86 | mov byte[nwin.close], 0 |
88 | mov byte[nwin.close], 0 |
87 | mcall -1 |
89 | mcall -1 |
88 | 90 | ||
89 | @@: |
91 | @@: |
90 | cmp byte[win.button_index], 100 |
92 | cmp byte[win.button_index], 100 |
91 | jne @f |
93 | jne @f |
92 | 94 | ||
93 | mcall 67, 0, 0, 0, 0 |
95 | mcall 67, 0, 0, 0, 0 |
94 | jmp .end |
96 | jmp .end |
95 | 97 | ||
96 | @@: |
98 | @@: |
97 | cmp byte[nwin.change_shape], 1 |
99 | cmp byte[nwin.change_shape], 1 |
98 | jne .end |
100 | jne .end |
99 | 101 | ||
100 | mov byte[nwin.change_shape], 0 |
102 | mov byte[nwin.change_shape], 0 |
101 | mcall 67, [nwin.x], [nwin.y], [nwin.width], [nwin.height] |
103 | mcall 67, [nwin.x], [nwin.y], [nwin.width], [nwin.height] |
102 | 104 | ||
103 | .end: |
105 | .end: |
104 | jmp n_main_loop |
106 | jmp n_main_loop |
105 | ;------------------------------------------------------------------------------- |
107 | ;------------------------------------------------------------------------------- |
106 | n_event_redraw: |
108 | n_event_redraw: |
107 | mcall 12, 1 |
109 | mcall 12, 1 |
108 | 110 | ||
109 | mcall 0, <[nwin.x], [nwin.width]>, <[nwin.y], [nwin.height]>, [color.bg], [color.bg], [color.frame] |
111 | mcall 0, <[nwin.x], [nwin.width]>, <[nwin.y], [nwin.height]>, [color.bg], [color.bg], [color.frame] |
110 | 112 | ||
111 | mcall 13, <[nwin.bgx], [nwin.bgwidth]>, <[nwin.bgy], [nwin.bgheight]>, [color.bg] |
113 | mcall 13, <[nwin.bgx], [nwin.bgwidth]>, <[nwin.bgy], [nwin.bgheight]>, [color.bg] |
112 | 114 | ||
113 | mov edx, [win.button_index] |
115 | mov edx, [win.button_index] |
114 | imul edx, 16 |
116 | imul edx, 16 |
115 | add edx, dock_items.name |
117 | add edx, dock_items.name |
116 | 118 | ||
117 | mov eax, 0 |
119 | mov eax, 0 |
118 | @@: |
120 | @@: |
119 | inc eax |
121 | inc eax |
120 | cmp byte[edx+eax], 0 |
122 | cmp byte[edx+eax], 0 |
121 | jne @b |
123 | jne @b |
122 | 124 | ||
123 | imul eax, 3 |
125 | imul eax, 3 |
124 | mov ebx, 34 |
126 | mov ebx, 34 |
125 | sub ebx, eax |
127 | sub ebx, eax |
126 | add ebx, 1 |
128 | add ebx, 1 |
127 | shl ebx, 16 |
129 | shl ebx, 16 |
128 | add ebx, 5 |
130 | add ebx, 5 |
129 | 131 | ||
130 | mcall 4, , [color.text] |
132 | mcall 4, , [color.text] |
131 | 133 | ||
132 | mcall 12, 2 |
134 | mcall 12, 2 |
133 | 135 | ||
134 | mcall 18, 3, [nwin.sid] |
136 | mcall 18, 3, [nwin.sid] |
135 | 137 | ||
136 | jmp n_main_loop[nwin.bgy],>[nwin.bgx],>[nwin.y],>[nwin.x],>[win.height],>0,> |
138 | jmp n_main_loop[nwin.bgy],>[nwin.bgx],>[nwin.y],>[nwin.x],>[win.height],>0,> |