[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx demo/psyko2.py librenderables/renderabl...
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx demo/psyko2.py librenderables/renderabl... |
Date: |
Wed, 02 Oct 2002 08:23:48 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/10/02 08:23:48
Modified files:
gfx/demo : psyko2.py
gfx/librenderables: renderables.py
gfx/libtext : Text.hxx
Log message:
Fix non-ascii character encoding in jython source and check glyph array
bounds in DenseGlyphs
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/psyko2.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.93&tr2=1.94&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtext/Text.hxx.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/psyko2.py
diff -c gzz/gfx/demo/psyko2.py:1.8 gzz/gfx/demo/psyko2.py:1.9
*** gzz/gfx/demo/psyko2.py:1.8 Tue Oct 1 15:12:44 2002
--- gzz/gfx/demo/psyko2.py Wed Oct 2 08:23:48 2002
***************
*** 313,323 ****
if self.answer == self.correct:
msg = "Oikein"
else:
! msg = "Väärin"
if self.seed in tex0:
! msg2 = "Oli nähty"
else:
! msg2 = "Ei ollut nähty"
cs1 = vs.coords.affineCoordsys(0, 5, 350, 350, 1, 0, 0, 1)
vs.matcher.add(cs1, "msg")
--- 313,323 ----
if self.answer == self.correct:
msg = "Oikein"
else:
! msg = "V\xe4\xe4rin"
if self.seed in tex0:
! msg2 = "Oli n\xe4hty"
else:
! msg2 = "Ei ollut n\xe4hty"
cs1 = vs.coords.affineCoordsys(0, 5, 350, 350, 1, 0, 0, 1)
vs.matcher.add(cs1, "msg")
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.93
gzz/gfx/librenderables/renderables.py:1.94
*** gzz/gfx/librenderables/renderables.py:1.93 Wed Oct 2 07:43:44 2002
--- gzz/gfx/librenderables/renderables.py Wed Oct 2 08:23:48 2002
***************
*** 713,719 ****
*/
float texf = 0.5;
! DBG(dbg_irregularquad) << "Dice: " << dicex << " " << dicey << " " <<
diceb << "\n";
for (int pass = 0; pass < (mode ? 4 : 1); pass++) {
--- 713,719 ----
*/
float texf = 0.5;
! DBG(dbg_irregularquad) << "Dice: " << dicex << " " << dicey << " " <<
diceb << "\\n";
for (int pass = 0; pass < (mode ? 4 : 1); pass++) {
***************
*** 842,847 ****
--- 842,853 ----
};
""",
"RenderCode" : """
+ if (dbg) {
+ cout << "HorizText:\\n";
+ for (unistring::iterator it = txt.begin(); it != txt.end();
++it)
+ cout << "'" << (char)*it << "' (" << (int)*it << ")\\n";
+ }
+
Vertexer<Coords> v(coords1, widthmul, heightmul, origin);
glPushAttrib(GL_ENABLE_BIT);
glEnable(GL_BLEND);
***************
*** 850,855 ****
--- 856,862 ----
v
);
glPopAttrib();
+ if (dbg) cout << "HorizText done\\n";
"""
},
Index: gzz/gfx/libtext/Text.hxx
diff -c gzz/gfx/libtext/Text.hxx:1.8 gzz/gfx/libtext/Text.hxx:1.9
*** gzz/gfx/libtext/Text.hxx:1.8 Sat Sep 28 05:16:46 2002
--- gzz/gfx/libtext/Text.hxx Wed Oct 2 08:23:48 2002
***************
*** 217,223 ****
/** Get a single glyph.
*/
QuadGlyph &operator[](Char c) {
! return glyphs[c];
}
/** Get the width of a single glyph.
*/
--- 217,227 ----
/** Get a single glyph.
*/
QuadGlyph &operator[](Char c) {
! if ((unsigned)c > 255) {
! std::cerr << "DenseGlyphs::operator[]: character " << c << " out of
range\n";
! return glyphs['?'];
! }
! return glyphs[c];
}
/** Get the width of a single glyph.
*/