Initial commit of Command & Conquer Generals and Command & Conquer Generals Zero Hour source code.

This commit is contained in:
LFeenanEA 2025-02-27 17:34:39 +00:00
parent 2e338c00cb
commit 3d0ee53a05
No known key found for this signature in database
GPG key ID: C6EBE8C2EA08F7E0
6072 changed files with 2283311 additions and 0 deletions

View file

@ -0,0 +1,173 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATDEFS_HEADER
#define CHATDEFS_HEADER
// gks 11/3/1999: version numbers for SetClientVersion
// GMU 01/12/01 : bumped CHAT_VERSION_MINOR to 15
// BGC 6/7/01: now version 16
#define CHAT_VERSION_MAJOR 1
#define CHAT_VERSION_MINOR 16
#define CHAT_VERSION ( ( CHAT_VERSION_MAJOR << 16 ) | ( CHAT_VERSION_MINOR ) )
//
// Response errors (Sent as arguments to the OnFoo calls)
//
// Your nick is still logged into chat
#define CHAT_E_NICKINUSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
// Your password is incorrect during login
#define CHAT_E_BADPASS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
// Reference made to non-existant user or channel
#define CHAT_E_NONESUCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
// The network layer is down or cannot be initialized for some reason
#define CHAT_E_CON_NETDOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 103)
// Name lookup (e.g DNS) failed for some reason
#define CHAT_E_CON_LOOKUP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 104)
// Some fatal error occured with the net connection
#define CHAT_E_CON_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 105)
// General request timeout for a request
#define CHAT_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 106)
// Must patch before continuing
#define CHAT_E_MUSTPATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 107)
// Miscellaneous internal status error
#define CHAT_E_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 108)
// Server has returned something we don't recognise
#define CHAT_E_UNKNOWNRESPONSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 109)
// Tried to join a channel that has enough players already
#define CHAT_E_CHANNELFULL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 110)
// Tried to create a channel that already exists
#define CHAT_E_CHANNELEXISTS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 111)
// Tried to join a channel that does not exist
#define CHAT_E_CHANNELDOESNOTEXIST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 112)
// Tried to join a channel with the wrong password
#define CHAT_E_BADCHANNELPASSWORD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 113)
// You've been banned from the server / channel
#define CHAT_E_BANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 114)
// You tried to do something that required operator status
#define CHAT_E_NOT_OPER MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 115)
// Your account is disabled
#define CHAT_E_DISABLED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 116)
// Your serial# has been banned
#define CHAT_E_SERIALBANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 117)
// Somebody else is using your serial#
#define CHAT_E_SERIALDUP MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 118)
// New error codes -- gks 1/10/2000
// Serial number does not exist in the database
#define CHAT_E_SERIALUNKNOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 119)
// Serial number is for a different product
#define CHAT_E_SKUSERIALMISMATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 120)
//
// Response success codes (non-error arguments passed to the OnFoo callbacks)
// Note: S_OK is the usual success code
// A network connection is underway
#define CHAT_S_CON_CONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 300)
// A network connection is complete
#define CHAT_S_CON_CONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 301)
// A network connection is going down
#define CHAT_S_CON_DISCONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 302)
// A network connection is closed
#define CHAT_S_CON_DISCONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 303)
// Find - Nick not in system
#define CHAT_S_FIND_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 304)
// Find - Not in any channels
#define CHAT_S_FIND_NOCHAN MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 305)
// Find - user has find turned off
#define CHAT_S_FIND_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 306)
// Page - Nick not in system
#define CHAT_S_PAGE_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 307)
// Page - user has page turned off
#define CHAT_S_PAGE_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 308)
// This channel list is only a ping update
#define CHAT_S_PINGLIST MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 315)
//
// Request errors (returned from the RequestFoo calls)
//
// You are not connected to the chat server
#define CHAT_E_NOTCONNECTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 500)
// You are not in a channel
#define CHAT_E_NOCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 501)
// Feature is not implemented
#define CHAT_E_NOTIMPLEMENTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 502)
// The request was made while while a conflicting request was still pending
#define CHAT_E_PENDINGREQUEST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 503)
// Invalid parameter passed - usually a NULL pointer
#define CHAT_E_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 504)
// Tried to create or join a channel before leaving the previous one
#define CHAT_E_LEAVECHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 508)
// Tried to send something to a channel when not a member of any channel
#define CHAT_E_JOINCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 509)
// Tried to join a non-existant channel
#define CHAT_E_UNKNOWNCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 510)
//
// Request success codes
// Notes: S_OK is the usual success code
//
// Channel list filter values
//
#define CHAT_CHANNEL_LIST_ALL -99999
//
// User flags (bit field)
//
// The owner of the current channel
#define CHAT_USER_CHANNELOWNER 0x0001
// The person with voice (conch shell...)
#define CHAT_USER_VOICE 0x0002
// Squelched?
#define CHAT_USER_SQUELCHED 0x0004
// The local user
#define CHAT_USER_MYSELF 0x8000
//
// Channel flags (bit field)
//
#define CHAN_MODE_PRIVATE 0x0004
#define CHAN_MODE_SECRET 0x0008
#define CHAN_MODE_MODERATED 0x0010
#define CHAN_MODE_TOPICLIMIT 0x0020
#define CHAN_MODE_INVITEONLY 0x0040
#define CHAN_MODE_NOPRIVMSGS 0x0080
#define CHAN_MODE_KEY 0x0100
#define CHAN_MODE_BAN 0x0200
#define CHAN_MODE_LIMIT 0x0400
#endif

