Commit Graph

157 Commits

Author SHA1 Message Date
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 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 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 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 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 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
Jeff Teunissen 7d6430edd4 Rua: move the old cvar() and cvar_set() functions
Move the old cvar get/set funcs to cvar.[rh] from system.[rh].
2011-12-14 20:33:33 -05:00
Jeff Teunissen 4f4d6b5675 OK, now import them...
Duh.
2011-12-09 22:42:43 -05:00
Jeff Teunissen c7c646a53f Makefile portability fixes
Allow our makefiles to build with non-GNU 'make' implementations.
Required some renaming of not-really-QuakeC source to .r to get it right.
2011-07-25 17:22:44 -04:00
Bill Currie 4e66a5b327 Add rua rappers for the cvar alias functions. 2011-07-06 19:17:28 +09:00
Jeff Teunissen 82e934af47 Rualib: nuke some unnecessary classes
List, ListNode, and Stack aren't necessary; all three are obviated by the
new, richer Array class.
2011-06-14 13:33:10 -04:00
Jeff Teunissen b18302eac1 Array: sorta-implement -description
An #if 0'ed out implementation of the -description method, which currently
returns a Quake string containing whatever the contained objects return
from -description, between parens and separated by commas (just like plist
format). Ideally, we'd have string objects interchangeable with primitive
strings, but having string objects (which are being worked on) should help.
2011-06-14 13:31:30 -04:00
Bill Currie 896791b209 Correct the spelling of "int" and clean up the mess. 2011-03-25 16:53:04 +09:00
Bill Currie 8c1d948586 And qfcc finds another bug :) 2011-03-24 13:36:36 +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 7b9d70167f Fix some missed language changes. 2011-03-10 20:51:04 +09:00
Bill Currie aa4ed00090 Fix the message type used to check arguments. 2011-03-02 22:13:16 +09:00
Bill Currie 595019d86e Fix some problems found by the new qfcc.
With this, ruamoko/lib almost compiles (though no object files are output).
Just some bogus "redeclared" errors and an improperly implemented
statement that produces an ice.
2011-02-14 23:10:45 +09:00
Bill Currie daae0284a1 Work around a warning about passing int constants into ...
I'm not sure why this is happening now when it didn't in the old qfcc,
but this will take care of the warning for now until I can get around to
fixing it.
2011-02-14 23:10:45 +09:00
Bill Currie 1195df9686 Update for the new syntax. 2011-02-13 21:25:36 +09:00
Bill Currie ed3f98eab4 qwaq related compile fixes for the new function syntax rules. 2011-02-13 19:07:30 +09:00
Bill Currie 1f8b453d58 Add some return statments for now.
At the moment, qfcc has no way of knowing that a function will never
return. This is needed until the time qfcc can know that.
2011-02-10 14:48:06 +09:00
Bill Currie d6b10c99aa Most, if not all, of the fixes needed to get qwaq building.
This is pretty much just changing [] to * and moving [N] to the other side
of the variable name.
2011-02-07 22:16:16 +09:00
Bill Currie c38ea0b1bc Correct the spelling of "nil". 2011-01-14 12:07:40 +09:00
Bill Currie 9e06220dc5 Missed a class -> class pointer change. 2011-01-10 12:26:11 +09:00
Bill Currie 6ebee4ad0e Get the type of Method right.
It's a direct structure rather than a pointer.
2011-01-10 12:25:31 +09:00
Bill Currie 75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Bill Currie c5edbf147a Move ruamoko libs and headers into ${prefix}/lib/qfcc 2010-12-24 19:39:54 +09:00
Jeff Teunissen 81d927c702 rename Runtime.h -- it's not a class. 2010-12-24 05:03:31 -05:00
Jeff Teunissen ff57b96bc6 Add Runtime header for obj* stuff.
Also, move lots of stuff out of the Object header.
2010-12-16 06:42:28 -05:00
Jeff Teunissen 7cb2ce3263 whitespace, clean up AutoreleasePool warnings
d'oh! How did I forget to include that header?
2010-12-16 06:24:54 -05:00
Jeff Teunissen 061f56ea2d Add missing methods
Array: Implement -indexOfObject: and -indexOfObjectIdenticalTo:
2010-12-16 06:24:54 -05:00
Jeff Teunissen 4968b65b2f Minor doc updates
Reveal more Rua documentation that I had already written years ago, and
clean up Array a little.
2010-12-16 06:24:54 -05:00
Bill Currie 096d7f5791 Turn on -Wall -Wno-integer-divide
This will break Array.r until Deek gets his changes in.
2010-12-16 20:14:06 +09:00
Bill Currie 6d494bfcdf Fix a slew of warnings found by -Wall.
-Wall still isn't used yet due to a missing method in Array, and
overzealous warnings in qfcc, but this covers the necessary fixes.
2010-12-16 20:01:49 +09:00
Bill Currie d89893682e Tweak an "only".
*twitch*
2010-12-12 22:55:53 +09:00
Bill Currie 736c9a3a60 Create a reference to Array(Private).
This is the real fix for the problem worked around by 5c8cb8fe.
2010-12-12 20:44:46 +09:00