Commit graph

2868 commits

Author SHA1 Message Date
Bill Currie
156f3382a5 Emit the points in the expected order.
Associating p1 with n2 and p2 with n1 was a bit confusing. Makes for a
more-sensible points output file, too.
2012-09-16 13:51:42 +09:00
Bill Currie
0ed535214e Import leak points files. 2012-09-16 12:57:17 +09:00
Bill Currie
d6476d4f93 Make some improvements to the leak files.
smart leak files now produce many points, not just one per portal. Normal
leak files now center the trail on the portal (instead of some weird
weighted average).
2012-09-16 12:38:55 +09:00
Bill Currie
4fc9316320 Add very preliminary support for map exporting.
There is no error checking, texture alignment or support for non-point
lights, but it's a start. Also, it's assumed all brushes are convex and
manifold.
2012-09-16 10:59:47 +09:00
Bill Currie
6b8df7f42a Give EntityClassDict mapping access functions.
They just redirect to the actual entity class dictionary, but it saves a
lot of unnecessary code elsewhere.
2012-09-16 10:55:06 +09:00
Bill Currie
8416276cee Remove a debug print. 2012-09-13 18:14:29 +09:00
Bill Currie
2760055a0f Try to speed up entity relationship drawing a little. 2012-09-13 13:14:32 +09:00
Bill Currie
559add50cb Fix some snafus. 2012-09-13 12:22:05 +09:00
Bill Currie
f18a926616 Add support for RMQs QUAKED comments.
RMQ just leaves out the entity size instead of using ? for brush entities.
2012-09-13 12:21:06 +09:00
Bill Currie
225cb4b364 Create an idquake character encoding.
It just does a 1:1 charmap conversion of quake text, purely to allow python
to read arbitrary qc code.
2012-09-13 12:19:26 +09:00
Bill Currie
bcda96a445 Report the source line of the entity in messages.
For now, just when PrintEntity is used to print the message, but having the
first line of the entity sure makes life easier.
2012-09-12 08:33:44 +09:00
Bill Currie
db25d5597d Handle quest format brushes.
Bah, I forgot I needed to fix the vertex count parsing when I did the
script lexing change.
2012-09-12 08:24:17 +09:00
Bill Currie
b764cad483 Add buttons to re-scan or re-parse entity class data. 2012-09-12 08:14:10 +09:00
Bill Currie
592222aba8 Don't attempt to draw a connecting line to a missing target. 2012-09-11 15:01:43 +09:00
Bill Currie
154d08a9c7 Gracefully handle unknown entity classes.
Unfortunately, the classname gets lost to blender at this stage, but I have
an idea for how to handle that.
2012-09-11 14:58:56 +09:00
Bill Currie
54832740c8 Gracefully handle missing textures.
The texinfo still gets a material, but just an untextured one. The idea is
such textures can be fixed up at a later date.
2012-09-11 14:57:24 +09:00
Bill Currie
41004fd7c2 Remove specularity from the brush materials.
Specularity looks ghastly when there's nothing for it to highlight.
2012-09-10 19:24:47 +09:00
Bill Currie
7204f8d90d Minor robustness improvements to map importing.
Allow map parse errors to be reported propertly (the raise was for
debugging) and give up gracefully when the wad file can't be found.
2012-09-10 19:23:15 +09:00
Bill Currie
995547ae6f Display a message for entity class parsing errors.
It's hacky, but at least something shows up.
2012-09-10 16:14:32 +09:00
Bill Currie
25e545616a Create EntityClassError exception.
Much more useful than Python's SyntaxError (and much less confusing).
2012-09-10 15:57:50 +09:00
Bill Currie
ae942afe5c Bind map_error to the script object.
This works much better :)
2012-09-10 14:59:43 +09:00
Bill Currie
f525be0880 Implement Script.error properly.
It's not good to get an attirbute error when trying to raise another error.
2012-09-10 14:58:41 +09:00
Bill Currie
dade60863e Move the entity class comment into its own box.
Blender doesn't support multiline text or word wrapping, so the tooltips
were rather ugly. The double spacing used by layout.label() is still a
little ugly, but the resulting text box just below the entity classname is
much more usable.
2012-09-10 13:19:38 +09:00
Bill Currie
198a49dfdf Ensure all files have the gpl block. 2012-09-10 12:40:55 +09:00
Bill Currie
a75fe213a6 Make entity lines post rather than pre.
I'm not sure what visual difference it makes, but it is pretty much what
I'd intended in the first place.
2012-09-10 12:16:23 +09:00
Bill Currie
2905cb69bc Add entity relation lines.
It has many problems (eg, the lines won't update when target/targetname
change), but the basics are working.
2012-09-10 11:48:22 +09:00
Bill Currie
9dc1039686 Fix map parsing for quest format maps.
Bah, the one place a single char lex is needed :P
2012-09-10 08:08:37 +09:00
Bill Currie
da6f57a23b Get entity field key/value pair editing working. 2012-09-10 08:08:11 +09:00
Bill Currie
ea541b325d Set the map parser scripts to not lex single chars.
qbsp treats {foo as one token, not two.
2012-09-09 17:23:55 +09:00
Bill Currie
c8be8c242a Don't use any single chars for maps.
The standard map format (original qbsp) doesn't use them.
2012-09-09 17:13:10 +09:00
Bill Currie
0c2818c038 Ensure the texture scaling is never 0. 2012-09-09 17:12:45 +09:00
Bill Currie
73cdd66c52 Set the entity properties as parsed from the map. 2012-09-09 17:11:57 +09:00
Bill Currie
825ce0dad6 Make the type of EntityClass.flagnames consistent.
Sometimes list and sometimes tuple makes for a mess.
2012-09-09 17:01:23 +09:00
Bill Currie
709ab05713 Add preliminary support for entity properties.
Only classname and flags are supported right now, and only classname gets
set when the entity is added (via the add menu).
2012-09-09 13:22:52 +09:00
Bill Currie
468f96902f Use a tetrahedron for the default brush entity.
It seems to be a reasonable shape to show that editing is needed.
2012-09-09 11:10:03 +09:00
Bill Currie
18fcdb0ce7 Implement the add_entity operator.
Doesn't work for brush entities yet.
2012-09-09 10:29:43 +09:00
Bill Currie
fde8d29899 Use icons to distinquish brush ents from others.
Mesh-data icons indicate brush entities, object-data icons indicate the
others.
2012-09-09 09:29:55 +09:00
Bill Currie
06fd951a55 Build the add entity menu tree.
The menu tree is built from the parsed entity classes, with _ forming the
separator between menu levels.
2012-09-09 08:54:41 +09:00
Bill Currie
a37c5465e1 First step for BSP2 support. DOES NOT WORK!
All of the nastiness is hidden in bspfile.c (including the old bsp29
specific data types). However, the conversions between bsp29 and bsp2 are
implemented but not yet hooked up properly. This commit just gets the data
structures in place and the obvious changes necessary to the rest of the
engine to get it to compile, plus a few obvious "make it work" changes.
2012-09-07 16:09:24 +09:00
Bill Currie
395a0eef78 Don't use targetname for entity names.
Proves to be rather non-useful (at this stage, anyway)
2012-09-04 20:29:00 +09:00
Bill Currie
1993ee8352 Remove some debug prints. 2012-09-04 19:40:07 +09:00
Bill Currie
af37ae438e Fix the incorrectly rotated textures.
map uses degrees, blender uses radians. oops.
2012-09-04 19:39:10 +09:00
Bill Currie
7feec96b8d Texture the world :)
Such a simple statement for a sizable hunk of work.
2012-09-04 17:04:30 +09:00
Bill Currie
b29f24e6d3 Add a wadpath scene property and load the wad files. 2012-09-04 17:04:00 +09:00
Bill Currie
95e2a5b21a Pre-process texture defs.
The st-vectors are now fully calculated as per qfbsp's algorithm.
The Texinfo class tries to create unique texture defintions.
2012-09-04 16:59:02 +09:00
Bill Currie
446016e84e Make wad contents searches case-insensitive. 2012-09-04 16:58:19 +09:00
Bill Currie
8587079c0d Fix a case&paste error. 2012-09-04 11:59:04 +09:00
Bill Currie
38facac7ce Add a very simple wad reader.
It supports only MipTex data (for automatic data conversion), and it's very
fragile, but it will do for now.
2012-09-03 19:37:04 +09:00
Bill Currie
125952d17d Un-hardcode the light distance. 2012-09-03 14:34:27 +09:00
Bill Currie
dfaf28001a Create colored boxes for sized entity classes.
The data is taken from the parsed entity class data. No error checking is
done yet.
2012-09-03 14:33:32 +09:00
Bill Currie
16952ffbbb Support loading entity class data into blender.
The qc source path is specified via the dirpath property in the QF Entity
Classes panel of the scene data. The scanned entity classes are stored in a
plist in a blender text file for persistent storage (so the directory
doesn't need to be scanned every time). Also, so the data doesn't have to
be parsed every time, the data is stored in a normal python class hanging
off the properties class (evil hack?).
2012-09-03 13:38:28 +09:00
Bill Currie
3cad0f978b Revamp entity class loading for blender integration.
Slightly cleaner EntityClass building, and now the directory scanner is
part of the EntityClassDict class, which also supports reading/writing
plists (for persistent storage in blender).
2012-09-03 13:35:18 +09:00
Bill Currie
b3e5083f60 Add a symlink to io_mesh_qfmdl's qfplist.py
The map editor addon needs to use it too, but I don't want to duplicate the
file in git.
2012-09-03 13:33:59 +09:00
Bill Currie
c08fd08025 Write empty array and dictionary items on one line.
Makes for slightly tidier plist text.
2012-08-31 16:14:49 +09:00
Bill Currie
43abf8e3df Support writing int and float items to a plist.
They are written as normal string items, so anything using the plist later
on will need to know the context, but at least now there's no need to first
convert int or float data to strings before writing a plist.
2012-08-31 16:10:30 +09:00
Bill Currie
2b55687aa5 Correct a missed function rename.
Serves me right for not testing properly :P
2012-08-31 15:54:26 +09:00
Bill Currie
ffcd78bc28 Add other entities as empties.
For now until I get entity class data importing sorted out. The empties are
set to display as size 8 cubes (+/-8bu).
2012-08-30 19:56:08 +09:00
Bill Currie
4b5242104a Add lights from the map to the scene.
Only the very basics are done at this stage, but things look reasonable.
The lamp energy might need tweaking.
2012-08-30 17:34:05 +09:00
Bill Currie
5d2b2639d0 Generate geometry for entities with brushes. 2012-08-30 14:50:19 +09:00
Bill Currie
15a906aadb Get map parsing pretty much working.
No geometry is created yet.
Both id and quest formats are supported.
e1m1.map parses in less than two seconds on my system.
2012-08-30 13:19:30 +09:00
Bill Currie
97c99de581 Create the entity class scanner.
It recursivly scans the QC source tree looking for QUAKED comments and
builds a dictionary of the found entity classes.
2012-08-29 15:43:53 +09:00
Bill Currie
08d7131c1b Create a python version of QF's script parser.
It's error handling is bogus, but it works for good input :)
2012-08-29 14:55:11 +09:00
Bill Currie
365f20bb95 Make the ps3 cross-build self-contained.
More or less.

This is a bit of an experiment (which seems to work nicely) in that qfcc
and pak are build natively in one build tree, then the full system is
cross-built in another tree using the natively build qfcc and pak. Both
trees are created by cross-configure.sh as sub-directories of the current
directory. However, cross-configure.sh still assumes it is being run in a
subdirectory of the main quakeforge directory.

cross-make.sh checks if the native tree is in the current directory and if
so, builds it, otherwise it just runs make for the cross-build tree (this
allows for running cross-make in a sub-directory for things like sorting
out build issues).
2012-08-20 10:56:09 +09:00
Bill Currie
0976ff8582 Nuke mentions of HOST_CC.
CC_FOR_BUILD is the recommended name these days (HOST_CC was from an old
gcc version, and is confusing anyway). Also, CC_FOR_BUILD should be set by
configure.
2012-08-20 10:51:46 +09:00
Bill Currie
a2f2d4d949 "Check" for the availability of pthreads.
Unfortunately, just because the header is there doesn't mean anything will
actually work :(. Also, the check is based on the host vendor/os for now.
Yes, it's rather lame but it will do for now.

With this, QF will build on an almost fresh ps3toolchain install. Only two
"fixes" are needed:
 o  In $PS3DEV/ppu/powerpc64-ps3-elf: ln -s ../include sys-include
 o  libsamplerate cross-built and installed.
2012-08-19 13:40:42 +09:00
Bill Currie
9bfcdad35a Fix some type-size safety issues.
Expecting int to be 32 bits is a little dangerous, and the function
versions of swap/noswap should be unsigned rather than signed.
2012-08-19 13:37:06 +09:00
Bill Currie
358ea4ef9a Fall back to execve/wait when execvp and waitpid are unavailable. 2012-08-19 13:18:38 +09:00
Bill Currie
5684347088 Some fixes for mingw cross-builds.
The fixes came to light while getting ps3toolchain cross-building working.
2012-08-18 22:12:02 +09:00
Bill Currie
cd1e3e5b6f Cross configure/make scripts for ps3toolchain based builds. 2012-08-18 21:33:58 +09:00
Bill Currie
af0db29981 Add support for meshes with multiple UV maps.
One common use for a mesh having multiple UV maps is when combining several
mesh objects into one: the base UV map is the result of joining the meshes
(and will be a right mess of overlapping UV islands), but an additional UV
map is then setup as a copy of the first but with the islands re-packed so
nothing overlaps. The export script now searches for the active UV map and
uses that for both UV coordinates and the skin texture (when none is
specified).
2012-08-12 13:38:12 +09:00
Bill Currie
971e689d3d Fix a slew of whitespace issues. 2012-08-07 13:25:44 +09:00
Bill Currie
a3c8209bdf Handle missing frame information a little more usefully.
If there's no export script, or the export script has no frame information,
animation data will be collected by running through blender frames 1 to the
current frame (inclusive). Each frame will be exported as a single frame
rather than as members of a frame group.
2012-08-07 13:23:19 +09:00
Bill Currie
39b2e80207 Optionally apply the object's transform to the mesh.
The default is to apply.
2012-08-07 11:49:08 +09:00
Bill Currie
634b3b043d Export non-triangular faces as triangle clusters.
It turns out this behavior is preferable (by at least one artist, anyway).
2012-08-07 10:49:32 +09:00
Bill Currie
a4da11cdb5 Correctly handle multiple vertices sharing a UV coordinate.
Need to use both UV coordinate and vertex index to find unique
combinations. This should fix leileilol's broken meshes.
2012-08-07 10:26:35 +09:00
Bill Currie
78bfd30648 Export vertex normals.
I'd forgotten I hadn't implemented exporting vertex normals. While I've
modified things for making better use of blender's tools and avoiding the
unnecessary use of objects, the code is taken from the ajmdl blender 2.4
export script.
2012-08-07 09:52:47 +09:00
Bill Currie
5661e738ac Actually return the skin in null_skin()
Oops.
2012-08-07 09:50:38 +09:00
Bill Currie
ff4c2cfb63 Add a todo list for the mdl addon. 2012-08-06 22:34:19 +09:00
Bill Currie
0e7e45b91d Redo the io_mesh_qfmdl packaging.
It is cross-platform, after all.
2012-07-17 17:30:16 +09:00
Bill Currie
fa61d2def7 Delete old io_mesh_qfmdl zips too. 2012-07-17 17:21:56 +09:00
Bill Currie
087908adcd Link in the keys progs builtins. 2012-07-15 07:39:50 +09:00
Bill Currie
97c87cf996 Initial checkin of the qwaq mini-engine. 2012-07-15 07:39:50 +09:00
Bill Currie
b6125276e4 Fix the mis-handling of the progs.dat line in preprogs.src
Gah, must have lost a line at some stage. Also, handle line number
directives.
2012-07-14 19:01:47 +09:00
Bill Currie
7444371162 Disable bolding for special chars.
If an escape sequence is used to access a char, the the programmer probably
wanted that char, regardless of the current bolding mode.
2012-07-14 17:47:34 +09:00
Bill Currie
3b8141691e Fix a bunch of continue vs break issues. 2012-07-14 17:26:13 +09:00
Bill Currie
1364bff91b Add an extended mode to qfcc.
Extended mode allows extra keywords (switch, for, etc) that are compatible
with v6 progs.
2012-07-14 17:16:33 +09:00
Bill Currie
4055d9a435 Add support for \s escapes to qfcc.
I guess \s is an fteqcc extention for toggling bold characters. At the
request of freewill.
2012-07-14 11:47:26 +09:00
Bill Currie
e657390ab5 Undo a mv -> cp change.
Turns out it wasn't quite what I thought it was. *shrug* :)
2012-07-13 18:14:50 +09:00
Bill Currie
fe26a55cc4 Package the mdl import/export addon. 2012-07-13 17:03:11 +09:00
Bill Currie
1100596431 Include the mdl import/export addon in the distribution.
A tad embarrasing...
2012-07-13 07:59:50 +09:00
Bill Currie
f467e2de54 Use sed's in-place option. 2012-07-11 13:38:27 +09:00
Bill Currie
7573c38122 Create qfspritegen based on id's sprgen.
No guarantees it works, but it should be able to convert a bunch of pcx
images into a sprite.
2012-06-30 20:20:15 +09:00
Bill Currie
0d9d777086 Fix Win32 package building for recent changes. 2012-06-29 11:15:11 +09:00
Bill Currie
dbc203b625 And a few more bits of whitespace. 2012-05-23 08:21:27 +09:00
Bill Currie
23a38738fc Massive whitespace cleanup.
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie
0036a5e113 Ensure edict_size is never 0.
Avoids division by / in NUM_FOR_EDICT
2012-05-06 21:35:42 +09:00
Bill Currie
1dd5cccda2 Correct some more error messages. 2012-05-06 18:52:05 +09:00
Bill Currie
a0788c6cdf Implement constant folding for unary operators.
Including conversions between float and int :)
2012-05-06 18:49:07 +09:00
Bill Currie
f781e9078c Correct some typos in error messages. 2012-05-06 18:43:18 +09:00
Bill Currie
954e03c3f7 Report the correct function name for the largest locals.
I must have been tired when I adapted that code.

* taniwha dons brown paper bag
2012-05-06 13:02:11 +09:00
Bill Currie
55ecf94f2d Don't draw arrows leaving return statements.
Return statements never flow to the next block (or any other block, for
that matter), so drawing arrows leaving them not only messes up dot's
graphs, but is quite missleading.
2012-05-05 18:04:10 +09:00
Bill Currie
56410ddc58 Prevent merged if/goto losing its way.
When mering if/goto (ie, if skipping a goto), the rest of the dead code
remover is used to delete the goto. That part of the code unuses the goto's
label. The if was getting the goto's label without the lable's used count
being incremented (the usaged temporarily increases by one). I have no idea
why the problem showed up randomly, but this seems to fix it (it fixes /a/
bug, anyway).
2012-05-04 22:35:20 +09:00
Bill Currie
953e789db2 Handle movement of the final block.
Moving a final block caused segfaults and weird flow graph corruptions.
2012-05-04 19:48:32 +09:00
Bill Currie
e8c17c68e6 Fix a segfault when the switch expression errors. 2012-05-04 18:13:11 +09:00
Bill Currie
5df25133b3 Implement code movement for unconditional jumps.
That is, when the destination of the jump is reachable via only the jump.
2012-05-04 18:00:05 +09:00
Bill Currie
33bfac0508 Process all basic blocks for jump threading.
I'd copied the for loop from the dead block removal code, but jump
threading doesn't need to look at the following block...
2012-05-04 14:10:30 +09:00
Bill Currie
f169a7732d Factor out label unuse.
I expect to need this more often in the future.
2012-05-04 14:01:39 +09:00
Bill Currie
d2da3b8246 Update old test for new syntax. 2012-05-04 11:04:58 +09:00
Bill Currie
75aa28cfac Mark all subsequent blocks as reachable after if/goto merge.
If an if/goto merge is done in the first dead block pass, no blocks after
the merge have their rechable flag set because they've never been tested.
2012-05-04 10:58:18 +09:00
Bill Currie
8ddd58f951 Fix the dropping of the block after the merged if/goto.
The naive implementation of the if/goto merging was letting the old target
of the if get dropped because the block would lose its label and thus be
judged unreachable because the preceeding goto block was still in the list.
Instead, when the if/goto are "merged", mark the goto block as unreachable,
the following block as reachable, and break out of the analysis loop to
force the removal of the goto block. Since the dead block removal function
loops until no action is taken, all other dead blocks will be removed.
2012-05-04 10:07:55 +09:00
Bill Currie
e866619de6 Output basic block flow diagrams to files.
The output can be controlled via --block-dot (not yet documented). The
files a named <sourcefile>.<function>.<stage>.dot. Currently, stage will be
one of "initial" (after expression to statement conversion), "thread"
(after jump threading), "dead" (after dead block removal), "final" (final
state before actual code emission).
2012-05-04 09:45:51 +09:00
Bill Currie
3da44ace52 Merge if and goto blocks when if only skips over the goto. 2012-05-03 22:21:32 +09:00
Bill Currie
6afdfb5fac Unuse label expressions that are no longer necessary. 2012-05-03 22:20:00 +09:00
Bill Currie
402a578bf8 Add some more helper functions.
Things were getting messy with the strcmps.
2012-05-03 22:17:23 +09:00
Bill Currie
88bed3644e Rename some helper functions. 2012-05-03 22:11:52 +09:00
Bill Currie
159f1bafea Add a little more info to statement flow diagrams.
The relative block number and the label user count are printed now.
2012-05-03 22:09:49 +09:00
Bill Currie
6900907129 Remove dead labels when jump threading.
This lets the dead block removal do a better job.
2012-05-03 19:32:44 +09:00
Bill Currie
ab73a267cd Do not unconditionally remove labels from blocks.
Labels can be shared between multiple flow-control instructions, so use the
label's used counter to determine when to remove the label. This was
causing problems with the jump threading.
2012-05-03 19:22:57 +09:00
Bill Currie
c79620f04c Make statement blocks more identifiable. 2012-05-03 19:10:44 +09:00
Bill Currie
43b5edf46b Implement jump threading.
First real optimization :)
2012-05-03 17:42:58 +09:00
Bill Currie
78a9ba2557 Make expression alias chains not-a-bug.
The common cause seems to be casting a cast (very common, and I'm not sure
just realiasing the expression would be right). It does't cause any harm
(particularly, it doesn't trigger alias def chains), so I won't worry about
it.
2012-05-03 13:57:31 +09:00
Bill Currie
006882407d Fix the source of alias def chains.
The actual bug might still be elsewhere, but at least now I know the alias
chains were coming from accessing .return and .param_N, which are unions
(not directly usable by the progs engine). Emitting a reference to a union
(or struct) would create an alias def, but an alias expression was created
in the expression tree to simplify return/param access. The double layer
(sometimes 3 or 4) alias isn't really neaded, so rather than layering the
aliases, just re-alias the alaised def.
2012-05-03 13:28:16 +09:00
Bill Currie
ec98e3e206 Mark alias def chains as a bug. 2012-05-03 13:27:30 +09:00
Bill Currie
5f676c367f Add a non-error diagnostic that can't be silenced.
It is inteded for flagging buggy conditions in the compiler, particularly
after having fixed the original bug (in case something comes back from the
dead).
2012-05-03 13:24:24 +09:00
Bill Currie
3306039da2 Print the destination type for alias expression bubbles. 2012-05-03 11:55:19 +09:00
Bill Currie
cb8fe4eb38 Correct a "spelling" error. 2012-05-03 11:54:36 +09:00
Bill Currie
e267e0a664 Allow control of progdefs.h CRC writing.
CRC writing defaults to off for non-v6 progs, but on for v6 progs. The
--progdefs option forces CRC writing.
2012-05-03 00:22:24 +09:00
Bill Currie
44fcd76475 Add some missing command line option docs. 2012-05-03 00:03:13 +09:00
Bill Currie
15de69d868 Use dstring for progdefs.h writing.
And finally get qfcc into the thing :P
2012-05-02 23:39:49 +09:00
Bill Currie
04b9b3a11d Fix progdefs.h writing. 2012-05-02 22:44:45 +09:00
Bill Currie
ce278b2fbf Ensure .zero does not get a vector field for v6 progs.
v6 progs expects .zero to be only 1 word. The code actually tried to keep
vector out of .zero, but it seems I'd rearranged the structure defintion
without updating the code that kills the vector field. Problem spotted by
divVerent.
2012-05-02 22:29:17 +09:00
Bill Currie
4fe7efbed8 Add a test for end of function conditional return.
divVerent was telling Spike about such a bug in fteqcc and I though I'd
better get in an explicit test for qfcc.
2012-04-30 20:27:24 +09:00
Bill Currie
e06ee34287 Allow quat * vec in ruamoko. 2012-04-26 12:00:27 +09:00
Bill Currie
3788a1a3b7 Correct the output of 16-bit vertex data.
The order is high (unscaled) low (scaled by 1/256) rather than low
(unscaled) high (scaled by 256).
2012-04-24 14:13:29 +09:00
Bill Currie
c2712e6373 Track recent api change in svn blender.
Bah, I'm looking forward to the bmesh api stabilizing.
2012-04-24 11:04:45 +09:00
Bill Currie
99c58cca73 Make exporting md16 files possible.
Not sure if it actually works as the clients don't render the result
properly (can't see anything where the model should be), but the output
model does import back into blender properly.
2012-04-23 08:54:19 +09:00
Bill Currie
bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie
7317aaf109 Fix an out-by-one error when expanding intervals. 2012-04-21 20:16:28 +09:00
Bill Currie
965680f5dd Fix the bogus rotation flag when exporting the torch. 2012-04-21 11:42:38 +09:00
Bill Currie
4e435654c0 Implement multiple skin and frame exporting. 2012-04-21 11:31:33 +09:00
Bill Currie
1242247ac2 Write the number of subskins in a skin group. 2012-04-21 11:30:43 +09:00
Bill Currie
cdc57a0473 Set the skin images' fakeuser flag.
Until I figure out how to do animated skins in blender...
2012-04-19 22:16:30 +09:00
Bill Currie
6bae99d66c Create an animation script for imported models.
The animation script is just a plist of relevant frame and skin
information. Documentation is included in the generated script.
2012-04-19 22:06:43 +09:00
Bill Currie
ff05074e70 Set the fcurve interpolation to linear.
Since qf does linear interpolation of verts, this seems to be reasonable.
Certaintly better than the rose-thorns I got because I haven't figured out
how to kick the auto-clamp.
2012-04-19 18:49:53 +09:00
Bill Currie
274848b720 Use exceptions for error reporting.
Much cleaner, should have done it this way in the first place.
2012-04-19 14:30:40 +09:00
Bill Currie
d500940983 Add support for writing plists.
For now, only dictionariess, lists/tuples, bytes and strings are
supported.
2012-04-17 22:05:50 +09:00
Bill Currie
68bf0108fb Create a python version of qfplist.
I've decided to use property lists to define mdl control scripts. Some
names will probably get changed, and I still need to write code for writing
a plist, but the hard part is pretty much done :)
2012-04-17 21:29:27 +09:00
Bill Currie
196f2da585 Remove the fallback for missing image pack support.
It's been in blender since 2.59 or so.
2012-04-17 13:10:21 +09:00
Bill Currie
e25024c131 Build a single NLA track with strips for all actions.
This removes the need for fakeuser :).

