2022-01-19 16:43:21 -06:00
|
|
|
#include "engine.h"
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2022-02-04 11:36:24 -06:00
|
|
|
#define STB_DS_IMPLEMENTATION
|
2022-02-07 08:50:34 -06:00
|
|
|
#include <stb_ds.h>
|
2022-02-04 11:36:24 -06:00
|
|
|
|
2022-06-30 10:31:23 -05:00
|
|
|
#define STB_TRUETYPE_IMPLEMENTATION
|
|
|
|
#include <stb_truetype.h>
|
2022-06-21 12:48:19 -05:00
|
|
|
|
2022-07-03 00:43:42 -05:00
|
|
|
#define STB_IMAGE_IMPLEMENTATION
|
2022-11-17 16:48:20 -06:00
|
|
|
#define STBI_FAILURE_USERMSG
|
2022-07-03 00:43:42 -05:00
|
|
|
#include "stb_image.h"
|
|
|
|
|
2023-01-04 18:09:42 -06:00
|
|
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
|
|
|
#include "stb_image_write.h"
|
|
|
|
|
2022-06-23 02:34:51 -05:00
|
|
|
#define PL_MPEG_IMPLEMENTATION
|
|
|
|
#include <pl_mpeg.h>
|
|
|
|
|
2022-02-06 10:14:57 -06:00
|
|
|
#include "render.h"
|
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
#include "2dphysics.h"
|
2023-05-12 13:22:05 -05:00
|
|
|
#include "camera.h"
|
2021-11-30 21:29:18 -06:00
|
|
|
#include "gameobject.h"
|
2023-05-12 13:22:05 -05:00
|
|
|
#include "input.h"
|
2022-01-19 16:43:21 -06:00
|
|
|
#include "log.h"
|
2023-05-12 13:22:05 -05:00
|
|
|
#include "openglrender.h"
|
2022-01-19 16:43:21 -06:00
|
|
|
#include "resources.h"
|
2022-02-06 10:14:57 -06:00
|
|
|
#include "script.h"
|
2023-05-12 13:22:05 -05:00
|
|
|
#include "sprite.h"
|
|
|
|
#include "timer.h"
|
|
|
|
#include "window.h"
|
2022-02-06 10:14:57 -06:00
|
|
|
#include "sound.h"
|
2022-01-19 16:43:21 -06:00
|
|
|
#include "engine.h"
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2023-05-12 13:22:05 -05:00
|
|
|
void error_callback(int error, const char *description) {
|
|
|
|
fprintf(stderr, "Error: %s\n", description);
|
|
|
|
YughError("GLFW Error: %s", description);
|
2022-02-06 10:14:57 -06:00
|
|
|
}
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2023-05-12 13:22:05 -05:00
|
|
|
void engine_init() {
|
|
|
|
resources_init();
|
|
|
|
|
|
|
|
YughInfo("Starting physics ...");
|
|
|
|
phys2d_init();
|
|
|
|
|
|
|
|
YughInfo("Starting sound ...");
|
|
|
|
sound_init();
|
|
|
|
|
|
|
|
YughInfo("Starting scripts ...");
|
|
|
|
script_init();
|
2022-02-06 10:14:57 -06:00
|
|
|
}
|