- An Allegro text box object is a pointer, and it requires a string or a buffer. Usually, I use malloc() for such text buffer, and sprintf() to input text.
- Is there another way? Example, a full disassembly requires a big buffer firstly.
- Is there another way? Example, a full disassembly requires a big buffer firstly.
Code:
//poor draft - current version:
char *text_string = malloc(0x2000);
//to input text
sprintf(text_string, "my text string\nand this is another line\nand one more\nagain...");
//the text box object
object[n].data = text_string;
do_dialog();
//======================
//poor draft - what I want to do:
char *text_string; //no buffer.
//to input text, somehow:
ADD_TEXT(text_string, "my text string\n");
ADD_TEXT(text_string, "and this is another line\n")
ADD_TEXT(text_string, "and one more\n");
ADD_TEXT(text_string, "again...");
//the text box object
object[n].data = text_string;
do_dialog();
char *text_string = malloc(0x2000);
//to input text
sprintf(text_string, "my text string\nand this is another line\nand one more\nagain...");
//the text box object
object[n].data = text_string;
do_dialog();
//======================
//poor draft - what I want to do:
char *text_string; //no buffer.
//to input text, somehow:
ADD_TEXT(text_string, "my text string\n");
ADD_TEXT(text_string, "and this is another line\n")
ADD_TEXT(text_string, "and one more\n");
ADD_TEXT(text_string, "again...");
//the text box object
object[n].data = text_string;
do_dialog();