Compare commits

..

59 commits

Author SHA1 Message Date
John Alanbrook e1bfdecc42 add wraps 2024-10-29 17:46:08 -05:00
John Alanbrook c8b097febb use mseon 2024-10-29 12:41:48 -05:00
John Alanbrook 7c324c1b33 massive refactor 2024-10-29 12:41:17 -05:00
John Alanbrook c89f28dcec enet 2024-10-20 08:28:13 -05:00
John Alanbrook db0c0cbc7a fix layout and 9slice bug 2024-10-19 23:25:07 -05:00
John Alanbrook 90eba900e3 zip side load; 9 slice working 2024-10-19 18:37:27 -05:00
John Alanbrook f823e6b839 string ref animation 2024-10-19 05:34:08 -05:00
John Alanbrook 27d7c5ab02 add aseprite support 2024-10-18 12:51:21 -05:00
John Alanbrook 12bb5e084a images use proper rect 2024-10-17 22:59:59 -05:00
John Alanbrook 151891f50f move where layout is loaded 2024-10-17 17:25:03 -05:00
John Alanbrook 83a19eec27 layout 2024-10-17 17:23:33 -05:00
John Alanbrook f1b2984f61 font string pulling 2024-10-16 07:53:05 -05:00
John Alanbrook 14deabf2dd no more mum 2024-10-15 17:15:50 -05:00
John Alanbrook 91ffcf998b remove clay 2024-10-15 09:09:07 -05:00
John Alanbrook b92220713f add layout.h 2024-10-15 07:55:49 -05:00
John Alanbrook 2a1a5231aa clay 2024-10-14 20:07:32 -05:00
John Alanbrook 7f6996d93f clay layout 2024-10-13 19:44:28 -05:00
John Alanbrook 39511e0d3b Fix audio; save qoa and wav; separate out idea of pcm and playable sound 2024-10-08 02:46:59 -05:00
John Alanbrook 8465fb53f7 ld56 updates 2024-10-06 17:18:18 -05:00
John Alanbrook f928f3e8a2 automatically use spritesheets 2024-10-05 08:43:51 -05:00
John Alanbrook a8ce3106e1 modify mum 2024-10-04 12:47:50 -05:00
John Alanbrook 179e883d0e scriptable rendering pipeline 2024-10-04 00:45:44 -05:00
John Alanbrook 0ffef3b602 fill mask 2024-10-03 23:35:40 -05:00
John Alanbrook 45bc8a8bb4 cleanup render path 2024-10-03 17:36:29 -05:00
John Alanbrook 26b42a6747 more sg javascript options 2024-10-03 09:31:06 -05:00
John Alanbrook 5eac1d03e9 fix wasm build; add sharpen shader; add masking 2024-10-02 20:14:45 -05:00
John Alanbrook 5149b9986f fix transform rotate 2024-10-02 12:16:34 -05:00
John Alanbrook a540e14cae scaling done correctly for integer rendering 2024-10-02 11:56:33 -05:00
John Alanbrook fa824aec3a unify frame, report, cache in profiler 2024-10-02 09:55:32 -05:00
John Alanbrook ca6c21ebb8 add saving and loading qoi 2024-10-01 18:10:52 -05:00
John Alanbrook dbaf482385 fix texture functions, add to ffi 2024-10-01 17:57:05 -05:00
John Alanbrook 9e6462bff4 improved texture handling; noise functions 2024-10-01 16:50:06 -05:00
John Alanbrook cbd66e5304 fix actor destruction. add rect pack function 2024-10-01 08:06:08 -05:00
John Alanbrook 93cda3848b add imgui clipboard 2024-09-30 19:00:09 -05:00
John Alanbrook 6456590492 faster particles; imgui ini 2024-09-30 13:06:31 -05:00
John Alanbrook 3717e84fe7 particle render speedup 2024-09-30 11:26:56 -05:00
John Alanbrook b3b3aa9803 timers are better 2024-09-30 10:14:56 -05:00
John Alanbrook a476562a9e C timers 2024-09-30 04:36:53 -05:00
John Alanbrook 6b94349a64 fix rendering 2024-09-29 06:10:42 -05:00
John Alanbrook 9bbe880466 timers 2024-09-27 14:30:15 -05:00
John Alanbrook f47be2d30c sprite render faster 2024-09-27 10:19:05 -05:00
John Alanbrook 4756955c1a sprites are now presorted 2024-09-26 23:12:30 -05:00
John Alanbrook 6f9137746a add some lodash 2024-09-26 19:28:54 -05:00
John Alanbrook f35c77c4a9 fix makefile; prettify javascript 2024-09-26 11:36:09 -05:00
John Alanbrook f95249f147 rename to only use js instead of jso 2024-09-25 20:51:20 -05:00
John Alanbrook 1e4a142030 fix macos compile errors 2024-09-25 15:27:26 -05:00
John Alanbrook dad588639e extend profiler 2024-09-25 12:46:59 -05:00
John Alanbrook ad1bcd45c7 add tracking of garbage collections 2024-09-24 17:07:32 -05:00
John Alanbrook 0666f4d949 massively add plotting functions 2024-09-24 14:12:59 -05:00
John Alanbrook d62a1ca0db add profiling code 2024-09-23 18:17:46 -05:00
John Alanbrook af6824e6db add render 2024-09-22 23:10:36 -05:00
John Alanbrook f82c54d3b2 add profiler timeout 2024-09-22 10:45:31 -05:00
John Alanbrook bcad975c71 add more icons 2024-09-21 23:48:40 -05:00
John Alanbrook 76036b30b5 add many useful icons 2024-09-21 01:24:21 -05:00
John Alanbrook b77281b311 fix sound deletion and unplugging 2024-09-15 17:49:35 -05:00
John Alanbrook 00fa902e1f add support for imgui textures 2024-09-15 12:22:45 -05:00
John Alanbrook 2e1c2608b1 Merge branch 'master' into working 2024-09-15 00:13:59 -05:00
John Alanbrook e7a3a8597b remove object map function 2024-09-15 00:13:49 -05:00
John Alanbrook 52b72931fc fix neo sequencer missing ref 2024-09-14 22:24:25 -05:00
477 changed files with 10582 additions and 99900 deletions

