-
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
19 changed files
with
29,797 additions
and
14 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
INCS := -I./src/ -I./src/libs | ||
FLAGS := -Og -fsanitize=address | ||
FLAGS := -O2 | ||
LFLAGS := -g | ||
|
||
all: pixelbox | ||
|
||
# generate asset archive :D | ||
./src/archive-generated.c : ./tools/archiver | ||
./tools/archiver assets/* > ./src/archive-generated.c |
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
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 |
---|---|---|
@@ -1,13 +1,30 @@ | ||
# Pixelbox | ||
my last attempt to create pixelbox. | ||
This time it MUST be simple and pretty fast. | ||
|
||
*Luajit FFI turns into mess when you trying to use small integers. | ||
Now we are in PURE C, no dynamic languages.* | ||
~~Do you want modification/plugin? Edit source and compile it! Easy!~~ | ||
Pixelbox is an unlimited falling-sand sandbox game. | ||
Still in alpha development. | ||
|
||
# Controls | ||
- Left Mouse Button - Hold and move to move your camera. | ||
- Right Mouse button - Hold and move to draw pixels | ||
- WASD for precise camera movement | ||
|
||
# Special world names | ||
- `:null:` - no database is created, all your changsw will lost when chunks will be unloaded (*used in development, for testing*) | ||
- `:memory:` - In memory database is created, all your changes will lost when you exit the world. | ||
- `any other name` - database file is created, all changes are saved on the disk. | ||
|
||
**WARNING:** database is working with `pragma journal_mode=MEMORY`, so it's unsafe to teminate program using task manager or due to system shutdown. Power loss is in effect too. Make sure to properly exit your worlds to minimize risk of the database corruption. | ||
In beta versions it's planned to add automatic world backups, now you may want to do it manually. | ||
|
||
Also, since pixelbox is still in alpha, and internal structure may change significantly, **any sort of backwards compatability is not guaranteed!** | ||
|
||
# Pages | ||
- See list of [Licenses](LICENSES.md) for code and resources. | ||
- See screenshots (TODO) | ||
- See todo list in Projects tab. (TODO) | ||
- telegram group with news about development [in Russian](https://t.me/pixebox_dev) | ||
|
||
# raylib makefile flags for TARGET\_OS=windows, HOST\_OS=linux | ||
``` | ||
make RAYLIB_LIBTYPE=STATIC USE_EXTERNAL_GLFW=FALSE PLATFORM_OS=Windows CC=x86_64-w64-mingw32-gcc | ||
``` |
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 @@ | ||
archive-generated.c |
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
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
Binary file not shown.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
/img2header | ||
/archiver |
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,39 @@ | ||
#define LUA_IMPL | ||
#include "minilua.h" | ||
#include <stdio.h> | ||
#include <raylib.h> | ||
|
||
static int lua_deflate(lua_State* L) { | ||
int outsize = 0; | ||
size_t insize = 0; | ||
const char* str = luaL_checklstring(L, 1, &insize); | ||
char* res = CompressData(str, insize, &outsize); | ||
if (!res) return 0; | ||
lua_pushlstring(L, res, outsize); | ||
MemFree(res); | ||
return 1; | ||
} | ||
|
||
int main(int argc, const char** argv) { | ||
lua_State* L = luaL_newstate(); | ||
luaL_openlibs(L); | ||
|
||
SetTraceLogLevel(LOG_NONE); | ||
lua_pushcfunction(L, lua_deflate); | ||
lua_setglobal(L, "compress"); | ||
|
||
lua_newtable(L); | ||
for(int i = 1; i < argc; i++) { | ||
lua_pushstring(L, argv[i]); | ||
lua_seti(L, -2, i); | ||
} | ||
lua_setglobal(L, "arg"); | ||
|
||
if (luaL_dofile(L, "tools/ar.lua") != LUA_OK) { | ||
fprintf(stderr, "%s", lua_tostring(L, -1)); | ||
return -1; | ||
} | ||
|
||
lua_close(L); | ||
return 0; | ||
} |
File renamed without changes
Oops, something went wrong.