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
import "ecere" | |
class HelloForm : Window | |
{ | |
caption = $"Hello Form"; | |
background = formColor; | |
borderStyle = sizable; | |
hasMaximize = true; | |
hasMinimize = true; | |
hasClose = true; |
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
from cffi import FFI | |
ffi_ec = FFI() | |
ffi_ec.cdef(open('cffi-eC.h').read()) | |
ffi_ec.set_source("_pyeC", | |
'#include "eC.h"', | |
sources=["../c/eC.c"], | |
include_dirs=["../c"], | |
libraries=["ecere"], | |
library_dirs=["C:/Program Files/Ecere SDK/bin"]) |
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
# -*- coding: utf-8 -*- | |
from pyecere import * | |
app = GuiApplication() #driver = "OpenGL") | |
printLn("Testing Variadic Functions!\n", 1, " + ", 2, " = ", 1+2) | |
printLn("Pi = ", 3.141592653589) | |
a = Array("<int>") | |
a.add(3) | |
a.add(4) | |
a.add(5) |
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
void fressMeshCPUData(Mesh mesh) | |
{ | |
delete mesh.vertices; | |
delete mesh.normals; | |
delete mesh.texCoords; | |
delete mesh.tangents; | |
delete mesh.lightVectors; | |
delete mesh.colors; | |
} |
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
[ 97%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/object.c.obj | |
C:\Program Files\Emscripten\clang\fastcomp\src\tools\llvm-c-test\object.c: In function 'llvm_object_list_sections': | |
C:\Program Files\Emscripten\clang\fastcomp\src\tools\llvm-c-test\object.c:39:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=] | |
printf("'%s': @0x%08" PRIx64 " +%" PRIu64 "\n", LLVMGetSectionName(sect), | |
^ | |
C:\Program Files\Emscripten\clang\fastcomp\src\tools\llvm-c-test\object.c:39:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=] | |
C:\Program Files\Emscripten\clang\fastcomp\src\tools\llvm-c-test\object.c: In function 'llvm_object_list_symbols': | |
C:\Program Files\Emscripten\clang\fastcomp\src\tools\llvm-c-test\object.c:75:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=] |
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
import "ecere" | |
import "slider" | |
class MyApp : GuiApplication | |
{ | |
driver = "OpenGL"; | |
}; | |
Camera camera | |
{ |
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
import "ecere" | |
import "slider" | |
class MyApp : GuiApplication | |
{ | |
driver = "OpenGL"; | |
}; | |
Camera camera | |
{ |
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
import "ecere" | |
class Unit | |
{ | |
String name; | |
public property const String name | |
{ | |
set { delete name; name = CopyString(value); } | |
get { return name; } | |
} |
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
import "ecere" | |
class Unit | |
{ | |
String name; | |
public property const String name | |
{ | |
set { delete name; name = CopyString(value); } | |
get { return name; } | |
} |
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
class App : Application | |
{ | |
void Main() | |
{ | |
bool snow = false; | |
printf("%d\n", ((snow * -2) - 10) * 3 / 4); | |
} | |
} |