Initial commit of Command & Conquer Renegade source code.

This commit is contained in:
LFeenanEA
2025-02-27 16:39:46 +00:00
parent 74ab8fa5e0
commit 58ed459113
4918 changed files with 1366710 additions and 0 deletions

View File

@@ -0,0 +1,815 @@
/*
** Command & Conquer Renegade(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/>.
*/
#include "clipboard.h"
#include <istdplug.h>
#include "utilapi.h"
//----------------------------------------------------------------------------
// Node_Key
//----------------------------------------------------------------------------
class Node_Key
{
public:
Node_Key ( int nr_frames, const char * name, Node_Key * next );
~Node_Key ();
void set_position ( int frame, Point3 pos )
{
if ( frame >= 0 && frame < nr_frames_ )
position_ [frame] = pos;
}
void set_orientation ( int frame, Quat facing )
{
if ( frame >= 0 && frame < nr_frames_ )
orientation_ [frame] = facing;
}
const Point3 & position ( int frame )
{
if ( frame < 0 || frame >= nr_frames_ )
frame = 0;
return position_ [frame];
}
const Quat & orientation ( int frame )
{
if ( frame < 0 || frame >= nr_frames_ )
frame = 0;
return orientation_ [frame];
}
const char * name () { return name_; }
int nr_frames () { return nr_frames_; }
Node_Key * next () { return next_; }
private:
char * name_;
int nr_frames_;
Point3 * position_;
Quat * orientation_;
Node_Key * next_;
};
//----------------------------------------------------------------------------
// Node_Key::Node_Key
//----------------------------------------------------------------------------
Node_Key::Node_Key
(
int nr_frames,
const char * name,
Node_Key * next
):
nr_frames_ (nr_frames),
next_ (next)
{
position_ = new Point3 [ nr_frames ];
orientation_ = new Quat [ nr_frames ];
name_ = new char [ strlen (name) + 1 ];
strcpy ( name_, name );
}
//----------------------------------------------------------------------------
// Node_Key::~Node_Key
//----------------------------------------------------------------------------
Node_Key::~Node_Key ()
{
delete [] position_;
delete [] orientation_;
delete [] name_;
}
//----------------------------------------------------------------------------
// Pose
//----------------------------------------------------------------------------
const MAX_NAME = 64;
class Pose
{
public:
Pose ( Interface * ip, const char * new_name, int first_frame, int last_frame );
~Pose ()
{
delete_keys ();
}
const char * name () const { return name_; }
void Add_Objects_To_List ( HWND hWnd );
void Paste_Keys ( Interface * ip );
Pose * next;
private:
void delete_keys ();
Node_Key * first_key;
char name_ [ MAX_NAME ];
int ticks_per_frame_;
};
//----------------------------------------------------------------------------
// Clipboard_Class
//----------------------------------------------------------------------------
class Clipboard_Class : public UtilityObj
{
public:
Clipboard_Class ();
~Clipboard_Class ();
void BeginEditParams(Interface *ip,IUtil *iu);
void EndEditParams(Interface *ip,IUtil *iu);
void SelectionSetChanged ( Interface * ip, IUtil * iu );
void DeleteThis() {}
void Init(HWND hWnd);
void Destroy(HWND hWnd);
void Close () { iu->CloseUtility (); }
void Create ( HWND );
void Paste ( HWND );
void Delete ( HWND );
BOOL Is_Empty () const { return first_pose == NULL; }
void Update_Object_List ( HWND hWnd );
private:
void Update_Pose_List ( HWND hWnd );
IUtil * iu;
Interface *ip;
HWND hPanel;
Pose * first_pose;
};
//----------------------------------------------------------------------------
// the_clipboard
//----------------------------------------------------------------------------
static Clipboard_Class the_clipboard;
//----------------------------------------------------------------------------
// Static data used for communicating to/from the name dialog.
//----------------------------------------------------------------------------
static char pose_name [ MAX_NAME ];
static int first_frame;
static int last_frame;
static int current_frame;
//----------------------------------------------------------------------------
// Clipboard_Desc_Class
//----------------------------------------------------------------------------
class Clipboard_Desc_Class:public ClassDesc
{
public:
int IsPublic() {return 1;}
void * Create(BOOL) {return &the_clipboard;}
const TCHAR * ClassName() {return _T("Key Clipboard");}
SClass_ID SuperClassID() {return UTILITY_CLASS_ID;}
Class_ID ClassID() {return Class_ID(0x5eb13907, 0x1d931bb4);}
const TCHAR* Category() {return _T("Westwood Tools");}
};
//----------------------------------------------------------------------------
// clipboard_desc
//----------------------------------------------------------------------------
static Clipboard_Desc_Class clipboard_desc;
//----------------------------------------------------------------------------
// ClipboardDesc
//----------------------------------------------------------------------------
ClassDesc* ClipboardDesc() {return &clipboard_desc;}
//----------------------------------------------------------------------------
// ClipboardDlgProc
//----------------------------------------------------------------------------
static BOOL CALLBACK ClipboardDlgProc
(
HWND hWnd,
UINT msg,
WPARAM wParam,
LPARAM lParam
)
{
switch (msg)
{
case WM_INITDIALOG:
the_clipboard.Init(hWnd);
break;
case WM_DESTROY:
the_clipboard.Destroy(hWnd);
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case ID_CLOSE:
the_clipboard.Close ();
break;
case ID_CREATE:
the_clipboard.Create ( hWnd );
break;
case ID_PASTE:
the_clipboard.Paste ( hWnd );
break;
case ID_DELETE:
the_clipboard.Delete ( hWnd );
break;
case IDC_POSE_LIST:
if ( HIWORD(wParam) == CBN_SELCHANGE )
the_clipboard.Update_Object_List ( hWnd );
break;
}
break;
default:
return FALSE;
}
return TRUE;
}
//----------------------------------------------------------------------------
// Pose_Name_Message_Handler
//----------------------------------------------------------------------------
static BOOL CALLBACK Pose_Name_Message_Handler
(
HWND hWnd,
UINT msg,
WPARAM wParam,
LPARAM lParam
)
{
static ISpinnerControl * first_frame_spin;
static ISpinnerControl * last_frame_spin;
switch (msg)
{
case WM_INITDIALOG:
CenterWindow ( hWnd, GetParent (hWnd) );
SetFocus ( GetDlgItem (hWnd, IDC_NAME) );
first_frame_spin = SetupIntSpinner
(
hWnd,
IDC_FIRST_FRAME_SPIN,
IDC_FIRST_FRAME_EDIT,
first_frame,
last_frame,
current_frame
);
first_frame_spin->SetResetValue ( current_frame );
last_frame_spin = SetupIntSpinner
(
hWnd,
IDC_LAST_FRAME_SPIN,
IDC_LAST_FRAME_EDIT,
first_frame,
last_frame,
current_frame
);
last_frame_spin->SetResetValue ( current_frame );
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
if ( SendDlgItemMessage ( hWnd, IDC_NAME, WM_GETTEXTLENGTH, 0, 0 ) == 0 )
EndDialog ( hWnd, 0 );
SendDlgItemMessage ( hWnd, IDC_NAME, WM_GETTEXT, MAX_NAME,
(LPARAM) pose_name );
first_frame = first_frame_spin->GetIVal ();
last_frame = last_frame_spin->GetIVal ();
EndDialog ( hWnd, 1 );
break;
case IDCANCEL:
EndDialog ( hWnd, 0 );
break;
}
return TRUE;
case CC_SPINNER_CHANGE:
// Do checking on the range spinners to make sure the low value never
// exceeds the high value.
switch ( LOWORD(wParam) )
{
case IDC_FIRST_FRAME_SPIN:
if ( first_frame_spin->GetIVal () > last_frame_spin->GetIVal () )
{
last_frame_spin->SetValue ( first_frame_spin->GetIVal (),
FALSE );
}
break;
case IDC_LAST_FRAME_SPIN:
if ( last_frame_spin->GetIVal () < first_frame_spin->GetIVal () )
{
first_frame_spin->SetValue ( last_frame_spin->GetIVal (),
FALSE );
}
break;
}
return TRUE;
}
return FALSE;
}
//----------------------------------------------------------------------------
// Clipboard_Class::Clipboard_Class
//----------------------------------------------------------------------------
Clipboard_Class::Clipboard_Class()
{
iu = NULL;
ip = NULL;
hPanel = NULL;
first_pose = NULL;
}
//----------------------------------------------------------------------------
// Clipboard_Class::~Clipboard_Class
//----------------------------------------------------------------------------
Clipboard_Class::~Clipboard_Class ()
{
while ( first_pose != NULL )
{
Pose * delete_p = first_pose;
first_pose = first_pose->next;
delete delete_p;
}
}
//----------------------------------------------------------------------------
// Clipboard_Class::BeginEditParams
//----------------------------------------------------------------------------
void Clipboard_Class::BeginEditParams(Interface *ip,IUtil *iu)
{
this->iu = iu;
this->ip = ip;
hPanel = ip->AddRollupPage
(
hInstance,
MAKEINTRESOURCE(IDD_CLIPBOARD_PANEL),
ClipboardDlgProc,
_T("Key Clipboard"),
0
);
}
//----------------------------------------------------------------------------
// Clipboard_Class::EndEditParams
//----------------------------------------------------------------------------
void Clipboard_Class::EndEditParams ( Interface *ip, IUtil *iu )
{
this->iu = NULL;
this->ip = NULL;
ip->DeleteRollupPage(hPanel);
hPanel = NULL;
}
//----------------------------------------------------------------------------
// Clipboard_Class::SelectionSetChanged
//----------------------------------------------------------------------------
void Clipboard_Class::SelectionSetChanged ( Interface * ip, IUtil * iu )
{
if ( ip->GetSelNodeCount () == 0 )
{
EnableWindow ( GetDlgItem ( hPanel, ID_CREATE ), FALSE );
}
else
{
EnableWindow ( GetDlgItem ( hPanel, ID_CREATE ), TRUE );
}
}
//----------------------------------------------------------------------------
// Clipboard_Class::Init
//----------------------------------------------------------------------------
void Clipboard_Class::Init ( HWND hWnd )
{
Update_Pose_List ( hWnd );
SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_SETCURSEL, 0, 0 );
Update_Object_List ( hWnd );
if ( ip->GetSelNodeCount () == 0 )
{
EnableWindow ( GetDlgItem ( hWnd, ID_CREATE ), FALSE );
}
else
{
EnableWindow ( GetDlgItem ( hWnd, ID_CREATE ), TRUE );
}
if ( Is_Empty () )
{
EnableWindow ( GetDlgItem ( hWnd, ID_PASTE ), FALSE );
EnableWindow ( GetDlgItem ( hWnd, ID_DELETE ), FALSE );
}
else
{
EnableWindow ( GetDlgItem ( hWnd, ID_PASTE ), TRUE );
EnableWindow ( GetDlgItem ( hWnd, ID_DELETE ), TRUE );
}
}
//----------------------------------------------------------------------------
// Clipboard_Class::Destroy
//----------------------------------------------------------------------------
void Clipboard_Class::Destroy(HWND hWnd) {}
//----------------------------------------------------------------------------
// Clipboard_Class::Create
//----------------------------------------------------------------------------
void Clipboard_Class::Create ( HWND hWnd )
{
// Set up the data that will appear in the name dialog.
const int ticks_per_frame = GetTicksPerFrame ();
first_frame = ip->GetAnimRange ().Start () / ticks_per_frame;
last_frame = ip->GetAnimRange ().End () / ticks_per_frame;
current_frame = ip->GetTime () / ticks_per_frame;
// Put up the name dialog.
int rv = DialogBoxParam
(
hInstance,
MAKEINTRESOURCE ( IDD_POSE_NAME ),
hWnd,
Pose_Name_Message_Handler,
0
);
if ( rv == 0 )
return;
Pose * new_pose = new Pose ( ip, pose_name, first_frame, last_frame );
new_pose->next = first_pose;
first_pose = new_pose;
Update_Pose_List ( hWnd );
SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_SETCURSEL, 0, 0 );
Update_Object_List ( hWnd );
EnableWindow ( GetDlgItem ( hWnd, ID_PASTE ), TRUE );
EnableWindow ( GetDlgItem ( hWnd, ID_DELETE ), TRUE );
}
//----------------------------------------------------------------------------
// Clipboard_Class::Paste
//----------------------------------------------------------------------------
void Clipboard_Class::Paste ( HWND hWnd )
{
SetCursor ( LoadCursor (NULL, IDC_WAIT) );
int sel = SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_GETCURSEL, 0, 0 );
if ( sel == CB_ERR )
return;
// Find the selected pose.
Pose * p = first_pose;
while ( sel > 0 && p != NULL )
{
p = p->next;
-- sel;
}
if ( p == NULL )
return;
p->Paste_Keys ( ip );
SetCursor ( LoadCursor (NULL, IDC_ARROW) );
}
//----------------------------------------------------------------------------
// Clipboard_Class::Delete
//----------------------------------------------------------------------------
void Clipboard_Class::Delete ( HWND hWnd )
{
int sel = SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_GETCURSEL, 0, 0 );
if ( sel != CB_ERR )
{
// Delete the pose's name from the list box.
SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_DELETESTRING, sel, 0 );
SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_SETCURSEL, 0, 0 );
// Find the selected pose and delete it.
Pose ** pointer_to_p = & first_pose;
Pose * p = first_pose;
while ( sel > 0 && p != NULL )
{
pointer_to_p = & p->next;
p = p->next;
-- sel;
}
if ( p != NULL )
{
*pointer_to_p = p->next;
delete p;
}
Update_Object_List ( hWnd );
}
if ( Is_Empty () )
{
EnableWindow ( GetDlgItem ( hWnd, ID_PASTE ), FALSE );
EnableWindow ( GetDlgItem ( hWnd, ID_DELETE ), FALSE );
}
}
//----------------------------------------------------------------------------
// Clipboard_Class::Update_Pose_List
//----------------------------------------------------------------------------
void Clipboard_Class::Update_Pose_List ( HWND hWnd )
{
// Delete any strings in the combo box.
SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_RESETCONTENT, 0, 0 );
// Rebuild the combo box.
for ( Pose * p = first_pose; p != NULL; p = p->next )
{
SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_ADDSTRING, 0,
(LPARAM) (LPCTSTR) p->name () );
}
}
//----------------------------------------------------------------------------
// Clipboard_Class::Update_Object_List
//----------------------------------------------------------------------------
void Clipboard_Class::Update_Object_List ( HWND hWnd )
{
// Delete any strings in the combo box.
SendDlgItemMessage ( hWnd, IDC_OBJECT_LIST, LB_RESETCONTENT, 0, 0 );
// Add strings from the objects in the currently selected pose.
int sel = SendDlgItemMessage ( hWnd, IDC_POSE_LIST, CB_GETCURSEL, 0, 0 );
if ( sel != CB_ERR )
{
Pose * p = first_pose;
while ( sel > 0 && p != NULL )
{
p = p->next;
-- sel;
}
if ( p != NULL )
{
p->Add_Objects_To_List ( hWnd );
}
}
}
//----------------------------------------------------------------------------
// Pose::Pose
//----------------------------------------------------------------------------
Pose::Pose ( Interface * ip, const char * name, int first_frame, int last_frame ):
first_key (NULL),
next (NULL),
ticks_per_frame_ (GetTicksPerFrame ())
{
int number_of_nodes = ip->GetSelNodeCount ();
int nr_frames = (last_frame - first_frame) + 1;
TimeValue start_time = first_frame * ticks_per_frame_;
char frame_count [ 16 ];
sprintf ( frame_count, " (%d)", nr_frames );
strncpy ( name_, name, MAX_NAME - 6 );
strncat ( name_, frame_count, 5 );
name_ [MAX_NAME - 1] = '\0';
for ( int i = 0; i < number_of_nodes; ++ i )
{
// Get the inode.
INode * inode = ip->GetSelNode ( i );
Control * tm_controller = inode->GetTMController ();
if ( tm_controller == NULL )
continue;
Node_Key * new_key = new Node_Key
(
nr_frames,
inode->GetName (),
first_key
);
first_key = new_key;
// Store the position and rotation keys.
Point3 node_position ( 0.0, 0.0, 0.0 );
Quat node_orientation ( 0.0, 0.0, 0.0, 1.0 );
for ( int frame = 0; frame < nr_frames; ++ frame )
{
TimeValue key_time = frame * ticks_per_frame_ + start_time;
Control * c;
// Copy rotation keys.
c = tm_controller->GetRotationController ();
if ( c != NULL )
c->GetValue ( key_time, & node_orientation, FOREVER );
else
node_orientation = Quat (0.0, 0.0, 0.0, 1.0);
// Copy position keys.
c = tm_controller->GetPositionController ();
if ( c != NULL )
c->GetValue ( key_time, & node_position, FOREVER );
else
node_position = Point3 (0.0, 0.0, 0.0);
new_key->set_position ( frame, node_position );
new_key->set_orientation ( frame, node_orientation );
}
}
}
//----------------------------------------------------------------------------
// Pose::Paste_Keys
//----------------------------------------------------------------------------
void Pose::Paste_Keys ( Interface * ip )
{
TimeValue current_time = ip->GetTime ();
theHold.Begin ();
SuspendAnimate ();
AnimateOn ();
Node_Key * p = first_key;
while ( p != NULL )
{
INode * inode = ip->GetINodeByName ( p->name () );
if ( inode != NULL )
{
Control * tm_controller = inode->GetTMController ();
if ( tm_controller != NULL )
{
for ( int frame = 0; frame < p->nr_frames (); ++ frame )
{
TimeValue key_time = current_time + frame * ticks_per_frame_;
Control * c;
// Paste rotation keys.
c = tm_controller->GetRotationController ();
if ( c != NULL )
{
c->EnableORTs (FALSE);
Quat orientation = p->orientation (frame);
c->SetValue ( key_time, & orientation );
c->EnableORTs (TRUE);
}
// Paste position keys.
c = tm_controller->GetPositionController ();
if ( c != NULL )
{
c->EnableORTs (FALSE);
Point3 position = p->position (frame);
c->SetValue ( key_time, & position );
c->EnableORTs (TRUE);
}
}
}
}
p = p->next ();
}
ResumeAnimate ();
TSTR undostr;
undostr.printf ( "Paste Keys" );
theHold.Accept ( undostr );
ip->RedrawViews ( current_time );
}
//----------------------------------------------------------------------------
// Pose::delete_keys
//----------------------------------------------------------------------------
void Pose::delete_keys ()
{
while ( first_key != NULL )
{
Node_Key * delete_p = first_key;
first_key = first_key->next ();
delete delete_p;
}
}
//----------------------------------------------------------------------------
// Pose::Add_Objects_To_List
//----------------------------------------------------------------------------
void Pose::Add_Objects_To_List ( HWND hWnd )
{
for ( Node_Key * k = first_key; k != NULL; k = k->next () )
{
SendDlgItemMessage ( hWnd, IDC_OBJECT_LIST, LB_ADDSTRING, 0,
(LPARAM) (LPCTSTR) k->name () );
}
}

