From bc3c56ffeb832f45fc8009b586697e27f3f1c49a Mon Sep 17 00:00:00 2001 From: Darkvater Date: Fri, 27 Oct 2006 11:09:24 +0000 Subject: (svn r6957) -Cleanup: comments, coding style --- gfx.c | 12 ++++++++++++ misc_gui.c | 3 ++- texteff.c | 5 ++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gfx.c b/gfx.c index 749131a67..0f446abbd 100644 --- a/gfx.c +++ b/gfx.c @@ -1906,6 +1906,18 @@ void MarkWholeScreenDirty(void) SetDirtyBlocks(0, 0, _screen.width, _screen.height); } +/** Set up a clipping area for only drawing into a certain area. To do this, + * Fill a DrawPixelInfo object with the supplied relative rectangle, backup + * the original (calling) _cur_dpi and assign the just returned DrawPixelInfo + * _cur_dpi. When you are done, give restore _cur_dpi's original value + * @param *n the DrawPixelInfo that will be the clipping rectangle box allowed + * for drawing + * @param left,top,width,height the relative coordinates of the clipping + * rectangle relative to the current _cur_dpi. This will most likely be the + * offset from the calling window coordinates + * @return return false if the requested rectangle is not possible with the + * current dpi pointer. Only continue of the return value is true, or you'll + * get some nasty results */ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height) { const DrawPixelInfo *o = _cur_dpi; diff --git a/misc_gui.c b/misc_gui.c index 3b736a334..168255c15 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -886,7 +886,8 @@ bool MoveTextBufferPos(Textbuf *tb, int navmode) * @param buf the buffer that will be holding the data for input * @param maxlength maximum length in characters of this buffer * @param maxwidth maximum length in pixels of this buffer. If reached, buffer - * cannot grow, even if maxlength would allow because there is space */ + * cannot grow, even if maxlength would allow because there is space. A length + * of zero '0' means the buffer is only restricted by maxlength */ void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth) { tb->buf = (char*)buf; diff --git a/texteff.c b/texteff.c index 6295448b3..84d22726a 100644 --- a/texteff.c +++ b/texteff.c @@ -48,7 +48,7 @@ static bool _textmessage_visible = false; static const Oblong _textmsg_box = {10, 30, 500, 150}; static Pixel _textmessage_backup[150 * 500]; // (height * width) -extern void memcpy_pitch(void *d, void *s, int w, int h, int spitch, int dpitch); +extern void memcpy_pitch(void *dst, void *src, int w, int h, int srcpitch, int dstpitch); static inline uint GetTextMessageCount(void) { @@ -240,8 +240,7 @@ void AddTextEffect(StringID msg, int x, int y, uint16 duration) int w; char buffer[100]; - if (_game_mode == GM_MENU) - return; + if (_game_mode == GM_MENU) return; for (te = _text_effect_list; te->string_id != INVALID_STRING_ID; ) { if (++te == endof(_text_effect_list)) return; -- cgit v1.2.3-70-g09d2