2020-10-04 08:28:38 +02:00
|
|
|
// Tips for Getting Started:
|
|
|
|
// 1. Use the Solution Explorer window to add/manage files
|
|
|
|
// 2. Use the Team Explorer window to connect to source control
|
|
|
|
// 3. Use the Output window to see build output and other messages
|
|
|
|
// 4. Use the Error List window to view errors
|
|
|
|
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
|
|
|
|
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
|
|
|
|
|
|
|
|
#ifndef PCH_H
|
|
|
|
#define PCH_H
|
|
|
|
|
|
|
|
// TODO: add headers that you want to pre-compile here
|
2020-10-25 15:17:26 +01:00
|
|
|
#include <Windows.h>
|
2020-10-18 17:08:41 +02:00
|
|
|
#include <cstdio>
|
2020-10-25 15:17:26 +01:00
|
|
|
#include <cassert>
|
|
|
|
#include <cmath>
|
2020-11-05 16:44:34 +01:00
|
|
|
#include <CommCtrl.h>
|
2020-12-02 18:12:34 +01:00
|
|
|
#include <htmlhelp.h>
|
2021-02-16 17:03:45 +01:00
|
|
|
#include <cstdint>
|
2021-01-22 10:53:16 +01:00
|
|
|
#include <type_traits> /*For control template*/
|
2021-08-27 12:29:41 +02:00
|
|
|
#include <chrono>
|
2021-09-01 10:02:57 +02:00
|
|
|
//#include <iostream>
|
2021-08-27 12:29:41 +02:00
|
|
|
#include <iomanip>
|
2020-11-01 16:45:29 +01:00
|
|
|
//#include <cstdlib>
|
2020-10-18 17:08:41 +02:00
|
|
|
|
2021-08-27 12:29:41 +02:00
|
|
|
#define SDL_MAIN_HANDLED
|
|
|
|
#include "SDL.h"
|
|
|
|
#include <SDL_mixer.h>
|
|
|
|
|
2021-09-05 09:47:05 +02:00
|
|
|
//https://github.com/ocornut/imgui 7b913db1ce9dd2fd98e5790aa59974dd4496be3b
|
|
|
|
#include "imgui.h"
|
|
|
|
#include "imgui_impl_sdl.h"
|
|
|
|
//https://github.com/Tyyppi77/imgui_sdl 01deb04b102b6a1c15c7fdec1977a2c96a885e6f
|
|
|
|
#include "imgui_sdl.h"
|
|
|
|
|
2021-09-01 10:02:57 +02:00
|
|
|
//typedef const char* LPCSTR;
|
|
|
|
//typedef int HINSTANCE;
|
|
|
|
//typedef int HWND;
|
|
|
|
|
2021-01-23 17:28:29 +01:00
|
|
|
/*Use (void) to silent unused warnings.*/
|
2020-11-05 16:44:34 +01:00
|
|
|
#define assertm(exp, msg) assert(((void)msg, exp))
|
2020-10-04 08:28:38 +02:00
|
|
|
|
2021-01-23 17:28:29 +01:00
|
|
|
/*Sound uses PlaySound*/
|
|
|
|
#undef PlaySound
|
|
|
|
|
2021-01-31 15:29:53 +01:00
|
|
|
|
|
|
|
inline size_t pgm_save(int width, int height, char* data, FILE* outfile)
|
|
|
|
{
|
|
|
|
size_t n = 0;
|
|
|
|
n += fprintf(outfile, "P5\n%d %d\n%d\n", width, height, 0xFF);
|
|
|
|
n += fwrite(data, 1, width * height, outfile);
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
2020-10-04 08:28:38 +02:00
|
|
|
#endif //PCH_H
|