Anyway, with this, the model's animations can be viewed all in sequence
just by hitting alt-a.
2012-04-16 15:42:49 +09:00
Bill Currie
4b29510bfd Set the name of the shape-key datablock to the model name.
Note that this is the data block that holds the list of actual shape-keys,
rather than the shape-keys themselves. I'm not sure what it's correct name
is (it's just "Key" in RNA).

I really dislike this method of setting the name, but the use of "Key" as
the datablock name is actually hard-coded into blender's C code :/
2012-04-16 13:33:45 +09:00
Bill Currie
0952e918dd Set fakeuser on actions.
Without fakeuser set, blender will toss out the actions on save and reload.
Converting to an nla strip might take care of that, but I haven't figured
out how to do that yet, so avoid any nasty surprised for the user.
2012-04-16 13:30:58 +09:00
Bill Currie
70f500a087 Use custom properties for model flags etc.
Eye position, auto rotation, sync type and particle effects can now all be
edited in blender: both import and export do the right thing. The settings
can be found in the "QF MDL" panel of the "Object" tab of the properties
view.
2012-04-15 21:55:23 +09:00
Bill Currie
92c08fb957 Update required blender version. 2012-04-15 13:47:59 +09:00
Bill Currie
fd9b8f7b4a Fix import and export for blender 2.63
Blender 2.63 should be out in a few days. Nice to get this ready ahead of
time.
2012-04-15 09:34:53 +09:00
Bill Currie
d3af0b2357 Correct the MD16 writing code.
Forgot to test it :P
2012-04-15 09:34:16 +09:00
Bill Currie
ab4aec47a7 Correct vertex scaling for blender 2.62+
This also abandons support for older versions of blender.
2012-04-14 18:10:25 +09:00
Bill Currie
a3e53337b6 Put my blender struts script in a safe place.
Nothing to do with QF, but then again, it might be useful.
2012-02-22 17:47:16 +09:00
Bill Currie
120f93e714 Fix a couple of missed edits from the previous commit. 2012-02-10 07:32:21 +09:00
Bill Currie
eefa89e72e Remove the AM_CONDITIONALs from tools.
Now that the tools directories aren't entered when those tools aren't being
built, there's no reason to use AM_CONDITIONAL in there.
2012-02-10 02:50:42 +09:00
Bill Currie
4d6ed605a9 Create and use QF_PROCESS_NEED_DIRS.
Not that I imagine many people use --with[out]-tools, but now unwanted
tools don't get visited by make.
2012-02-10 01:49:45 +09:00
Bill Currie
e34f0178b6 Build GLSL clients for SDL.
Just about to do a release, and I realized windows users wouldn't have any
way of checking out the new renderer. I'll add wglsl when I get a chance to
do some testing.
2012-02-08 22:05:58 +09:00
Bill Currie
cc443c42e6 Update the cross-tools locations. 2012-02-08 21:10:43 +09:00
Bill Currie
b59ffd4cf1 Fix win32 (mingw) builds. 2012-02-07 20:18:23 +09:00
Bill Currie
9fbff2f4d5 Do an audit of the Makefile.am files.
o All instances of LIBADD/LDADD have a corresponding DEPENDENCIES
    specificatiion.
  o libraries now use a lib_ldflags macro to keep things consistent
  o duplication of source/lib names has been minimized (particularly in
    the libraries; more work needs to be done for the executables)
  o automake spec blocks have been organized (again, more work needs to be
    done for the executables)
2012-02-07 16:04:19 +09:00
Bill Currie
f5eec3d930 Set all android envvars for make as well as configure.
Running make might trigger a reconfig, so the vars are always necessary.
2012-02-05 20:52:38 +09:00
Bill Currie
d2a6da6c24 Set PKG_CONFIG_PATH to something reasonable.
Now libsamplerate can be detected.
2012-02-05 18:46:12 +09:00
Bill Currie
459d6c3f2d Add the final changes to get configure working for android. 2012-02-05 14:36:02 +09:00
Bill Currie
c0f7b4ba37 Fix qfvis for android.
pthread_cancel is not (and will not be) implemented, so rework the thread
finalization to not need it.
2012-02-05 14:29:46 +09:00
Bill Currie
5fdad1c79c Support more than just mingw cross compiling.
This is the beginnings of android support :)
2012-02-05 11:34:11 +09:00
Bill Currie
f8dfee6de7 Merge branch 'master' into glsl 2012-01-29 22:36:35 +09:00
Bill Currie
1f3eaaf2e0 Fix the importer for blender 2.61.
The use_image field of faces disappeared somewhere between 2.59 and 2.61.
2012-01-23 23:10:25 +09:00
Bill Currie
86a401b025 Fix the importer for blender 2.61.
The use_image field of faces disappeared somewhere between 2.59 and 2.61.
2012-01-22 19:23:02 +09:00
Bill Currie
91cb875115 Add vertex loading/writing for MD16. 2012-01-05 16:49:42 +09:00
Bill Currie
c8163fc0de Add an option to prevent the use of default paths.
Despair has things locked down such that running qfcc during a build fails
due to lack of read access to /usr/local/lib. This is actually a good
thing as accidentally hitting old includes/libs (when a file gets deleted
in the tree) hides bugs. Thus, --no-default-paths to turn off default
search paths.
2012-01-04 13:53:04 +09:00
Bill Currie
ffc9680653 Add an option to prevent the use of default paths.
Despair has things locked down such that running qfcc during a build fails
due to lack of read access to /usr/local/lib. This is actually a good
thing as accidentally hitting old includes/libs (when a file gets deleted
in the tree) hides bugs. Thus, --no-default-paths to turn off default
search paths.
2012-01-04 13:17:57 +09:00
Bill Currie
59c621e0cf Move qfprogs from tools to qfcc (packaging). 2011-12-25 16:23:02 +09:00
Bill Currie
cc5140e3a1 Move min/max/bound and field_offset into better locations.
min/max bound into mathlib.h (they /are/ math functions, after all) and
field_offset into qtypes.h.
2011-12-24 10:04:33 +09:00
Jeff Teunissen
6ead583195 Ruamoko: Implement infinity.
The special token __INFINITY__, like __FILE__ and friends, will expand to
a floating-point expression containing a value the C compiler considers
infinite. Obviously, this assumes that the system has relatively modern
float hardware -- but if it doesn't, having Ruamoko be able to represent
float infinity is the least of your problems. :)
2011-12-14 12:20:10 -05:00
Bill Currie
8516891329 Edit the package version when building a release. 2011-12-09 11:27:46 +09:00
Bill Currie
853bf13d9e Move the winding code into libQFmodels. 2011-11-28 20:54:35 +09:00
Bill Currie
91e65b6c80 Rename mplane_t to plane_t and clean up the mess.
I got rather tired of there being multiple definitions of mostly compatible
plane types (and I need a common type anyway). dplane_t still exists for
now because I want to be careful when messing with the actual bsp format.
2011-11-28 20:54:34 +09:00
Bill Currie
ea02f3cd44 Fix a missed byteswap when loading qfo files. 2011-11-15 17:36:55 +09:00
Bill Currie
2457837b37 Make some improvements to the winding docs. 2011-11-12 12:17:45 +09:00
Bill Currie
6b62b850a7 Add an option to omit the mipmap from extracted textures.
This is at the request of Spirit (quaddicted). Great idea.
2011-10-05 20:43:40 +09:00
Bill Currie
3b8ab404a0 Add the ability to save the extra model parameters.
The params are eye position, flags and synctype. Provision is made for
reading them from a text block on export, but nothing is done other than
retrieving the text block.
2011-09-28 07:41:20 +09:00
Bill Currie
521f482806 Fix an off-by-one error that caused uvs to wrap. 2011-09-25 20:52:28 +09:00
Bill Currie
1277c17cd9 Give the 24-8 bit converter a massive speedup.
The biggest part of the speedup is reading from blender's image only once
(it seems that every read does so from GL rather than memory: ouch). Also,
cache the results for each color.
2011-09-25 20:50:32 +09:00
Bill Currie
2e2484250c Add some notes about modelgen's commands. 2011-09-24 21:31:02 +09:00
Bill Currie
50795b8239 Calculate the model "size".
The size is actually the average area in quake units of the mesh's
triangles. Again, my results are slightly smaller (0.025).

