… | |
… | |
146 | |
146 | |
147 | glPushMatrix; |
147 | glPushMatrix; |
148 | glCallList $self->{list}; |
148 | glCallList $self->{list}; |
149 | glPopMatrix; |
149 | glPopMatrix; |
150 | |
150 | |
|
|
151 | # TNT2 emulates logops in software (or worse :) |
151 | if ($CFClient::UI::FOCUS != $self) { |
152 | if ($CFClient::UI::FOCUS != $self) { |
152 | glColor 64/255, 64/255, 64/255; |
153 | glColor 0.4, 0.2, 0.2, 0.9; |
153 | glLogicOp GL_AND; |
154 | glEnable GL_BLEND; |
154 | glEnable GL_COLOR_LOGIC_OP; |
155 | glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; |
155 | glBegin GL_QUADS; |
156 | glBegin GL_QUADS; |
156 | glVertex 0, 0; |
157 | glVertex 0, 0; |
157 | glVertex 0, $::HEIGHT; |
158 | glVertex 0, $::HEIGHT; |
158 | glVertex $::WIDTH, $::HEIGHT; |
159 | glVertex $::WIDTH, $::HEIGHT; |
159 | glVertex $::WIDTH, 0; |
160 | glVertex $::WIDTH, 0; |
160 | glEnd; |
161 | glEnd; |
161 | glDisable GL_COLOR_LOGIC_OP; |
162 | glDisable GL_BLEND; |
162 | } |
163 | } |
163 | } |
164 | } |
164 | |
165 | |
165 | my %DIR = ( |
166 | my %DIR = ( |
166 | CFClient::SDLK_KP8, [1, "north"], |
167 | CFClient::SDLK_KP8, [1, "north"], |
… | |
… | |
189 | |
190 | |
190 | if ($sym == CFClient::SDLK_KP5) { |
191 | if ($sym == CFClient::SDLK_KP5) { |
191 | $::CONN->user_send ("stay fire"); |
192 | $::CONN->user_send ("stay fire"); |
192 | } elsif ($uni == ord ",") { |
193 | } elsif ($uni == ord ",") { |
193 | $::CONN->user_send ("take"); |
194 | $::CONN->user_send ("take"); |
194 | } elsif ($uni == ord "\t") { |
195 | } elsif ($uni == ord "\t" or $uni == ord " ") { |
195 | $::CONN->user_send ("apply"); |
196 | $::CONN->user_send ("apply"); |
196 | } elsif ($sym == CFClient::SDLK_KP_PLUS || $uni == ord "+") { |
197 | } elsif ($sym == CFClient::SDLK_KP_PLUS || $uni == ord "+") { |
197 | $::CONN->user_send ("rotateshoottype +"); |
198 | $::CONN->user_send ("rotateshoottype +"); |
198 | } elsif ($sym == CFClient::SDLK_KP_MINUS || $uni == ord "-") { |
199 | } elsif ($sym == CFClient::SDLK_KP_MINUS || $uni == ord "-") { |
199 | $::CONN->user_send ("rotateshoottype -"); |
200 | $::CONN->user_send ("rotateshoottype -"); |