all repos — hyperkaos @ 20fbac8ed1ac18bbcb91b84602bf0cee7037797b

lightweight modular puzzle/adventure game engine in C with SDL 1.2

add TextBox.c to README
Iris Lightshard nilix@nilfm.cc
commit

20fbac8ed1ac18bbcb91b84602bf0cee7037797b

parent

212b0ce075e0ff990e151465c1a86e702347f86b

1 files changed, 27 insertions(+), 1 deletions(-)

jump to
M README.mdREADME.md

@@ -172,4 +172,30 @@ moves mapBuffer to mapData and allocates new mapBuffer; if music was loaded in the new map chunk, play the first track

###pager() -if the player is warping to a new map chunk, halt the music (if any), unload the current map chunk before pushing mapBuffer to mapData+if the player is warping to a new map chunk, halt the music (if any), unload the current map chunk before pushing mapBuffer to mapData + +##TextBox.c + +###newTextBox() + +returns a pointer to an empty TextBox + +###newGTextBox(SDL_Surface* image) + +returns a pointer to an empty TextBox, with portarit image + +###deleteTextBox(TextBox* target) + +deallocates memory for target + +###addText(TextBox* self, char* text) + +adds the string of text as a line in the TextBox pointed to by self + +###textBoxInput(TextBox* self, int* textIsRelevent) + +increments TextBox cursor, handles keyboard input while TextBox is onscreen + +###displayTextBox(TextBox* self) + +takes control of the main loop and draws the room, foreground, and the TextBox over it all, and passes input to textBoxInput()