-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
101 additions
and
223 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// asdf exec emcc ./wasm_test.c -s WASM=1 -s EXPORTED_FUNCTIONS="['_foo']" -sEXPORTED_RUNTIME_METHODS=ccall,cwrap -o module.js | ||
// I think it's probably best if the emscripten layer is on top of a normal c layer. | ||
// That way I can run the normal c as c locally and debug it. | ||
|
||
// I think I need to use embind to make the passing of data back and forth easier. | ||
// I suppose just having one single module makes this easier too. | ||
// Should I port the existing stuff first or should I design the new game engine from scratch | ||
// to support all the stuff I want to support? | ||
|
||
#include <emscripten.h> | ||
|
||
EMSCRIPTEN_KEEPALIVE | ||
int foo(int x) { | ||
return x+3; | ||
} | ||
|
||
// I need to figure out how to set up clion for emscripten. I don't think I'll be able to debug | ||
// though. |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
hello tazar steve | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef TAZAR_H | ||
#define TAZAR_H | ||
|
||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
|
||
#endif // TAZAR_H |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "tazar.h" | ||
|
||
#include <assert.h> | ||
|
||
int tazar_ai() { | ||
return 0; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "tazar.h" | ||
|
||
#include <assert.h> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "tazar.h" | ||
|
||
#include <assert.h> | ||
#include <stdio.h> | ||
|
||
int main() { | ||
assert(1 == 1); | ||
printf("tazar\n"); | ||
return 0; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <emscripten.h> | ||
|
||
EMSCRIPTEN_KEEPALIVE | ||
int foo(int x) { | ||
return x + 3; | ||
} | ||
|
||
#include "tazar.h" | ||
|
||
#include <assert.h> |