mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Tweaked tabs-vs-spaces
This commit is contained in:
@@ -10,19 +10,19 @@ To use the drive system, first you must designate specific folders which can be
|
||||
#include "drive_system.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
//the drive system uses a LiteralDictionary, which must be initialized with this
|
||||
Toy_initDriveSystem();
|
||||
//the drive system uses a LiteralDictionary, which must be initialized with this
|
||||
Toy_initDriveSystem();
|
||||
|
||||
Toy_setDrivePath("scripts", "assets/scripts");
|
||||
Toy_setDrivePath("sprites", "assets/sprites");
|
||||
Toy_setDrivePath("fonts", "assets/fonts");
|
||||
Toy_setDrivePath("scripts", "assets/scripts");
|
||||
Toy_setDrivePath("sprites", "assets/sprites");
|
||||
Toy_setDrivePath("fonts", "assets/fonts");
|
||||
|
||||
//TODO: do you stuff here
|
||||
//TODO: do you stuff here
|
||||
|
||||
//clean up the drive dictionary when you're done
|
||||
Toy_freeDriveSystem();
|
||||
//clean up the drive dictionary when you're done
|
||||
Toy_freeDriveSystem();
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ Sometimes, native functions will receive `Toy_Literal` identifiers instead of th
|
||||
```c
|
||||
Toy_Literal foobarIdn = foobar;
|
||||
if (TOY_IS_IDENTIFIER(foobar) && Toy_parseIdentifierToValue(interpreter, &foobar)) {
|
||||
freeLiteral(foobarIdn); //remember to free the identifier
|
||||
freeLiteral(foobarIdn); //remember to free the identifier
|
||||
}
|
||||
```
|
||||
|
||||
@@ -101,7 +101,7 @@ This function sets the function called by the `print` keyword. By default, the f
|
||||
|
||||
```c
|
||||
static void printWrapper(const char* output) {
|
||||
printf("%s\n", output);
|
||||
printf("%s\n", output);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -113,7 +113,7 @@ This function sets the function called by the `assert` keyword on failure. By de
|
||||
|
||||
```c
|
||||
static void assertWrapper(const char* output) {
|
||||
fprintf(stderr, "Assertion failure: %s\n", output);
|
||||
fprintf(stderr, "Assertion failure: %s\n", output);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -123,6 +123,6 @@ This function sets the function called when an error occurs within the interpret
|
||||
|
||||
```c
|
||||
static void errorWrapper(const char* output) {
|
||||
fprintf(stderr, "%s", output); //no newline
|
||||
fprintf(stderr, "%s", output); //no newline
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user