Compare commits

..

No commits in common. "b17e5d3917888f94c098fbd3d0b58f3d7b7eed8a" and "79c06098b3888b177f92f3b8ae92dbe9c2745da1" have entirely different histories.

7 changed files with 11 additions and 41 deletions

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>Prosperon</string>
<key>CFBundleIdentifier</key>
<string>pockle.world.prosperon</string>
<key>CFBundleName</key>
<string>Prosperon</string>
<key>CFBundleVersion</key>
<string>0.5</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2024 Pockle World. All rights reserved.</string>
</dict>
</plist>

View file

@ -173,7 +173,6 @@ SHADERS := $(patsubst %.sglsl, %.sglsl.h, $(SHADERS))
DESTDIR ?= ~/.bin DESTDIR ?= ~/.bin
install: $(NAME) install: $(NAME)
@echo Copying to destination
cp -f $(NAME) $(DESTDIR)/$(APP) cp -f $(NAME) $(DESTDIR)/$(APP)
$(NAME): libengine$(INFO).a libquickjs$(INFO).a $(DEPS) $(NAME): libengine$(INFO).a libquickjs$(INFO).a $(DEPS)
@ -181,15 +180,14 @@ $(NAME): libengine$(INFO).a libquickjs$(INFO).a $(DEPS)
$(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@ $(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@
@echo Finished build @echo Finished build
libengine$(INFO).a: $(OBJS) libengine$(INFO).a: $(OBJS)
@echo Archiving $@
$(AR) rcs $@ $(OBJS) $(AR) rcs $@ $(OBJS)
QUICKJS := source/engine/thirdparty/quickjs QUICKJS := source/engine/thirdparty/quickjs
libquickjs$(INFO).a: $(QUICKJS)/libregexp$(INFO).o $(QUICKJS)/quickjs$(INFO).o $(QUICKJS)/libunicode$(INFO).o $(QUICKJS)/cutils$(INFO).o $(QUICKJS)/libbf$(INFO).o libquickjs$(INFO).a: $(QUICKJS)/libregexp$(INFO).o $(QUICKJS)/quickjs$(INFO).o $(QUICKJS)/libunicode$(INFO).o $(QUICKJS)/cutils$(INFO).o $(QUICKJS)/libbf$(INFO).o
$(AR) rcs $@ $^ $(AR) rcs $@ $^
%$(INFO).o: %.c $(SHADERS) %$(INFO).o: %.c $(SHADERS) source/engine/core.cdb.h
@echo Making C object $@ @echo Making C object $@
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
@ -208,10 +206,6 @@ shaders: $(SHADERS)
@echo Creating shader $^ @echo Creating shader $^
./sokol-shdc --ifdef -i $^ --slang=glsl330:hlsl5:metal_macos:metal_ios:metal_sim:glsl300es -o $@ ./sokol-shdc --ifdef -i $^ --slang=glsl330:hlsl5:metal_macos:metal_ios:metal_sim:glsl300es -o $@
SCRIPTS := $(shell ls scripts/*.js*)
CORE != (ls icons/* fonts/*)
CORE := $(CORE) $(SCRIPTS)
CDB = source/engine/thirdparty/tinycdb CDB = source/engine/thirdparty/tinycdb
CDB_C != find $(CDB) -name *.c CDB_C != find $(CDB) -name *.c
CDB_O := $(patsubst %.c, %.o, $(CDB_C)) CDB_O := $(patsubst %.c, %.o, $(CDB_C))
@ -229,15 +223,19 @@ packer: tools/packer.c tools/libcdb.a
cc $^ -I$(CDB) -o packer cc $^ -I$(CDB) -o packer
core.cdb: packer $(CORE) core.cdb: packer $(CORE)
@echo Packing core.cdb
./packer $(CORE) ./packer $(CORE)
chmod 644 out.cdb chmod 644 out.cdb
mv out.cdb core.cdb mv out.cdb core.cdb
source/engine/core.cdb.h: core.cdb source/engine/core.cdb.h: core.cdb
@echo Making $@ @echo Packing core.cdb.h
xxd -i $< > $@ xxd -i $< > $@
SCRIPTS := $(shell ls scripts/*.js*)
SCRIPT_O := $(addsuffix o, $(SCRIPTS))
CORE != (ls icons/* fonts/*)
CORE := $(CORE) $(SCRIPTS)
jsc: tools/jso.c tools/libquickjs.a jsc: tools/jso.c tools/libquickjs.a
$(CC) $^ -lm -Iquickjs -o $@ $(CC) $^ -lm -Iquickjs -o $@

View file

@ -37,7 +37,7 @@ qq = 'ms';
} }
Object.assign(console, { Object.assign(console, {
say(msg) { console.print(msg + "\n"); }, say(msg) { console.print(msg + "\n"); },
pprint(msg, lvl = 0) { pprint(msg, lvl = 0) {
if (typeof msg === 'object') if (typeof msg === 'object')

View file

@ -37,13 +37,6 @@ os.prefpath = function() {
return otherpath[os.sys()] + "/" + (game.title ? game.title : "Untitled Prosperon Game"); return otherpath[os.sys()] + "/" + (game.title ? game.title : "Untitled Prosperon Game");
} }
os.openurl = function(url) {
if (os.sys() === 'windows')
os.system(`start ${url}`);
else
os.system(`open ${url}`);
}
var projectfile = ".prosperon/project.json"; var projectfile = ".prosperon/project.json";
Resources.is_sound = function(path) { Resources.is_sound = function(path) {

View file

@ -45,7 +45,7 @@ struct gameobject {
struct shape_cb *shape_cbs; struct shape_cb *shape_cbs;
JSValue ref; JSValue ref;
HMM_Mat4 world; HMM_Mat4 world;
float drawlayer; float drawlayer;
}; };
/* /*

View file

@ -809,16 +809,11 @@ JSC_SCALL(os_make_texture,
JS_SetPropertyStr(js, ret, "path", JS_DupValue(js,argv[0])); JS_SetPropertyStr(js, ret, "path", JS_DupValue(js,argv[0]));
) )
JSC_SCALL(os_system,
system(str);
)
static const JSCFunctionListEntry js_os_funcs[] = { static const JSCFunctionListEntry js_os_funcs[] = {
MIST_FUNC_DEF(os,sprite,1), MIST_FUNC_DEF(os,sprite,1),
MIST_FUNC_DEF(os, cwd, 0), MIST_FUNC_DEF(os, cwd, 0),
MIST_FUNC_DEF(os, env, 1), MIST_FUNC_DEF(os, env, 1),
MIST_FUNC_DEF(os, sys, 0), MIST_FUNC_DEF(os, sys, 0),
MIST_FUNC_DEF(os, system, 1),
MIST_FUNC_DEF(os, quit, 0), MIST_FUNC_DEF(os, quit, 0),
MIST_FUNC_DEF(os, reindex_static, 0), MIST_FUNC_DEF(os, reindex_static, 0),
MIST_FUNC_DEF(os, gc, 0), MIST_FUNC_DEF(os, gc, 0),

View file

@ -3,7 +3,7 @@
#include "sokol/sokol_gfx.h" #include "sokol/sokol_gfx.h"
#include "HandmadeMath.h" #include "HandmadeMath.h"
#include "render.h" #include "render.h"
#define TEX_SPEC 0 #define TEX_SPEC 0
#define TEX_NORM 1 #define TEX_NORM 1