-
-
Save anonymous/520109406c81200b96194911d2a3fa00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ACS_Zandronum.h> | |
int testFunc1(int a) | |
{ | |
return a + 10; | |
} | |
int testFunc2(int a) | |
{ | |
return a + 110; | |
} | |
[[call("ScriptS"), address("butt")]] | |
void TestScript() | |
{ | |
int rand = ACS_Random(1, 2); | |
int (*func)(int a); | |
if (rand == 1) { func = testFunc1; } | |
else { func = testFunc2; } | |
printf("ayy lmao ("); | |
printf("%f", 0.1); | |
printf(")\n"); | |
ACS_BeginPrint(); | |
int x = ACS_Random(1, 10); | |
__nprintf("rand -> %d; func(%d) -> %d", rand, x, func(x)); | |
__nprintf("\ndouble testing"); | |
__nprintf("\n%%e: %e", 0.1f); | |
__nprintf("\n%%f: %f", 0.1f); | |
__nprintf("\n%%g: %g", 0.1f); | |
ACS_EndPrint(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment