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

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.57 by root, Sun May 21 00:02:00 2006 UTC vs.
Revision 1.60 by root, Tue May 23 23:14:44 2006 UTC

36sub gl_init { 36sub gl_init {
37 $GL_VERSION = gl_version * 1; 37 $GL_VERSION = gl_version * 1;
38 %GL_EXT = map +($_ => 1), split /\s+/, gl_extensions; 38 %GL_EXT = map +($_ => 1), split /\s+/, gl_extensions;
39 39
40 $GL_NPOT = $GL_EXT{GL_ARB_texture_non_power_of_two} || $GL_VERSION >= 2; 40 $GL_NPOT = $GL_EXT{GL_ARB_texture_non_power_of_two} || $GL_VERSION >= 2;
41 $GL_NPOT = 0 if gl_vendor =~ /ATI Technologies/; # ATI doesn't get it right...
41 42
42 glDisable GL_COLOR_MATERIAL; 43 glDisable GL_COLOR_MATERIAL;
43 glShadeModel GL_FLAT; 44 glShadeModel GL_FLAT;
44 glDisable GL_DITHER; 45 glDisable GL_DITHER;
45 glDisable GL_DEPTH_TEST; 46 glDisable GL_DEPTH_TEST;
106 -Home => "$Crossfire::VARDIR/pclient", 107 -Home => "$Crossfire::VARDIR/pclient",
107 -Cachesize => 1_000_000, 108 -Cachesize => 1_000_000,
108 -ErrFile => "$Crossfire::VARDIR/pclient/errorlog.txt", 109 -ErrFile => "$Crossfire::VARDIR/pclient/errorlog.txt",
109# -ErrPrefix => "DATABASE", 110# -ErrPrefix => "DATABASE",
110 -Verbose => 1, 111 -Verbose => 1,
111 -Flags => DB_CREATE | DB_RECOVER_FATAL | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN, 112 -Flags => DB_CREATE | DB_RECOVER | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN,
112 or die "unable to create/open database home $Crossfire::VARDIR/pclient: $BerkeleyDB::Error"; 113 or die "unable to create/open database home $Crossfire::VARDIR/pclient: $BerkeleyDB::Error";
113 114
114sub db_table($) { 115sub db_table($) {
115 my ($table) = @_; 116 my ($table) = @_;
116 117
130 my ($pom) = @_; 131 my ($pom) = @_;
131 132
132 $pom->present ("CFClient::PodToPango") 133 $pom->present ("CFClient::PodToPango")
133} 134}
134 135
136sub pod_to_pango_list($) {
137 my ($pom) = @_;
138
139 [
140 map s/^(\s*)// && [40 * length $1, length $_ ? $_ : " "],
141 split /\n/, $pom->present ("CFClient::PodToPango")
142 ]
143}
144
135package CFClient::PodToPango; 145package CFClient::PodToPango;
136 146
137use base Pod::POM::View::Text; 147use base Pod::POM::View::Text;
138 148
139our $indent = 0; 149our $indent = 0;
167 177
168sub view_textblock { 178sub view_textblock {
169 ("\t" x ($indent / 2)) . "$_[1]\n\n" 179 ("\t" x ($indent / 2)) . "$_[1]\n\n"
170} 180}
171 181
182sub view_head1 {
183 "<span foreground='#ffff00' size='x-large'>" . $_[1]->title->present ($_[0]) . "</span>\n\n"
184 . $_[1]->content->present ($_[0])
185};
186
172sub view_head2 { 187sub view_head2 {
173 "<big>" . $_[1]->title->present ($_[0]) . "</big>\n\n" 188 "<span foreground='#ccccff' size='large'>" . $_[1]->title->present ($_[0]) . "</span>\n\n"
174 . $_[1]->content->present ($_[0]) 189 . $_[1]->content->present ($_[0])
175}; 190};
176 191
177sub view_over { 192sub view_over {
178 local $indent = $indent + $_[1]->indent; 193 local $indent = $indent + $_[1]->indent;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines