diff options
Diffstat (limited to 'base')
| -rw-r--r-- | base/base.c | 4 | ||||
| -rwxr-xr-x | base/build.sh | 20 | ||||
| -rw-r--r-- | base/settings.h | 2 | ||||
| -rw-r--r-- | base/state.c | 11 |
4 files changed, 20 insertions, 17 deletions
diff --git a/base/base.c b/base/base.c index 4c6fbe3..91555ef 100644 --- a/base/base.c +++ b/base/base.c @@ -85,7 +85,9 @@ int main(int argc, char **argv) { reset_profiling_data(); #endif render_callback(); +// #ifndef PERF_TEST apply_phosphor_decay(); +// #endif update_keyboard_state(); update_modifier_state(); update_mouse_state(); @@ -112,7 +114,7 @@ int main(int argc, char **argv) { mkfw_swap_buffers(); #endif } - + shutdown_callback(); #ifdef PROFILER overlay_shutdown(); #endif diff --git a/base/build.sh b/base/build.sh index b415041..e237c16 100755 --- a/base/build.sh +++ b/base/build.sh @@ -51,27 +51,27 @@ case "$BUILD_TYPE" in esac # Make sure shaders are up to date -shader2h 330 vertex_shader vertex_shader.glsl data/vertex_shader.h -shader2h 330 fragment_shader shader.h fragment_shader.glsl data/fragment_shader.h +#shader2h 330 vertex_shader vertex_shader.glsl data/vertex_shader.h +#shader2h 330 fragment_shader shader.h fragment_shader.glsl data/fragment_shader.h # Stop on first error set -e # Common compile commands gcc_cmd="gcc $CFLAGS ${PROJECT_NAME}.c -o ${PROJECT_NAME} $INCLUDE_PATHS $LDFLAGS" -mingw_cmd="x86_64-w64-mingw32-gcc $CFLAGS ${PROJECT_NAME}.c -o ${PROJECT_NAME}.exe -mwindows $INCLUDE_PATHS $LDFLAGS" +#mingw_cmd="x86_64-w64-mingw32-gcc $CFLAGS ${PROJECT_NAME}.c -o ${PROJECT_NAME}.exe -mwindows $INCLUDE_PATHS $LDFLAGS" # Run Linux and Windows builds in parallel ( - ctime -begin .${PROJECT_NAME}_linux +# ctime -begin .${PROJECT_NAME}_linux $gcc_cmd $LINUX_INCLUDE $LINUX_LIBS - ctime -end .${PROJECT_NAME}_linux $? +# ctime -end .${PROJECT_NAME}_linux $? ) & -( - ctime -begin .${PROJECT_NAME}_windows - $mingw_cmd $WINDOWS_INCLUDE $WINDOWS_LIBS - ctime -end .${PROJECT_NAME}_windows $? -) & +#( +# ctime -begin .${PROJECT_NAME}_windows +# $mingw_cmd $WINDOWS_INCLUDE $WINDOWS_LIBS +# ctime -end .${PROJECT_NAME}_windows $? +#) & wait diff --git a/base/settings.h b/base/settings.h index be448c4..c8d3c5c 100644 --- a/base/settings.h +++ b/base/settings.h @@ -3,7 +3,7 @@ // #define PERF_TEST #ifndef PERF_TEST -#define PROFILER +// #define PROFILER #endif diff --git a/base/state.c b/base/state.c index f883d64..1e9d95b 100644 --- a/base/state.c +++ b/base/state.c @@ -1,7 +1,7 @@ -#define BUFFER_WIDTH 2048 -#define BUFFER_HEIGHT 1024 -#define FPS 50 +#define BUFFER_WIDTH 256 // render buffer +#define BUFFER_HEIGHT 240 // render buffer +#define FPS 60.1 #ifdef _WIN32 #define SLEEP_MARGIN_NS 330000 // 0.33ms (Windows timing functionality is utter garbage) #else @@ -11,8 +11,8 @@ #define ONE_SECOND_NS 1000000000 #define FRAMETIME (ONE_SECOND_NS / FPS) -#define SCREEN_WIDTH 360 -#define SCREEN_HEIGHT 270 +#define SCREEN_WIDTH 256 // screen size +#define SCREEN_HEIGHT 240 // screen size uint32_t buffer[BUFFER_WIDTH * BUFFER_HEIGHT] __attribute__((section(".bss"), aligned(4096))); uint32_t display_buffer[SCREEN_WIDTH * SCREEN_HEIGHT] __attribute__((section(".bss"), aligned(4096))); @@ -85,6 +85,7 @@ static struct remake_callbacks *current_part = 0; static void render_callback(); static void audio_callback(int16_t *audio_buffer, size_t frames); static void init_callback(); +static void shutdown_callback(); #ifndef PROFILER #define PROFILE_NAMED(name) |
