[75220] trunk/dports/games/PlasmaClient/files/patch-chatlog.diff
ryandesign at macports.org
ryandesign at macports.org
Tue Jan 18 01:34:08 PST 2011
Revision: 75220
http://trac.macports.org/changeset/75220
Author: ryandesign at macports.org
Date: 2011-01-18 01:33:55 -0800 (Tue, 18 Jan 2011)
Log Message:
-----------
PlasmaClient: add patch for chatlog variant
Added Paths:
-----------
trunk/dports/games/PlasmaClient/files/patch-chatlog.diff
Copied: trunk/dports/games/PlasmaClient/files/patch-chatlog.diff (from rev 75219, users/ryandesign/ports/games/PlasmaClient/files/patch-chatlog.diff)
===================================================================
--- trunk/dports/games/PlasmaClient/files/patch-chatlog.diff (rev 0)
+++ trunk/dports/games/PlasmaClient/files/patch-chatlog.diff 2011-01-18 09:33:55 UTC (rev 75220)
@@ -0,0 +1,50 @@
+--- PCKi.cpp.orig Sun Jan 16 15:49:49 2011 +0100
++++ PCKi.cpp Tue Jan 18 03:13:39 2011 -0600
+@@ -34,6 +34,8 @@
+
+ PC_SINGLETON_IMPL_WITH_CTOR_DTOR(PCKi)
+
++extern FILE *chatlog;
++
+ void PCKi::drawPlayerList()
+ {
+ plFont* font = PCFontMgr::instance().findFont("Courier", 10);
+@@ -125,6 +127,9 @@
+ {
+ plString buf_string = msg->getUser() + ": " + msg->getString();
+ msgs.push_back(buf_string);
++ buf_string += "\n";
++ fputs(buf_string.cstr(), chatlog);
++ fflush(chatlog);
+ if(msgs.size() > 10)
+ msgs.pop_front();
+ }
+--- main.cpp.orig Sun Jan 16 15:49:49 2011 +0100
++++ main.cpp Tue Jan 18 03:13:39 2011 -0600
+@@ -56,6 +56,8 @@
+ extern double zoom;
+ extern bool zooming;
+
++FILE *chatlog;
++
+ double prev_sba = 1.0;
+ bool drawfps = true;
+
+@@ -121,6 +123,8 @@
+ fps.font = arial;
+ fps.X = pcClient::instance().getSettings().width - 3*arial->getWidth();
+ fps.Y = 5;
++
++ chatlog = fopen("/tmp/pcchat.log", "a");
+
+ // FontLine loc;
+ // loc.font = arial;
+@@ -614,6 +618,8 @@
+
+ pcClient::instance().writeAWPC();
+
++ fclose(chatlog);
++
+ // Free all the global stuff so tools like valgrind won't complain
+ // TODO this is probably wrong on some level
+ pcAuthClient::instance().disconnect();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110118/1c1b469e/attachment.html>
More information about the macports-changes
mailing list