#define _GNU_SOURCE /*!< 未使用*/
#include "angband.h"
+#include "util.h"
+
+#include "floor.h"
+#include "player-status.h"
+#include "files.h"
#ifdef WORLD_SCORE
* @param size 追加サイズ
* @return 追加後のバッファ容量
*/
-static int buf_append(BUF *buf, const char *data, size_t size)
+static int buf_append(BUF *buf, concptr data, size_t size)
{
while (buf->size + size > buf->max_size)
{
* @param fmt 文字列フォーマット
* @return 追加後のバッファ容量
*/
-static int buf_sprintf(BUF *buf, const char *fmt, ...)
+static int buf_sprintf(BUF *buf, concptr fmt, ...)
{
int ret;
char tmpbuf[8192];
return buf->size;
}
-static int buf_search(BUF *buf, const char *str)
+static int buf_search(BUF *buf, concptr str)
{
char *ret;
* @param buf 伝送内容バッファ
* @return なし
*/
-static bool http_post(int sd, cptr url, BUF *buf)
+static bool http_post(int sd, concptr url, BUF *buf)
{
BUF *output;
char response_buf[1024] = "";
- const char *HTTP_RESPONSE_CODE_OK = "HTTP/1.1 200 OK";
+ concptr HTTP_RESPONSE_CODE_OK = "HTTP/1.1 200 OK";
output = buf_new();
buf_sprintf(output, "POST %s HTTP/1.0\r\n", url);
{
char buf[1024];
FILE *fff;
- char file_name[1024];
+ GAME_TEXT file_name[1024];
/* Open a new file */
fff = my_fopen_temp(file_name, 1024);
/* 一旦一時ファイルを作る。通常のダンプ出力と共通化するため。 */
(void)make_character_dump(fff);
-
- /* Close the file */
my_fclose(fff);
/* Open for read */
{
(void)buf_sprintf(dumpbuf, "%s", buf);
}
-
- /* Close the file */
my_fclose(fff);
-
- /* Remove the file */
fd_kill(file_name);
/* Success */
* @brief スクリーンダンプを作成する/ Make screen dump to buffer
* @return 作成したスクリーンダンプの参照ポインタ
*/
-cptr make_screen_dump(void)
+concptr make_screen_dump(void)
{
BUF *screen_buf;
int y, x, i;
- cptr ret;
+ concptr ret;
- byte a = 0, old_a = 0;
- char c = ' ';
+ TERM_COLOR a = 0, old_a = 0;
+ SYMBOL_CODE c = ' ';
- static cptr html_head[] = {
+ static concptr html_head[] = {
"<html>\n<body text=\"#ffffff\" bgcolor=\"#000000\">\n",
"<pre>",
0,
};
- static cptr html_foot[] = {
+ static concptr html_foot[] = {
"</pre>\n",
"</body>\n</html>\n",
0,
use_graphics = FALSE;
reset_visuals();
- /* Redraw everything */
p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
-
- /* Hack -- update */
handle_stuff();
}
for (x = 0; x < wid - 1; x++)
{
int rv, gv, bv;
- cptr cc = NULL;
+ concptr cc = NULL;
/* Get the attr/char */
(void)(Term_what(x, y, &a, &c));
use_graphics = TRUE;
reset_visuals();
- /* Redraw everything */
p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
-
- /* Hack -- update */
handle_stuff();
}
buf_sprintf(score, "version: Hengband %d.%d.%d\n",
FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
#endif
- buf_sprintf(score, "score: %d\n", total_points());
+ buf_sprintf(score, "score: %d\n", calc_score());
buf_sprintf(score, "level: %d\n", p_ptr->lev);
- buf_sprintf(score, "depth: %d\n", dun_level);
+ buf_sprintf(score, "depth: %d\n", current_floor_ptr->dun_level);
buf_sprintf(score, "maxlv: %d\n", p_ptr->max_plv);
buf_sprintf(score, "maxdp: %d\n", max_dlv[DUNGEON_ANGBAND]);
buf_sprintf(score, "au: %d\n", p_ptr->au);
- buf_sprintf(score, "turns: %d\n", turn_real(turn));
+ buf_sprintf(score, "turns: %d\n", turn_real(current_world_ptr->game_turn));
buf_sprintf(score, "sex: %d\n", p_ptr->psex);
buf_sprintf(score, "race: %s\n", rp_ptr->title);
buf_sprintf(score, "class: %s\n", cp_ptr->title);