通信プロトコルの記述を開始
@@ -83,9 +83,13 @@ | ||
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
86 | - // !!! - キャラクター作成まわり | |
87 | - // !!! - マップ内の移動 | |
88 | - // !!! - アイテムの売買 | |
86 | + // !!! - キャラクタ作成 | |
87 | + // !!! - 冒険 | |
88 | + // !!! - 売買 | |
89 | + | |
90 | + if (0) { | |
91 | + // !!! parseCommand() | |
92 | + } | |
89 | 93 | } |
90 | 94 | |
91 | 95 | // イベントの更新 |
@@ -15,6 +15,9 @@ | ||
15 | 15 | #include "CycleTimer.h" |
16 | 16 | #include "delay.h" |
17 | 17 | #include "log_printf.h" |
18 | +#include <iostream> | |
19 | +#include <cstring> | |
20 | +#include <cstdlib> | |
18 | 21 | |
19 | 22 | using namespace qrk; |
20 | 23 | using namespace std; |
@@ -30,14 +33,49 @@ | ||
30 | 33 | }; |
31 | 34 | |
32 | 35 | |
33 | - ArgsInformation parseArgs(int argc, char *argv[]) | |
36 | + void displayVersion(void) | |
34 | 37 | { |
35 | - (void)argc; | |
36 | - (void)argv; | |
38 | + // !!! | |
39 | + cout << "version information" << endl; | |
40 | + } | |
37 | 41 | |
38 | - ArgsInformation args; | |
42 | + | |
43 | + void displayHelp(void) | |
44 | + { | |
39 | 45 | // !!! |
46 | + cout << "help information" << endl; | |
47 | + } | |
40 | 48 | |
49 | + | |
50 | + ArgsInformation parseArgs(int argc, char *argv[]) | |
51 | + { | |
52 | + ArgsInformation args; | |
53 | + | |
54 | + bool display_help = false; | |
55 | + bool display_version = false; | |
56 | + | |
57 | + for (int i = 1; i < argc; ++i) { | |
58 | + const char* token = argv[i]; | |
59 | + | |
60 | + if ((! strcmp(token, "-v")) || (! strcmp(token, "--version"))) { | |
61 | + display_version = true; | |
62 | + | |
63 | + } else if ((! strcmp(token, "-h")) || (! strcmp(token, "--help"))) { | |
64 | + display_help = true; | |
65 | + } | |
66 | + // !!! サーバの port 番号 | |
67 | + } | |
68 | + | |
69 | + // バージョン情報、ヘルプ情報、の順で処理する | |
70 | + if (display_version) { | |
71 | + displayVersion(); | |
72 | + exit(0); | |
73 | + | |
74 | + } else if (display_help) { | |
75 | + displayHelp(); | |
76 | + exit(0); | |
77 | + } | |
78 | + | |
41 | 79 | return args; |
42 | 80 | } |
43 | 81 |
@@ -46,8 +84,10 @@ | ||
46 | 84 | { |
47 | 85 | (void)world_map; |
48 | 86 | |
49 | - // !!! | |
87 | + // !!! ファイルからの読み込み | |
50 | 88 | |
89 | + // !!! log_printf() | |
90 | + | |
51 | 91 | return false; |
52 | 92 | } |
53 | 93 |
@@ -56,8 +96,13 @@ | ||
56 | 96 | { |
57 | 97 | (void)characters; |
58 | 98 | |
99 | + // !!! NPC キャラクタをテキストファイルから読み出す | |
59 | 100 | // !!! |
60 | 101 | |
102 | + // !!! プレイヤー・キャラクタは、接続時に DB から読み出す | |
103 | + | |
104 | + // !!! log_printf() | |
105 | + | |
61 | 106 | return false; |
62 | 107 | } |
63 | 108 |
@@ -66,8 +111,14 @@ | ||
66 | 111 | { |
67 | 112 | (void)event_manager; |
68 | 113 | |
114 | + // !!! 固定クエストは、テキストファイルから読み出す | |
115 | + | |
116 | + // !!! ランダム・クエストは、DB から読み出す | |
117 | + | |
69 | 118 | // !!! |
70 | 119 | |
120 | + // !!! log_printf() | |
121 | + | |
71 | 122 | return false; |
72 | 123 | } |
73 | 124 | } |
@@ -4,10 +4,12 @@ | ||
4 | 4 | |
5 | 5 | all : html |
6 | 6 | cd server/ && $(MAKE) |
7 | + cd client/ && $(MAKE) | |
7 | 8 | cd samples/ && $(MAKE) |
8 | 9 | |
9 | 10 | clean : |
10 | 11 | cd server/ && $(MAKE) clean |
12 | + cd client/ && $(MAKE) clean | |
11 | 13 | cd samples/ && $(MAKE) clean |
12 | 14 | cd output_html/ && $(RM) -rf * |
13 | 15 |
@@ -15,5 +17,5 @@ | ||
15 | 17 | |
16 | 18 | .PHONY : all clean |
17 | 19 | |
18 | -output_html/document_html/index.html : Doxyfile $(wildcard dox/* sources/*) | |
20 | +output_html/document_html/index.html : Doxyfile $(wildcard dox/* server/* client/*) | |
19 | 21 | doxygen |