View File

@@ -0,0 +1,8 @@
LIBRARY clipbord
EXPORTS
LibDescription @1
LibNumberClasses @2
LibClassDesc @3
LibVersion @4
SECTIONS
.data READ WRITE

View File

@@ -0,0 +1,130 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_CLIPBOARD_PANEL DIALOG DISCARDABLE 0, 0, 108, 150
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Close",ID_CLOSE,58,132,46,13
LTEXT "Animation:",IDC_ANIMATION,4,2,101,8
COMBOBOX IDC_POSE_LIST,4,12,101,61,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Objects in animation:",IDC_STATIC,4,27,101,8
LISTBOX IDC_OBJECT_LIST,3,38,101,44,LBS_SORT | LBS_NOSEL |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Create...",ID_CREATE,4,84,100,13
PUSHBUTTON "Paste",ID_PASTE,4,100,100,13
PUSHBUTTON "Delete",ID_DELETE,4,116,100,13
LTEXT "James McNeill",IDC_STATIC,4,134,49,8
END
IDD_POSE_NAME DIALOG DISCARDABLE 0, 0, 186, 63
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Pose Name"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Name:",IDC_STATIC,7,7,23,10
EDITTEXT IDC_NAME,31,7,148,12,ES_AUTOHSCROLL
LTEXT "First frame:",IDC_STATIC,7,26,37,10
CONTROL "",IDC_FIRST_FRAME_EDIT,"CustEdit",WS_TABSTOP,47,25,28,
10
CONTROL "",IDC_FIRST_FRAME_SPIN,"SpinnerControl",0x0,75,25,10,10
LTEXT "Last frame:",IDC_STATIC,99,25,37,10
CONTROL "",IDC_LAST_FRAME_EDIT,"CustEdit",WS_TABSTOP,141,25,28,
10
CONTROL "",IDC_LAST_FRAME_SPIN,"SpinnerControl",0x0,169,25,10,10
PUSHBUTTON "Cancel",IDCANCEL,74,42,50,14
DEFPUSHBUTTON "OK",IDOK,129,42,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_POSE_NAME, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 56
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,124 @@
# Microsoft Developer Studio Project File - Name="Clipbord" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=Clipbord - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Clipbord.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Clipbord.mak" CFG="Clipbord - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Clipbord - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "Clipbord - Win32 Hybrid" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""$/Commando/Code/Tools/Clipbord", PIDCAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Clipbord - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "d:\3dsmax2\maxsdk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib core.lib geom.lib maxutil.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release\clipbord.dlu" /libpath:"d:\3dsmax2\maxsdk\lib"
!ELSEIF "$(CFG)" == "Clipbord - Win32 Hybrid"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Hybrid"
# PROP BASE Intermediate_Dir "Hybrid"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Hybrid"
# PROP Intermediate_Dir "Hybrid"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "d:\3dsmax2\maxsdk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "d:\3dsmax2\maxsdk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib core.lib geom.lib util.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release\clipbord.dlu" /libpath:"d:\3dsmax2\maxsdk\lib"
# ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib core.lib geom.lib maxutil.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Hybrid\clipbord.dlu" /libpath:"d:\3dsmax2\maxsdk\lib"
!ENDIF
# Begin Target
# Name "Clipbord - Win32 Release"
# Name "Clipbord - Win32 Hybrid"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\Clipboard.cpp
# End Source File
# Begin Source File
SOURCE=.\Clipboard.def
# End Source File
# Begin Source File
SOURCE=.\Clipboard.rc
# End Source File
# Begin Source File
SOURCE=.\DLLMain.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\clipboard.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,85 @@
/*
** Command & Conquer Renegade(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/>.
*/
#include "clipboard.h"
HINSTANCE hInstance;
static BOOL controlsInit = FALSE;
#define DLLEXPORT __declspec(dllexport)
//----------------------------------------------------------------------------
// DllMain
//----------------------------------------------------------------------------
BOOL WINAPI DllMain
(
HINSTANCE hinstDLL,
ULONG,
LPVOID
)
{
hInstance = hinstDLL;
if ( ! controlsInit )
{
controlsInit = TRUE;
InitCustomControls(hInstance); // jaguar controls
InitCommonControls(); // initialize Chicago controls
}
return TRUE;
}
//----------------------------------------------------------------------------
// LibDescription
//----------------------------------------------------------------------------
DLLEXPORT const TCHAR * LibDescription()
{
return _T("Animation Key Clipboard Utility");
}
//----------------------------------------------------------------------------
// LibNumberClasses
//----------------------------------------------------------------------------
DLLEXPORT int LibNumberClasses()
{
return 1;
}
//----------------------------------------------------------------------------
// LibClassDesc
//----------------------------------------------------------------------------
DLLEXPORT ClassDesc * LibClassDesc(int i)
{
return ClipboardDesc ();
}
//----------------------------------------------------------------------------
// LibVersion
//----------------------------------------------------------------------------
DLLEXPORT ULONG LibVersion()
{
return VERSION_3DSMAX;
}

