… | |
… | |
77 | |
77 | |
78 | $FONTSIZE = int $HEIGHT / 50; |
78 | $FONTSIZE = int $HEIGHT / 50; |
79 | |
79 | |
80 | ############################################################################# |
80 | ############################################################################# |
81 | |
81 | |
82 | glClearColor 0, 0, 0, 0; |
82 | glClearColor 1, 1, 1, 1; |
83 | |
83 | |
84 | glEnable GL_TEXTURE_2D; |
84 | glEnable GL_TEXTURE_2D; |
85 | glEnable GL_COLOR_MATERIAL; |
85 | glEnable GL_COLOR_MATERIAL; |
86 | glShadeModel GL_FLAT; |
86 | glShadeModel GL_FLAT; |
87 | glDisable GL_DEPTH_TEST; |
87 | glDisable GL_DEPTH_TEST; |
… | |
… | |
146 | $HEIGHT = $CFG->{height}; |
146 | $HEIGHT = $CFG->{height}; |
147 | $FULLSCREEN = 0; |
147 | $FULLSCREEN = 0; |
148 | |
148 | |
149 | init_screen; |
149 | init_screen; |
150 | |
150 | |
151 | my $mapsize = List::Util::min 64, List::Util::max 11, int $HEIGHT * $CFG->{mapsize} * 0.01 / 32; |
151 | my $mapsize = List::Util::min 64, List::Util::max 11, int $WIDTH * $CFG->{mapsize} * 0.01 / 32; |
152 | |
152 | |
153 | $CONN = new conn |
153 | $CONN = new conn |
154 | host => $CFG->{host}, |
154 | host => $CFG->{host}, |
155 | port => $CFG->{port}, |
155 | port => $CFG->{port}, |
156 | user => $CFG->{user}, |
156 | user => $CFG->{user}, |
… | |
… | |
175 | sub force_refresh { |
175 | sub force_refresh { |
176 | glViewport 0, 0, $WIDTH, $HEIGHT; |
176 | glViewport 0, 0, $WIDTH, $HEIGHT; |
177 | |
177 | |
178 | glMatrixMode GL_PROJECTION; |
178 | glMatrixMode GL_PROJECTION; |
179 | glLoadIdentity; |
179 | glLoadIdentity; |
180 | glOrtho 0, $WIDTH, $HEIGHT, 0, -6000 , 6000; |
180 | glOrtho 0, $WIDTH, $HEIGHT, 0, -10000 , 10000; |
181 | glMatrixMode GL_MODELVIEW; |
181 | glMatrixMode GL_MODELVIEW; |
182 | |
182 | |
183 | glClear GL_COLOR_BUFFER_BIT; |
183 | glClear GL_COLOR_BUFFER_BIT; |
184 | |
184 | |
185 | $Crossfire::Client::Widget::TOPLEVEL->draw; |
185 | $Crossfire::Client::Widget::TOPLEVEL->draw; |