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