Commit Graph

1745 Commits (3e14c0fb3d889fbc4afba44a32d04d8ecd32a7fd)

Author SHA1 Message Date
Giel van Schijndel 3e14c0fb3d * Fix a bug which could cause a buffer overflow in kf_SendTextMessage() if one would type too long chat-messages
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2319 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 16:32:00 +00:00
Giel van Schijndel b96bfb801f * Remove unnecessary sub-scope
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2318 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 15:39:02 +00:00
Giel van Schijndel 566ed75daf * Add -std=gnu99 to the compiler options
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2317 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 14:51:39 +00:00
Per Inge Mathisen e6629b123c Add transparency to water tiles. This closes bug report #9657.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2316 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-02 14:46:35 +00:00
Giel van Schijndel 9ad346be5c * move some variables into a more local scope (bool GotSpace, NewLine)
* add some comments
 * actually parse newline characters (ASCII_NEWLINE to be precise which is defined as '@' right now, we might want to change this)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2315 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 20:50:27 +00:00
Giel van Schijndel 9814c2eec7 * remove unused flag FTEXTF_SKIP_LEADING_SPACES and all code related to it
* remove "BOOL AddLeadingSpaces" and all code relying on it to be true, since it never would be true
 * turn a while-loop into a for-loop (reduces duplicated code slightly, and increases its readability)
 * merge two nested if's: if (a) { if (b); } => if (a && b)
