Split stb_image into h/c
This commit is contained in:
parent
87df6921e8
commit
b82ea3d670
2
Makefile
2
Makefile
|
@ -79,7 +79,7 @@ includeflag != $(call prefix,$(edirs) $(eddirs) $(pindirs) $(bsdirs),-I)
|
||||||
COMPINCLUDE = $(edirs) $(eddirs) $(pindirs) $(bsdirs)
|
COMPINCLUDE = $(edirs) $(eddirs) $(pindirs) $(bsdirs)
|
||||||
|
|
||||||
#COMPILER_FLAGS specifies the additional compilation options we're using
|
#COMPILER_FLAGS specifies the additional compilation options we're using
|
||||||
WARNING_FLAGS = -Wall -Wextra -Wwrite-strings -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Wno-incompatible-function-pointer-types -Wno-gnu-statement-expression -Wno-complex-component-init -pedantic
|
WARNING_FLAGS = #-Wall -Wextra -Wwrite-strings -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Wno-incompatible-function-pointer-types -Wno-gnu-statement-expression -Wno-complex-component-init -pedantic
|
||||||
COMPILER_FLAGS = $(includeflag) -g -O0 $(WARNING_FLAGS) -DGLEW_STATIC -D_GLFW_X11 -D_POSIX_C_SOURCE=1993809L -c -MMD -MP $< -o $@
|
COMPILER_FLAGS = $(includeflag) -g -O0 $(WARNING_FLAGS) -DGLEW_STATIC -D_GLFW_X11 -D_POSIX_C_SOURCE=1993809L -c -MMD -MP $< -o $@
|
||||||
|
|
||||||
LIBPATH = -L./bin
|
LIBPATH = -L./bin
|
||||||
|
|
|
@ -27,6 +27,7 @@ extern "C" {
|
||||||
#include "vec.h"
|
#include "vec.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "script.h"
|
#include "script.h"
|
||||||
|
|
||||||
}
|
}
|
||||||
#include <stb_ds.h>
|
#include <stb_ds.h>
|
||||||
#define ASSET_TEXT_BUF 1024*1024 /* 1 MB buffer for editing text files */
|
#define ASSET_TEXT_BUF 1024*1024 /* 1 MB buffer for editing text files */
|
||||||
|
@ -58,10 +59,14 @@ const char *allowed_extensions[] = { "jpg", "png", "gltf", "glsl" };
|
||||||
static const char *editor_filename = "editor.ini";
|
static const char *editor_filename = "editor.ini";
|
||||||
|
|
||||||
static ImGuiIO *io = NULL;
|
static ImGuiIO *io = NULL;
|
||||||
static struct {
|
|
||||||
|
struct asset {
|
||||||
char *key;
|
char *key;
|
||||||
struct fileasset *value;
|
struct fileasset *value;
|
||||||
} *assets = NULL;
|
};
|
||||||
|
|
||||||
|
static struct asset *assets = NULL;
|
||||||
|
|
||||||
static char asset_search_buffer[100] = { 0 };
|
static char asset_search_buffer[100] = { 0 };
|
||||||
|
|
||||||
struct fileasset *selected_asset;
|
struct fileasset *selected_asset;
|
||||||
|
@ -827,7 +832,7 @@ void editor_selectasset(struct fileasset *asset)
|
||||||
|
|
||||||
void editor_selectasset_str(char *path)
|
void editor_selectasset_str(char *path)
|
||||||
{
|
{
|
||||||
struct fileasset *asset = shget(assets, path);
|
struct fileasset *asset = (struct fileasset*)shget(assets, path);
|
||||||
|
|
||||||
if (asset)
|
if (asset)
|
||||||
editor_selectasset(asset);
|
editor_selectasset(asset);
|
||||||
|
|
|
@ -1,18 +1,12 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
#define CGLTF_IMPLEMENTATION
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
|
||||||
#define STB_DS_IMPLEMENTATION
|
#define STB_DS_IMPLEMENTATION
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#include <stb_ds.h>
|
||||||
|
|
||||||
#ifdef EDITOR
|
#ifdef EDITOR
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stb_ds.h>
|
|
||||||
#include <stb_image.h>
|
|
||||||
#include <pl_mpeg.h>
|
|
||||||
|
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
#include "openglrender.h"
|
#include "openglrender.h"
|
||||||
|
|
|
@ -174,7 +174,7 @@ void toggleprefab(struct mGameObject *go)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void component_update(struct component *c)
|
void sdDCC Q(struct component *c)
|
||||||
{
|
{
|
||||||
if (c->update)
|
if (c->update)
|
||||||
c->update(c->data, c->go);
|
c->update(c->data, c->go);
|
||||||
|
|
7358
source/engine/thirdparty/stb/include/stb_image.h
vendored
7358
source/engine/thirdparty/stb/include/stb_image.h
vendored
File diff suppressed because it is too large
Load diff
7351
source/engine/thirdparty/stb/stb_image.c
vendored
Executable file
7351
source/engine/thirdparty/stb/stb_image.c
vendored
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue