Commit Graph

196 Commits

Author SHA1 Message Date
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
Bill Currie c262229478 Revert "Move private Array methods into main file"
This reverts commit 5c8cb8fec8.

The fix comes next.
2010-12-12 20:43:28 +09:00
Jeff Teunissen 15ba4091bc Doc fixes.
Document some more Array methods, mark the private methods as private in
the docs.
2010-12-12 05:45:12 -05:00
Jeff Teunissen 4a8ff8aee8 A little strictness: error out in some nasty conditions. 2010-12-12 05:41:52 -05:00
Jeff Teunissen 5c8cb8fec8 Move private Array methods into main file
#if 0 out the "normal" implementation, so that it doesn't hurt. When it
becomes possible to have the private Array methods separate, remove them
from the main file and remove the #if 0 block from Array+Private.r.
2010-12-12 05:39:17 -05:00
Jeff Teunissen 22dd7cd20d Avoid wasting a local and giving the compiler a minor aneurysm
qfcc doesn't yet like foo[bar++] = baz; let's be nice and not give it
indigestion.
2010-12-12 00:16:33 -05:00
Jeff Teunissen f13c45a9ae kill extra reference to Array in docs 2010-12-11 23:45:48 -05:00
Jeff Teunissen 8d05b07a26 remove empty -release in AutoreleasePool. 2010-12-11 23:32:04 -05:00
Jeff Teunissen 505076a98d rewrite Array, AutoreleasePool
This version is a bit more useful, and we should be able to get rid of the
Stack class. Also, the Ruamoko parts of the autorelease system should be
almost ready now.
2010-12-11 20:32:19 -05:00
Jeff Teunissen 4bd37e7b64 Switch to C-style function declarations.
Doxygen hates the QuakeC-style function prototypes we use, so switch to the
C-style prototypes.
2010-12-11 20:31:59 -05:00
Bill Currie addbcaa09c Add PL_GetFromFile builtin.
This is an extension "wrapper" (no such C function). This allows ruamoko
programs to read property lists without worrying about the memory required
to store the string for the property list being read.
2010-11-24 17:01:19 +09:00
Bill Currie e9fea12e47 Must return self in -autorelease 2010-11-24 17:01:19 +09:00
Bill Currie 3878b76cc5 Start using autorelease.
Much more testing is required (oh, but for qc-valgrind), but there is now
a ~945kB block of free data in the menu progs heap :).

Also, correct the printed size of the memory block to not include the
block header size.
2010-11-24 17:01:18 +09:00
Bill Currie 4518e6af91 First stab at implementing autorelease.
It's probably nowhere near right, but probably ok for now (I need to study
the GNUStep code). I'm unhappy with the menu code hook, but it will have
to do for now.
2010-11-24 17:01:18 +09:00
Bill Currie 7acf8c0570 Must retain before release. 2010-11-24 17:01:18 +09:00
Bill Currie 5fc4ef63f6 Rewrite ruamoko plist support to use handles.
The plist code was written long before I thought of resource handles, and
then it was forgotten. This is much nicer and safer than storing C
pointers in progs memory space (*shudder*).
2010-11-24 17:01:18 +09:00
Bill Currie 0dfff8fd58 ignore stuff 2010-08-07 10:42:09 +00:00
Bill Currie 8abb9a69aa remove support for an optional = in struct/union declarations 2010-01-13 06:34:32 +00:00
Bill Currie 128faf773a give sprintf a real prototype 2010-01-13 06:25:38 +00:00
Bill Currie d996c364b8 massively speedup savegame scanning (and bump the menu progs memory size again :/) 2007-05-13 03:56:08 +00:00
Bill Currie 72daa2fd2b add some sounds to the menus (not yet finished) 2007-05-07 12:17:12 +00:00
Bill Currie 33f08b6a43 add QFS_Open and QFS_WOpen 2006-12-20 12:08:57 +00:00
Bill Currie de5bf80eb8 release the item after removing it from the array, rather than before 2006-12-20 11:33:40 +00:00
Bill Currie 809ce1fb82 fix some leak issues 2006-12-16 14:00:00 +00:00
Bill Currie 68e7b3199d add finding elements 2006-12-16 13:59:29 +00:00
Bill Currie 70ec9848e7 add PL_RemoveObjectForKey and make PL_D_AddObject take a normal C string for key instead of a pl string. 2006-12-09 06:00:36 +00:00
Bill Currie eeca330af2 whitespace 2006-12-02 06:51:41 +00:00
Bill Currie 6e0c70cac7 reduce the amount of memory needed to read menu.plist 2005-06-15 01:41:10 +00:00
Brian Koropoff 5378a850b4 Bug fixes: initializes properly, releases overwritten elements, doesn't
try to free null pointers
2005-05-06 23:06:50 +00:00
Brian Koropoff 5130545c72 Array now properly retains/releases objects it stores. 2005-05-02 02:32:03 +00:00
Bill Currie 73e45cc8ee working on scripted menus; video works
dealloc -> release

