[Scummvm-cvs-logs] CVS: residual actor.cpp,1.14,1.15 Makefile.cross,1.6,1.7 textobject.cpp,1.3,1.4 main.cpp,1.13,1.14 TODO,1.18,1.19

James Brown ender at users.sourceforge.net
Sat Oct 11 02:19:02 CEST 2003


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv23534

Modified Files:
	actor.cpp Makefile.cross textobject.cpp main.cpp TODO 
Log Message:
Fix residual crosscompile, add (untested) temp font support under Win32


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- actor.cpp	11 Oct 2003 08:28:32 -0000	1.14
+++ actor.cpp	11 Oct 2003 09:18:05 -0000	1.15
@@ -49,7 +49,6 @@
   // For now, this is just the ignoring-boxes version (which afaict
   // isn't even in the original).  This will eventually need a
   // following-boxes version also.
-  printf("walkto\n");
   if (p == pos_)
     walking_ = false;
   else {

Index: Makefile.cross
===================================================================
RCS file: /cvsroot/scummvm/residual/Makefile.cross,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile.cross	30 Aug 2003 18:05:48 -0000	1.6
+++ Makefile.cross	11 Oct 2003 09:18:05 -0000	1.7
@@ -4,7 +4,7 @@
 
 CXXFLAGS = -W -Wall -Ilua/include $(SDL_CFLAGS) # -O2 
 LDFLAGS = -W -Wall # -O2 
-LIBS = -Llua/lib -llua -llualib -lmingw32 -lopengl32 -lglu32 $(SDL_LIBS) 
+LIBS = -Llua/lib -llua -llualib -lmingw32 -lopengl32 -lglu32 -lgdi32 $(SDL_LIBS) 
 
 OBJS = main.o lab.o bitmap.o model.o resource.o material.o debug.o \
         textsplit.o lua.o registry.o localize.o scene.o engine.o actor.o \

Index: textobject.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textobject.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- textobject.cpp	5 Oct 2003 17:45:46 -0000	1.3
+++ textobject.cpp	11 Oct 2003 09:18:05 -0000	1.4
@@ -45,9 +45,9 @@
   glRasterPos2i(x_, y_);
   glListBase(Engine::instance()->font);
   glCallLists(
-    strlen(rindex(localString, '/')) - 1, 
+    strlen(strrchr(localString, '/')) - 1, 
     GL_UNSIGNED_BYTE,
-    rindex(localString, '/') + 1
+    strrchr(localString, '/') + 1
   );
 
   glMatrixMode( GL_PROJECTION );

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/main.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- main.cpp	5 Oct 2003 17:45:46 -0000	1.13
+++ main.cpp	11 Oct 2003 09:18:05 -0000	1.14
@@ -35,6 +35,7 @@
  #include <GL/glx.h>
  #include <X11/Xlib.h>
 #else
+ #include <SDL_syswm.h>
  #include <windows.h>
 #endif
 
@@ -128,7 +129,21 @@
   // FIXME: Hacky temporary font renderer code
   Engine::instance()->font = glGenLists(256);
   #ifdef WIN32
-	#warning FIXME: Do Win32 code
+  {
+	#warning entering w32 code
+	HDC   hDC;
+	HFONT font;
+	SDL_SysWMinfo wmi;
+        SDL_VERSION(&wmi.version);
+	SDL_GetWMInfo(&wmi);
+
+	hDC = GetDC(wmi.window);
+	font = CreateFont(0, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 
+			  OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, 0	,
+			  FF_DONTCARE|DEFAULT_PITCH, "Courier New");
+	SelectObject(hDC, font);
+	wglUseFontBitmaps(hDC, 0, 256, Engine::instance()->font);
+  }
   #else
   {
         Display *dpy = XOpenDisplay(NULL);

Index: TODO
===================================================================
RCS file: /cvsroot/scummvm/residual/TODO,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- TODO	11 Oct 2003 08:28:32 -0000	1.18
+++ TODO	11 Oct 2003 09:18:05 -0000	1.19
@@ -1,8 +1,7 @@
 Residual in-progress items (in rough order of priority):
 -------------------------------------------------------0
  * Add SMUSH (low-priority, but important) - Assigned to aquadran
- * Add LAF font support to replace existing hack   ]______
- * .. meanwhile add Win32 support for said hack :) ]        Ender
+ * Add LAF font support to replace existing hack
 
 Residual TODO list (in rough order of priority):
 ------------------------------------------------ 





More information about the Scummvm-git-logs mailing list