Commit Graph

342 Commits

Author SHA1 Message Date
Bill Currie caf78b5422 Rename ty_none to ty_basic
This far better reflects the actual meaning. It is very likely that
ty_none is a holdover from long before there was full type encoding and
it meant that the union in qfcc's type_t had no data. This is still
true for basic types, but only if not a function, field or pointer type.
If the type was function, field or pointer, it was not true, so it was
misnamed pretty much from the start.
2020-02-21 17:52:00 +09:00
Bill Currie 2f18364364 Start work on encoding typedef chains 2020-02-19 21:41:46 +09:00
Bill Currie a6f3e1753a Fix ruamoko's hashtab_t typedef
Being typedefed directly to a pointer is a holdover from when pointer
declarations were really awkward.
2020-02-19 21:41:46 +09:00
Bill Currie 67e183c8b6 Put the guts of qwaq's reflection code into ruamoko 2020-02-19 21:41:46 +09:00
Bill Currie 39df9c0c87 Fix some more double related warnings
Fewer than I expected
2020-02-15 23:49:12 +09:00
Bill Currie 7e7e0526dd Fix a double constant issue
There will be more of these :/
2020-02-15 23:49:12 +09:00
Bill Currie df7c08a010 Add support for doubles to Ruamoko
Only as scalars, I still need to think about what to do for vectors and
quaternions due to param size issues. Also, doubles are not yet
guaranteed to be correctly aligned.
2020-02-15 23:49:12 +09:00
Bill Currie 9248e8cf01 Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
Bill Currie c98d1ff08c Document some problems with nil
While he's a pretty cool character in HZD, he seems to have some
identity problems when in a compiler.
2019-06-09 22:29:51 +09:00
Bill Currie f163e35f21 Add a builtin to get keydown. 2016-01-10 13:33:05 +09:00
Bill Currie c25fd410a5 Update doxygen config files for 1.8.9.1 2016-01-04 11:17:09 +09:00
Jeff Teunissen 396338a543 Rua: flesh out docs for BOOL. 2014-10-16 13:05:57 -04:00
Bill Currie f5501fbf24 Fix a pile of automake deprecation warnings.
s/INCLUDES/AM_CPPFLAGS/g

I <3 sed :)
2013-11-24 13:11:50 +09:00
Bill Currie 2e8d9e7636 Correct the menu code to sortof work with the new IMTs.
The menu code at least compiles now. It should work for the default IMT
tables (ie, if imt_0 is there).
2013-01-16 20:31:46 +09:00
Bill Currie 2974bedd78 Add ruamoko declarations for the new menu functions. 2013-01-13 20:13:19 +09:00
Bill Currie 4868a245b3 Fix the "for new syntax" FIXME.
Empty structs are now (correctly) invalid. The hack of using an empty
struct to represent a handle returned from a builtin has been unnecessary
since opaque structs were implemented: now a pointer to an opaque struct
can be used. This is mostly safe as handles are aways negative and thus
attempting to dereference such a pointer should result in a VM error. It
will be even safer once const is implemented and the pointers can be made
constant (eg, typedef struct handle * const handle;)
2012-12-20 10:10:41 +09:00
Bill Currie e17d8ac9db Add ruamoko wrappers for the set api.
This includes both normal functions and a Set class (and SetIterator
class). Most of the methods are implemented as builtins.
2012-12-16 13:48:36 +09:00
Bill Currie 7ed490c434 Allow nil when replacing objects in an array.
I want this in a little project, but I also want to consult with Deek about
it, so I've only commented out the code.
2012-12-16 13:38:19 +09:00
Bill Currie 814f902e88 Add a new crosshair.
Now all 4 slots of the crosshair table are used :)