With this, all calculable fields are set. Only eye position, flags and
synctype remain.
2011-09-24 13:18:23 +09:00
Bill Currie
07b5db64c6 Calculate the bounding radius.
The calculated radius is a smidge (0.05) smaller than the original
(invisibl.mdl), but I think that's due to the difference in source data: id
used the original models, I'm using their output.
2011-09-24 13:03:18 +09:00
Bill Currie
3b33d8dade Make the basis shape key active on import.
Blender must have an active shape key before shape key animation will work.
This fixes the models being locked to the first frame until a shape key is
selected via the UI.
2011-09-24 11:43:06 +09:00
Bill Currie
bd840726c2 Fix the mangled faces.
I /did/ see the warning about vertex index 0 in the obj importer script,
but I didn't take it seriously enough. This fixes both the twisted texture
on a couple of faces, and the truly mangled tris when exporting (using
invisibl.mdl for testing).
2011-09-24 09:00:14 +09:00
Bill Currie
a1d9e752cd Fix the messed up UVs.
I had forgotten to invert the t axis.
2011-09-23 19:58:26 +09:00
Bill Currie
a80eef8bc4 Get the exporter mostly working.
There seems to be some problems with the UVs, only one frame is exported,
and various model params don't get set (eye position, size, bounding
radius, synctype, flags), but the size and shape look right in qf :).
2011-09-23 19:01:31 +09:00
Bill Currie
8ccb07d959 Make the MDL classes a little more usable.
This really eased the writing of the exporter :)
2011-09-23 19:00:39 +09:00
Bill Currie
8bec9cb203 Clean up export_mdl() a little. 2011-09-23 13:00:46 +09:00
Bill Currie
4a3731652e Fix the exported skin conversion.
I must remember to test language features in python 3 :P
2011-09-22 14:08:10 +09:00
Bill Currie
40f46f2ea3 Complete mdl writing.
Except for the normal index in the frame bounds (and potentially frame
names with junk after the terminating nul), the output is identical to the
input for:
	mdl=MDL().read("invisibl.mdl")
	mdl.write("test.mdl")