This is an imperfect revision of history.
2004-11-18 05:08:00 +00:00
Bill Currie 3a7ecf9f31 enable obj_sendv
This is an imperfect revision of history.
2004-11-17 21:27:00 +00:00
Bill Currie 96e20d891c overload str_mid so it has the same semantics as Python's slice operator
This is an imperfect revision of history.
2004-11-14 00:53:00 +00:00
Bill Currie 7a217b81cd add a PropertyList class hierarchy
This is an imperfect revision of history.
2004-11-13 01:55:00 +00:00
Bill Currie 53f4d13f43 wrap the plist functions
This is an imperfect revision of history.
2004-11-11 22:42:00 +00:00
Bill Currie 5ef382d2a7 Add a rua wrapper for scripts (seems, to work, too:). Also added generic resource handle support based on strref handling in pr_strings.c.
This is an imperfect revision of history.
2004-11-11 04:06:00 +00:00
Bill Currie 64cc8c60d2 compile time protocol support seems to be complete now. fortunatly, protocols had never been written out so the corrections to the protocol related stuctures do not need a progs version bump. runtime protocol support hasn't been fully tested yet.
+load runtime support seems to be working.

This is an imperfect revision of history.
2004-11-11 00:34:00 +00:00
Jeff Teunissen 2842f4d4f1 Ruamoko builtin declaration/implementation cleanup/simplification. Incomplete,
but working.
2004-04-28 00:42:38 +00:00
Bill Currie 804ba76719 add bindings for the qfs functions 2004-04-20 23:01:54 +00:00
Bill Currie 4afe0c1588 move hash.r and plist.r to libr where they belong 2004-02-25 02:38:15 +00:00
Bill Currie 8069becadf pkgincludedir and pkglibdir patch from
"Alexey I. Froloff" <sir_raorn@immo.ru> (raorn)
2004-02-18 06:28:37 +00:00
Bill Currie 103299e7e4 rename Cvar_GetCvarString to Cvar_GetString and add
Cvar_Set{String,Float,Integer,Vector} and
Cvar_Get{String,Float,Integer,Vector}. use them in the menus
2004-02-14 02:56:29 +00:00
Bill Currie 0e147a7b61 video options "done" 2004-02-14 02:09:18 +00:00
Bill Currie 51cd2fc69a most of the video menu now uses CvarToggle and CvarToggleView (and rename
RangeSlider to CvarRangeView)
2004-02-07 00:09:50 +00:00
Bill Currie fb9c3e6125 Object error doesn't return anything... 2004-02-04 00:56:33 +00:00
Bill Currie ec26083228 start working on a gui lib with a Slider class. use the slider class for
the volume settings. doesn't /quite/ work properly yet
2004-02-03 08:31:26 +00:00
Bill Currie 888ff5f571 make the math functions Grievre provided available 2004-02-03 06:24:43 +00:00
Bill Currie a4bcf2dab6 hopefully better library arrangement 2004-02-03 06:00:16 +00:00
Bill Currie b3f76e1e48 add some string builtins (only the basics for now, but enough to deal with
temporary strings) and fix the game load/save menus.
2004-01-07 07:36:17 +00:00
Bill Currie 9c92a916ff change the dict and array add functions to return true/false and add some
more docs
2004-01-07 06:19:11 +00:00
Bill Currie 380e397d5b set all of our static builtin extentions to 0x000fxxxx. fixes the invalid
builtin crash in menus
2004-01-07 00:04:07 +00:00
Bill Currie 6f1dd54e99 quick and dirty fix to get menus loading again. libr.a really needs to be
cleaned up: most of the stuff in it should /not/ be in the standard library
2004-01-05 09:06:06 +00:00
Brian Koropoff 687a0845b6 Introducing the GIB Object System (TM). This breaks scriptable HUD for now
and probably has enough bugs to leave the Orkin man scratching his head,
but it works and allows you to do neat things like write classes in GIB
(amazing!) and subclass builtin classes (which are Object and Thread at the
moment, Hash should be coming soon as a replacement for stem and leaf
variables).
2003-09-11 06:03:13 +00:00
Bill Currie 8b36ae6c00 bunch of bug fixes. rather important part of the bot fixes (oops:) 2003-09-03 01:27:57 +00:00
Bill Currie 7ff9f32706 uncomment some functions that may or may not get implemented 2003-08-23 06:12:10 +00:00
Bill Currie ac330a32c2 remove @extern from definitions 2003-08-20 22:36:35 +00:00
Bill Currie 27306a9a2b correct the prototypes for the hash functions (oops:) 2003-08-19 21:10:19 +00:00
Bill Currie dd9ab1e050 get unsigned mostly working 2003-08-01 21:20:04 +00:00
Bill Currie 908a3dab29 fix a bunch of FIXMEs now that qfcc has been fixed for these items 2003-08-01 16:37:44 +00:00
Bill Currie 6ecb707257 revamp the struct system so "struct foo;" does the right thing (ala C) 2003-07-30 04:11:45 +00:00
Bill Currie da86367824 update for recent changes to Object 2003-07-29 19:55:41 +00:00
Jeff Teunissen d05f17cdae Re-add -autorelease to the Object protocol. 2003-07-29 18:23:44 +00:00