Initial commit
This commit is contained in:
commit
1753ea2d0a
|
@ -0,0 +1,16 @@
|
||||||
|
.dub
|
||||||
|
docs.json
|
||||||
|
__dummy.html
|
||||||
|
docs/
|
||||||
|
/cm3d2tool
|
||||||
|
cm3d2tool.so
|
||||||
|
cm3d2tool.dylib
|
||||||
|
cm3d2tool.dll
|
||||||
|
cm3d2tool.a
|
||||||
|
cm3d2tool.lib
|
||||||
|
cm3d2tool-test-*
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.lst
|
||||||
|
out/
|
|
@ -0,0 +1,31 @@
|
||||||
|
University of Illinois/NCSA
|
||||||
|
Open Source License
|
||||||
|
|
||||||
|
Copyright (c) 2019, Les De Ridder
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal with
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimers.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimers in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of cm3d2tool nor the names of its contributors may be used
|
||||||
|
to endorse or promote products derived from this Software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
||||||
|
SOFTWARE.
|
|
@ -0,0 +1,7 @@
|
||||||
|
name "cm3d2tool"
|
||||||
|
description "CM3D2 Modding Tool"
|
||||||
|
authors "lesderid"
|
||||||
|
copyright "Copyright © 2019, Les De Ridder"
|
||||||
|
license "NCSA"
|
||||||
|
dependency "sdlang-d" version="~>0.10.4"
|
||||||
|
targetPath "out"
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"fileVersion": 1,
|
||||||
|
"versions": {
|
||||||
|
"libinputvisitor": "1.2.2",
|
||||||
|
"sdlang-d": "0.10.4",
|
||||||
|
"taggedalgebraic": "0.10.12",
|
||||||
|
"unit-threaded": "0.7.55"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
import std.stdio;
|
||||||
|
|
||||||
|
import cm3d2;
|
||||||
|
|
||||||
|
void main(string[] args)
|
||||||
|
{
|
||||||
|
if (args.length < 2)
|
||||||
|
{
|
||||||
|
help(args[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args[1])
|
||||||
|
{
|
||||||
|
case "help":
|
||||||
|
case "-h":
|
||||||
|
case "--help":
|
||||||
|
help(args[0]);
|
||||||
|
break;
|
||||||
|
case "menu-to-sdl":
|
||||||
|
throw new Exception("Not implemented yet");
|
||||||
|
case "sdl-to-menu":
|
||||||
|
throw new Exception("Not implemented yet");
|
||||||
|
default:
|
||||||
|
writeln("Unknown option '" ~ args[1] ~ "'");
|
||||||
|
writeln();
|
||||||
|
goto case "help";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void help(string toolPath)
|
||||||
|
{
|
||||||
|
writeln("Usage: " ~ toolPath ~ " <command>");
|
||||||
|
writeln();
|
||||||
|
|
||||||
|
void showCommandUsage(string command, string description)
|
||||||
|
{
|
||||||
|
writeln(" " ~ toolPath ~ " " ~ command);
|
||||||
|
writeln(" " ~ description);
|
||||||
|
}
|
||||||
|
|
||||||
|
showCommandUsage("menu-to-sdl", "Convert .menu to SDL");
|
||||||
|
showCommandUsage("sdl-to-menu", "Convert SDL to .menu");
|
||||||
|
|
||||||
|
writeln();
|
||||||
|
writeln("Reads input from stdin and writes output to stdout.");
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
module cm3d2.menu;
|
||||||
|
|
||||||
|
class Menu
|
||||||
|
{
|
||||||
|
public static Menu fromSDL(string sdl)
|
||||||
|
{
|
||||||
|
throw new Exception("Not implemented yet");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Menu fromMenu(string menu)
|
||||||
|
{
|
||||||
|
throw new Exception("Not implemented yet");
|
||||||
|
}
|
||||||
|
|
||||||
|
public string toMenu()
|
||||||
|
{
|
||||||
|
throw new Exception("Not implemented yet");
|
||||||
|
}
|
||||||
|
|
||||||
|
public string toSDL()
|
||||||
|
{
|
||||||
|
throw new Exception("Not implemented yet");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
module cm3d2;
|
||||||
|
|
||||||
|
public import cm3d2.menu;
|
Loading…
Reference in New Issue