2011-09-22 11:44:08 +09:00
Bill Currie
e35dd29a2d Don't use Vector in mdl.py
This will make testing of the MDL class a little easier (independent of
Blender).
2011-09-22 11:43:57 +09:00
Bill Currie
a58f9582b0 Try to write out the skin.
Something's not working as all I get is a black texture, but the basics
(MDL writing) seem to be ok.
2011-09-22 00:58:57 +09:00
Bill Currie
ba4ccaf816 Check that all faces are triangles. 2011-09-21 22:34:23 +09:00
Bill Currie
57aa19bd44 Rename qfmdl to io_mesh_qfmdl.
This fits in better with the blender addon naming scheme.
2011-09-21 20:18:23 +09:00
Bill Currie
c3b358f470 Clean up the intra-package import lines. 2011-09-21 19:17:16 +09:00
Bill Currie
84f65a0171 Get the "front end" working nicely.
Proper enable/disable of export, file filtering and no exceptions :)
2011-09-21 19:17:16 +09:00
Bill Currie
2ca39e7f75 Start working on the exporter. 2011-09-21 17:37:32 +09:00
Bill Currie
4b9a421928 Split out the MDL class.
I will need it for the exporter.
2011-09-21 12:34:09 +09:00
Bill Currie
af4a91accf Do a tiny bit of cleanup. 2011-09-20 19:32:49 +09:00
Bill Currie
b00e865d4c Make the importer work in both 2.58 and svn blender. 2011-09-20 18:58:45 +09:00
Bill Currie
67ba9129ed Report bad mdl files. 2011-09-20 13:34:12 +09:00
Bill Currie
9a4e5aef53 Read strings as strings rather than bytes. 2011-09-20 13:33:41 +09:00
Bill Currie
a32e45d2d5 Refactor the import code.
This should make things a little more maintainable.
2011-09-20 12:44:37 +09:00
Bill Currie
d90fd4cee9 Fix a mistake found by a debug build of blender. 2011-09-18 18:49:16 +09:00
Bill Currie
c65522b5cf Add key frames for all shape keys. 2011-09-18 15:37:17 +09:00
Bill Currie
94ac2fa675 Remove a debug print 2011-09-18 10:37:28 +09:00
Bill Currie
b57e098e93 Rewrite the frame group to action conversion.
Now it works :) Mostly :/ Need to figure out how to "finalize" the action.
Also, blender occasionally loses my skin texture :(
2011-09-18 09:58:59 +09:00
Bill Currie
dbb1df70b5 Fix frame merging for mdlv3 files.
v3 files have no name fields in the frames, so we need to store the
generated name.
2011-09-18 09:18:49 +09:00
Bill Currie
ad8afec84c Merge multiple frames into a single frame group.
But only if they seem to be related (ie, the frame name is the same up to
the number). This will later become optional, but it allows me to test
some of the frame group code.
2011-09-17 23:41:35 +09:00
Bill Currie
dc76ad6556 Create actions for frames and frame groups.
Simple frames get a one key action, groups get an action with a key per
subframe.
2011-09-17 23:13:21 +09:00
Bill Currie
644f4db9d1 Add support for v3 (qtest) mdl files.
Finally, I can see the dragon in all its... glory?
2011-09-17 09:05:07 +09:00
Bill Currie
f7de55ed5e Create a shape key for every frame and subframe.
Shammy has no frame groups :(. Need to find a model with groups.
2011-09-16 20:59:39 +09:00
Bill Currie
b0af18478b Be a little more direct in object linking and materal adding. 2011-09-16 19:14:31 +09:00
Bill Currie
de24fa99a8 Break out the skin/material setup code. 2011-09-16 17:57:07 +09:00
Bill Currie
41213f2c30 Make the skin show in blender's 3d view.
Much thanks to ideasman_42 for showing me which code I needed to grok to
get it working.
2011-09-15 22:45:23 +09:00
Bill Currie
320f613263 Give the uvlayer texture a name. 2011-09-15 20:39:26 +09:00
Bill Currie
257fefca38 Link the first skin to the imported object.
The texture doesn't display properly in 3d space in texture mode yet.
2011-09-15 19:52:18 +09:00
Bill Currie
7489d5646b Convert all skins.
Skin groups are now partially supported.
2011-09-15 19:51:52 +09:00
Bill Currie
f8e1e3d4ec Fix incorrect bracket/parens 2011-09-15 19:18:31 +09:00
Bill Currie
11f37298be Reveres the face windings.
Blender's vertex order and quake's vertex order seem to be opposed.
2011-09-15 17:23:40 +09:00
Bill Currie
0569e0ebd3 Build the uv layout. 2011-09-15 13:21:08 +09:00
Bill Currie
99ff91e341 Load the skins into blender images.
Skin groups are not yet supported (skipped).
2011-09-15 11:29:54 +09:00
Bill Currie
9d025e0058 Begin working on an mdl import/export plugin for blender.
This is only preliminary at this stage:
  o No export yet.
  o Only the first frame is converte4d.
  o Skins are not yet converted
2011-09-14 19:33:51 +09:00
Bill Currie
3de5575def Move the menu files into the QF directory for win32. 2011-09-11 17:13:20 +09:00
Bill Currie
a71acc9ae5 Move the essential init code into Sys_Init(). 2011-09-11 14:56:47 +09:00
Bill Currie
b9401fe7c6 Fix incomplete removal of old files. 2011-09-10 18:10:51 +09:00
Bill Currie
505660dffe Nuke another buffer.
Though snprintf was used, not having a buffer just makes things cleaner.
2011-09-07 09:41:06 +09:00
Bill Currie
f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie
70d42cc838 Allow light entities to specify a named light property. 2011-08-21 14:40:18 +09:00
Bill Currie
73a280f86a Handle all light types in the switch.
Even though nothing is down for those types.
2011-08-21 14:40:18 +09:00
Bill Currie
2d8b011bc8 Support negative lights. 2011-08-21 14:40:18 +09:00
Bill Currie
efce040d48 Document the fields qflight uses to control lighting. 2011-08-21 14:40:18 +09:00
Bill Currie
e42c5a4272 More tests and fix vector/quaternion global dumps. 2011-08-11 14:58:13 +09:00
Bill Currie
c6e0e094d8 Fix an unterminated array.
That was sneaky. It took building qfcc on an arm to trigger that bug.
2011-07-30 15:01:16 +09:00
Bill Currie
d910c14935 Clean up some doxygen warnings. 2011-07-10 19:12:07 +09:00
Bill Currie
617e70c8e3 Clean up a bunch of bison unused warnings. 2011-06-21 19:52:47 +09:00
Bill Currie
0f7390dd60 Clean up all the "set but not used" warnings.
gcc on my system is failing to treat this specific warning as an error :/
2011-06-19 10:48:02 +09:00
Bill Currie
dedda7596d Just for fun :) 2011-06-15 17:33:03 +09:00
Bill Currie
d638fdce83 Add a PlaneFlip macro. 2011-05-07 19:29:03 +09:00
Bill Currie
b9d21cbe9a Catch resizes in the camera view.
Avoids a segfault when resizing the window.
2011-04-16 18:58:05 +09:00
Bill Currie
3337dc609f Fix a buffer error. 2011-04-16 13:05:28 +09:00
Bill Currie
fb65cd2b44 Cache needed fonts.
Obtaining a font has become rather expensive in recent gnustep, so cache
fonts, obtaining new ones only when needed rather than every redraw. Makes
things snappy again :)
2011-04-16 12:17:23 +09:00
Bill Currie
36ec375893 Support resizing the window.
The resized layout isn't perfect, but at least the usable real estate for
the xy window grows nicely.
2011-04-10 14:34:34 +09:00
Bill Currie
9e15e2cd76 Remove a debug print. 2011-04-10 09:14:28 +09:00
Bill Currie
c7612dcd99 Make statement dumps a little more informative. 2011-04-10 09:08:46 +09:00
Bill Currie
fd6e341e06 Clean up cast_expr() a little bit. 2011-04-10 00:29:27 +09:00
Bill Currie
6cb3d18fc4 Use a hash table for finding entities.
This gives a major speed boost :)
2011-04-09 18:32:29 +09:00
Bill Currie
32f3f5c06b Use a hash table for epair lookup.
This gives a very minor speedup to drawing large maps.
2011-04-09 14:47:36 +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
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
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
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
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
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
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
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
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
f5ce9e2004 Fix a merge induced error in overloaded functions. 2011-03-20 19:04:18 +09:00
Bill Currie
1ada2a96cf Merge branch 'master' into qfcc-codegen
Conflicts:
	tools/qfcc/source/expr.c
	tools/qfcc/source/function.c
	tools/qwaq/test.r
2011-03-20 15:58:31 +09:00
Bill Currie
a919e5f619 Make class_check_ivars() use class_add_ivars() to add the ivars.
This avoids implementation ivar blocks trashing the ivar offsets in
derived classes.
2011-03-20 13:35:59 +09:00
Bill Currie
8c8a6a4d63 The function return type is the address of the type descriptor... 2011-03-17 20:31:20 +09:00
Bill Currie
01144d23cf Add a new gcc warning option and fix the two bugs it found. 2011-03-17 19:58:56 +09:00
Bill Currie
5aa0b34570 Add the cast statement to the statement block.
*sob*
2011-03-10 20:43:53 +09:00
Bill Currie
f663f587fe Fix the missing local defs for builtin functions. 2011-03-10 20:16:35 +09:00
Bill Currie
899af3119b Use the correct type when generating a move expression. 2011-03-10 19:30:21 +09:00
Bill Currie
2129eaaf20 Dereference moves need movepi rather than movei. 2011-03-10 19:29:23 +09:00
Bill Currie
8d69c5c898 More tests 2011-03-09 20:34:23 +09:00
Bill Currie
cbbbf87e20 Resurrect the stats output. 2011-03-09 15:51:17 +09:00