X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=84e79b3a3c5088834a09a6e741b3b5553053c737;hb=a8e936aa644b673bdd5d34c888acd92b562c82dc;hp=1dc080b22906ea71c5afa4815509c72c52eae037;hpb=0aa29de86fecb91c38b9a1a54e0ce7015aed39b4;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 1dc080b2..84e79b3a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -227,7 +227,7 @@ void DumpTile(int x, int y) printf(" CustomValue: %d\n", CustomValue[x][y]); printf(" GfxElement: %d\n", GfxElement[x][y]); printf(" GfxAction: %d\n", GfxAction[x][y]); - printf(" GfxFrame: %d\n", GfxFrame[x][y]); + printf(" GfxFrame: %d [%d]\n", GfxFrame[x][y], FrameCounter); printf("\n"); } @@ -2283,7 +2283,7 @@ void DrawEnvelopeRequest(char *text) int text_width = line_length * font_width; int width = request.width; int height = request.height; - int tile_size = request.step_offset; + int tile_size = MAX(request.step_offset, 1); int x_steps = width / tile_size; int y_steps = height / tile_size; int sx_offset = border_size; @@ -2294,7 +2294,7 @@ void DrawEnvelopeRequest(char *text) if (request.centered) sx_offset = (request.width - text_width) / 2; - if (request.wrap_single_words) + if (request.wrap_single_words && !request.autowrap) { char *src_text_ptr, *dst_text_ptr; @@ -2362,7 +2362,7 @@ void AnimateEnvelopeRequest(int anim_mode, int action) int anim_delay_value = (no_delay ? 0 : delay_value + 500 * 0) / 2; unsigned int anim_delay = 0; - int tile_size = request.step_offset; + int tile_size = MAX(request.step_offset, 1); int max_xsize = request.width / tile_size; int max_ysize = request.height / tile_size; int max_xsize_inner = max_xsize - 2;