Also, fix the offset for pic based crosshairs in glsl, and use just one
func for them.
2012-12-12 19:36:18 +09:00
Bill Currie f358364ef2 Fix assignment of nil to a structure.
constfold.c seems to be getting a little long in the tooth :P
2012-12-11 11:53:01 +09:00
Bill Currie cd62755ce4 Fix some warnings found by qfcc's flow analysis.
Ok, maybe it works too well? Nah, not really. It's nice having proper
unisnitialized checks on structs.
2012-12-10 22:20:44 +09:00
Bill Currie ff0c51e52c Build our ruamoko stuff with optimizations :) 2012-12-01 11:20:06 +09:00
Bill Currie 2aaa380098 Fix some uninitialized variable warnings.
While they're false positives (qfcc doesn't know about noreturn), at least
qfcc is doing its job :)
2012-11-21 10:25:29 +09:00
Bill Currie db92a7b9f9 Fix an out-by-one error.
That "qfvalgrind" is proving worthwhile :)
2012-11-20 19:49:57 +09:00
Bill Currie abd9704d26 Avoid over-releasing the autorelease pool.
It seems that the engine menu code must be calling menu_post too often, but
I don't feel like fixing it just yet.
2012-11-20 14:54:40 +09:00
Bill Currie 951bed6206 Allow the retain count to become 0.
With the new retain count scheme, it must reach 0 or double frees won't be
caught.
2012-11-20 14:41:13 +09:00
Bill Currie d5c831b6da Add a little test case for accessing types.
Using ruamoko to access ruamoko type encodings is actually quite pleasant
:)
2012-11-15 13:40:11 +09:00
Bill Currie 9a53531d3b Fix a braino in Object's -init.
I'd forgotten AutoreleasePool doesn't like receiving -retain when I did the
retainCount change, and thus Object's -init was a little too naive.
2012-11-14 20:45:29 +09:00
Bill Currie c96718493a A bit of a cleanup before fixing class type defs.
All internal structs now have "proper" names, and fit the naming convention
(eg, obj_module (like objective-c's types, but obj instead of objc). Some
redundant types got removed (holdovers from before proper struct tag
handling).

Also, it has proven to be unnecessary to build internal classes, so
make_class and make_class_struct are gone, too.
2012-11-12 11:12:33 +09:00
Bill Currie dc22d06905 Fix an out-by-one in the definition of INT_MAX.
INT_MAX wound up being INT_MIN :/
2012-11-12 10:28:31 +09:00
Bill Currie 218424d0ae Add debug.r to libcsqc. 2012-11-09 19:11:30 +09:00
Bill Currie 07e67da838 Add class versions of retain and friends.
As class objects don't have retain counts (they're usually static, even!!),
allowing the instance implementations of retain, release, and autorelease
attempt to modify the non-existant retainCount would be a recipe for severe
headaches. We also don't want the retainCount returning "random" values.
2012-11-08 20:41:56 +09:00
Bill Currie 6b46cde7c8 Move retainCount out of Object.
Going by "standard" Objective-C, retainCount really doesn't belong in
Object itself. The way GNUStep does it is to stash retainCount in memory
just below the object by allocating extra bytes for the count and returning
a pointer just beyond those extra bytes. Now Ruamoko does the same. This
fixes the inconsistencies in structure layouts for Protocol and class
structs between qfcc generated (internal) structs and user visible structs.
2012-11-08 20:24:25 +09:00
Bill Currie 3042c2bb1a Create backups of quick.sav.
F6 is fantastic, until you hit it by mistake after dieing when you meant
to hit F9 (I've done that way too often). quick.sav is still the last file
written via F6 (so F9 is unaffected), but now the previous quick.sav
becomes quick1.sav. Up to 5 (currently) backups will be kept: quick1 is
the newest, quick5 the oldest. A menu for accessing the backups has been
added as a sub-menu of the load menu.
2012-07-21 22:41:57 +09:00
Sander van Dijk 4725d5a973 Add a "Prev. weapon" menu option. 2012-07-17 06:28:32 +09:00
Bill Currie f1854c85b2 Fix some doxygen warnings and errors. 2012-07-15 07:39:50 +09:00
Bill Currie 37dda1ef99 Update for doxygen 1.8.1 2012-07-15 07:39:50 +09:00
Bill Currie d9288c0837 Don't double-draw the bindings menus. 2012-07-14 20:16:45 +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 95a06c20b2 Move qfcc's libs and headers to ${prefix}/share
On discussion with Despair, share makes more sense than lib as they are
really cross-platform (though qfcc itself is not).
2012-05-05 19:34:35 +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 b69d527507 Nuke another AM_CONDITIONAL 2012-02-13 16:08:03 +09:00
Bill Currie 546a7e7aac Avoid recusing into tools and ruamoko when not needed. 2012-02-12 19:29:31 +09:00
Bill Currie 7c76415f9d Add math.r to libr. 2012-02-06 19:33:08 +09:00
Bill Currie a694eed968 Add Draw_Picf to allow smooth placement on low-res consoles. 2012-02-06 19:32:30 +09:00
Bill Currie 14c0e22494 Tweak Draw_MakePic to be a little more usable. 2012-02-06 15:50:32 +09:00
Bill Currie d6ddbe4efe Create decls for the new draw functions. 2012-02-06 15:50:32 +09:00
Bill Currie c98ffa4eda Create a message buffer API for Ruamoko
The api hides all the gory details of message buffer setup and usage
(particularly the differences between writing and reading). Most
importantly, the api provides a safe way to read and write binary data
(always little endian).
2012-02-06 15:50:32 +09:00
Bill Currie 6e10d847ef Make the qpic_t struct consistent with the internal layout.
Now that the renderer ruamoko builtins use handles, there's no need to
hide data, and it's safer anyway.
2012-02-06 12:50:44 +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