Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVTOOLS: New create_engine tool #3865

Merged
merged 1 commit into from May 9, 2022
Merged

Conversation

dreammaster
Copy link
Member

@dreammaster dreammaster commented May 8, 2022

Following on from a musing I had on Discord recently, I decided to try my hand at making a tool for creating the skeletons of new engines, saving potential authors the trouble of copying and pasting from existing engines or Quux, and trying to properly rename everything. The tool is fairly simple, it:

  1. Takes in a single command line parameter specifying the engine name
  2. Creates a folder for it in engines/
  3. Copies the files from the files/ subfolder included with the tool, replacing occurances of a "Xyzzy" placeholder with the engine name, maintaining the upper/lower/camel case of the Xyzzy being replaced.
  4. Finally, for those of us using Visual Studio, creates a batch file in dists/msvc/ to simply creating a solution file with just that engine enabled.

At the moment I've only built it as a Visual Studio project that can be compiled and then run similar to create_project, but someone familiar with Linux can probably fairly easily extend with a proper makefile and an ifdef block for using mkdir rather than the Window CreateDirectoryA.

Just thought I'd do this as a pull request first before pushing it to master in case of any feedback or further suggestions for inclusions in the skeleton files.

@sev-
Copy link
Member

@sev- sev- commented May 8, 2022

Excellent idea! The only note from me is that create_engine.cpp file is missing the copyright header.

devtools/create_engine/files/xyzzy.h Outdated Show resolved Hide resolved
@bluegr
Copy link
Member

@bluegr bluegr commented May 8, 2022

Nice idea, I like it! +1 from me too

@dreammaster
Copy link
Member Author

@dreammaster dreammaster commented May 8, 2022

Excellent idea! The only note from me is that create_engine.cpp file is missing the copyright header.

I also took care of adding in the missing header.

@bluegr
Copy link
Member

@bluegr bluegr commented May 8, 2022

Nice work! Looks good to be added now

@dreammaster dreammaster merged commit d00106f into scummvm:master May 9, 2022
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants