don't even import any of the editor code in the wasm build
This commit is contained in:
parent
2ddff03189
commit
0bf17c3ca5
@ -1,11 +1,13 @@
|
|||||||
#load "iprof.jai";
|
#if OS != .WASM {
|
||||||
#load "picker.jai";
|
#load "iprof.jai";
|
||||||
#load "console.jai";
|
#load "picker.jai";
|
||||||
#load "postprocess.jai";
|
#load "postprocess.jai";
|
||||||
#load "trile_editor.jai";
|
#load "trile_editor.jai";
|
||||||
#load "level_editor.jai";
|
#load "level_editor.jai";
|
||||||
#load "textureDebugger.jai";
|
}
|
||||||
#if HAS_TACOMA { #load "tacoma.jai"; }
|
#if HAS_TACOMA { #load "tacoma.jai"; }
|
||||||
|
#load "console.jai";
|
||||||
|
#load "textureDebugger.jai";
|
||||||
|
|
||||||
#scope_file
|
#scope_file
|
||||||
|
|
||||||
@ -23,7 +25,7 @@ current_editor_view : Editor_View = .Trile_Editor;
|
|||||||
in_editor_view : bool = false;
|
in_editor_view : bool = false;
|
||||||
|
|
||||||
init_editor :: () {
|
init_editor :: () {
|
||||||
init_profiler();
|
#if OS != .WASM {init_profiler();}
|
||||||
init_console();
|
init_console();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,6 +34,7 @@ console_open_ignore_input : bool = false;
|
|||||||
|
|
||||||
|
|
||||||
draw_editor_ui :: (theme: *GR.Overall_Theme) {
|
draw_editor_ui :: (theme: *GR.Overall_Theme) {
|
||||||
|
#if OS != .WASM {
|
||||||
if in_editor_view {
|
if in_editor_view {
|
||||||
r := GR.get_rect(0,0,0,0);
|
r := GR.get_rect(0,0,0,0);
|
||||||
r.x = 0; r.w = 100*vw;
|
r.x = 0; r.w = 100*vw;
|
||||||
@ -62,8 +65,9 @@ draw_editor_ui :: (theme: *GR.Overall_Theme) {
|
|||||||
draw_post_process_editor_ui(theme);
|
draw_post_process_editor_ui(theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
draw_console(theme);
|
|
||||||
draw_profiler();
|
draw_profiler();
|
||||||
|
}
|
||||||
|
draw_console(theme);
|
||||||
draw_texture_debugger(theme);
|
draw_texture_debugger(theme);
|
||||||
draw_postprocess_popup(theme);
|
draw_postprocess_popup(theme);
|
||||||
GR.draw_popups();
|
GR.draw_popups();
|
||||||
@ -71,6 +75,7 @@ draw_editor_ui :: (theme: *GR.Overall_Theme) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
draw_editor :: () {
|
draw_editor :: () {
|
||||||
|
#if OS != .WASM {
|
||||||
if !in_editor_view then return;
|
if !in_editor_view then return;
|
||||||
|
|
||||||
if current_editor_view == {
|
if current_editor_view == {
|
||||||
@ -81,7 +86,7 @@ draw_editor :: () {
|
|||||||
case .Post_Process_Editor;
|
case .Post_Process_Editor;
|
||||||
draw_post_process_editor();
|
draw_post_process_editor();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tick_editor_ui :: () {
|
tick_editor_ui :: () {
|
||||||
@ -89,6 +94,7 @@ tick_editor_ui :: () {
|
|||||||
in_editor_view = !in_editor_view;
|
in_editor_view = !in_editor_view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OS != .WASM {
|
||||||
if in_editor_view {
|
if in_editor_view {
|
||||||
if current_editor_view == {
|
if current_editor_view == {
|
||||||
case .Trile_Editor;
|
case .Trile_Editor;
|
||||||
@ -99,6 +105,7 @@ tick_editor_ui :: () {
|
|||||||
tick_post_process_editor();
|
tick_post_process_editor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tick_console();
|
tick_console();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,7 +145,7 @@ frame :: () {
|
|||||||
|
|
||||||
dpis := state.dpi_scale;
|
dpis := state.dpi_scale;
|
||||||
|
|
||||||
tick_profiler();
|
#if OS != .WASM { tick_profiler(); }
|
||||||
if !in_editor_view then game_tick();
|
if !in_editor_view then game_tick();
|
||||||
fonsClearState(state.fons);
|
fonsClearState(state.fons);
|
||||||
for event: Input.events_this_frame {
|
for event: Input.events_this_frame {
|
||||||
@ -167,7 +167,7 @@ frame :: () {
|
|||||||
memory_visualizer_per_frame_update();
|
memory_visualizer_per_frame_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
profiler_update();
|
#if OS != .WASM { profiler_update(); }
|
||||||
reset_temporary_storage();
|
reset_temporary_storage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user