Commit Graph

7548 Commits

Author SHA1 Message Date
Bill Currie b5a4e330ca Ignore profiling data. 2011-04-09 14:33:21 +09:00
Bill Currie 57ed603658 Extract values from constant defs. 2011-04-09 12:42:41 +09:00
Bill Currie cc714864a8 Support converting to/from unsigned values. 2011-04-09 11:32:33 +09:00
Bill Currie 55cc0f9206 Bring back the unsigned type (PROGS version bump)
This is only low-level support (the unsigned keyword still does not work),
but sufficient to make switch statements using jump tables work.
2011-04-09 10:07:47 +09:00
Bill Currie b522853765 Ensure the target of def_op relocs gets updated.
These occur only when switch statements use jump tables, thus why the
problem went unnoticed :/
2011-04-08 17:09:40 +09:00
Bill Currie 37b0648ec7 Undo the func field as selector patch.
The support code for the patch is left intact (it will be needed later),
but idea is too cumbersome for working with existing progs.
2011-04-08 15:01:56 +09:00
Bill Currie 237f11c472 Fix cast expressions.
Casting between ints and floats needs special treatment to get the
conversion operator, but other casts need to be aliases.
2011-04-08 13:55:26 +09:00
Bill Currie c4a398850a Fix defs as constants for vectors and quaternions. 2011-04-04 21:31:59 +09:00
Bill Currie 38b25e0c38 Do not double-allocate space for immediates.
Caused by changed semantics in def creation.
2011-04-03 13:11:50 +09:00
Bill Currie 92ba110a87 Ensure a field def is emitted for @this. 2011-04-03 13:03:48 +09:00
Bill Currie 7f67e6eb17 Refactor the def handling code a little. 2011-04-03 13:03:22 +09:00
Bill Currie 6d0b13dbf0 Resolve types whenever possible. 2011-04-03 13:02:04 +09:00
Bill Currie 2c9c1bd968 Ensure defs for @self and @this are generated. 2011-04-03 13:00:48 +09:00
Bill Currie 2de7733b6a Fix initialized variable type handling.
Same problem as initialized constants :P
2011-03-30 21:21:38 +09:00
Bill Currie 2bacfdabf2 Interpret func fields as selectors for entities with objects. 2011-03-30 20:19:31 +09:00
Bill Currie 8e18c76bde Make initialized variables defs rather than immediate constants. 2011-03-30 19:58:09 +09:00
Bill Currie 7dbd2ec172 Allow field aliasing.
Initializing a field variable to another field will set the new field to
point to the same location. No type checking is done.