View file

@ -1,217 +1,9 @@
--- BasedOnStyle: GNU
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Right
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RequiresClausePosition: OwnLine
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
IndentWidth: 2 IndentWidth: 2
... TabWidth: 2
UseTab: Never
ContinuationIndentWidth: 2 # Indents continuation lines by 2 spaces
AllowShortFunctionsOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Attach

4
.prettierignore Normal file
View file

@ -0,0 +1,4 @@
**/*.html
**/*.json
**/*.css
**/*.md

21
.prettierrc Normal file
View file

@ -0,0 +1,21 @@
{
"arrowParens": "avoid",
"bracketSameLine": false,
"bracketSpacing": true,
"semi": true,
"experimentalTernaries": false,
"singleQuote": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"trailingComma": "all",
"singleAttributePerLine": false,
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"proseWrap": "preserve",
"insertPragma": false,
"printWidth": 1000,
"requirePragma": false,
"tabWidth": 2,
"useTabs": false,
"embeddedLanguageFormatting": "auto"
}

303
Makefile
View file

@ -1,296 +1,13 @@
PROCS != nproc --all debug: FORCE
MAKEFLAGS = -j $(PROCS) meson setup build_dbg -Dbuildtype=debugoptimized
UNAME != uname meson compile -C build_dbg
MAKEDIR != pwd
# Options
# NDEBUG --- build with debugging symbols and logging
ifeq ($(ARCH),) release: FORCE
ARCH != uname -m meson setup -Dbuildtype=release -Db_lto=true -Db_lto_threads=4 -Db_ndebug=true -Db_pgo=use build_release
endif meson compile -C build_release
CXX:=$(CC) sanitize: FORCE
meson setup -Db_sanitize=address -Db_sanitize=memory -Db_sanitize=leak -Db_sanitize=undefined build_sani
meson compile -C build_sani
OPT ?= 0 FORCE:
LD = $(CC)
STEAM = steam/sdk
STEAMAPI =
LDFLAGS += -lstdc++
ifeq ($(CROSS)$(CC), emcc)
LDFLAGS += --shell-file shell.html --closure 1
CPPFLAGS += -Wbad-function-cast -Wcast-function-type -sSTACK_SIZE=1MB -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=128MB
NDEBUG = 1
ARCH:= wasm
endif
ifdef NEDITOR
CPPFLAGS += -DNO_EDITOR
endif
ifdef NFLAC
CPPFLAGS += -DNFLAC
endif
ifdef NMP3
CPPFLAGS += -DNMP3
endif
ifdef NSVG
CPPFLAGS += -DNSVG
endif
ifdef NQOA
CPPFLAGS += -DNQOA
endif
ifdef NDEBUG
CPPFLAGS += -DNDEBUG
else
CPPFLAGS += -g -DDUMP
INFO :=$(INFO)_dbg
endif
ifdef NSTEAM
CPPFLAGS += -DNSTEAM
endif
ifdef LEAK
CPPFLAGS += -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -DLEAK
INFO := $(INFO)_leak
endif
ifeq ($(OPT),small)
CPPFLAGS += -Os -flto -fno-ident -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections
LDFLAGS += -flto
INFO :=$(INFO)_small
else ifeq ($(OPT), 1)
CPPFLAGS += -O3 -flto
INFO :=$(INFO)_opt
else
CPPFLAGS += -O2
endif
CPPFLAGS += -DHAVE_CEIL -DCP_USE_CGTYPES=0 -DCP_USE_DOUBLES=0 -DHAVE_FLOOR -DHAVE_FMOD -DHAVE_LRINT -DHAVE_LRINTF $(includeflag) $(WARNING_FLAGS) -I. -DVER=\"$(SEM)\" -DCOM=\"$(COM)\" -DDATE=\"$(DATE)\" -DINFO=\"$(INFO)\" -Wno-narrowing #-DENABLE_SINC_MEDIUM_CONVERTER -DENABLE_SINC_FAST_CONVERTER -DCP_COLLISION_TYPE_TYPE=uintptr_t -DCP_BITMASK_TYPE=uintptr_t
CPPFLAGS += -DCONFIG_VERSION=\"2024-02-14\" -DCONFIG_BIGNUM #for quickjs
# ENABLE_SINC_[BEST|FAST|MEDIUM]_CONVERTER
# default, fast and medium available in game at runtime; best available in editor
INFO := $(INFO)_$(ARCH)
ifeq ($(OS), Windows_NT) # then WINDOWS
PLATFORM := win64
DEPS += resource.o
STEAMAPI := steam_api64
LDFLAGS += -mwin32 -static
CPPFLAGS += -mwin32
LDLIBS += mingw32 kernel32 d3d11 user32 shell32 dxgi gdi32 ws2_32 ole32 winmm setupapi m pthread
INFO :=$(INFO)_win
EXT = .exe
else ifeq ($(OS), IOS)
CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
SDK = iphoneos
SDK_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/$(SDK).platform/Developer/SDKs/$(SDK).sdk
CFLAGS += -isysroot $(SDK_PATH) -miphoneos-version-min=13.0
LDFLAGS += -isysroot $(SDK_PATH) -miphoneos-version-min=13.0
LDFLAGS += -framework Foundation -framework UIKit -framework AudioToolbox -framework Metal -framework MetalKit -framework AVFoundation
CXXFLAGS += -std=c++11
CFLAGS += -x objective-c -DIOS
INFO :=$(INFO)_ios
else ifeq ($(OS), wasm) # Then WEB
OS := Web
LDFLAGS += -sUSE_WEBGPU
CPPFLAGS += -DNSTEAM
LDLIBS += GL openal c m dl
STEAMAPI :=
EXT = .html
else
UNAME != uname -s
ifeq ($(UNAME), Linux) # then LINUX
OS := Linux
PLATFORM := linux64
LDFLAGS += -pthread -rdynamic
LDLIBS += pthread c m dl X11 Xi Xcursor EGL asound GL
INFO :=$(INFO)_linux
STEAMAPI := steam_api
endif
ifeq ($(UNAME), Darwin)
OS := macos
PLATFORM := osx
CPPFLAGS += -arch $(ARCH)
CFLAGS += -x objective-c
CXXFLAGS += -std=c++11
LDFLAGS += -framework Cocoa -framework QuartzCore -framework AudioToolbox -framework Metal -framework MetalKit
INFO :=$(INFO)_macos
STEAMAPI := steam_api
endif
endif
ifdef NSTEAM
STEAMAPI =
endif
# All other sources
OBJS != find source -type f -name '*.c' | grep -vE 'test|tool|example|fuzz|main' | grep -vE 'quickjs'
CPPOBJS != find source -type f -name '*.cpp' | grep -vE 'test|tool|example|fuzz|main'
OBJS += $(CPPOBJS)
OBJS += source/engine/yugine.c
OBJS += $(shell find source/engine -type f -name '*.m')
QUICKJS := source/engine/thirdparty/quickjs
OBJS += $(addprefix $(QUICKJS)/, libregexp.c quickjs.c libunicode.c cutils.c libbf.c)
OBJS := $(patsubst %.cpp, %$(INFO).o, $(OBJS))
OBJS := $(patsubst %.c, %$(INFO).o,$(OBJS))
OBJS := $(patsubst %.m, %$(INFO).o, $(OBJS))
engineincs != find source/engine -maxdepth 1 -type d
includeflag != find source -type d -name include
includeflag += $(engineincs) source/engine/thirdparty/sokol source/engine/thirdparty/stb source/engine/thirdparty/cgltf source/engine/thirdparty/TinySoundFont source/engine/thirdparty/dr_libs source/engine/thirdparty/imgui
includeflag += $(STEAM)/public
includeflag += source
includeflag := $(addprefix -I, $(includeflag))
WARNING_FLAGS = -Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types
# For vanilla compilation, remove _
ifeq ($(INFO),_)
INFO :=
endif
APP = prosperon
NAME = $(APP)$(INFO)$(EXT)
SEM != git describe --tags --abbrev=0
COM != git rev-parse --short HEAD
DATE != date +%s
LDLIBS += $(STEAMAPI)
LDLIBS := $(addprefix -l, $(LDLIBS))
LDPATHS := $(STEAM)/redistributable_bin/$(PLATFORM)
LDPATHS := $(addprefix -L, $(LDPATHS))
DEPENDS = $(OBJS:.o=.d)
ifndef VERBOSE
.SILENT:
endif
DEPFLAGS = -MT $(@:.d=.o) -MM -MG $< -o $@
%$(INFO).d: %.c
@echo Making deps $@
$(CROSS)$(CC) $(CPPFLAGS) $(DEPFLAGS)
%$(INFO).d: %.cpp
@echo Making deps $@
$(CROSS)$(CXX) $(CPPFLAGS) $(DEPFLAGS)
%$(INFO).d: %.m
@echo Making deps $@
$(CROSS)$(CC) $(CPPFLAGS) $(DEPFLAGS)
ifneq ($(MAKECMDGOALS), clean)
include $(DEPENDS)
endif
.DEFAULT_GOAL := all
all: $(NAME)
cp -f $(NAME) $(APP)$(EXT)
$(APP): $(NAME)
cp -f $(NAME) $(APP)
$(NAME): $(OBJS) $(DEPS)
@echo Linking $(NAME)
$(CROSS)$(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@
@echo Finished build
%$(INFO).o: %.c
@echo Making C object $@
$(CROSS)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
%$(INFO).o: %.cpp
@echo Making C++ object $@
$(CROSS)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fpermissive -c $< -o $@
%$(INFO).o: %.m
@echo Making Objective-C object $@
$(CROSS)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
CORE != (ls icons/* fonts/* shaders/*.cg scripts/*.js*)
packer: tools/packer.c source/engine/miniz.c
@echo Making packer
$(CC) -O2 $^ -Isource/engine -o packer
core.cdb: packer $(CORE)
@echo Packing core.cdb
./packer $@ $(CORE)
core.cdb.h: core.cdb
@echo Making $@
xxd -i $< > $@
ICNSIZE = 16 32 128 256 512 1024
ICNNAME := $(addsuffix .png, $(ICNSIZE))
ICON = icons/moon.gif
icon.ico: $(ICON)
for i in $(ICNSIZE); do convert $^ -thumbnail $${i}x$${i} $${i}.png; done
convert $(ICNNAME) icon.ico
rm $(ICNNAME)
resource.o: resource.rc resource.manifest icon.ico
$(CROSS)windres -i $< -o $@
crossios:
make OS=IOS ARCH=arm64 DEBUG=$(DEBUG) OPT=$(OPT)
Prosperon.icns: $(ICON)
mkdir -p Prosperon.iconset
for i in $(ICNSIZE); do magick $^ -size $${i}x$${i} Prosperon.iconset/icon_$${i}x$${i}.png; done
iconutil -c icns Prosperon.iconset
crossmac: Prosperon.icns
make ARCH=arm64 DEBUG=$(DEBUG) OPT=$(OPT)
mv $(APP) mac_arm64
make ARCH=x86_64 DEBUG=$(DEBUG) OPT=$(OPT)
mv $(APP) mac_x86_64
lipo mac_arm64 mac_x86_64 -create -output $(APP)_mac
rm mac_arm64 mac_x86_64
rm -rf Prosperon.app
mkdir Prosperon.app
mkdir Prosperon.app/Contents
mkdir Prosperon.app/Contents/MacOS
mkdir Prosperon.app/Contents/Resources
mv $(NAME) Prosperon.app/Contents/MacOS/Prosperon
cp Info.plist Prosperon.app/Contents
cp Prosperon.icns Prosperon.app/Contents/Resources
crosswin:
make CROSS=x86_64-w64-mingw32- OS=Windows_NT CC=gcc
crossweb:
make CC=emcc OS=wasm
mv $(APP).html index.html
clean:
@echo Cleaning project
rm -f core.cdb jso cdb packer TAGS source/engine/core.cdb.h tools/libcdb.a $(APP)* *.icns *.ico
find . -type f -name "*.[oad]" -delete
rm -rf Prosperon.app
docs: doc/prosperon.org
make -C doc
mv doc/html .
api: $(APP)
./prosperon run 'for (var i in globalThis) say(i)' | xargs -I {} ./prosperon api {} > docs/api/{}.md
TAGINC != find . -name "*.[chj]"
tags: $(TAGINC)
@echo Making tags.
@etags $(TAGINC)

View file

@ -2,6 +2,12 @@
The easily moddable, programming minded, 2D-first game engine. The aim is to make the fastest way to make games. The easily moddable, programming minded, 2D-first game engine. The aim is to make the fastest way to make games.
See the [documentation](doc/prosperon.org) for more information, including how to compile. Using ...
* Sokol for rendering
* Chipmunk2D for physics
* imgui for easy editor UI
* Clay for game UI
Includes an implementation for Nota, and Kim.
*Prosperon is useful, but is a work in progress. Breaking changes are frequent.* *Prosperon is useful, but is a work in progress. Breaking changes are frequent.*

View file

@ -1,173 +0,0 @@
# Mum
#### padding
**array**
[
0,
0
]
#### offset
**array**
[
0,
0
]
#### font
**string**
#### selectable
**boolean**
#### selected
**boolean**
#### font_size
**number**
#### text_align
**string**
#### scale
**number**
#### angle
**number**
#### anchor
**array**
[
0,
1
]
#### hovered
**object**
#### text_shadow
**object**
#### text_outline
**number**
#### color
**array**
[
1,
1,
1,
1
]
#### margin
**array**
[
0,
0
]
#### width
**number**
#### height
**number**
#### max_width
**number**
#### max_height
**number**
#### image_repeat
**boolean**
#### image_repeat_offset
**array**
[
0,
0
]
#### debug
**boolean**
#### make(def)
#### prestart()
#### start()
#### extend(def)
#### text(def)
#### button(def)
#### window(def)
#### image(def)
#### column(def)
#### debug_colors
**object**

View file

@ -1,15 +0,0 @@
# Tween
#### default
**object**
#### start(obj, target, tvals, options)
#### make(obj, target, tvals, options)

3
globcore.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
ls icons/* fonts/* shaders/*.cg scripts/*.js*

BIN
icons/airplane.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
icons/ak47.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
icons/amputation.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
icons/ant.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/archer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
icons/armadillo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/atom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
icons/banana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/bank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
icons/banknote.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
icons/barn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
icons/barrel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/basket.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
icons/bat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
icons/bed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
icons/belt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
icons/boar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
icons/broom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
icons/cabin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
icons/card-10-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
icons/card-10-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/card-10-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
icons/card-10-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
icons/card-2-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-2-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
icons/card-2-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
icons/card-2-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-3-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
icons/card-3-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-3-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-3-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
icons/card-4-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
icons/card-4-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
icons/card-4-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
icons/card-4-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
icons/card-5-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
icons/card-5-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-5-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-5-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
icons/card-6-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/card-6-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icons/card-6-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icons/card-6-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/card-7-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
icons/card-7-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

BIN
icons/card-7-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

BIN
icons/card-7-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
icons/card-8-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
icons/card-8-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icons/card-8-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icons/card-8-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
icons/card-9-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/card-9-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

BIN
icons/card-9-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icons/card-9-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
icons/card-ace-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-ace-diamonds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
icons/card-ace-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
icons/card-ace-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
icons/card-discard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
icons/card-draw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
icons/card-jack-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
icons/card-jack-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
icons/card-jack-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
icons/card-joker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/card-king-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
icons/card-king-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
icons/card-king-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
icons/card-pick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/card-queen-clubs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
icons/card-queen-hearts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
icons/card-queen-spades.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
icons/card-random.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/chess-bishop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

BIN
icons/chess-king.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
icons/chess-knight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
icons/chess-pawn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
icons/chess-queen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
icons/chess-rook.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,018 B

BIN
icons/chicken.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/clarinet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icons/cloak.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
icons/clown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
icons/coins.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
icons/compass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/cow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
icons/crossed-swords.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
icons/deer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
icons/dice.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Some files were not shown because too many files have changed in this diff Show more