Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS

Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
@@ -0,0 +1,375 @@
// AnimDetail.cpp : implementation file
//
#include "stdafx.h"
#include "AnimSize.h"
#include "AnimDetail.h"
#include "ChannelDump.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// AnimDetail dialog
AnimDetail::AnimDetail(const char *animation_name, CWnd* pParent /*=NULL*/)
: CDialog(AnimDetail::IDD, pParent)
{
//{{AFX_DATA_INIT(AnimDetail)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
animationName = animation_name;
animData.Load(animation_name);
iconList = new CImageList;
Register_Pointer(iconList);
iconList->Create(16,16, ILC_COLOR16, 2,2);
iconList->Add( theApp.LoadIcon( IDI_ICON_POS ));
iconList->Add( theApp.LoadIcon( IDI_ICON_ROT ));
iconList->Add( theApp.LoadIcon( IDI_ICON_VEL ));
iconList->Add( theApp.LoadIcon( IDI_ICON_TRG ));
iconList->Add( theApp.LoadIcon( IDI_ICON_ANGVEL ));
}
AnimDetail::~AnimDetail()
{
Unregister_Pointer(iconList);
delete iconList;
iconList = NULL;
}
void AnimDetail::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(AnimDetail)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(AnimDetail, CDialog)
//{{AFX_MSG_MAP(AnimDetail)
ON_BN_CLICKED(IDC_BUTTON_STREAM, OnButtonStream)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// AnimDetail message handlers
void AnimDetail::PostNcDestroy()
{
CDialog::PostNcDestroy();
delete this;
}
BOOL AnimDetail::OnInitDialog()
{
CDialog::OnInitDialog();
CListCtrl *list = (CListCtrl *)GetDlgItem( IDC_ANIM_DETAIL_LIST );
list->InsertColumn( 0, "Joint", LVCFMT_LEFT, 150);
list->InsertColumn( 1, "OneKeySize", LVCFMT_LEFT, 70);
list->InsertColumn( 2, "KeyCount", LVCFMT_LEFT, 70);
list->InsertColumn( 3, "TotalKeySize", LVCFMT_LEFT, 75);
list->SetImageList(iconList, LVSIL_SMALL);
int absolute_count = 0;
for (int i = 0; i < animData.GetJointCount(); ++i)
{
Stuff::MString temp_name = animData.animJointBlock[i].GetName(animData.animNameBlock);
Stuff::MString uncomp;
MW4Animation::UncompressName(temp_name, uncomp);
CString joint_name;
joint_name = (const char *)uncomp;
for (int chan_count = 0; chan_count < animData.animJointBlock[i].channelsUsed; chan_count++)
{
ChannelAnimData *cur_channel = &animData.animChannelBlock[animData.animJointBlock[i].firstChannel + chan_count];
Check_Pointer(cur_channel);
int item = 0;
switch (cur_channel->keyType)
{
case JointAnimData::Point3DLinearKeyType:
item = list->InsertItem( absolute_count, joint_name, 0 );
break;
case JointAnimData::QuaternionLinearKeyType:
item = list->InsertItem( absolute_count, joint_name, 1 );
break;
case JointAnimData::VelocityLinearKeyType:
item = list->InsertItem( absolute_count, joint_name, 2 );
break;
case JointAnimData::TriggerLinearKeyType:
item = list->InsertItem( absolute_count, joint_name, 3 );
break;
case JointAnimData::AngularVelocityLinearKeyType:
item = list->InsertItem( absolute_count, joint_name, 4 );
break;
}
CString key_count_text;
CString key_size_text;
CString total_key_size_text;
key_count_text.Format("%d", cur_channel->keyframeCount);
key_size_text.Format("%d", cur_channel->sizeOfOneKey);
total_key_size_text.Format("%d", cur_channel->sizeOfOneKey * cur_channel->keyframeCount);
list->SetItemText( absolute_count, 1, key_size_text );
list->SetItemText( absolute_count, 2, key_count_text );
list->SetItemText( absolute_count, 3, total_key_size_text );
++absolute_count;
}
}
CEdit *edit;
CString size_string;
edit = (CEdit *)GetDlgItem( IDC_EDIT_LOAD_OVERHEAD );
Check_Pointer(edit);
size_string.Format("%d", sizeof(AnimData));
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_HEADER_SIZE );
Check_Pointer(edit);
size_string.Format("%d", animData.animHeaderBlockSize);
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_NAME_SIZE );
Check_Pointer(edit);
size_string.Format("%d", animData.animNameBlockSize);
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_KEYSIZE );
Check_Pointer(edit);
size_string.Format("%d", animData.animKeyBlockSize);
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_JOINT_SIZE );
Check_Pointer(edit);
size_string.Format("%d", animData.animJointBlockSize);
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT4_CHANNEL_SIZE );
Check_Pointer(edit);
size_string.Format("%d", animData.animChannelBlockSize);
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_JOINT_COUNT );
Check_Pointer(edit);
size_string.Format("%d", animData.GetJointCount());
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_CHANNEL_COUNT );
Check_Pointer(edit);
size_string.Format("%d", animData.GetChannelCount());
edit->SetWindowText( size_string );
edit = (CEdit *)GetDlgItem( IDC_EDIT_TOTAL_SIZE );
Check_Pointer(edit);
size_string.Format("%d", animData.GetSize() + sizeof(AnimData));
edit->SetWindowText( size_string );
SetWindowText(animationName);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
#define NEWLINE "\r\n"
void AnimDetail::OnButtonStream()
{
// view the raw data
CListCtrl *list = (CListCtrl *)GetDlgItem( IDC_ANIM_DETAIL_LIST );
Check_Pointer(list);
for (int i = 0; i < list->GetItemCount( ); ++i)
{
//if (list->GetCheck(i))
if (list->GetItemState(i, LVIS_SELECTED) == LVIS_SELECTED)
{
ChannelDump *dump_window;
CString channel_data;
DumpData(channel_data, i);
dump_window = new ChannelDump(channel_data);
dump_window->Create(IDD_CHAN_DUMP_DIALOG);
dump_window->ShowWindow(SW_SHOW);
}
}
}
void AnimDetail::DumpData(CString &channel_data, int channel_number)
{
ChannelAnimData *cur_channel = &animData.animChannelBlock[channel_number];
Check_Pointer(cur_channel);
switch (cur_channel->keyType)
{
case JointAnimData::Point3DLinearKeyType:
channel_data += "Time\tX\tY\tZ";
channel_data += NEWLINE;
break;
case JointAnimData::QuaternionLinearKeyType:
channel_data += "Time\tX\tY\tZ\tW";
channel_data += NEWLINE;
break;
case JointAnimData::TriggerLinearKeyType:
channel_data += "Time\tvalue\t0-15";
channel_data += NEWLINE;
break;
case JointAnimData::VelocityLinearKeyType:
channel_data += "Time\tX\tY\tX\tXv\tYv\tZv";
channel_data += NEWLINE;
break;
case JointAnimData::AngularVelocityLinearKeyType:
channel_data += "Time\tX\tY\tZ\tW\tXv\tYv\tZv";
channel_data += NEWLINE;
break;
}
for (int keyframe = 0; keyframe < cur_channel->keyframeCount; keyframe++)
{
BaseKeyframe *base_keyframe = (BaseKeyframe *)
((BYTE*)animData.animKeyBlock + cur_channel->offsetToKeyData + (cur_channel->sizeOfOneKey * keyframe));
BaseKeyframeTime *base_keyframetime = (BaseKeyframeTime *)
((BYTE*)animData.animKeyTimeBlock + cur_channel->offsetToKeyTimeData + (4 * keyframe));
Check_Pointer(base_keyframe);
CString time;
time.Format("%.3f", base_keyframetime->timeOfFrame);
channel_data += time;
channel_data += " : \t";
CString addon = "";
switch (cur_channel->keyType)
{
case JointAnimData::Point3DLinearKeyType:
addon.Format("%.3f\t%.3f\t%.3f",
((Point3DLinearKey*)base_keyframe)->valueOfKey.x,
((Point3DLinearKey*)base_keyframe)->valueOfKey.y,
((Point3DLinearKey*)base_keyframe)->valueOfKey.z
);
break;
case JointAnimData::QuaternionLinearKeyType:
addon.Format("%.3f\t%.3f\t%.3f\t%.3f",
((QuaternionLinearKey*)base_keyframe)->valueOfKey.x,
((QuaternionLinearKey*)base_keyframe)->valueOfKey.y,
((QuaternionLinearKey*)base_keyframe)->valueOfKey.z,
((QuaternionLinearKey*)base_keyframe)->valueOfKey.w
);
break;
case JointAnimData::TriggerLinearKeyType:
{
//((TriggerLinearKey*)base_keyframe)->value
CString flag_string;
flag_string.Format("%d\t\t", ((TriggerLinearKey*)base_keyframe)->valueOfKey);
addon += flag_string;
int temp = ((TriggerLinearKey*)base_keyframe)->valueOfKey;
for (int i = 0; i < 16; ++i)
{
int flag = temp & 3;
temp = temp >> 2;
flag_string.Format("%d ", flag);
addon += flag_string;
}
}
break;
case JointAnimData::VelocityLinearKeyType:
addon.Format("%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f",
((VelocityLinearKey*)base_keyframe)->valueOfKey.x,
((VelocityLinearKey*)base_keyframe)->valueOfKey.y,
((VelocityLinearKey*)base_keyframe)->valueOfKey.z,
((VelocityLinearKey*)base_keyframe)->velocityOfKey.x,
((VelocityLinearKey*)base_keyframe)->velocityOfKey.y,
((VelocityLinearKey*)base_keyframe)->velocityOfKey.z
);
break;
case JointAnimData::AngularVelocityLinearKeyType:
addon.Format("%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f",
((AngularVelocityLinearKey*)base_keyframe)->valueOfKey.x,
((AngularVelocityLinearKey*)base_keyframe)->valueOfKey.y,
((AngularVelocityLinearKey*)base_keyframe)->valueOfKey.z,
((AngularVelocityLinearKey*)base_keyframe)->valueOfKey.w,
((AngularVelocityLinearKey*)base_keyframe)->velocityOfKey.x,
((AngularVelocityLinearKey*)base_keyframe)->velocityOfKey.y,
((AngularVelocityLinearKey*)base_keyframe)->velocityOfKey.z
);
}
channel_data += addon;
channel_data += NEWLINE;
}
}
@@ -0,0 +1,63 @@
#if !defined(AFX_ANIMDETAIL_H__A0B8790F_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
#define AFX_ANIMDETAIL_H__A0B8790F_8849_11D2_854E_00A0C9B4E907__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AnimDetail.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// AnimDetail dialog
#if !defined(MW4ANIMATIONSYSTEM_HPP)
#include <MW4\MW4AnimationSystem.hpp>
#endif
using namespace MW4Animation;
class AnimDetail : public CDialog
{
// Construction
public:
AnimDetail(const char *animation_name, CWnd* pParent = NULL); // standard constructor
~AnimDetail();
AnimData animData;
CString animationName;
CImageList *iconList;
void DumpData(CString &channel_data, int channel_number);
// Dialog Data
//{{AFX_DATA(AnimDetail)
enum { IDD = IDD_ANIMDETAIL_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(AnimDetail)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(AnimDetail)
virtual BOOL OnInitDialog();
afx_msg void OnButtonStream();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMDETAIL_H__A0B8790F_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
@@ -0,0 +1,112 @@
// AnimSize.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "AnimSize.h"
#include "AnimSizeDlg.h"
#include "ChannelDump.h"
#include <mmsystem.h>
#if !defined(STUFF_STUFF_HPP)
#include "Stuff\Stuff.hpp"
#endif
#include <GameOS\GameOS.hpp>
#include <DLLPlatform\DLLPlatform.hpp>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeApp
BEGIN_MESSAGE_MAP(CAnimSizeApp, CWinApp)
//{{AFX_MSG_MAP(CAnimSizeApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeApp construction
CAnimSizeApp::CAnimSizeApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CAnimSizeApp object
CAnimSizeApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeApp initialization
BOOL CAnimSizeApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CAnimSizeDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
int CAnimSizeApp::ExitInstance()
{
return CWinApp::ExitInstance();
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void __stdcall GetGameOSEnvironment(char* CommandLine)
{
//
//----------------------------------------------------------
// This is where to set GOS environment settings.
//----------------------------------------------------------
//
Environment.applicationName = "ANIMSIZEINVIS";
Environment.directoryPath = "\\Tools\\AnimSize";
Environment.screenWidth = 640;
Environment.screenHeight = 480;
Environment.bitDepth = 16;
}
@@ -0,0 +1,189 @@
# Microsoft Developer Studio Project File - Name="AnimSize" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=AnimSize - Win32 Debug
!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 "AnimSize.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 "AnimSize.mak" CFG="AnimSize - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "AnimSize - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "AnimSize - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "AnimSize - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# 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 /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /Zp4 /MD /W3 /GX /O2 /I "..\..\Libraries" /I "..\..\Code" /I "..\..\..\CoreTech\Libraries" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "AnimSize - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /G6 /Zp4 /MDd /W3 /Gm /GR /Zi /Od /I "..\..\Libraries" /I "..\..\Code" /I "..\..\..\CoreTech\Libraries" /I "..\..\Code\Mw4" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /D "_ARMOR" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "AnimSize - Win32 Release"
# Name "AnimSize - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\AnimDetail.cpp
# End Source File
# Begin Source File
SOURCE=.\AnimSize.cpp
# End Source File
# Begin Source File
SOURCE=.\AnimSize.rc
# End Source File
# Begin Source File
SOURCE=.\AnimSizeDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\ChannelDump.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\AnimDetail.h
# End Source File
# Begin Source File
SOURCE=.\AnimSize.h
# End Source File
# Begin Source File
SOURCE=.\AnimSizeDlg.h
# End Source File
# Begin Source File
SOURCE=.\ChannelDump.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\res\AnimSize.ico
# End Source File
# Begin Source File
SOURCE=.\res\AnimSize.rc2
# End Source File
# Begin Source File
SOURCE=.\res\ico00001.ico
# End Source File
# Begin Source File
SOURCE=.\res\ico00002.ico
# End Source File
# Begin Source File
SOURCE=.\res\ico00003.ico
# End Source File
# Begin Source File
SOURCE=.\res\ico00004.ico
# End Source File
# Begin Source File
SOURCE=.\res\icon1.ico
# End Source File
# Begin Source File
SOURCE=.\res\icon2.ico
# End Source File
# Begin Source File
SOURCE=.\res\icon_vel.ico
# End Source File
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project
@@ -0,0 +1,89 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "AnimSize"=.\AnimSize.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name DLLPlatform
End Project Dependency
Begin Project Dependency
Project_Dep_Name GameOS
End Project Dependency
Begin Project Dependency
Project_Dep_Name MW4Animation
End Project Dependency
Begin Project Dependency
Project_Dep_Name Stuff
End Project Dependency
}}}
###############################################################################
Project: "DLLPlatform"=..\..\..\coretech\libraries\DLLPlatform\DLLPlatform.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "GameOS"=..\..\..\coretech\libraries\gameos\GameOS.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "MW4Animation"=..\..\Code\MW4\MW4Animation.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Stuff"=..\..\Libraries\Stuff\Stuff.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
@@ -0,0 +1,52 @@
// AnimSize.h : main header file for the ANIMSIZE application
//
#if !defined(AFX_ANIMSIZE_H__A0B87905_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
#define AFX_ANIMSIZE_H__A0B87905_8849_11D2_854E_00A0C9B4E907__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeApp:
// See AnimSize.cpp for the implementation of this class
//
class CAnimSizeApp;
extern CAnimSizeApp theApp;
class CAnimSizeApp : public CWinApp
{
public:
CAnimSizeApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAnimSizeApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CAnimSizeApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMSIZE_H__A0B87905_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
@@ -0,0 +1,250 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#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
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\AnimSize.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON DISCARDABLE "res\\AnimSize.ico"
IDI_ICON_NOT_LOADED ICON DISCARDABLE "res\\icon1.ico"
IDI_ICON_LOADED ICON DISCARDABLE "res\\ico00001.ico"
IDI_ICON_ROT ICON DISCARDABLE "res\\ico00002.ico"
IDI_ICON_POS ICON DISCARDABLE "res\\icon2.ico"
IDI_ICON_VEL ICON DISCARDABLE "res\\icon_vel.ico"
IDI_ICON_TRG ICON DISCARDABLE "res\\ico00003.ico"
IDI_ICON_ANGVEL ICON DISCARDABLE "res\\ico00004.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ANIMSIZE_DIALOG DIALOGEX 0, 0, 339, 346
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "AnimSize"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
PUSHBUTTON "Load...",IDC_BUTTON2,5,305,55,15
PUSHBUTTON "Save...",IDC_BUTTON3,60,305,55,15
PUSHBUTTON "Add Files...",IDC_BUTTON4,115,305,55,15
EDITTEXT IDC_TOTAL_SIZE_EDIT,265,305,55,15,ES_AUTOHSCROLL |
ES_READONLY
PUSHBUTTON "Recalculate",IDC_BUTTON5,45,324,120,15
PUSHBUTTON "Quit",IDC_BUTTON6,175,324,120,15
CONTROL "List1",IDC_ANIM_LIST,"SysListView32",LVS_REPORT |
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,325,293
PUSHBUTTON "Anim Detail >>>",IDC_BUTTON_DETAIL,189,305,55,15
END
IDD_ANIMDETAIL_DIALOG DIALOG DISCARDABLE 0, 0, 292, 414
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Joint Block Size",IDC_STATIC,7,377,62,10
EDITTEXT IDC_EDIT_JOINT_COUNT,115,375,20,12,ES_AUTOHSCROLL |
ES_READONLY
EDITTEXT IDC_EDIT_JOINT_SIZE,71,375,40,12,ES_AUTOHSCROLL |
ES_READONLY
LTEXT "Count",IDC_STATIC,115,364,20,10
LTEXT "Channel Block Size",IDC_STATIC,7,393,62,10
EDITTEXT IDC_EDIT_CHANNEL_COUNT,115,391,20,12,ES_AUTOHSCROLL |
ES_READONLY
EDITTEXT IDC_EDIT4_CHANNEL_SIZE,71,391,40,12,ES_AUTOHSCROLL |
ES_READONLY
LTEXT "Total Size",IDC_STATIC,175,346,40,10
EDITTEXT IDC_EDIT_TOTAL_SIZE,221,345,40,12,ES_AUTOHSCROLL |
ES_READONLY
CONTROL "List1",IDC_ANIM_DETAIL_LIST,"SysListView32",LVS_REPORT |
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,278,303
PUSHBUTTON "Channel Stream >>>",IDC_BUTTON_STREAM,203,383,76,14
LTEXT "Loader Overhead",IDC_STATIC,7,320,62,10
EDITTEXT IDC_EDIT_LOAD_OVERHEAD,71,319,40,12,ES_AUTOHSCROLL |
ES_READONLY
LTEXT "Header Block Size",IDC_STATIC,7,333,62,10
EDITTEXT IDC_EDIT_HEADER_SIZE,71,333,40,12,ES_AUTOHSCROLL |
ES_READONLY
LTEXT "Name Block Size",IDC_STATIC,7,347,62,10
EDITTEXT IDC_EDIT_NAME_SIZE,71,346,40,12,ES_AUTOHSCROLL |
ES_READONLY
LTEXT "Total Key Size",IDC_STATIC,7,361,62,10
EDITTEXT IDC_EDIT_KEYSIZE,71,361,40,12,ES_AUTOHSCROLL |
ES_READONLY
END
IDD_CHAN_DUMP_DIALOG DIALOG DISCARDABLE 0, 0, 427, 317
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_JOINT_EDIT,0,0,425,315,ES_MULTILINE | ES_AUTOHSCROLL |
ES_READONLY
END
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "AnimSize MFC Application\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "AnimSize\0"
VALUE "LegalCopyright", "Copyright (C) 1998\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "AnimSize.EXE\0"
VALUE "ProductName", "AnimSize Application\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ANIMSIZE_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 332
TOPMARGIN, 7
BOTTOMMARGIN, 339
END
IDD_ANIMDETAIL_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 285
TOPMARGIN, 7
BOTTOMMARGIN, 407
END
IDD_CHAN_DUMP_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 420
TOPMARGIN, 7
BOTTOMMARGIN, 310
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\AnimSize.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -0,0 +1,505 @@
// AnimSizeDlg.cpp : implementation file
//
#include "stdafx.h"
#include "AnimSize.h"
#include "AnimSizeDlg.h"
#include "Stuff\NotationFile.hpp"
#if !defined(STUFF_STUFF_HPP)
#include "Stuff\Stuff.hpp"
#endif
#include <GameOS\GameOS.hpp>
#include <DLLPlatform\DLLPlatform.hpp>
#if !defined(MW4ANIMATIONSYSTEM_HPP)
#include <MW4\MW4AnimationSystem.hpp>
#endif
HGOSHEAP Heap;
using namespace Stuff;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "AnimDetail.h"
using namespace MW4Animation;
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeDlg dialog
CAnimSizeDlg::CAnimSizeDlg(CWnd* pParent /*=NULL*/)
: CDialog(CAnimSizeDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CAnimSizeDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
HINSTANCE hInstance;
hInstance = AfxGetResourceHandle();
InitGameOS( hInstance, NULL, "\0" );
Stuff::ArmorLevel = 3;
Stuff::InitializeClasses();
notationList = NULL;
notNamed = false;
iconList = new CImageList;
Register_Pointer(iconList);
iconList->Create(16,16, ILC_COLOR16, 2,2);
iconList->Add( theApp.LoadIcon( IDI_ICON_NOT_LOADED ));
iconList->Add( theApp.LoadIcon( IDI_ICON_LOADED ));
Heap = gos_CreateMemoryHeap("Default");
Check_Pointer(Heap);
gos_PushCurrentHeap(Heap);
}
CAnimSizeDlg::~CAnimSizeDlg()
{
gos_PopCurrentHeap();
Unregister_Pointer(iconList);
delete iconList;
iconList = NULL;
Stuff::TerminateClasses();
// DLLPlatform::TerminatePlatform();
ExitGameOS();
}
void CAnimSizeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAnimSizeDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAnimSizeDlg, CDialog)
//{{AFX_MSG_MAP(CAnimSizeDlg)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BUTTON2, OnLoad)
ON_BN_CLICKED(IDC_BUTTON3, OnSave)
ON_BN_CLICKED(IDC_BUTTON4, OnAddFiles)
ON_BN_CLICKED(IDC_BUTTON5, OnRefresh)
ON_BN_CLICKED(IDC_BUTTON6, OnQuit)
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_BUTTON_DETAIL, OnButtonDetail)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeDlg message handlers
#define NAME_COLUMN 0
#define CHANNEL_COUNT_COLUMN 1
#define SIZE_COLUMN 2
int ColumnArray[3];
BOOL CAnimSizeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
CListCtrl *list = (CListCtrl *)GetDlgItem( IDC_ANIM_LIST );
ColumnArray[NAME_COLUMN] = list->InsertColumn( NAME_COLUMN, "Name", LVCFMT_LEFT, 350);
ColumnArray[CHANNEL_COUNT_COLUMN] = list->InsertColumn( CHANNEL_COUNT_COLUMN, "Channels", LVCFMT_LEFT, 60);
ColumnArray[SIZE_COLUMN] = list->InsertColumn( SIZE_COLUMN, "Size", LVCFMT_LEFT, 50);
list->SetImageList(iconList, LVSIL_SMALL);
return TRUE; // return TRUE unless you set the focus to a control
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CAnimSizeDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CAnimSizeDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::OnLoad()
{
// save current list
if (notationList != NULL)
{
int result = CAnimSizeDlg::MessageBox("Do you want to save current list?", "Save", MB_YESNOCANCEL);
if (result == IDYES)
{
const char *name = NULL;
if (!notNamed)
{
name = notationList->GetFileName();
}
CFileDialog dlg(false, ".list", name, OFN_OVERWRITEPROMPT, "Notation List (*.list)|*.list||");
if (dlg.DoModal() == IDOK)
{
//Stuff::FileStream file_stream(dlg.GetPathName(), Stuff::FileStream::WriteOnly);
notationList->SaveAs(dlg.GetPathName());
//notationList->Reset();
Unregister_Object(notationList);
delete notationList;
notationList = NULL;
}
else
{
return;
}
}
else if (result == IDNO)
{
notationList->IgnoreChanges();
Unregister_Object(notationList);
delete notationList;
notationList = NULL;
}
else
{
return;
}
}
Verify(notationList == NULL);
// load new list
CFileDialog dlg(true, ".list", NULL, NULL, "Notation List (*.list)|*.list||");
if (dlg.DoModal() == IDOK)
{
notationList = new NotationFile(dlg.GetPathName());
Register_Object(notationList);
}
OnRefresh();
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::OnSave()
{
if (notationList == NULL)
return;
if (!notationList->IsChanged())
{
return;
}
// save current list
const char *name = NULL;
if (!notNamed)
{
name = notationList->GetFileName();
}
CFileDialog dlg(false, ".list", name, OFN_OVERWRITEPROMPT, "Notation List (*.list)|*.list||");
if (dlg.DoModal() == IDOK)
{
//Stuff::FileStream file_stream(dlg.GetPathName(), Stuff::FileStream::WriteOnly);
notationList->SaveAs(dlg.GetPathName());
//notationList->Reset();
Unregister_Object(notationList);
delete notationList;
notationList = NULL;
}
OnRefresh();
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::OnAddFiles()
{
if (notationList == NULL)
{
notationList = new NotationFile();
Register_Object(notationList);
notNamed = true;
}
// add files
CFileDialog dlg(true, ".mw4anim", NULL, OFN_ALLOWMULTISELECT, "Mech4 Animation (*.mw4anim)|*.mw4anim||");
char *holder = dlg.m_ofn.lpstrFile;
dlg.m_ofn.lpstrFile = new char [10000];
Register_Pointer(dlg.m_ofn.lpstrFile);
dlg.m_ofn.nMaxFile = 10000;
for (int i = 0; i < 10000; ++i)
{
dlg.m_ofn.lpstrFile[i] = NULL;
}
Page *page = notationList->SetPage("ANIMLIST");
Check_Object(page);
if (dlg.DoModal() == IDOK)
{
POSITION pos = dlg.GetStartPosition();
page->AppendEntry("ANIM", dlg.GetNextPathName(pos));
while (pos != NULL)
{
page->AppendEntry("ANIM", dlg.GetNextPathName(pos));
}
}
Unregister_Pointer(dlg.m_ofn.lpstrFile);
delete[] dlg.m_ofn.lpstrFile;
dlg.m_ofn.lpstrFile = holder;
OnRefresh();
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::OnRefresh()
{
// clear list
CListCtrl *list = (CListCtrl *)GetDlgItem( IDC_ANIM_LIST );
Check_Pointer(list);
list->DeleteAllItems();
if (notationList == NULL)
return;
Page *page = notationList->FindPage("ANIMLIST");
if (!page)
return;
ChainOf<Note*> *anim_name_list = page->MakeNoteChain("ANIM");
Check_Object(anim_name_list);
Page::NoteIterator anim_itr(anim_name_list);
Note *anim_name_entry;
int count = 0;
size_t total_size = 0;
while ((anim_name_entry = anim_itr.ReadAndNext()) != NULL)
{
const char *entry_name;
anim_name_entry->GetEntry(&entry_name);
AnimListData list_data;
GetAnimData(entry_name, list_data);
int icon_image;
if (list_data.animValid)
{
icon_image = 1;
}
else
{
icon_image = 0;
}
int item = list->InsertItem( count, entry_name, icon_image );
// set other data..
CString channel_count_text;
channel_count_text.Format("%d", (int)list_data.channelCount);
CString anim_size_text;
anim_size_text.Format("%d", list_data.animSize);
list->SetItemText( item, ColumnArray[CHANNEL_COUNT_COLUMN], channel_count_text );
list->SetItemText( item, ColumnArray[SIZE_COLUMN], anim_size_text );
total_size += list_data.animSize;
++count;
}
Unregister_Object(anim_name_list);
delete anim_name_list;
CEdit *edit = (CEdit *)GetDlgItem( IDC_TOTAL_SIZE_EDIT );
Check_Pointer(edit);
int total_k = 0;
if (total_size != 0)
{
total_k = total_size / 1024;
}
CString size_string;
size_string.Format("%db / %dk", total_size, total_k);
edit->SetWindowText( size_string );
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::GetAnimData(const char *name, AnimListData &list_data)
{
list_data.animValid = false;
list_data.animSize = 0;
list_data.channelCount = 0;
AnimData new_anim;
if (new_anim.Load(name))
{
list_data.animValid = true;
list_data.animSize = sizeof(new_anim) + new_anim.GetSize();;
list_data.channelCount = new_anim.GetChannelCount();
}
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::OnQuit()
{
OnClose();
DestroyWindow( );
}
/////////////////////////////////////////////////////////////////////////////
void CAnimSizeDlg::OnClose()
{
// TODO: Add your message handler code here and/or call default
if (notationList != NULL)
{
OnSave();
notationList->IgnoreChanges();
Unregister_Object(notationList);
delete notationList;
notationList = NULL;
}
CDialog::OnClose();
}
void CAnimSizeDlg::OnButtonDetail()
{
CListCtrl *list = (CListCtrl *)GetDlgItem( IDC_ANIM_LIST );
Check_Pointer(list);
for (int i = 0; i < list->GetItemCount( ); ++i)
{
//if (list->GetCheck(i))
if (list->GetItemState(i, LVIS_SELECTED) == LVIS_SELECTED)
{
AnimData new_anim;
if (new_anim.Load(list->GetItemText( i, 0) ))
{
AnimDetail *new_detail;
new_detail = new AnimDetail(list->GetItemText( i, 0) );
new_detail->Create(IDD_ANIMDETAIL_DIALOG);
new_detail->ShowWindow(SW_SHOW);
}
}
}
}
void CAnimSizeDlg::PostNcDestroy()
{
// TODO: Add your specialized code here and/or call the base class
CDialog::PostNcDestroy();
//delete this;
}
@@ -0,0 +1,79 @@
// AnimSizeDlg.h : header file
//
#if !defined(AFX_ANIMSIZEDLG_H__A0B87907_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
#define AFX_ANIMSIZEDLG_H__A0B87907_8849_11D2_854E_00A0C9B4E907__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CAnimSizeDlg dialog
#if !defined(STUFF_STUFF_HPP)
#include "Stuff\Stuff.hpp"
#endif
struct AnimListData
{
bool animValid;
size_t animSize;
char channelCount;
};
class CAnimSizeDlg : public CDialog
{
// Construction
public:
CAnimSizeDlg(CWnd* pParent = NULL); // standard constructor
~CAnimSizeDlg();
// Dialog Data
//{{AFX_DATA(CAnimSizeDlg)
enum { IDD = IDD_ANIMSIZE_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAnimSizeDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
public:
Stuff::NotationFile *notationList;
bool notNamed;
CImageList *iconList;
void GetAnimData(const char *name, AnimListData &list_data);
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CAnimSizeDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnLoad();
afx_msg void OnSave();
afx_msg void OnAddFiles();
afx_msg void OnRefresh();
afx_msg void OnQuit();
afx_msg void OnClose();
afx_msg void OnButtonDetail();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMSIZEDLG_H__A0B87907_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
@@ -0,0 +1,65 @@
// ChannelDump.cpp : implementation file
//
#include "stdafx.h"
#include "animsize.h"
#include "ChannelDump.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ChannelDump dialog
ChannelDump::ChannelDump(const char *text, CWnd* pParent /*=NULL*/)
: CDialog(ChannelDump::IDD, pParent)
{
//{{AFX_DATA_INIT(ChannelDump)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
editText = text;
}
void ChannelDump::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(ChannelDump)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(ChannelDump, CDialog)
//{{AFX_MSG_MAP(ChannelDump)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// ChannelDump message handlers
BOOL ChannelDump::OnInitDialog()
{
CDialog::OnInitDialog();
CEdit *edit;
edit = (CEdit *)GetDlgItem( IDC_JOINT_EDIT );
edit->SetWindowText( editText );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void ChannelDump::PostNcDestroy()
{
// TODO: Add your specialized code here and/or call the base class
CDialog::PostNcDestroy();
delete this;
}
@@ -0,0 +1,48 @@
#if !defined(AFX_CHANNELDUMP_H__305AD607_D031_11D2_BBE6_CD2C989C903A__INCLUDED_)
#define AFX_CHANNELDUMP_H__305AD607_D031_11D2_BBE6_CD2C989C903A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ChannelDump.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// ChannelDump dialog
class ChannelDump : public CDialog
{
// Construction
public:
ChannelDump(const char *text, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(ChannelDump)
enum { IDD = IDD_CHAN_DUMP_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
CString editText;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(ChannelDump)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(ChannelDump)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHANNELDUMP_H__305AD607_D031_11D2_BBE6_CD2C989C903A__INCLUDED_)
@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// AnimSize.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
+27
View File
@@ -0,0 +1,27 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A0B87909_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
#define AFX_STDAFX_H__A0B87909_8849_11D2_854E_00A0C9B4E907__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A0B87909_8849_11D2_854E_00A0C9B4E907__INCLUDED_)
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,13 @@
//
// ANIMSIZE.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,59 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by AnimSize.rc
//
#define IDD_ANIMSIZE_DIALOG 102
#define IDD_ANIMDETAIL_DIALOG 103
#define IDR_MAINFRAME 128
#define IDI_ICON_NOT_LOADED 130
#define IDI_ICON_LOADED 131
#define IDI_ICON_ROT 132
#define IDI_ICON_POS 133
#define IDD_CHAN_DUMP_DIALOG 133
#define IDI_ICON_VEL 134
#define IDI_ICON_TRG 135
#define IDI_ICON_ANGVEL 136
#define IDC_LIST1 1000
#define IDC_ANIM_DETAIL_LIST 1000
#define IDC_BUTTON2 1002
#define IDC_BUTTON3 1003
#define IDC_BUTTON4 1004
#define IDC_EDIT1 1005
#define IDC_EDIT_JOINT_COUNT 1005
#define IDC_JOINT_EDIT 1005
#define IDC_LIST2 1006
#define IDC_SCROLLBAR1 1007
#define IDC_EDIT2 1007
#define IDC_EDIT_JOINT_SIZE 1007
#define IDC_BUTTON5 1008
#define IDC_EDIT3 1008
#define IDC_EDIT_CHANNEL_COUNT 1008
#define IDC_BUTTON6 1009
#define IDC_EDIT4 1009
#define IDC_EDIT4_CHANNEL_SIZE 1009
#define IDC_EDIT5 1010
#define IDC_EDIT_TOTAL_SIZE 1010
#define IDC_EDIT6 1011
#define IDC_EDIT_LOAD_OVERHEAD 1011
#define IDC_EDIT7 1012
#define IDC_EDIT_HEADER_SIZE 1012
#define IDC_SCROLLBAR2 1013
#define IDC_EDIT_NAME_SIZE 1013
#define IDC_EDIT_KEYSIZE 1014
#define IDC_LIST3 1015
#define IDC_ANIM_LIST 1016
#define IDC_LIST5 1017
#define IDC_TOTAL_SIZE_EDIT 1017
#define IDC_BUTTON_DETAIL 1018
#define IDC_BUTTON_STREAM 1020
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 135
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1028
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif