… | |
… | |
89 | } |
89 | } |
90 | |
90 | |
91 | sub key_up { |
91 | sub key_up { |
92 | } |
92 | } |
93 | |
93 | |
|
|
94 | my $x; |
|
|
95 | |
94 | sub draw { |
96 | sub draw { |
95 | glEnable GL_TEXTURE_2D; |
97 | glEnable GL_TEXTURE_2D; |
96 | glEnable GL_BLEND; |
98 | glEnable GL_BLEND; |
|
|
99 | |
|
|
100 | glPushMatrix; |
97 | |
101 | |
98 | my $map = $::CONN->{map}; |
102 | my $map = $::CONN->{map}; |
99 | |
103 | |
100 | for my $x (0 .. $::CONN->{mapw} - 1) { |
104 | for my $x (0 .. $::CONN->{mapw} - 1) { |
101 | for my $y (0 .. $::CONN->{maph} - 1) { |
105 | for my $y (0 .. $::CONN->{maph} - 1) { |
… | |
… | |
119 | glEnd; |
123 | glEnd; |
120 | } |
124 | } |
121 | } |
125 | } |
122 | } |
126 | } |
123 | |
127 | |
|
|
128 | glPopMatrix; |
|
|
129 | |
124 | glDisable GL_TEXTURE_2D; |
130 | glDisable GL_TEXTURE_2D; |
125 | glDisable GL_BLEND; |
131 | glDisable GL_BLEND; |
126 | } |
132 | } |
127 | |
133 | |
128 | 1; |
134 | 1; |
|
|
135 | |