diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index 204986da727ac..14c203e0f3baf 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -1,3 +1,7 @@ +// We are implementing the Relooper C API, so always export from this file. +#ifndef RELOOPERDLL_EXPORTS +#define RELOOPERDLL_EXPORTS +#endif #include "Relooper.h" @@ -1269,7 +1273,7 @@ VoidIntMap __blockDebugMap__; // maps block pointers in currently running code t extern "C" { -void rl_set_output_buffer(char *buffer, int size) { +RELOOPERDLL_API void rl_set_output_buffer(char *buffer, int size) { #if DEBUG printf("#include \"Relooper.h\"\n"); printf("int main() {\n"); @@ -1279,15 +1283,15 @@ void rl_set_output_buffer(char *buffer, int size) { Relooper::SetOutputBuffer(buffer, size); } -void rl_make_output_buffer(int size) { +RELOOPERDLL_API void rl_make_output_buffer(int size) { Relooper::SetOutputBuffer((char*)malloc(size), size); } -void rl_set_asm_js_mode(int on) { +RELOOPERDLL_API void rl_set_asm_js_mode(int on) { Relooper::SetAsmJSMode(on); } -void *rl_new_block(const char *text, const char *branch_var) { +RELOOPERDLL_API void *rl_new_block(const char *text, const char *branch_var) { Block *ret = new Block(text, branch_var); #if DEBUG printf(" void *b%d = rl_new_block(\"// code %d\");\n", ret->Id, ret->Id); @@ -1297,21 +1301,21 @@ void *rl_new_block(const char *text, const char *branch_var) { return ret; } -void rl_delete_block(void *block) { +RELOOPERDLL_API void rl_delete_block(void *block) { #if DEBUG printf(" rl_delete_block(block_map[%d]);\n", ((Block*)block)->Id); #endif delete (Block*)block; } -void rl_block_add_branch_to(void *from, void *to, const char *condition, const char *code) { +RELOOPERDLL_API void rl_block_add_branch_to(void *from, void *to, const char *condition, const char *code) { #if DEBUG printf(" rl_block_add_branch_to(block_map[%d], block_map[%d], %s%s%s, %s%s%s);\n", ((Block*)from)->Id, ((Block*)to)->Id, condition ? "\"" : "", condition ? condition : "NULL", condition ? "\"" : "", code ? "\"" : "", code ? code : "NULL", code ? "\"" : ""); #endif ((Block*)from)->AddBranchTo((Block*)to, condition, code); } -void *rl_new_relooper() { +RELOOPERDLL_API void *rl_new_relooper() { #if DEBUG printf(" void *block_map[10000];\n"); printf(" void *rl = rl_new_relooper();\n"); @@ -1319,18 +1323,18 @@ void *rl_new_relooper() { return new Relooper; } -void rl_delete_relooper(void *relooper) { +RELOOPERDLL_API void rl_delete_relooper(void *relooper) { delete (Relooper*)relooper; } -void rl_relooper_add_block(void *relooper, void *block) { +RELOOPERDLL_API void rl_relooper_add_block(void *relooper, void *block) { #if DEBUG printf(" rl_relooper_add_block(rl, block_map[%d]);\n", ((Block*)block)->Id); #endif ((Relooper*)relooper)->AddBlock((Block*)block); } -void rl_relooper_calculate(void *relooper, void *entry) { +RELOOPERDLL_API void rl_relooper_calculate(void *relooper, void *entry) { #if DEBUG printf(" rl_relooper_calculate(rl, block_map[%d]);\n", ((Block*)entry)->Id); printf(" rl_relooper_render(rl);\n"); @@ -1342,7 +1346,7 @@ void rl_relooper_calculate(void *relooper, void *entry) { ((Relooper*)relooper)->Calculate((Block*)entry); } -void rl_relooper_render(void *relooper) { +RELOOPERDLL_API void rl_relooper_render(void *relooper) { ((Relooper*)relooper)->Render(); } diff --git a/src/shell.html b/src/shell.html index efb9e91db9a9f..7a3a8d08c4a29 100644 --- a/src/shell.html +++ b/src/shell.html @@ -11,10 +11,44 @@ div.emscripten_border { border: 1px solid black; } /* the canvas *must not* have any border or padding, or mouse coords will be wrong */ canvas.emscripten { border: 0px none; } + + .spinner { + height: 50px; + width: 50px; + margin: 0px auto; + -webkit-animation: rotation .8s linear infinite; + -moz-animation: rotation .8s linear infinite; + -o-animation: rotation .8s linear infinite; + animation: rotation 0.8s linear infinite; + border-left: 10px solid rgb(0,150,240); + border-right: 10px solid rgb(0,150,240); + border-bottom: 10px solid rgb(0,150,240); + border-top: 10px solid rgb(100,0,200); + border-radius: 100%; + background-color: rgb(200,100,250); + } + @-webkit-keyframes rotation { + from {-webkit-transform: rotate(0deg);} + to {-webkit-transform: rotate(360deg);} + } + @-moz-keyframes rotation { + from {-moz-transform: rotate(0deg);} + to {-moz-transform: rotate(360deg);} + } + @-o-keyframes rotation { + from {-o-transform: rotate(0deg);} + to {-o-transform: rotate(360deg);} + } + @keyframes rotation { + from {transform: rotate(0deg);} + to {transform: rotate(360deg);} + } +