eg:
.SEL thinkMethod = think;
2011-03-30 09:33:47 +09:00
Bill Currie 550fff5467 Allow assignments between any field types. 2011-03-30 08:14:17 +09:00
Bill Currie 75c3653be4 Implement some missed relocs. 2011-03-30 08:13:13 +09:00
Bill Currie 2bddcefafe Allow up to 64 faces on a brush.
This is temporary until unlimited faces can be supported, but it's
sufficient to load mappi.map.
2011-03-29 12:46:49 +09:00
Bill Currie 1911cc1472 Mingw build fixes. 2011-03-27 08:26:42 +09:00
Bill Currie c8e1d7b45a Fix the API for inputline->enter().
Pass the inputline object rather than the input text, allowing access to
both user_data and the input text.
2011-03-27 08:03:39 +09:00
Bill Currie 30bd1c0134 Create classes for inputing cvar strings and script the network menu.
Hitting enter after inputting text is currently broken, but that's because
support for it was never put in the inputline wrapper code.
2011-03-25 18:26:10 +09:00
Bill Currie 84afc458fa Allow the menus to overide the Escape key. 2011-03-25 18:02:59 +09:00
Bill Currie 896791b209 Correct the spelling of "int" and clean up the mess. 2011-03-25 16:53:04 +09:00
Bill Currie 1617f0765e Support the default type without segfaulting. 2011-03-25 09:59:48 +09:00
Bill Currie 8c1d948586 And qfcc finds another bug :) 2011-03-24 13:36:36 +09:00
Bill Currie a7cfe3b215 Preserve the current class across protocol defs.
It seems that protocol defs are allowed in class implementations, so don't
let the protocol def kill the current class for the class implementation.
2011-03-24 11:55:17 +09:00
Bill Currie 2be07fd652 Keep the the temp string out of progs for sprintf.
There's no need for the string to be in progs memory when printing as the
end result will be moved into progs memory regardless.
2011-03-24 11:45:58 +09:00
Bill Currie 71af121665 Detect missing @end tags.
Give a warning when @end is forgotten in class implementations.
2011-03-24 11:44:22 +09:00
Bill Currie b0d1e782ee Treat allocating less than 1 byte as an error. 2011-03-24 11:10:08 +09:00
Bill Currie 1822290b1a Fix the double offset of inputline text. 2011-03-24 08:50:32 +09:00
Bill Currie e878ace83b Make input lines mostly work.
There is still a problem with the placement of the input line text
relative to the text box caused by vertical movement being excessive.
2011-03-23 21:35:49 +09:00
Bill Currie 8d3508cf20 Allocate space for temp defs using size rather than type.
Statement operands throw away the high level type information, so store
type size in the operand and use this size for allocating space for temps
rather than using the low-level type.
2011-03-23 21:32:14 +09:00
Bill Currie 98f5f84ca3 Clean up the leftovers of converting the controls menu.
The bindings menu is still inaccessible, though.
2011-03-23 15:22:01 +09:00
Bill Currie 15fc325136 Fix the features menu. 2011-03-23 15:19:30 +09:00
Bill Currie 9b62c8c126 Rename ty_type_e to ty_meta_e and type_t.ty to type_t.meta 2011-03-22 16:06:47 +09:00
Bill Currie d4be914019 Fix initialized vector variables.
The whole initialized variable system is wonky, but it will do for now.
2011-03-22 15:10:06 +09:00
Bill Currie a9eb793a5e Yay, even more tests :P 2011-03-22 15:00:46 +09:00
Bill Currie 6a49861b49 Fix the bogus source file for "redefined" functions. 2011-03-22 13:45:44 +09:00
Bill Currie 7dbd5f656c Fix traditional vector component access. 2011-03-22 13:05:42 +09:00
Bill Currie f1d9570dc8 Fix constant value type handling.
Rename immediate.[ch] to value.[ch] and clean up the mess.

Add convert_value() to convert the type of a value (only scalar types).
2011-03-22 12:24:39 +09:00
Bill Currie b812c0e235 Disable -Wlogical-op for gcc 4.4 or lower.
It seems to be broken before 4.5.
2011-03-21 21:54:00 +09:00
Bill Currie 1219df0872 Fix field immediates.
Field immediates need to be treated the same way as pointer immediates when
merging values.
2011-03-21 18:11:46 +09:00
Bill Currie 46093c0937 Use the correct meta type for spacial types.
Although vector and quaternion types have symbol tables, they are not
really structs, so set the meta type to "none", allowing the types to be
encoded correctly.
2011-03-21 17:26:49 +09:00
Bill Currie cefe7e2e94 Use the correct source of defs for field defs. 2011-03-21 17:07:40 +09:00
Bill Currie 0c0f4360da Make field defs "nosave".
The engine treats fielddefs with DEF_SAVEGLOBAL set as bogus.
2011-03-21 17:06:45 +09:00
Bill Currie bc0cffc9c6 Fix handling of autorelease pools in the menu code.
Create a "menu_pre" function that creates the autorelease pool, change
menu_post() to release the pool correctly, and make the menu internal code
require and call menu_pre.
2011-03-21 13:14:14 +09:00
Bill Currie a9e139e14c Correct a minor logic error.
We don't want to always add a new autorelease pool, and we certainly want
one if there are none.
2011-03-21 13:12:30 +09:00
Bill Currie f5ce9e2004 Fix a merge induced error in overloaded functions. 2011-03-20 19:04:18 +09:00