ref: fe1e1357ce329cbe71847a82d9bf56c9440f4512
parent: 0fa446614fc99ec40d3b6c269811f85c91188500
author: Iliyas Jorio <iliyas@jor.io>
date: Wed Feb 2 19:18:00 EST 2022
Nuke stdafx.h
--- a/src/MTypes.cpp
+++ b/src/MTypes.cpp
@@ -7,7 +7,6 @@
///
-#include "stdafx.h"
#include "MTypes.h"
#include <algorithm>
--- a/src/SDLU.cpp
+++ b/src/SDLU.cpp
@@ -6,7 +6,6 @@
/// John Stiles, 2002/10/12
///
-#include "stdafx.h"
#include "SDLU.h"
#include "gameticks.h"
#include "music.h"
--- a/src/SDLU.h
+++ b/src/SDLU.h
@@ -2,10 +2,9 @@
/// SDLU.h
///
+#pragma once
-#ifndef __SDLU__
-#define __SDLU__
-
+#include <SDL.h>
#include "MTypes.h"
#define BLUE_MASK 0x0000FF
@@ -46,6 +45,3 @@
MBoolean SDLU_CheckSDLTyping(SDL_Keycode* sdlKey);
MBoolean SDLU_IsForeground();
void SDLU_Present();
-
-
-#endif
--- a/src/blitter.cpp
+++ b/src/blitter.cpp
@@ -1,6 +1,5 @@
// blitter.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -1,6 +1,5 @@
// control.c
-#include "stdafx.h"
#include "main.h"
#include "control.h"
#include "moving.h"
--- a/src/font.cpp
+++ b/src/font.cpp
@@ -1,6 +1,5 @@
// font.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/gameticks.cpp
+++ b/src/gameticks.cpp
@@ -1,6 +1,6 @@
// gameticks.c
-#include "stdafx.h"
+#include <SDL_timer.h>
#include "gameticks.h"
unsigned int baseTickCount, freezeTickCount;
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -1,7 +1,5 @@
// graphics.c
-#include "stdafx.h"
-
#include <stdlib.h>
#include "SDLU.h"
#include "main.h"
--- a/src/graymonitor.cpp
+++ b/src/graymonitor.cpp
@@ -1,6 +1,5 @@
// graymonitor.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/grays.cpp
+++ b/src/grays.cpp
@@ -1,6 +1,5 @@
// grays.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/gworld.cpp
+++ b/src/gworld.cpp
@@ -1,6 +1,5 @@
// gworld.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/hiscore.cpp
+++ b/src/hiscore.cpp
@@ -1,6 +1,5 @@
// hiscore.c
-#include "stdafx.h"
#include "SDLU.h"
#include <string.h>
--- a/src/keyselect.cpp
+++ b/src/keyselect.cpp
@@ -1,6 +1,5 @@
// keyselect.c
-#include "stdafx.h"
#include "SDLU.h"
#include <stdio.h>
--- a/src/level.cpp
+++ b/src/level.cpp
@@ -1,7 +1,5 @@
// level.c
-#include "stdafx.h"
-
#include <stdlib.h>
#include <math.h>
#include <algorithm>
binary files a/src/main.cpp b/src/main.cpp differ
--- a/src/main.h
+++ b/src/main.h
@@ -1,6 +1,7 @@
// main.h
+#include <SDL.h>
#include "MTypes.h"
@@ -237,7 +238,7 @@
#define kLastBlob kBlob7
#define kBlobTypes (kLastBlob - kFirstBlob + 1)
-constexpr double pi = M_PI;
+constexpr double pi = 3.14159265358979323846264338327950288;
#define arrsize(x) int(sizeof((x)) / sizeof((x)[0]))
--- a/src/moving.cpp
+++ b/src/moving.cpp
@@ -1,6 +1,5 @@
// moving.c
-#include "stdafx.h"
#include "main.h"
#include "moving.h"
#include "players.h"
--- a/src/music.cpp
+++ b/src/music.cpp
@@ -1,7 +1,5 @@
// music.c
-#include "stdafx.h"
-
#include <string.h>
#include <vector>
#include <fstream>
--- a/src/next.cpp
+++ b/src/next.cpp
@@ -1,6 +1,5 @@
// next.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/opponent.cpp
+++ b/src/opponent.cpp
@@ -1,6 +1,5 @@
// opponent.c
-#include "stdafx.h"
#include "SDLU.h"
#include <math.h>
--- a/src/pause.cpp
+++ b/src/pause.cpp
@@ -5,12 +5,6 @@
// decent to the end user...
-#include "stdafx.h"
-
-#if __APPLE__
-#include <Cocoa/Cocoa.h>
-#endif
-
#include "SDLU.h"
#include <algorithm>
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -1,6 +1,5 @@
// players.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/prefs.cpp
+++ b/src/prefs.cpp
@@ -1,6 +1,5 @@
// prefs.c
-#include "stdafx.h"
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -1,6 +1,5 @@
// random.c
-#include "stdafx.h"
#include <stdlib.h>
#include "main.h"
--- a/src/score.cpp
+++ b/src/score.cpp
@@ -1,6 +1,5 @@
// score.c
-#include "stdafx.h"
#include "SDLU.h"
#include <stdio.h>
--- a/src/soundfx.cpp
+++ b/src/soundfx.cpp
@@ -1,6 +1,5 @@
// soundfx.c
-#include "stdafx.h"
#include "main.h"
#include "soundfx.h"
#include "music.h"
--- a/src/stdafx.cpp
+++ /dev/null
@@ -1,8 +1,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// CandyCrisis.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
--- a/src/stdafx.h
+++ /dev/null
@@ -1,8 +1,0 @@
-///
-/// stdafx.h
-///
-
-#pragma once
-
-#include <SDL.h>
-#include <SDL_endian.h>
--- a/src/tutorial.cpp
+++ b/src/tutorial.cpp
@@ -1,6 +1,5 @@
// tutorial.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/tweak.cpp
+++ b/src/tweak.cpp
@@ -1,6 +1,5 @@
// tweak.c
-#include "stdafx.h"
#include <math.h>
#include "main.h"
--- a/src/victory.cpp
+++ b/src/victory.cpp
@@ -1,6 +1,5 @@
// victory.c
-#include "stdafx.h"
#include "SDLU.h"
#include "main.h"
--- a/src/zap.cpp
+++ b/src/zap.cpp
@@ -1,6 +1,5 @@
// zap.cpp
-#include "stdafx.h"
#include "SDLU.h"
#include <stdio.h>