remove engine dir

This commit is contained in:
2024-11-05 14:42:05 -06:00
parent a92f34db71
commit 75c93b4cf9
162 changed files with 20 additions and 17 deletions

View File

@@ -66,18 +66,18 @@ src = ['anim.c', 'config.c', 'datastream.c','font.c','gameobject.c','HandmadeMat
imsrc = ['GraphEditor.cpp','ImCurveEdit.cpp','ImGradient.cpp','imgui_draw.cpp','imgui_tables.cpp','imgui_widgets.cpp','imgui.cpp','ImGuizmo.cpp','imnodes.cpp','implot_items.cpp','implot.cpp']
srceng = 'source/engine'
srceng = 'source'
tp = srceng / 'thirdparty'
includes = [srceng,tp / 'cgltf',tp / 'imgui',tp / 'par',tp / 'sokol',tp / 'stb',tp,tp / 'pl_mpeg/include']
foreach file : src
full_path = join_paths('source/engine', file)
full_path = join_paths('source', file)
sources += files(full_path)
endforeach
if get_option('editor')
sources += 'source/engine/qjs_imgui.cpp'
sources += 'source/qjs_imgui.cpp'
foreach imgui : imsrc
sources += tp / 'imgui' / imgui
endforeach

View File

@@ -4,7 +4,7 @@ cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
windres = 'x86_64-w64-mingw32-windres'
strip = 'x86_64-w64-mingw32-strip'
exe_wrapper = 'wine64'
exe_wrapper = ''
[host_machine]
system = 'windows'

View File

@@ -301,18 +301,9 @@ game.is_image = function(obj)
// Any request to it returns an image, which is a texture and rect. But they can
game.texture = function (path) {
if (!path) return game.texture("icons/no_tex.gif");
var parts = path.split(':');
path = Resources.find_image(parts[0]);
if (!io.exists(path)) {
console.error(`Missing texture: ${path}`);
game.texture.cache[path] = game.texture("icons/no_tex.gif");
game.texture.time_cache[path] = io.mod(path);
return game.texture.cache[path];
}
// Look for a cached version
var frame;
var anim_str;
@@ -336,6 +327,15 @@ game.texture = function (path) {
return ret[anim_str].frames[frame];
}
if (!path) return game.texture("icons/no_tex.gif");
if (!io.exists(path)) {
console.error(`Missing texture: ${path}`);
game.texture.cache[path] = game.texture("icons/no_tex.gif");
game.texture.time_cache[path] = io.mod(path);
return game.texture.cache[path];
}
// Cache not found; add to the spritesheet
var ext = path.ext();
@@ -361,6 +361,10 @@ game.texture = function (path) {
// in this case, it's just a single image
anim.texture = anim.frames[0].texture;
anim.rect = anim.frames[0].rect;
anim.frames = undefined;
anim.texture.load_gpu();
game.texture.cache[path] = anim;
return anim;
}
game.texture.cache[path] = anim;
anim.frames[0].texture.load_gpu();
@@ -381,18 +385,18 @@ game.texture = function (path) {
texture: tex,
rect:{x:0,y:0,width:1,height:1}
};
pack_into_sheet([image]);
// pack_into_sheet([image]);
} else if (Object.keys(anim).length === 1) {
image = Object.values(anim)[0];
image.frames.forEach(x => x.texture = tex);
pack_into_sheet(image.frames);
// pack_into_sheet(image.frames);
} else {
var allframes = [];
for (var a in anim)
allframes = allframes.concat(anim[a].frames);
for (var frame of allframes) frame.texture = tex;
pack_into_sheet(allframes);
// pack_into_sheet(allframes);
image = anim;
}

View File

@@ -1038,7 +1038,6 @@ render.image = function image(image, rect = [0,0], rotation = 0, color = Color.w
render.images = function(image, rects, rotations, colors)
{
}
var slice9_t = os.make_transform();

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