forked from TerryCavanagh/VVVVVV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructured files and render hook, more work on recursive connections
- Loading branch information
Tynan Richards
committed
Aug 18, 2024
1 parent
77f77cc
commit e0a3c8d
Showing
15 changed files
with
3,009 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ | |
#include "Textbox.h" | ||
#include "TowerBG.h" | ||
|
||
#include "solver/Terrain.h" | ||
|
||
enum FadeBars | ||
{ | ||
FADE_NONE, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef SOLVER_EXCEPTIONS_H | ||
#define SOLVER_EXCEPTIONS_H | ||
|
||
#include <SDL.h> | ||
|
||
#include "Exit.h" | ||
|
||
namespace Exceptions { | ||
static inline SDL_NORETURN void unimplemented(void) { | ||
VVV_exit(-1); | ||
} | ||
static inline SDL_NORETURN void todo(void) { | ||
VVV_exit(-1); | ||
} | ||
|
||
static inline SDL_NORETURN void error(void) { | ||
VVV_exit(1); | ||
} | ||
static inline SDL_NORETURN void invalid_argument(void) { | ||
VVV_exit(2); | ||
} | ||
static inline SDL_NORETURN void inadmissible_heuristic(void) { | ||
VVV_exit(10); | ||
} | ||
static inline void require(bool condition) { | ||
if (!condition) { | ||
invalid_argument(); | ||
} | ||
} | ||
static inline void assert(bool condition) { | ||
if (!condition) { | ||
VVV_exit(3); | ||
} | ||
} | ||
static inline void unreachable(void) { | ||
assert(false); | ||
} | ||
} | ||
|
||
#endif /* SOLVER_EXCEPTIONS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
#include "Heuristic.h" | ||
|
||
#include "solver/Constants.h" | ||
|
||
#include <SDL.h> | ||
#include "Exit.h" | ||
#include "solver/Heuristic.h" | ||
|
||
namespace Heuristic { | ||
int basic_heuristic(int dx, int dy) { | ||
int x_frames = (SDL_abs(dx) + MAX_X_SPEED - 1) / MAX_X_SPEED; | ||
int y_frames = (SDL_abs(dy) + MAX_Y_SPEED - 1) / MAX_Y_SPEED; | ||
return SDL_max(x_frames, y_frames); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.