mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
Updates to the Ruamoko manual, still very much in progress.
This commit is contained in:
parent
03505e80d1
commit
5b79b7512a
5 changed files with 1341 additions and 194 deletions
8
tools/qfcc/doc/hello.r
Normal file
8
tools/qfcc/doc/hello.r
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <qwaq/globals.rh>
|
||||
#include <qwaq/fields.rh>
|
||||
#include <qwaq/builtins.rh>
|
||||
|
||||
void () main =
|
||||
{
|
||||
printf ("Hello, world!\n");
|
||||
};
|
10
tools/qfcc/doc/hello2.r
Normal file
10
tools/qfcc/doc/hello2.r
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <qwaq/globals.rh>
|
||||
#include <qwaq/fields.rh>
|
||||
#include <qwaq/builtins.rh>
|
||||
|
||||
void () main =
|
||||
{
|
||||
printf ("Hello, ");
|
||||
printf ("world!");
|
||||
printf ("\n");
|
||||
};
|
10
tools/qfcc/doc/qfcc-output.txt
Normal file
10
tools/qfcc/doc/qfcc-output.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
208 strofs
|
||||
4 statements
|
||||
14 functions
|
||||
30 globaldefs
|
||||
0 locals size ((null))
|
||||
8 fielddefs
|
||||
52 pr_globals
|
||||
6 entityfields
|
||||
1316 TOTAL SIZE
|
||||
Compilation time: 0.0365 seconds.
|
File diff suppressed because it is too large
Load diff
23
tools/qfcc/doc/radians.r
Normal file
23
tools/qfcc/doc/radians.r
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include <qwaq/globals.rh>
|
||||
#include <qwaq/fields.rh>
|
||||
#include <qwaq/builtins.rh>
|
||||
|
||||
#define PI 3.14159265358973
|
||||
|
||||
/* Print a silly conversion table between degrees and radians */
|
||||
void () main =
|
||||
{
|
||||
float degrees, radians;
|
||||
integer lower, upper, step;
|
||||
|
||||
lower = 0; // lower limit
|
||||
upper = 360; // upper limit
|
||||
step = 45; // step size
|
||||
|
||||
degrees = lower;
|
||||
while (degrees <= upper) {
|
||||
radians = degrees * (PI / 180);
|
||||
printf ("%f\t%f\n", degrees, radians);
|
||||
degrees = degrees + step;
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue