Bill Currie
ea34a5b753
Fix some nasty memory errors.
...
Three cheers for valgrind!!!
2012-11-01 20:53:28 +09:00
Bill Currie
5c79953a7e
Put quotes around strings for statement operands.
...
This makes reading output a bit easier (especially if the string is empty
or just whitespace).
2012-10-30 12:31:28 +09:00
Bill Currie
f8bdd909cc
Separate out C and html quoting into separate functions.
...
Dot sometimes wants normal C quotes, othertimes html. Quite annoying,
really, but this is cleaner anyway.
2012-10-30 12:31:22 +09:00
Bill Currie
f680521e0f
Escape unprintable chars.
2012-10-27 11:45:51 +09:00
Bill Currie
ec42bde527
Make hash tables more const correct.
...
And clean up the resulting mess :/
2012-10-27 11:44:31 +09:00
Bill Currie
034139b806
Move some code around so it's more accessible.
2012-10-27 11:43:29 +09:00
Bill Currie
7519ec7bbd
Fix the bogus missing return warning.
...
Pascal's return mechanism is such that void return is always used.
2012-10-26 20:11:38 +09:00
Bill Currie
3f351a5c88
Fix a printf format goof.
...
Forgot to compile test :/
2012-10-26 19:38:59 +09:00
Bill Currie
52b9721027
Add the COMMA token to the pascal parser.
...
I guess I forgot I needed to keep token numbers in sync between pascal and
qc/ruamoko.
2012-10-26 19:06:10 +09:00
Bill Currie
72045f1a5b
Delay storage setting for pascal functions.
...
The function def must not be local. This fixes the null function call in
gcd.pas.
2012-10-26 19:03:00 +09:00
Bill Currie
27b83a8d65
Clean up all extra aborts, using internal_error instead.
...
Some internal_error calls have no message, but at least things will be more
consistent.
2012-10-26 19:02:02 +09:00
Bill Currie
5530e84ada
Call find_type for pascal functions/procedures.
...
The result of parse_params needs to be passed through find_type before
actually being used. I guess I'd missed this back when I got things working
for qc.
2012-10-26 16:20:57 +09:00
Bill Currie
144387c3e3
Add shared.h to the dist files.
2012-10-26 16:16:46 +09:00
Bill Currie
f14d8060e0
Merge qfpc into qfcc.
...
Since gnu bison and flex are required anyway, no harm in using their api
prefix options. Now, qfcc can compile both QC/Ruamoko and Pascal files
(Pascal is (currently?) NOT supported in progs.src mode), selecting the
language based on the extension: .r, .qc and .c select QC/Ruamoko, .pas and
.p select Pascal, while anything else is treated as an object file (as
before).
2012-10-26 16:01:41 +09:00
Bill Currie
50b22ab163
Fix a rather silly snafu with smart-leak.
...
I blame this fever :P
Now smart-leak actually makes sense.
2012-09-18 07:48:39 +09:00
Bill Currie
45fd312133
Merge branch 'master' into mapedit
2012-09-17 07:52:42 +09:00
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