Rev 298 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 298 | Rev 300 | ||
---|---|---|---|
Line 1731... | Line 1731... | ||
1731 | { |
1731 | { |
1732 | static short x; |
1732 | static short x; |
1733 | static short y; |
1733 | static short y; |
1734 | short i; |
1734 | short i; |
1735 | short max; |
1735 | short max; |
- | 1736 | char *p; |
|
- | 1737 | int len; |
|
1736 | char string[40]; |
1738 | char string[40]; |
1737 | int start; |
1739 | int start; |
Line 1738... | Line 1740... | ||
1738 | 1740 | ||
Line 1739... | Line -... | ||
1739 | inhelpscreens = false; |
- | |
1740 | 1741 | inhelpscreens = false; |
|
1741 | 1742 | ||
1742 | // Horiz. & Vertically center string and print it. |
1743 | // Horiz. & Vertically center string and print it. |
1743 | if (messageToPrint) |
- | |
1744 | { |
1744 | if (messageToPrint) |
1745 | start = 0; |
1745 | { |
- | 1746 | y = 100 - M_StringHeight(messageString)/2; |
|
- | 1747 | p = messageString; |
|
1746 | y = 100 - M_StringHeight(messageString)/2; |
1748 | len = strlen(p); |
1747 | while(*(messageString+start)) |
1749 | while(*p) |
1748 | { |
- | |
1749 | for (i = 0;i < strlen(messageString+start);i++) |
1750 | { |
- | 1751 | for (i = 0;len;i++,len--) |
|
1750 | if (*(messageString+start+i) == '\n') |
1752 | { |
1751 | { |
1753 | if (*(p+i) == '\n') |
1752 | memset(string,0,40); |
1754 | { memset(string,0,40); |
- | 1755 | strncpy(string,p,i); |
|
1753 | strncpy(string,messageString+start,40); |
1756 | p+= i+1; |
1754 | start += i+1; |
- | |
1755 | break; |
- | |
1756 | } |
- | |
1757 | 1757 | len-= 1; |
|
1758 | if (i == strlen(messageString+start)) |
- | |
1759 | { |
- | |
1760 | strcpy(string,messageString+start); |
1758 | break; |
Line -... | Line 1759... | ||
- | 1759 | }; |
|
- | 1760 | }; |
|
- | 1761 | ||
- | 1762 | if (len == 0) |
|
1761 | start += i; |
1763 | { strncpy(string,p,i); |
1762 | } |
1764 | p+=i; |
1763 | 1765 | }; |
|
1764 | x = 160 - M_StringWidth(string)/2; |
1766 | x = 160 - M_StringWidth(string)/2; |
1765 | M_WriteText(x,y,string); |
1767 | M_WriteText(x,y,string); |
1766 | y += SHORT(hu_font[0]->height); |
1768 | y += SHORT(hu_font[0]->height); |
Line 1767... | Line 1769... | ||
1767 | } |
1769 | }; |
1768 | return; |
1770 | return; |
Line 1769... | Line 1771... | ||
1769 | } |
1771 | }; |