Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
expimp.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19//
20// expimp.h
21//
22
23#ifndef __EXPIMP_H
24#define __EXPIMP_H
25
26#include "transDB.h"
27#include "Babylondlg.h"
28
40
48
49typedef enum
50{
53} GnFormat;
54
60
61typedef struct
62{
63 GnFormat format; // what file format to generate
64 GnUntranslated untranslated; // what to do with untranslated text
65
66} GNOPTIONS;
67
68typedef struct
69{
71 int dialog;
72 int limit;
73
74} RPOPTIONS;
75
76
77#define CSF_ID ( ('C'<<24) | ('S'<<16) | ('F'<<8) | (' ') )
78#define CSF_LABEL ( ('L'<<24) | ('B'<<16) | ('L'<<8) | (' ') )
79#define CSF_STRING ( ('S'<<24) | ('T'<<16) | ('R'<<8) | (' ') )
80#define CSF_STRINGWITHWAVE ( ('S'<<24) | ('T'<<16) | ('R'<<8) | ('W') )
81#define CSF_VERSION 3
82
83typedef struct
84{
85 int id;
89 int skip;
90
92
93typedef struct
94{
95 int id;
99 int skip;
101
102} CSF_HEADER;
103
104int ExportTranslations ( TransDB *db, const char *filename, LangID langid, TROPTIONS *options, CBabylonDlg *dlg = NULL );
105int ImportTranslations ( TransDB *db, const char *filename, CBabylonDlg *dlg = NULL );
106int UpdateSentTranslations ( TransDB *db, const char *filename, CBabylonDlg *dlg = NULL );
107int GenerateGameFiles ( TransDB *db, const char *filename, GNOPTIONS *option, LangID *languages, CBabylonDlg *dlg = NULL );
108int GenerateReport ( TransDB *db, const char *filename, RPOPTIONS *options, LangID *languages, CBabylonDlg *dlg = NULL );
109void ProcessWaves ( TransDB *db, const char *filename, CBabylonDlg *dlg );
110#endif
#define NULL
Definition BaseType.h:92
LangID
Definition TransDB.h:69
TrFilter
Definition expimp.h:30
@ TR_UNSENT
Definition expimp.h:38
@ TR_NONDIALOG
Definition expimp.h:34
@ TR_SAMPLE
Definition expimp.h:35
@ TR_DIALOG
Definition expimp.h:33
@ TR_UNVERIFIED
Definition expimp.h:37
@ TR_CHANGES
Definition expimp.h:32
@ TR_ALL
Definition expimp.h:31
@ TR_MISSING_DIALOG
Definition expimp.h:36
int ImportTranslations(TransDB *db, const char *filename, CBabylonDlg *dlg=NULL)
Definition expimp.cpp:899
int UpdateSentTranslations(TransDB *db, const char *filename, CBabylonDlg *dlg=NULL)
Definition expimp.cpp:1608
int GenerateReport(TransDB *db, const char *filename, RPOPTIONS *options, LangID *languages, CBabylonDlg *dlg=NULL)
Definition expimp.cpp:1481
void ProcessWaves(TransDB *db, const char *filename, CBabylonDlg *dlg)
Definition expimp.cpp:1392
int GenerateGameFiles(TransDB *db, const char *filename, GNOPTIONS *option, LangID *languages, CBabylonDlg *dlg=NULL)
Definition expimp.cpp:1264
GnFormat
Definition expimp.h:50
@ GN_BABYLONSTR
Definition expimp.h:52
@ GN_UNICODE
Definition expimp.h:51
GnUntranslated
Definition expimp.h:56
@ GN_USEORIGINAL
Definition expimp.h:58
@ GN_USEIDS
Definition expimp.h:57
int ExportTranslations(TransDB *db, const char *filename, LangID langid, TROPTIONS *options, CBabylonDlg *dlg=NULL)
Definition expimp.cpp:405
int num_strings
Definition expimp.h:88
int num_labels
Definition expimp.h:87
int version
Definition expimp.h:86
int id
Definition expimp.h:95
int version
Definition expimp.h:96
int num_labels
Definition expimp.h:97
int skip
Definition expimp.h:99
int num_strings
Definition expimp.h:98
int langid
Definition expimp.h:100
GnFormat format
Definition expimp.h:63
GnUntranslated untranslated
Definition expimp.h:64
int limit
Definition expimp.h:72
int dialog
Definition expimp.h:71
int translations
Definition expimp.h:70
int include_translations
Definition expimp.h:45
TrFilter filter
Definition expimp.h:43
int include_comments
Definition expimp.h:44