From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- .../index.html | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 cvs/cvsweb.cgi/code/client/Attic/client.cpp?rev=1.2&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html (limited to 'cvs/cvsweb.cgi/code/client/Attic/client.cpp?rev=1.2&content-type=text') diff --git a/cvs/cvsweb.cgi/code/client/Attic/client.cpp?rev=1.2&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html b/cvs/cvsweb.cgi/code/client/Attic/client.cpp?rev=1.2&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html new file mode 100644 index 00000000..0406d953 --- /dev/null +++ b/cvs/cvsweb.cgi/code/client/Attic/client.cpp?rev=1.2&content-type=text/x-cvsweb-markup&hideattic=0&sortby=date/index.html @@ -0,0 +1,95 @@ + + + +code/client/client.cpp - view - 1.2 + +
[BACK] Return to client.cpp + CVS log [TXT][DIR] Up to Nevrax / code / client

File: Nevrax / code / client / Attic / client.cpp (download)
+Revision 1.2, Wed Nov 22 15:54:42 2000 UTC (20 months ago) by coutelas +
Branch: MAIN +
Changes since 1.1: +61 -6 + lines
+added interface for shard choice
+
+

+#include <windows.h>
+#include <gl/gl.h>
+
+
+#include <string>
+#include "nel/3d/driver.h"
+#include "nel/misc/types_nl.h"
+#include "login_interface.h"
+#include "shards_list_interface.h"
+
+
+CLogUserId login(NL3D::CScene * scene, uint w, uint h)
+{
+        CLoginInterface logscreen;
+        logscreen.init(scene, w, h);
+        return logscreen.log();
+}
+
+uint chooseShard(NL3D::CScene * scene, uint w, uint h, 
+                                          const std::vector<ucstring>& shards)
+{
+        CShardsListInterface shardListScreen;
+        shardListScreen.init(scene, w, h, shards);
+        return shardListScreen.choose();
+}
+
+
+
+std::vector<ucstring> connect(CLogUserId id) //TEMP !!
+{
+        std::vector<ucstring> shards;
+        shards.reserve(10);
+        ucstring ucs;
+        ucs+='s';ucs+='h';ucs+='a';ucs+='r';ucs+='d';ucs+=' ';
+        ucstring ucsa = ucs; ucsa += 'A';
+        shards.push_back(ucsa);
+        ucstring ucsb = ucs; ucsb += 'B';
+        shards.push_back(ucsb);
+        ucstring ucsc = ucs; ucsc += 'C';
+        shards.push_back(ucsc);
+        ucstring ucsd = ucs; ucsd += 'D';
+        shards.push_back(ucsd);
+        ucstring ucse = ucs; ucse += 'E';
+        shards.push_back(ucse);
+        ucstring ucsf = ucs; ucsf += 'F';
+        shards.push_back(ucsf);
+        ucstring ucsg = ucs; ucsg += 'G';
+        shards.push_back(ucsg);
+        return shards;
+}
+
+
+
+
+
+/****************************************************************\
+                                                        MAIN
+\****************************************************************/
+void main()
+{
+        // init scene
+        uint w = 800;
+        uint h = 600;
+        uint bpp = 32;
+        bool windowed = true;
+        NL3D::CScene scene;
+        NL3D::CSceneUt::init3d(scene, w, h, bpp, windowed); 
+        
+        
+        // user login session
+        CLogUserId id = login(&scene, w, h);
+        
+        // connection // TEMP !!
+        std::vector<ucstring> shards = connect(id);
+
+        // shard choice
+        uint shardIndex = chooseShard(&scene, w, h, shards);
+
+        // release scene
+        NL3D::CSceneUt::release3d(scene);
+}
\ No newline at end of file -- cgit v1.2.1