VirtualComputer/libpxc/pxct.c

26 lines
631 B
C
Raw Normal View History

#include <stdio.h>
2019-03-06 22:41:35 +00:00
#include <stdlib.h>
/* https://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html
gcc -Wall -c -fpic pxc.c
gcc -Wall -shared pxc.o -o pxc.so
gcc -Wall pxct.c -L. -lpxc -Wl,-rpath=.
*/
int convert(int px[], int *out[]);
2019-03-06 22:41:35 +00:00
typedef long long int addr;
void setSource(addr address, short w, short h, short mcx, short mcy);
void* updateAndGetMap(int x, int y, int w, int h, int** out_changed);
int main() {
2019-03-06 22:41:35 +00:00
printf("Setting source...");
void* p = malloc(640*480*4);
setSource((addr)p, 640, 480, 5, 4);
printf("Updating map...");
void* x=updateAndGetMap(0, 0, 640, 480, NULL);
free(p);
return 0;
}