From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_net_chat_8cpp_source.html | 170 ++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 Doc/doxygen/html/_net_chat_8cpp_source.html (limited to 'Doc/doxygen/html/_net_chat_8cpp_source.html') diff --git a/Doc/doxygen/html/_net_chat_8cpp_source.html b/Doc/doxygen/html/_net_chat_8cpp_source.html new file mode 100644 index 0000000..60ae6e1 --- /dev/null +++ b/Doc/doxygen/html/_net_chat_8cpp_source.html @@ -0,0 +1,170 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/Stars45/NetChat.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
NetChat.cpp
+
+
+Go to the documentation of this file.
1 /* Project Starshatter 4.5
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: Stars.exe
+
6  FILE: NetChat.cpp
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Single chat message and sender
+
13 */
+
14 
+
15 
+
16 #include "MemDebug.h"
+
17 #include "NetChat.h"
+
18 #include "NetLayer.h"
+
19 
+
20 // +-------------------------------------------------------------------+
+
21 
+
22 static int chat_id_key = 1000;
+
23 
+
24 // +-------------------------------------------------------------------+
+
25 
+
26 NetChatEntry::NetChatEntry(const NetUser* u, const char* s)
+
27 : id(chat_id_key++), msg(s)
+
28 {
+
29  if (u) {
+
30  user = u->Name();
+
31  color = u->GetColor();
+
32  }
+
33  else {
+
34  user = "unknown";
+
35  color = Color::Gray;
+
36  }
+
37 
+
38  time = NetLayer::GetUTC();
+
39 }
+
40 
+
41 NetChatEntry::NetChatEntry(int msg_id, const char* u, const char* s)
+
42 : id(msg_id), user(u), msg(s)
+
43 {
+
44  color = Color::Gray;
+
45  time = NetLayer::GetUTC();
+
46 
+
47  if (id >= chat_id_key)
+
48  chat_id_key = id + 1;
+
49 }
+
50 
+ +
52 { }
+
53 
+
+
+ + + + -- cgit v1.1