NOTE: there should be no behavioural changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2314 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 20:17:23 +00:00
Giel van Schijndel 0733a68c76 * Fix an infinite loop in the text drawing code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2313 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 19:21:04 +00:00
Giel van Schijndel f147f95639 * use static linkage for some global vars and some utility functions
* remove character wrapping code from pie_DrawText (word wrapping code already exists in the only function that ever calls pie_DrawText, so why would we need character wrapping?)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2312 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 18:59:51 +00:00
Giel van Schijndel bc2d70ea16 run `astyle --suffix=none --indent=tab --brackets=break --indent-switches --pad=oper --unpad=paren --min-conditional-indent=0 --mode=c lib/ivis_opengl/textdraw.c`
This is because I got fed up by mixed indentation style (even on the same line!!), and some dozen of different styles sometimes even in the same function (and I don't want to waste my time on style)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2311 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 18:26:56 +00:00
Giel van Schijndel 6ac475282e * remove #ifdef TESTBED code since TESTBED is never defined (not defined by commented out code either)
* fix error in code cutting off trailing spaces where we would cut of everything until a space instead! (oops)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2310 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 18:02:49 +00:00
Giel van Schijndel 473e038691 * remove "left justify append" ability from text drawing code (since it isn't justified; erm used)
* put curly braces on a line of their own
 * general clean up (e.g. moving some variables in a more local scope, giving some more sensible names, etc.)
NOTE: there should be _no_ behavioural changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2309 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 16:57:41 +00:00
Giel van Schijndel 4e3293784a * remove (unused) pie_DrawText callback functionality (the callback had the responsibility of actually drawing the text)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2308 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 16:10:50 +00:00
Per Inge Mathisen 0226604dbc Fix wrong texture pages selected for various models. Closes bug #9629.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2307 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 15:06:23 +00:00
Per Inge Mathisen 4b45e8e2e1 Some misc cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2306 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 15:04:16 +00:00
Per Inge Mathisen 7bd7f71d8b Fix broken cam 2 and 3 texture references.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2305 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 13:38:30 +00:00
Per Inge Mathisen bb99887986 Use GL_NEAREST_MIPMAP_LINEAR for mipmap filter to reduce texture seam artifacts.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2304 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 13:27:40 +00:00
Giel van Schijndel c152dbedbd * Set bugtraq:url and bugtraq:regex properties on directories
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2303 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 09:54:05 +00:00
Giel van Schijndel d026f5d803 * Set svn:mime-type to image/png for all PNG files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2302 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 09:49:26 +00:00
Per Inge Mathisen d90e50c0b1 Add shadows on/off GUI option in graphics options menu.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2301 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 20:44:24 +00:00
Per Inge Mathisen f999c48d46 Rewritten texture loader. The textures are reimported from the original PCX files,
since they old ones we had had scaling artifacts on the edges, and they have been
split up into one file per texture. We now also use custom mipmaps down to 16x16 
size for improved scaling and interpolation. Texture page (atlas) assembly is now
done with OpenGL rather than by shuffling pixels directly in memory.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2300 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 20:16:38 +00:00
Giel van Schijndel fd74d682e5 * remove forward declaration of undefined and unused function iV_GetTextExtents
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2299 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 19:39:49 +00:00
Per Inge Mathisen 6ee32dba61 New cheat code: "tileinfo". Gives you information about the tile under the cursor.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2298 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 19:31:48 +00:00
Giel van Schijndel 0832e1f5eb * Fix warning about suggested parentheses
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2297 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 14:20:28 +00:00
Giel van Schijndel e9d8948939 * Just use uint32_t to store UTF-32 (or UCS-4) characters in rather than uint_fast32_t which probably falls into the category premature optimization
* Fix macro ASSERT_START_OCTET (I used a logical and there instead of logical or)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2296 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 14:17:35 +00:00
Per Inge Mathisen af3631c5f9 Get radar colours from radar text files instead of samples of the terrain tiles.
The radar files use HTML-like hex values for colours (ie FFFFFF is clear white).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2295 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 13:02:31 +00:00
Per Inge Mathisen 179f89cbad Improve logging for tracking down resource loading bugs.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2294 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 12:47:08 +00:00
Giel van Schijndel 17ac519765 * Assert that the starting octect of a UTF-8 codepoint sequence is correct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2293 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 12:07:12 +00:00
Per Inge Mathisen ce56538fba Revert commit r2258 which made texture coordinates into floating point. It
caused bug #9631, wrong team colours displayed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2292 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 20:20:06 +00:00
Giel van Schijndel 9b31055f08 * make pie_DrawFormattedText const correct ("char*" -> "const char*")
* Don't use a hundred and two different methods of determining the end of nul terminated string
 * Use pointers into the string rather than integers as "iterators"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2291 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 17:03:02 +00:00
Giel van Schijndel 1b2ee6ae43 * Fix undeclared identifier
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2290 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:46:37 +00:00
Giel van Schijndel 518fd90693 * Mismatched declaration and definition
* function was declared unsigned int, but defined as int; now it's unsigned int in both

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2289 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:44:56 +00:00
Ari Johnson 44dd9e4dc9 Added lib/framework/utf8.[ch] to Xcode project
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2288 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:44:03 +00:00
Giel van Schijndel 3cbe1ed25a * Clean out iV_GetCharWidth to make it more readable (it also returns an unsigned int rather than a signed one now)
* Define iV_GetTextWidth in terms of iV_GetCharWidth now (rather than copy&paste implementations)
 * iV_GetTextWidth now also returns an unsigned int

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2287 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:42:37 +00:00
Giel van Schijndel ed18068ec8 * Forgot to return the determined length value of unicode_strlen: doh!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2286 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:28:38 +00:00
Giel van Schijndel 7c73b0a9e1 * Add function "size_t unicode_strlen(const utf_32_char* unicode_string)" which determines the amount of characters in a UTF-32 encoded string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2285 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:27:39 +00:00
Giel van Schijndel f78bb18a5b * Use a typedef utf_32_char in the UTF-8 code to store UTF-32 characters in
* This way it should be easy to change the type of utf_32_char if ever needed (currently it is uint_fast32_t)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2284 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 15:34:44 +00:00
Giel van Schijndel 100309f547 * Provide implementation of function "uint_fast32_t* utf8_decode(const char* utf8_string)" which decodes a UTF-8 encoded string into a UTF-32 (native endianess) encoded Unicode string (UTF-32 is the "native" unicode encoding)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2283 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 15:15:02 +00:00
Giel van Schijndel 8bbe10a748 * Provide implementation of function "size_t utf8_character_count(const char* utf8_string)" which counts the amount of characters (not bytes/octects!) in a UTF-8 encoded string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2282 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 14:46:15 +00:00
Giel van Schijndel 38a82a2ada * Add UTF-8 encoder (the decoder is a WIP)
* Add files lib/framework/utf8.[ch] to autoconf/automake, raw makefiles, Code::Blocks and MSVC
NOTE: this may require updating of some additionaly buildsystems (e.g. OSX)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2281 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 14:02:05 +00:00
Giel van Schijndel 87c955e52e * Add locale directory to raw makefile buildsystem
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2280 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 12:08:35 +00:00
Dennis Schridde f363f0b8a9 Workaround for bug#9455. The issue which causes this must sit elsewhere and should be fixed there.
This fix may not be needed for the trunk, since maybe the real issue is already fixed! Commiting it just in case...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2279 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 11:18:23 +00:00
Dennis Schridde 673ae4aa65 update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2277 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 00:57:37 +00:00
Dennis Schridde f509873c0e mp-names.patch by Martin Koller.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2276 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 00:27:33 +00:00
Dennis Schridde 2fbaec50c4 Fix unused function getLanguage.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2275 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 23:33:21 +00:00
Dennis Schridde ca4810c78a Greatly enhanced german translation by Ryo: 2012 translated messages, 16 untranslated messages.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2274 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 22:15:43 +00:00
Per Inge Mathisen 9c6c62ff7f Make PNG loader a little less picky about the PNG format being exactly correct.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2273 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 17:42:22 +00:00
Per Inge Mathisen 464e580967 Roll back the latest, accidential change to this texture page.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2272 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 17:41:21 +00:00
Dennis Schridde 8939a96d21 Better debuging of not found data.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2270 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 17:17:38 +00:00
Dennis Schridde f612678624 Backport r2265,2266,2268 from branches/2.0
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2269 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 16:58:16 +00:00
Giel van Schijndel 0931065023 * Use dynamic_cast<T*> instead of wxWidgets' own RTTI implementation (t*)->IsKindOf(CLASSINFO(T))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2267 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 16:55:19 +00:00