diff --git a/VisualC/examples/audio/01-simple-playback/01-simple-playback.vcxproj b/VisualC/examples/audio/01-simple-playback/01-simple-playback.vcxproj index cf428b1270..de4a67cee1 100644 --- a/VisualC/examples/audio/01-simple-playback/01-simple-playback.vcxproj +++ b/VisualC/examples/audio/01-simple-playback/01-simple-playback.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/audio/02-simple-playback-callback/02-simple-playback-callback.vcxproj b/VisualC/examples/audio/02-simple-playback-callback/02-simple-playback-callback.vcxproj index e1e19126f2..7140c331ec 100644 --- a/VisualC/examples/audio/02-simple-playback-callback/02-simple-playback-callback.vcxproj +++ b/VisualC/examples/audio/02-simple-playback-callback/02-simple-playback-callback.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/audio/03-load-wav/03-load-wav.vcxproj b/VisualC/examples/audio/03-load-wav/03-load-wav.vcxproj index 8da33130ad..356cb6e2fc 100644 --- a/VisualC/examples/audio/03-load-wav/03-load-wav.vcxproj +++ b/VisualC/examples/audio/03-load-wav/03-load-wav.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/camera/01-read-and-draw/01-read-and-draw.vcxproj b/VisualC/examples/camera/01-read-and-draw/01-read-and-draw.vcxproj index 5dcbfef4c3..c143bcec57 100644 --- a/VisualC/examples/camera/01-read-and-draw/01-read-and-draw.vcxproj +++ b/VisualC/examples/camera/01-read-and-draw/01-read-and-draw.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/game/01-snake/01-snake.vcxproj b/VisualC/examples/game/01-snake/01-snake.vcxproj index c83c670fec..d9c0d862d2 100644 --- a/VisualC/examples/game/01-snake/01-snake.vcxproj +++ b/VisualC/examples/game/01-snake/01-snake.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/game/02-woodeneye-008/02-woodeneye-008.vcxproj b/VisualC/examples/game/02-woodeneye-008/02-woodeneye-008.vcxproj index 5bf3df2a0c..da89312614 100644 --- a/VisualC/examples/game/02-woodeneye-008/02-woodeneye-008.vcxproj +++ b/VisualC/examples/game/02-woodeneye-008/02-woodeneye-008.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/game/03-infinite-monkeys/03-infinite-monkeys.vcxproj b/VisualC/examples/game/03-infinite-monkeys/03-infinite-monkeys.vcxproj index 9535db263b..58e3c81771 100644 --- a/VisualC/examples/game/03-infinite-monkeys/03-infinite-monkeys.vcxproj +++ b/VisualC/examples/game/03-infinite-monkeys/03-infinite-monkeys.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/generate.py b/VisualC/examples/generate.py index 85b249121a..e06110e4b2 100644 --- a/VisualC/examples/generate.py +++ b/VisualC/examples/generate.py @@ -4,7 +4,8 @@ import uuid REPOSITORY_ROOT = pathlib.Path(__file__).parent.parent.parent -def generate(category, example_name): + +def generate(category, example_name, c_source_file): guid = str(uuid.uuid4()).upper() text = f""" @@ -16,7 +17,7 @@ def generate(category, example_name): - + @@ -34,12 +35,19 @@ def generate(category, example_name): f.write(text) +def get_c_source_filename(example_dir: pathlib.Path): + """Gets the one and only C source file name in the directory of the example.""" + c_files = [f.name for f in example_dir.iterdir() if f.name.endswith(".c")] + assert len(c_files) == 1 + return c_files[0] + + def main(): path = REPOSITORY_ROOT / "examples" for category in path.iterdir(): if category.is_dir(): for example in category.iterdir(): - generate(category.name, example.name) + generate(category.name, example.name, get_c_source_filename(example)) if __name__ == "__main__": diff --git a/VisualC/examples/pen/01-drawing-lines/01-drawing-lines.vcxproj b/VisualC/examples/pen/01-drawing-lines/01-drawing-lines.vcxproj index 9174268e81..64025bb77a 100644 --- a/VisualC/examples/pen/01-drawing-lines/01-drawing-lines.vcxproj +++ b/VisualC/examples/pen/01-drawing-lines/01-drawing-lines.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/01-clear/01-clear.vcxproj b/VisualC/examples/renderer/01-clear/01-clear.vcxproj index 562f7f3583..e55d8df355 100644 --- a/VisualC/examples/renderer/01-clear/01-clear.vcxproj +++ b/VisualC/examples/renderer/01-clear/01-clear.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/02-primitives/02-primitives.vcxproj b/VisualC/examples/renderer/02-primitives/02-primitives.vcxproj index d4ed14ba5a..525bba7616 100644 --- a/VisualC/examples/renderer/02-primitives/02-primitives.vcxproj +++ b/VisualC/examples/renderer/02-primitives/02-primitives.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/03-lines/03-lines.vcxproj b/VisualC/examples/renderer/03-lines/03-lines.vcxproj index 01a7809d43..4b40b7e28b 100644 --- a/VisualC/examples/renderer/03-lines/03-lines.vcxproj +++ b/VisualC/examples/renderer/03-lines/03-lines.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/04-points/04-points.vcxproj b/VisualC/examples/renderer/04-points/04-points.vcxproj index 0796dfdefc..0c8fa22f56 100644 --- a/VisualC/examples/renderer/04-points/04-points.vcxproj +++ b/VisualC/examples/renderer/04-points/04-points.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/05-rectangles/05-rectangles.vcxproj b/VisualC/examples/renderer/05-rectangles/05-rectangles.vcxproj index d9f6d795e3..8d4b33b5c2 100644 --- a/VisualC/examples/renderer/05-rectangles/05-rectangles.vcxproj +++ b/VisualC/examples/renderer/05-rectangles/05-rectangles.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/06-textures/06-textures.vcxproj b/VisualC/examples/renderer/06-textures/06-textures.vcxproj index 8c6595111c..d99b62c060 100644 --- a/VisualC/examples/renderer/06-textures/06-textures.vcxproj +++ b/VisualC/examples/renderer/06-textures/06-textures.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/07-streaming-textures/07-streaming-textures.vcxproj b/VisualC/examples/renderer/07-streaming-textures/07-streaming-textures.vcxproj index 6affa1cd18..0830c4fbbe 100644 --- a/VisualC/examples/renderer/07-streaming-textures/07-streaming-textures.vcxproj +++ b/VisualC/examples/renderer/07-streaming-textures/07-streaming-textures.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/08-rotating-textures/08-rotating-textures.vcxproj b/VisualC/examples/renderer/08-rotating-textures/08-rotating-textures.vcxproj index 90833c64ae..5e14c6d093 100644 --- a/VisualC/examples/renderer/08-rotating-textures/08-rotating-textures.vcxproj +++ b/VisualC/examples/renderer/08-rotating-textures/08-rotating-textures.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/09-scaling-textures/09-scaling-textures.vcxproj b/VisualC/examples/renderer/09-scaling-textures/09-scaling-textures.vcxproj index 4d97ffc797..ada32f7000 100644 --- a/VisualC/examples/renderer/09-scaling-textures/09-scaling-textures.vcxproj +++ b/VisualC/examples/renderer/09-scaling-textures/09-scaling-textures.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/VisualC/examples/renderer/10-geometry/10-geometry.vcxproj b/VisualC/examples/renderer/10-geometry/10-geometry.vcxproj index f551958a3f..6013514fe3 100644 --- a/VisualC/examples/renderer/10-geometry/10-geometry.vcxproj +++ b/VisualC/examples/renderer/10-geometry/10-geometry.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/11-color-mods/11-color-mods.vcxproj b/VisualC/examples/renderer/11-color-mods/11-color-mods.vcxproj index 766f6550c1..c0af3e32df 100644 --- a/VisualC/examples/renderer/11-color-mods/11-color-mods.vcxproj +++ b/VisualC/examples/renderer/11-color-mods/11-color-mods.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/14-viewport/14-viewport.vcxproj b/VisualC/examples/renderer/14-viewport/14-viewport.vcxproj index c15c28075d..1ebbda55f5 100644 --- a/VisualC/examples/renderer/14-viewport/14-viewport.vcxproj +++ b/VisualC/examples/renderer/14-viewport/14-viewport.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/15-cliprect/15-cliprect.vcxproj b/VisualC/examples/renderer/15-cliprect/15-cliprect.vcxproj index 6f8ce5f528..dbb7ca670a 100644 --- a/VisualC/examples/renderer/15-cliprect/15-cliprect.vcxproj +++ b/VisualC/examples/renderer/15-cliprect/15-cliprect.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/17-read-pixels/17-read-pixels.vcxproj b/VisualC/examples/renderer/17-read-pixels/17-read-pixels.vcxproj index 60b599e1c8..674462e8e4 100644 --- a/VisualC/examples/renderer/17-read-pixels/17-read-pixels.vcxproj +++ b/VisualC/examples/renderer/17-read-pixels/17-read-pixels.vcxproj @@ -7,7 +7,7 @@ - + diff --git a/VisualC/examples/renderer/18-debug-text/18-debug-text.vcxproj b/VisualC/examples/renderer/18-debug-text/18-debug-text.vcxproj index 05c964d4d1..98f11985e9 100644 --- a/VisualC/examples/renderer/18-debug-text/18-debug-text.vcxproj +++ b/VisualC/examples/renderer/18-debug-text/18-debug-text.vcxproj @@ -7,7 +7,7 @@ - + \ No newline at end of file