ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.4 by root, Fri Apr 7 18:49:53 2006 UTC vs.
Revision 1.7 by elmex, Fri Apr 7 20:04:59 2006 UTC

1package Client::Widget; 1package Crossfire::Client::Widget;
2use strict; 2use strict;
3 3
4our $FOCUS; # the widget with current focus 4our $FOCUS; # the widget with current focus
5our %ACTIVE_WIDGETS; 5our %ACTIVE_WIDGETS;
6 6
77} 77}
78 78
79package Client::MapWidget; 79package Client::MapWidget;
80 80
81use strict; 81use strict;
82
82our @ISA = qw/Client::Widget/; 83our @ISA = qw/Client::Widget/;
83 84
84use SDL::OpenGL; 85use SDL::OpenGL;
85use SDL::OpenGL::Constants; 86use SDL::OpenGL::Constants;
86 87
89} 90}
90 91
91sub key_up { 92sub key_up {
92} 93}
93 94
95my $x;
96
94sub draw { 97sub draw {
95 glEnable GL_TEXTURE_2D; 98 glEnable GL_TEXTURE_2D;
96 glEnable GL_BLEND; 99 glEnable GL_BLEND;
100
101 glPushMatrix;
97 102
98 my $map = $::CONN->{map}; 103 my $map = $::CONN->{map};
99 104
100 for my $x (0 .. $::CONN->{mapw} - 1) { 105 for my $x (0 .. $::CONN->{mapw} - 1) {
101 for my $y (0 .. $::CONN->{maph} - 1) { 106 for my $y (0 .. $::CONN->{maph} - 1) {
119 glEnd; 124 glEnd;
120 } 125 }
121 } 126 }
122 } 127 }
123 128
129 glPopMatrix;
130
124 glDisable GL_TEXTURE_2D; 131 glDisable GL_TEXTURE_2D;
125 glDisable GL_BLEND; 132 glDisable GL_BLEND;
126} 133}
127 134
1281; 1351;
136

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines