[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx rules.mk jni/GzzGL-jni.cxx librenderabl...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx rules.mk jni/GzzGL-jni.cxx librenderabl... |
Date: |
Mon, 07 Oct 2002 04:07:51 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/07 04:07:51
Modified files:
gfx : rules.mk
gfx/jni : GzzGL-jni.cxx
gfx/librenderables: Renderables.hxx renderables.py
Log message:
Port to 3.2
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/rules.mk.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/Renderables.hxx.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.98&tr2=1.99&r1=text&r2=text
Patches:
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.44 gzz/gfx/jni/GzzGL-jni.cxx:1.45
*** gzz/gfx/jni/GzzGL-jni.cxx:1.44 Sun Oct 6 13:37:46 2002
--- gzz/gfx/jni/GzzGL-jni.cxx Mon Oct 7 04:07:51 2002
***************
*** 82,90 ****
*
* @param env the JNI interface pointer
*/
! Renderables::unistring jstr2unistr(JNIEnv *env, jstring jstr) {
const jchar *strptr = env->GetStringChars(jstr, 0);
! Renderables::unistring unistr(strptr, env->GetStringLength(jstr));
env->ReleaseStringChars(jstr, strptr);
return unistr;
}
--- 82,90 ----
*
* @param env the JNI interface pointer
*/
! Renderables::unicodecharvector jstr2unistr(JNIEnv *env, jstring jstr) {
const jchar *strptr = env->GetStringChars(jstr, 0);
! Renderables::unicodecharvector unistr(strptr, strptr +
env->GetStringLength(jstr));
env->ReleaseStringChars(jstr, strptr);
return unistr;
}
***************
*** 96,103 ****
return stdstr;
}
/** Converts unistring to jstring */
! jstring unistr2jstr(JNIEnv *env, Renderables::unistring unistr) {
! return env->NewString(unistr.data(), unistr.length());
}
/** Converts std::string to jstring through UTF-8 transformation */
jstring stdstr2jstr(JNIEnv *env, std::string stdstr) {
--- 96,103 ----
return stdstr;
}
/** Converts unistring to jstring */
! jstring unistr2jstr(JNIEnv *env, Renderables::unicodecharvector unistr) {
! return env->NewString(&(unistr[0]), unistr.size());
}
/** Converts std::string to jstring through UTF-8 transformation */
jstring stdstr2jstr(JNIEnv *env, std::string stdstr) {
Index: gzz/gfx/librenderables/Renderables.hxx
diff -c gzz/gfx/librenderables/Renderables.hxx:1.19
gzz/gfx/librenderables/Renderables.hxx:1.20
*** gzz/gfx/librenderables/Renderables.hxx:1.19 Thu Oct 3 14:13:32 2002
--- gzz/gfx/librenderables/Renderables.hxx Mon Oct 7 04:07:51 2002
***************
*** 72,78 ****
using Util::ObjectStorer;
! typedef std::basic_string<unsigned short> unistring;
using namespace Vec23;
--- 72,78 ----
using Util::ObjectStorer;
! typedef std::vector<unsigned short> unicodecharvector;
using namespace Vec23;
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.98
gzz/gfx/librenderables/renderables.py:1.99
*** gzz/gfx/librenderables/renderables.py:1.98 Sun Oct 6 09:44:42 2002
--- gzz/gfx/librenderables/renderables.py Mon Oct 7 04:07:51 2002
***************
*** 26,35 ****
convert = {
"String" : {
"JNI" : "jstring",
! "CXX" : "unistring",
"pre" : (lambda v, p : "const jchar *jc_"+p\
+" = env->GetStringChars("+p \
! +", 0); unistring "+v+"(jc_"+p+"); \
env->ReleaseStringChars("+p+", jc_"+p+");\n"),
},
"Font" : {
--- 26,35 ----
convert = {
"String" : {
"JNI" : "jstring",
! "CXX" : "unicodecharvector",
"pre" : (lambda v, p : "const jchar *jc_"+p\
+" = env->GetStringChars("+p \
! +", 0); unicodecharvector "+v+"(jc_"+p+", jc_"+p+" +
env->GetStringLength("+p+")); \
env->ReleaseStringChars("+p+", jc_"+p+");\n"),
},
"Font" : {
***************
*** 983,989 ****
"Name": "HorizText",
"Data": """
TextRenderer *r;
! unistring txt;
ZPt origin;
float heightmul;
float widthmul;
--- 983,989 ----
"Name": "HorizText",
"Data": """
TextRenderer *r;
! unicodecharvector txt;
ZPt origin;
float heightmul;
float widthmul;
***************
*** 1014,1020 ****
"RenderCode" : """
if (dbg) {
cout << "HorizText:\\n";
! for (unistring::iterator it = txt.begin(); it != txt.end();
++it)
cout << "'" << (char)*it << "' (" << (int)*it << ")\\n";
}
--- 1014,1020 ----
"RenderCode" : """
if (dbg) {
cout << "HorizText:\\n";
! for (unicodecharvector::iterator it = txt.begin(); it !=
txt.end(); ++it)
cout << "'" << (char)*it << "' (" << (int)*it << ")\\n";
}
***************
*** 1038,1044 ****
"Name": "HorizText2",
"Data": """
TextRenderer *r;
! unistring txt;
float height, ascent, scale;
int magic;
""",
--- 1038,1044 ----
"Name": "HorizText2",
"Data": """
TextRenderer *r;
! unicodecharvector txt;
float height, ascent, scale;
int magic;
""",
***************
*** 1107,1113 ****
"Name": "HorizText_Squished",
"Data": """
TextRenderer *r;
! unistring txt;
ZPt origin;
float heightmul;
float widthmul;
--- 1107,1113 ----
"Name": "HorizText_Squished",
"Data": """
TextRenderer *r;
! unicodecharvector txt;
ZPt origin;
float heightmul;
float widthmul;
Index: gzz/gfx/rules.mk
diff -c gzz/gfx/rules.mk:1.12 gzz/gfx/rules.mk:1.13
*** gzz/gfx/rules.mk:1.12 Wed Oct 2 09:24:14 2002
--- gzz/gfx/rules.mk Mon Oct 7 04:07:51 2002
***************
*** 1,10 ****
OBJ = testGzzGL.o GZZGL-linux.o GzzGL.o
LIBOBJ = GZZGL-linux.o GzzGL.o GzzGL-jni.o paper-jni.o
LIBS = -lfreetype -lGL -lGLU `gdk-pixbuf-config --libs` -lstdc++
- # CXX=libtool --mode=compile g++-3.0
- # CXXLINK=libtool --mode=link gcc-3.0
! GCCVER=3.1
CXX=g++-$(GCCVER)
CXXLINK=gcc-$(GCCVER)
--- 1,8 ----
OBJ = testGzzGL.o GZZGL-linux.o GzzGL.o
LIBOBJ = GZZGL-linux.o GzzGL.o GzzGL-jni.o paper-jni.o
LIBS = -lfreetype -lGL -lGLU `gdk-pixbuf-config --libs` -lstdc++
! GCCVER=3.2
CXX=g++-$(GCCVER)
CXXLINK=gcc-$(GCCVER)
***************
*** 25,31 ****
CPPFLAGS = -I../libglwrapper/ -I../../libglwrapper/ -I/usr/include/freetype2
-I$(NVIDIAH) $(JNIINC) `gdk-pixbuf-config --cflags` -I../ -I.
! CXXFLAGS = -g -Wall $(OPTIMIZE) $(CPPFLAGS)
CCFLAGS = -g -Wall
SHARED = -shared
--- 23,29 ----
CPPFLAGS = -I../libglwrapper/ -I../../libglwrapper/ -I/usr/include/freetype2
-I$(NVIDIAH) $(JNIINC) `gdk-pixbuf-config --cflags` -I../ -I.
! CXXFLAGS = -g -Wall $(OPTIMIZE) $(CPPFLAGS)
CCFLAGS = -g -Wall
SHARED = -shared
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx rules.mk jni/GzzGL-jni.cxx librenderabl...,
Tuomas J. Lukka <=