-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWDEFS.BAT
64 lines (58 loc) · 1.74 KB
/
NEWDEFS.BAT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
:: DOSBox compatible new moddefs.h util
:: Used by NEWMOD.BAT
::
:: BHZ Skeleton Module for MBBS v6.x
:: Mark Seelye (bhz) (c)2023
:: burninghorizon.com, bhz.co
:: 3 required args
:: name, modmain, and file
IF "%3"=="" goto usage
set _name=%1
set _modmain=%2
set _file=%3
:: Make the MODDEFS.H file
@echo // Autogenerated by NEWDEFS.BAT >> %_file%
@echo #ifndef __%_name%_%_modmain%_H__ >> %_file%
@echo #define __%_name%_%_modmain%_H__ >> %_file%
@echo. >> %_file%
@echo #include "%_modmain%.H" >> %_file%
@echo #include "%_name%.H" >> %_file%
@echo. >> %_file%
@echo #define MODVER "v1.0.0" >> %_file%
@echo #define MODNAM "%_name%" >> %_file%
@echo. >> %_file%
@echo void init(void); >> %_file%
@echo. >> %_file%
@echo void EXPORT init__%_name%(void) { >> %_file%
@echo init(); >> %_file%
@echo } >> %_file%
@echo. >> %_file%
@echo #endif >> %_file%
goto end
:usage
echo.
echo Create new MODDEFS.H file (DOSBox compatible) v0.1
echo (used by NEWMOD.BAT)
echo.
echo BHZ Skeleton Module for MBBS v6.x
echo Mark Seelye (bhz) 2023
echo burninghorizon.com, bhz.co
echo.
echo USAGE:
echo NEWDEFS.BAT NAME MODMAIN FILE
echo NAME is the name of your mod, usually Dev ID + Mod Id (EX: BHZSKLN)
echo MODMAIN (shouldn't be [DID]+[MODID]!), ex: MYMOD
echo FILE is the path/filename for output mdf file.
echo Ex: c:\bbsv6\SRC\FOO\BARRR\MODDEFS.H
echo Notes:
echo For best effect enter NAME, MODMAIN in ALL CAPS
echo.
echo Examples:
echo NEWDEFS.BAT BHZBLURP MYMOD C:\bbsv6\src\bhz\blurp\MODDEFS.H
echo Creates new C:\bbsv6\src\bhz\blurp\moddefs.h
echo With the modmain include set to #include "MYMOD.H"
echo.
goto end
:end