View File

@@ -0,0 +1,29 @@
/*
** Command & Conquer Renegade(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 _BLENDER_H
#define _BLENDER_H
#include "Max.h"
#include "resource.h"
extern ClassDesc* ClipboardDesc ();
extern HINSTANCE hInstance;
#endif

View File

@@ -0,0 +1,92 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Clipboard.rc
//
#define ID_APPLY 2
#define IDD_COLORCLIP_PANEL 101
#define IDD_COLORCLIP_FLOATER 102
#define IDD_ASCIIOUT_PANEL 103
#define IDD_BLENDER_PANEL 103
#define IDD_CLIPBOARD_PANEL 103
#define IDD_UTILTEST_PANEL 104
#define IDD_POSE_NAME 104
#define IDD_APPDATA_PANEL 105
#define IDC_COLORCLIP_NEWFLOAT 1000
#define IDC_ASCIIOUT_PICK 1002
#define IDC_TESTER_MAKEOBJECT 1003
#define IDC_TESTER_MAKEGROUP 1004
#define IDC_APPDATA_EDIT 1004
#define IDC_TESTER_GROUPOBJS 1005
#define IDC_APPDATA_GET 1005
#define IDC_TESTER_OPENGROUP 1006
#define IDC_APPDATA_PUT 1006
#define IDC_TESTER_CLOSEGROUP 1007
#define IDC_TESTER_EXPLODEGROUP 1008
#define IDC_TESTER_UNGROUP 1009
#define IDC_TESTER_SAVETOFILE 1010
#define IDC_TESTER_LOADFROMFILE 1011
#define IDC_TESTER_SETENV 1012
#define IDC_TESTER_SETWAV 1013
#define IDS_TESTER_ANIMON 1014
#define IDS_TESTER_ANIMOFF 1015
#define ID_CLOSE 1015
#define IDS_TESTER_RENDER 1016
#define IDC_POSITION_CHECK 1016
#define ID_CREATE 1016
#define IDC_ROTATION_CHECK 1017
#define IDC_POSE_LIST 1017
#define ID_PASTE 1018
#define IDC_OBJECT_LIST 1019
#define IDC_NAME 1020
#define ID_DELETE 1021
#define IDC_ANIMATION 1022
#define IDC_KEY_EDIT 1026
#define IDC_FIRST_FRAME_EDIT 1026
#define IDC_MATCH_EDIT 1027
#define IDC_LAST_FRAME_EDIT 1027
#define IDC_POS_LOW_EDIT 1028
#define IDC_POS_HIGH_EDIT 1029
#define IDC_ROT_LOW_EDIT 1030
#define IDC_ROT_HIGH_EDIT 1031
#define IDC_COLOR_SWATCH1 1039
#define IDC_COLOR_SWATCH2 1040
#define IDC_COLOR_SWATCH3 1041
#define IDC_COLOR_SWATCH4 1042
#define IDC_COLOR_SWATCH5 1043
#define IDC_COLOR_SWATCH6 1044
#define IDC_COLOR_SWATCH7 1045
#define IDC_COLOR_SWATCH8 1046
#define IDC_KEY_SPIN 1046
#define IDC_FIRST_FRAME_SPIN 1046
#define IDC_COLOR_SWATCH9 1047
#define IDC_MATCH_SPIN 1047
#define IDC_LAST_FRAME_SPIN 1047
#define IDC_COLOR_SWATCH10 1048
#define IDC_POS_LOW_SPIN 1048
#define IDC_COLOR_SWATCH11 1049
#define IDC_POS_HIGH_SPIN 1049
#define IDC_COLOR_SWATCH12 1050
#define IDC_ROT_LOW_SPIN 1050
#define IDC_ROT_HIGH_SPIN 1051
#define IDC_APPDATA_SLOTSPIN 1202
#define IDC_APPDATA_SLOT 1203
#define IDC_APPDATA_SLOTLABEL 1204
#define IDS_RB_ASCIIOBJECTOUT 30619
#define IDS_RB_ASCIIFILES 30620
#define IDS_RB_SAVEOBJECT 30621
#define IDS_RB_COLORCLIPBOARD 30622
#define IDS_RB_COLORNUM 30623
#define IDS_RB_APPDATATEST 30624
#define IDS_RB_FILEEXISTS 30625
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1023
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif