Win32GUI: Gather raw_print text and display it all in single dialog
Defined strbuf_t and related routines to support dynamically sized strings. Modified strip_newline() to strip the last newline in a string instead of the first. Simplified splash window code using new strbuf_t. Prior to exiting game, re-enable getreturn and call wait_synch() in case there is buffered raw prints that must be displayed to user.
This commit is contained in:
committed by
Pasi Kallinen
parent
b02dae91a1
commit
a588541a27
@@ -924,6 +924,11 @@ E int NDECL(phase_of_the_moon);
|
||||
E boolean NDECL(friday_13th);
|
||||
E int NDECL(night);
|
||||
E int NDECL(midnight);
|
||||
E void FDECL(strbuf_init, (strbuf_t *));
|
||||
E void FDECL(strbuf_append, (strbuf_t *, const char *));
|
||||
E void FDECL(strbuf_reserve, (strbuf_t *, int));
|
||||
E void FDECL(strbuf_empty, (strbuf_t *));
|
||||
E void FDECL(strbuf_nl_to_crlf, (strbuf_t *));
|
||||
|
||||
/* ### invent.c ### */
|
||||
|
||||
|
||||
@@ -151,6 +151,12 @@ enum game_end_types {
|
||||
ASCENDED
|
||||
};
|
||||
|
||||
typedef struct strbuf {
|
||||
int len;
|
||||
char * str;
|
||||
char buf[256];
|
||||
} strbuf_t;
|
||||
|
||||
#include "align.h"
|
||||
#include "dungeon.h"
|
||||
#include "monsym.h"
|
||||
|
||||
Reference in New Issue
Block a user