View file

@ -0,0 +1,60 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DOWNLOADDEFS_H
#define _DOWNLOADDEFS_H
// CDownload statuses
#define DOWNLOADSTATUS_NONE 0
#define DOWNLOADSTATUS_GO 1
#define DOWNLOADSTATUS_CONNECTING 2
#define DOWNLOADSTATUS_LOGGINGIN 3
#define DOWNLOADSTATUS_FINDINGFILE 4
#define DOWNLOADSTATUS_QUERYINGRESUME 5
#define DOWNLOADSTATUS_DOWNLOADING 6
#define DOWNLOADSTATUS_DISCONNECTING 7
#define DOWNLOADSTATUS_DONE 0
// CDownload return codes
#define DOWNLOAD_SUCCEEDED S_OK
#define DOWNLOAD_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 1 )
#define DOWNLOAD_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 2 )
#define DOWNLOAD_NETWORKERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 3 )
#define DOWNLOAD_FILEERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 4 )
#define DOWNLOAD_REENTERERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 4 )
// CDownloadEvent return codes.
#define DOWNLOADEVENT_SUCCEEDED S_OK
#define DOWNLOADEVENT_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 5 )
#define DOWNLOADEVENT_RESUME S_OK
#define DOWNLOADEVENT_DONOTRESUME MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 6 )
// CDownloadEvent error codes for OnError()
#define DOWNLOADEVENT_NOSUCHSERVER 1
#define DOWNLOADEVENT_COULDNOTCONNECT 2
#define DOWNLOADEVENT_LOGINFAILED 3
#define DOWNLOADEVENT_NOSUCHFILE 4
#define DOWNLOADEVENT_LOCALFILEOPENFAILED 5
#define DOWNLOADEVENT_TCPERROR 6
#define DOWNLOADEVENT_DISCONNECTERROR 7
#endif

View file

@ -0,0 +1,30 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FTPDEFS_H_INCLUDED__
#define __FTPDEFS_H_INCLUDED__
// CFtp return codes.
#define FTP_SUCCEEDED S_OK
#define FTP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 1 )
#define FTP_TRYING MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 2 )
#endif

View file

@ -0,0 +1,32 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETUTILDEFS_HEADER
#define NETUTILDEFS_HEADER
#define NETUTIL_E_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
#define NETUTIL_E_BUSY MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
#define NETUTIL_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
#define NETUTIL_E_INVALIDFIELD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 256)
#define NETUTIL_E_CANTVERIFY MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 257)
#define NETUTIL_S_FINISHED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 500)
#endif

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,113 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Nov 05 10:28:33 2001
*/
/* Compiler settings for .\WOLAPI.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID IID_IRTPatcher = {0x925CDEDE,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IRTPatcherEvent = {0x925CDEE3,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IChat = {0x4DD3BAF4,0x7579,0x11D1,{0xB1,0xC6,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IChatEvent = {0x4DD3BAF6,0x7579,0x11D1,{0xB1,0xC6,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IDownload = {0x0BF5FCEB,0x9F03,0x11D1,{0x9D,0xC7,0x00,0x60,0x97,0xC5,0x43,0x21}};
const IID IID_IDownloadEvent = {0x6869E99D,0x9FB4,0x11D1,{0x9D,0xC8,0x00,0x60,0x97,0xC5,0x43,0x21}};
const IID IID_INetUtil = {0xB832B0AA,0xA7D3,0x11D1,{0x97,0xC3,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_INetUtilEvent = {0xB832B0AC,0xA7D3,0x11D1,{0x97,0xC3,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_IChat2 = {0x8B938190,0xEF3F,0x11D1,{0x98,0x08,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_IChat2Event = {0x8B938192,0xEF3F,0x11D1,{0x98,0x08,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_IIGROptions = {0x89DD1ECD,0x0DCA,0x49d8,{0x8E,0xF3,0x33,0x75,0xE6,0xD6,0xEE,0x9D}};
const IID LIBID_WOLAPILib = {0x925CDED1,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const CLSID CLSID_RTPatcher = {0x925CDEDF,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const CLSID CLSID_Chat = {0x4DD3BAF5,0x7579,0x11D1,{0xB1,0xC6,0x00,0x60,0x97,0x17,0x65,0x56}};
const CLSID CLSID_Download = {0xBF6EA206,0x9E55,0x11D1,{0x9D,0xC6,0x00,0x60,0x97,0xC5,0x43,0x21}};
const CLSID CLSID_IGROptions = {0xABF6FC8F,0x1344,0x46de,{0x84,0xC9,0x83,0x71,0x11,0x8D,0xC3,0xFF}};
const CLSID CLSID_NetUtil = {0xB832B0AB,0xA7D3,0x11D1,{0x97,0xC3,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const CLSID CLSID_Chat2 = {0x8B938191,0xEF3F,0x11D1,{0x98,0x08,0x00,0x60,0x97,0x06,0xFA,0x0C}};
#ifdef __cplusplus
}
#endif

Binary file not shown.