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,76 @@
/*
** 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/>.
*/
#include "StdAfx.h"
#include "Gameclient/ParticleSys.h"
#include "CButtonShowColor.h"
// CButtonShowColor ///////////////////////////////////////////////////////////////////////////////
void CButtonShowColor::OnPaint()
{
try {
CPaintDC paintDC(this);
CPen pen(PS_SOLID, 1, 0xFFFFFF00);
CBrush brush(RGBtoBGR(m_color.getAsInt()));
// Select my stuff
CPen *oldPen = paintDC.SelectObject(&pen);
CRect rect;
GetWindowRect(&rect);
ScreenToClient(&rect);
paintDC.FillRect(&rect, &brush);
paintDC.MoveTo(rect.left, rect.top);
paintDC.LineTo(rect.right, rect.top);
paintDC.LineTo(rect.right, rect.bottom);
paintDC.LineTo(rect.left, rect.bottom);
paintDC.LineTo(rect.left, rect.top);
// Restore the states.
paintDC.SelectObject(oldPen);
} catch (...) {
// Unlikely, but possible.
return;
}
}
CButtonShowColor::~CButtonShowColor()
{
DestroyWindow();
}
// Convert from 0x00RRGGBB to 0x00BBGGRR
COLORREF CButtonShowColor::RGBtoBGR(Int color)
{
return ((color & 0x00FF0000) >> 16 |
(color & 0x0000FF00) << 0 |
(color & 0x000000FF) << 16);
}
// Convert from 0x00BBGGRR to 0x00RRGGBB
Int CButtonShowColor::BGRtoRGB(COLORREF color)
{
return RGBtoBGR(color);
}
BEGIN_MESSAGE_MAP(CButtonShowColor, CButton)
ON_WM_PAINT()
END_MESSAGE_MAP()

View file

@ -0,0 +1,48 @@
/*
** 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/>.
*/
#pragma once
#ifndef _H_CBUTTONSHOWCOLOR_
#define _H_CBUTTONSHOWCOLOR_
#include "Lib/Basetype.h"
class CButtonShowColor : public CButton
{
protected:
RGBColor m_color;
public:
const RGBColor& getColor(void) const { return m_color; }
void setColor(Int color) { m_color.setFromInt(color); }
void setColor(const RGBColor& color) { m_color = color; }
~CButtonShowColor();
static COLORREF RGBtoBGR(Int color);
static Int BGRtoRGB(COLORREF color);
protected:
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP();
};
#endif /* _H_CBUTTONSHOWCOLOR_ */

View file

@ -0,0 +1,327 @@
/*
** 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/>.
*/
#include "StdAfx.h"
#include "Resource.h"
#include "CColorAlphaDialog.h"
#include "GameClient/ParticleSys.h"
#include "CParticleEditorPage.h"
#include "EmissionTypePanels.h"
#include "ParticleEditorDialog.h"
#include "ParticleEditorExport.h"
#include "ParticleTypePanels.h"
#include "VelocityTypePanels.h"
#define ARBITRARY_BUFF_SIZE 128
static const UINT colorControls[][2] =
{
{IDC_PSEd_Color1, IDC_PSEd_CF1_Frame},
{IDC_PSEd_Color2, IDC_PSEd_CF2_Frame},
{IDC_PSEd_Color3, IDC_PSEd_CF3_Frame},
{IDC_PSEd_Color4, IDC_PSEd_CF4_Frame},
{IDC_PSEd_Color5, IDC_PSEd_CF5_Frame},
{IDC_PSEd_Color6, IDC_PSEd_CF6_Frame},
{IDC_PSEd_Color7, IDC_PSEd_CF7_Frame},
{IDC_PSEd_Color8, IDC_PSEd_CF8_Frame}
};
static const UINT alphaControls[][3] =
{
{IDC_PSEd_AF1_Min, IDC_PSEd_AF1_Max, IDC_PSEd_AF1_Frame},
{IDC_PSEd_AF2_Min, IDC_PSEd_AF2_Max, IDC_PSEd_AF2_Frame},
{IDC_PSEd_AF3_Min, IDC_PSEd_AF3_Max, IDC_PSEd_AF3_Frame},
{IDC_PSEd_AF4_Min, IDC_PSEd_AF4_Max, IDC_PSEd_AF4_Frame},
{IDC_PSEd_AF5_Min, IDC_PSEd_AF5_Max, IDC_PSEd_AF5_Frame},
{IDC_PSEd_AF6_Min, IDC_PSEd_AF6_Max, IDC_PSEd_AF6_Frame},
{IDC_PSEd_AF7_Min, IDC_PSEd_AF7_Max, IDC_PSEd_AF7_Frame},
{IDC_PSEd_AF8_Min, IDC_PSEd_AF8_Max, IDC_PSEd_AF8_Frame}
};
CColorAlphaDialog::CColorAlphaDialog(UINT nIDTemplate, CWnd* pParentWnd) :
CDialog(nIDTemplate, pParentWnd)
{}
void CColorAlphaDialog::InitPanel( void )
{
CString custColor;
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color1", "0");
m_customColors[0] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color2", "0");
m_customColors[1] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color3", "0");
m_customColors[2] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color4", "0");
m_customColors[3] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color5", "0");
m_customColors[4] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color6", "0");
m_customColors[5] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color7", "0");
m_customColors[6] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color8", "0");
m_customColors[7] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color9", "0");
m_customColors[8] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color10", "0");
m_customColors[9] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color11", "0");
m_customColors[10] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color12", "0");
m_customColors[11] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color13", "0");
m_customColors[12] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color14", "0");
m_customColors[13] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color15", "0");
m_customColors[14] = atol(custColor.GetBuffer(0));
custColor = AfxGetApp()->GetProfileString("Custom Colors", "Color16", "0");
m_customColors[15] = atol(custColor.GetBuffer(0));
}
void CColorAlphaDialog::performUpdate(IN Bool toUI)
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update the colors
for (int i = 0; i < MAX_KEYFRAMES; ++i) {
// update the color swatch
CButtonShowColor *pSwatch = (CButtonShowColor*) GetDlgItem(colorControls[i][0]);
CWnd *pFrame = GetDlgItem(colorControls[i][1]);
RGBColorKeyframe colorFrame;
if (pSwatch && pFrame) {
if (toUI) {
pParent->getColorValueFromSystem(i, colorFrame);
pSwatch->setColor(colorFrame.color);
pSwatch->Invalidate(TRUE);
sprintf(buff, "%u", colorFrame.frame);
pFrame->SetWindowText(buff);
} else {
colorFrame.color = pSwatch->getColor();
pFrame->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
colorFrame.frame = atoi(buff);
pParent->updateColorValueToSystem(i, colorFrame);
}
}
}
}
{ // update the values
for (int i = 0; i < MAX_KEYFRAMES; ++i) {
ParticleSystemInfo::RandomKeyframe keyFrame;
pParent->getAlphaRangeFromSystem(i, keyFrame);
{ // Minimum first
CWnd *pMin = GetDlgItem(alphaControls[i][0]);
if (pMin) {
if (toUI) {
sprintf(buff, FORMAT_STRING, keyFrame.var.getMinimumValue());
pMin->SetWindowText(buff);
} else {
pMin->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
keyFrame.var.m_low = atof(buff);
}
}
}
{ // then maximum
CWnd *pMax = GetDlgItem(alphaControls[i][1]);
if (pMax) {
if (toUI) {
sprintf(buff, FORMAT_STRING, keyFrame.var.getMaximumValue());
pMax->SetWindowText(buff);
} else {
pMax->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
keyFrame.var.m_high = atof(buff);
}
}
}
{ // then the frame
CWnd *pFrame = GetDlgItem(alphaControls[i][2]);
if (pFrame) {
if (toUI) {
// Unsigned int
sprintf(buff, "%u", keyFrame.frame);
pFrame->SetWindowText(buff);
} else {
pFrame->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
keyFrame.frame = (unsigned) atoi(buff);
}
}
}
if (toUI) {
// We're all done.
} else {
pParent->updateAlphaRangeToSystem(i, keyFrame);
}
}
}
}
void CColorAlphaDialog::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BOOL CColorAlphaDialog::OnInitDialog()
{
// replace all the buttons with our buttons.
for (int i = 0; i < MAX_KEYFRAMES; ++i) {
CRect rect;
CWnd *item = GetDlgItem(colorControls[i][0]);
if (!item) {
continue;
}
item->GetWindowRect(&rect);
ScreenToClient(&rect);
DWORD style = item->GetStyle();
m_colorButton[i].Create("", style, rect, this, colorControls[i][0]);
item->DestroyWindow();
}
return CDialog::OnInitDialog();
}
#define ONCOLORDLG(x) void CColorAlphaDialog::OnColor##x##() { onColorPress( x ); }
ONCOLORDLG(1)
ONCOLORDLG(2)
ONCOLORDLG(3)
ONCOLORDLG(4)
ONCOLORDLG(5)
ONCOLORDLG(6)
ONCOLORDLG(7)
ONCOLORDLG(8)
#undef ONCOLORDLG
void CColorAlphaDialog::onColorPress(Int colorPressed)
{
CColorDialog dlg(CButtonShowColor::RGBtoBGR(m_colorButton[colorPressed - 1].getColor().getAsInt()));
dlg.m_cc.Flags |= (CC_FULLOPEN | CC_ANYCOLOR);
dlg.m_cc.lpCustColors = m_customColors;
if (dlg.DoModal() == IDOK) {
m_colorButton[colorPressed - 1].setColor(CButtonShowColor::BGRtoRGB(dlg.GetColor()));
static char buff[ARBITRARY_BUFF_SIZE];
ltoa(m_customColors[0], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color1", buff);
ltoa(m_customColors[1], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color2", buff);
ltoa(m_customColors[2], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color3", buff);
ltoa(m_customColors[3], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color4", buff);
ltoa(m_customColors[4], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color5", buff);
ltoa(m_customColors[5], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color6", buff);
ltoa(m_customColors[6], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color7", buff);
ltoa(m_customColors[7], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color8", buff);
ltoa(m_customColors[8], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color9", buff);
ltoa(m_customColors[9], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color10", buff);
ltoa(m_customColors[10], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color11", buff);
ltoa(m_customColors[11], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color12", buff);
ltoa(m_customColors[12], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color13", buff);
ltoa(m_customColors[13], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color14", buff);
ltoa(m_customColors[14], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color15", buff);
ltoa(m_customColors[15], buff, 10);
AfxGetApp()->WriteProfileString("Custom Colors", "Color16", buff);
OnParticleSystemEdit();
}
}
BEGIN_MESSAGE_MAP(CColorAlphaDialog, CDialog)
ON_BN_CLICKED(IDC_PSEd_Color1, OnColor1)
ON_BN_CLICKED(IDC_PSEd_Color2, OnColor2)
ON_BN_CLICKED(IDC_PSEd_Color3, OnColor3)
ON_BN_CLICKED(IDC_PSEd_Color4, OnColor4)
ON_BN_CLICKED(IDC_PSEd_Color5, OnColor5)
ON_BN_CLICKED(IDC_PSEd_Color6, OnColor6)
ON_BN_CLICKED(IDC_PSEd_Color7, OnColor7)
ON_BN_CLICKED(IDC_PSEd_Color8, OnColor8)
ON_EN_KILLFOCUS(IDC_PSEd_CF1_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF2_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF3_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF4_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF5_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF6_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF7_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CF8_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF1_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF2_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF3_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF4_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF5_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF6_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF7_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF8_Min, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF1_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF2_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF3_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF4_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF5_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF6_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF7_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF8_Max, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF1_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF2_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF3_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF4_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF5_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF6_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF7_Frame, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_AF8_Frame, OnParticleSystemEdit)
END_MESSAGE_MAP()

View file

@ -0,0 +1,56 @@
/*
** 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/>.
*/
#pragma once
#include "CButtonShowColor.h"
#include "GameClient/ParticleSys.h"
class CColorAlphaDialog : public CDialog
{
protected:
DWORD m_customColors[16];
CButtonShowColor m_colorButton[MAX_KEYFRAMES];
void onColorPress( Int colorPressed );
public:
enum {IDD = IDD_PSEd_EditColorAndAlpha};
CColorAlphaDialog(UINT nIDTemplate = CColorAlphaDialog::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
virtual BOOL OnInitDialog();
afx_msg void OnColor1();
afx_msg void OnColor2();
afx_msg void OnColor3();
afx_msg void OnColor4();
afx_msg void OnColor5();
afx_msg void OnColor6();
afx_msg void OnColor7();
afx_msg void OnColor8();
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};

View file

@ -0,0 +1,34 @@
/*
** 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/>.
*/
#pragma once
struct CParticleEditorPage : public CDialog
{
UINT m_templateID;
public:
CParticleEditorPage(UINT nIDTemplate = 0, CWnd* pParentWnd = NULL);
void InitPanel( int templateID );
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};

View file

@ -0,0 +1,136 @@
/*
** 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/>.
*/
#include "StdAfx.h"
#include "Resource.h"
#include "CSwitchesDialog.h"
#include "ParticleEditorDialog.h"
CSwitchesDialog::CSwitchesDialog(UINT nIDTemplate, CWnd* pParentWnd) : CDialog(nIDTemplate, pParentWnd)
{
}
void CSwitchesDialog::InitPanel( void )
{
}
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void CSwitchesDialog::performUpdate( IN Bool toUI )
{
DebugWindowDialog *parent = GetDWDParent();
if (!parent) {
return;
}
{ // update hollowness
CButton *pWnd;
pWnd = (CButton*)GetDlgItem(IDC_PSEd_Hollow);
if (pWnd) {
Bool hollow;
if (toUI) {
parent->getSwitchFromSystem(ST_HOLLOW, hollow);
pWnd->SetCheck(hollow);
} else {
hollow = pWnd->GetCheck();
parent->updateSwitchToSystem(ST_HOLLOW, hollow);
}
}
}
{ // update one shot
CButton *pWnd;
pWnd = (CButton*)GetDlgItem(IDC_PSEd_OneShot);
if (pWnd) {
Bool oneShot;
if (toUI) {
parent->getSwitchFromSystem(ST_ONESHOT, oneShot);
pWnd->SetCheck(oneShot);
} else {
oneShot = pWnd->GetCheck();
parent->updateSwitchToSystem(ST_ONESHOT, oneShot);
}
}
}
{ // update Ground Aligned
CButton *pWnd;
pWnd = (CButton*)GetDlgItem(IDC_PSEd_GroundAligned);
if (pWnd) {
Bool groundAlign;
if (toUI) {
parent->getSwitchFromSystem(ST_ALIGNXY, groundAlign);
pWnd->SetCheck(groundAlign);
} else {
groundAlign = pWnd->GetCheck();
parent->updateSwitchToSystem(ST_ALIGNXY, groundAlign);
}
}
}
{ // update Emit above ground only
CButton *pWnd;
pWnd = (CButton*)GetDlgItem(IDC_PSEd_EmitAboveGroundOnly);
if (pWnd) {
Bool aboveGroundOnly;
if (toUI) {
parent->getSwitchFromSystem(ST_EMITABOVEGROUNDONLY, aboveGroundOnly);
pWnd->SetCheck(aboveGroundOnly);
} else {
aboveGroundOnly = pWnd->GetCheck();
parent->updateSwitchToSystem(ST_EMITABOVEGROUNDONLY, aboveGroundOnly);
}
}
}
{ // update Particle Up towards emitter
CButton *pWnd;
pWnd = (CButton*)GetDlgItem(IDC_PSEd_ParticleUpTowardsEmitter);
if (pWnd) {
Bool upTowardsEmitter;
if (toUI) {
parent->getSwitchFromSystem(ST_PARTICLEUPTOWARDSEMITTER, upTowardsEmitter);
pWnd->SetCheck(upTowardsEmitter);
} else {
upTowardsEmitter = pWnd->GetCheck();
parent->updateSwitchToSystem(ST_PARTICLEUPTOWARDSEMITTER, upTowardsEmitter);
}
}
}
}
void CSwitchesDialog::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = GetDWDParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(CSwitchesDialog, CDialog)
ON_BN_CLICKED(IDC_PSEd_OneShot, OnParticleSystemEdit)
ON_BN_CLICKED(IDC_PSEd_Hollow, OnParticleSystemEdit)
ON_BN_CLICKED(IDC_PSEd_GroundAligned, OnParticleSystemEdit)
ON_BN_CLICKED(IDC_PSEd_EmitAboveGroundOnly, OnParticleSystemEdit)
ON_BN_CLICKED(IDC_PSEd_ParticleUpTowardsEmitter, OnParticleSystemEdit)
END_MESSAGE_MAP()

View file

@ -0,0 +1,42 @@
/*
** 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/>.
*/
#pragma once
#include "Lib/BaseType.h"
class DebugWindowDialog;
class CSwitchesDialog : public CDialog
{
public:
enum {IDD = IDD_PSEd_EditSwitchesDialog};
CSwitchesDialog(UINT nIDTemplate = CSwitchesDialog::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
DebugWindowDialog* GetDWDParent(void) { return (DebugWindowDialog*) GetParent(); }
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};

View file

@ -0,0 +1,426 @@
/*
** 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/>.
*/
// FILE: EmissionTypePanels.cpp
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: EmissionTypePanels.cpp */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#include "StdAfx.h"
#include "EmissionTypePanels.h"
#include "ParticleEditorDialog.h"
// Defines ////////////////////////////////////////////////////////////////////
#define ARBITRARY_BUFF_SIZE 128
// EmissionPanelLine //////////////////////////////////////////////////////////
EmissionPanelPoint::EmissionPanelPoint(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void EmissionPanelPoint::InitPanel( void )
{
}
void EmissionPanelPoint::performUpdate( IN Bool toUI )
{
}
void EmissionPanelPoint::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(EmissionPanelPoint, ISwapablePanel)
END_MESSAGE_MAP()
// Defines ////////////////////////////////////////////////////////////////////
#define ARBITRARY_BUFF_SIZE 128
// EmissionPanelLine //////////////////////////////////////////////////////////
EmissionPanelLine::EmissionPanelLine(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void EmissionPanelLine::InitPanel( void )
{
}
void EmissionPanelLine::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update line parameters
Real linePoint;
CWnd *pWnd;
// first X1
pWnd = GetDlgItem(IDC_PSEd_LineStartX);
if (pWnd) {
if (toUI) {
pParent->getLineFromSystem(0, linePoint);
sprintf(buff, FORMAT_STRING, linePoint);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
linePoint = atof(buff);
pParent->updateLineToSystem(0, linePoint);
}
}
// now the Y1
pWnd = GetDlgItem(IDC_PSEd_LineStartY);
if (pWnd) {
if (toUI) {
pParent->getLineFromSystem(1, linePoint);
sprintf(buff, FORMAT_STRING, linePoint);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
linePoint = atof(buff);
pParent->updateLineToSystem(1, linePoint);
}
}
// now the Z1
pWnd = GetDlgItem(IDC_PSEd_LineStartZ);
if (pWnd) {
if (toUI) {
pParent->getLineFromSystem(2, linePoint);
sprintf(buff, FORMAT_STRING, linePoint);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
linePoint = atof(buff);
pParent->updateLineToSystem(2, linePoint);
}
}
// first the X2
pWnd = GetDlgItem(IDC_PSEd_LineEndX);
if (pWnd) {
if (toUI) {
pParent->getLineFromSystem(3, linePoint);
sprintf(buff, FORMAT_STRING, linePoint);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
linePoint = atof(buff);
pParent->updateLineToSystem(3, linePoint);
}
}
// now the Y2
pWnd = GetDlgItem(IDC_PSEd_LineEndY);
if (pWnd) {
if (toUI) {
pParent->getLineFromSystem(4, linePoint);
sprintf(buff, FORMAT_STRING, linePoint);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
linePoint = atof(buff);
pParent->updateLineToSystem(4, linePoint);
}
}
// the Z2
pWnd = GetDlgItem(IDC_PSEd_LineEndZ);
if (pWnd) {
if (toUI) {
pParent->getLineFromSystem(5, linePoint);
sprintf(buff, FORMAT_STRING, linePoint);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
linePoint = atof(buff);
pParent->updateLineToSystem(5, linePoint);
}
}
}
}
void EmissionPanelLine::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(EmissionPanelLine, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_LineStartX, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_LineStartY, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_LineStartZ, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_LineEndX, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_LineEndY, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_LineEndZ, OnParticleSystemEdit)
END_MESSAGE_MAP()
// EmissionPanelBox ///////////////////////////////////////////////////////////
EmissionPanelBox::EmissionPanelBox(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void EmissionPanelBox::InitPanel( void )
{
}
void EmissionPanelBox::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update half size of box
Real halfSize;
CWnd *pWnd;
// first the X
pWnd = GetDlgItem(IDC_PSEd_BoxHalfSizeX);
if (pWnd) {
if (toUI) {
pParent->getHalfSizeFromSystem(0, halfSize);
sprintf(buff, FORMAT_STRING, halfSize);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
halfSize = atof(buff);
pParent->updateHalfSizeToSystem(0, halfSize);
}
}
// now the Y
pWnd = GetDlgItem(IDC_PSEd_BoxHalfSizeY);
if (pWnd) {
if (toUI) {
pParent->getHalfSizeFromSystem(1, halfSize);
sprintf(buff, FORMAT_STRING, halfSize);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
halfSize = atof(buff);
pParent->updateHalfSizeToSystem(1, halfSize);
}
}
// finally, the Z
pWnd = GetDlgItem(IDC_PSEd_BoxHalfSizeZ);
if (pWnd) {
if (toUI) {
pParent->getHalfSizeFromSystem(2, halfSize);
sprintf(buff, FORMAT_STRING, halfSize);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
halfSize = atof(buff);
pParent->updateHalfSizeToSystem(2, halfSize);
}
}
}
}
void EmissionPanelBox::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(EmissionPanelBox, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_BoxHalfSizeX, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_BoxHalfSizeY, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_BoxHalfSizeZ, OnParticleSystemEdit)
END_MESSAGE_MAP()
// EmissionPanelSphere ////////////////////////////////////////////////////////
EmissionPanelSphere::EmissionPanelSphere(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void EmissionPanelSphere::InitPanel( void )
{
}
void EmissionPanelSphere::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update sphere radius
Real radius;
CWnd *pWnd;
// first the X
pWnd = GetDlgItem(IDC_PSEd_SphereRadius);
if (pWnd) {
if (toUI) {
pParent->getHalfSizeFromSystem(0, radius);
sprintf(buff, FORMAT_STRING, radius);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
radius = atof(buff);
pParent->updateHalfSizeToSystem(0, radius);
}
}
}
}
void EmissionPanelSphere::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(EmissionPanelSphere, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_SphereRadius, OnParticleSystemEdit)
END_MESSAGE_MAP()
// EmissionPanelCylinder //////////////////////////////////////////////////////
EmissionPanelCylinder::EmissionPanelCylinder(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void EmissionPanelCylinder::InitPanel( void )
{
}
void EmissionPanelCylinder::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update cylinder parameters
CWnd *pWnd;
// first the Radius
pWnd = GetDlgItem(IDC_PSEd_CylRadius);
if (pWnd) {
Real radius;
if (toUI) {
pParent->getCylinderRadiusFromSystem(radius);
sprintf(buff, FORMAT_STRING, radius);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
radius = atof(buff);
pParent->updateCylinderRadiusToSystem(radius);
}
}
// now the Length
pWnd = GetDlgItem(IDC_PSEd_CylLength);
if (pWnd) {
Real length;
if (toUI) {
pParent->getCylinderLengthFromSystem(length);
sprintf(buff, FORMAT_STRING, length);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
length = atof(buff);
pParent->updateCylinderLengthToSystem(length);
}
}
}
}
void EmissionPanelCylinder::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(EmissionPanelCylinder, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_CylRadius, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CylLength, OnParticleSystemEdit)
END_MESSAGE_MAP()

View file

@ -0,0 +1,138 @@
/*
** 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/>.
*/
// FILE: EmissionTypePanels.h
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: EmissionTypePanels.h */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: Emission panels are pretty similar, they all go here. */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#pragma once
#ifndef _H_EMISSIONTYPEPANELS_
#define _H_EMISSIONTYPEPANELS_
// INCLUDES ///////////////////////////////////////////////////////////////////
#include "resource.h"
#include "ISwapablePanel.h"
// DEFINES ////////////////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////
// EmissionPanelPoint //////////////////////////////////////////////////////////
class EmissionPanelPoint : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_EmissionPanelPoint};
virtual DWORD GetIDD( void ) { return IDD; }
EmissionPanelPoint(UINT nIDTemplate = EmissionPanelPoint::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// EmissionPanelLine //////////////////////////////////////////////////////////
class EmissionPanelLine : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_EmissionPanelLine};
virtual DWORD GetIDD( void ) { return IDD; }
EmissionPanelLine(UINT nIDTemplate = EmissionPanelLine::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// EmissionPanelBox ///////////////////////////////////////////////////////////
class EmissionPanelBox : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_EmissionPanelBox};
virtual DWORD GetIDD( void ) { return IDD; }
EmissionPanelBox(UINT nIDTemplate = EmissionPanelBox::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// EmissionPanelSphere ////////////////////////////////////////////////////////
class EmissionPanelSphere : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_EmissionPanelSphere};
virtual DWORD GetIDD( void ) { return IDD; }
EmissionPanelSphere(UINT nIDTemplate = EmissionPanelSphere::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// EmissionPanelCylinder //////////////////////////////////////////////////////
class EmissionPanelCylinder : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_EmissionPanelCylinder};
virtual DWORD GetIDD( void ) { return IDD; }
EmissionPanelCylinder(UINT nIDTemplate = EmissionPanelCylinder::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
#endif /* _H_EMISSIONTYPEPANELS_ */

View file

@ -0,0 +1,54 @@
/*
** 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/>.
*/
// FILE: ISwapablePanel.h
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: ISwapablePanel.h */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: Swapable panels derive from this so that we can easily call */
/* the update function */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#pragma once
#ifndef _H_ISWAPABLEPANEL_
#define _H_ISWAPABLEPANEL_
#include "Lib/BaseType.h"
// INCLUDES ///////////////////////////////////////////////////////////////////
// DEFINES ////////////////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////
interface ISwapablePanel : public CDialog
{
ISwapablePanel(UINT nIDTemplate = 0, CWnd* pParentWnd = NULL) : CDialog(nIDTemplate, pParentWnd) {}
virtual DWORD GetIDD( void ) = 0;
virtual void performUpdate( IN Bool toUI ) = 0;
virtual void InitPanel( void ) = 0;
};
#endif /* _H_ISWAPABLEPANEL_ */

View file

@ -0,0 +1,677 @@
/*
** 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/>.
*/
// FILE: MoreParmsDialog.cpp
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: MoreParmsDialog.cpp */
/* Created: John K. McDonald, Jr., 3/23/2002 */
/* Desc: Additional particle system parameters */
/* Revision History: */
/* 3/23/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#include "StdAfx.h"
#include "MoreParmsDialog.h"
#include "ParticleEditorDialog.h"
#define ARBITRARY_BUFF_SIZE 128
MoreParmsDialog::MoreParmsDialog(UINT nIDTemplate, CWnd* pParentWnd) : CDialog(nIDTemplate, pParentWnd)
{
}
MoreParmsDialog::~MoreParmsDialog()
{
}
void MoreParmsDialog::InitPanel( void )
{
CComboBox* pCombo;
pCombo = (CComboBox*) GetDlgItem(IDC_PSEd_WindMotion);
if (pCombo) {
for (int i = 1; WindMotionNames[i]; ++i) {
pCombo->AddString(WindMotionNames[i]);
}
pCombo->SetCurSel(0);
}
}
void MoreParmsDialog::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // Update all fields on this panel.
CWnd *pWnd;
{ // initial delay
Real initialDelay;
pWnd = GetDlgItem(IDC_PSEd_InitialDelayMin);
if (pWnd) {
if (toUI) {
pParent->getInitialDelayFromSystem(0, initialDelay);
sprintf(buff, FORMAT_STRING, initialDelay);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
initialDelay = atof(buff);
pParent->updateInitialDelayToSystem(0, initialDelay);
}
}
pWnd = GetDlgItem(IDC_PSEd_InitialDelayMax);
if (pWnd) {
if (toUI) {
pParent->getInitialDelayFromSystem(1, initialDelay);
sprintf(buff, FORMAT_STRING, initialDelay);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
initialDelay = atof(buff);
pParent->updateInitialDelayToSystem(1, initialDelay);
}
}
}
{ // burst delay
Real burstDelay;
pWnd = GetDlgItem(IDC_PSEd_BurstDelayMin);
if (pWnd) {
if (toUI) {
pParent->getBurstDelayFromSystem(0, burstDelay);
sprintf(buff, FORMAT_STRING, burstDelay);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
burstDelay = atof(buff);
pParent->updateBurstDelayToSystem(0, burstDelay);
}
}
pWnd = GetDlgItem(IDC_PSEd_BurstDelayMax);
if (pWnd) {
if (toUI) {
pParent->getBurstDelayFromSystem(1, burstDelay);
sprintf(buff, FORMAT_STRING, burstDelay);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
burstDelay = atof(buff);
pParent->updateBurstDelayToSystem(1, burstDelay);
}
}
}
{ // burst count
Real burstCount;
pWnd = GetDlgItem(IDC_PSEd_BurstCountMin);
if (pWnd) {
if (toUI) {
pParent->getBurstCountFromSystem(0, burstCount);
sprintf(buff, FORMAT_STRING, burstCount);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
burstCount = atof(buff);
pParent->updateBurstCountToSystem(0, burstCount);
}
}
pWnd = GetDlgItem(IDC_PSEd_BurstCountMax);
if (pWnd) {
if (toUI) {
pParent->getBurstCountFromSystem(1, burstCount);
sprintf(buff, FORMAT_STRING, burstCount);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
burstCount = atof(buff);
pParent->updateBurstCountToSystem(1, burstCount);
}
}
}
{ // color scale
Real colorScale;
pWnd = GetDlgItem(IDC_PSEd_ColorScaleMin);
if (pWnd) {
if (toUI) {
pParent->getColorScaleFromSystem(0, colorScale);
sprintf(buff, FORMAT_STRING, colorScale);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
colorScale = atof(buff);
pParent->updateColorScaleToSystem(0, colorScale);
}
}
pWnd = GetDlgItem(IDC_PSEd_ColorScaleMax);
if (pWnd) {
if (toUI) {
pParent->getColorScaleFromSystem(1, colorScale);
sprintf(buff, FORMAT_STRING, colorScale);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
colorScale = atof(buff);
pParent->updateColorScaleToSystem(1, colorScale);
}
}
}
{ // particle lifetime
Real particleLifetime;
pWnd = GetDlgItem(IDC_PSEd_ParticleLifetimeMin);
if (pWnd) {
if (toUI) {
pParent->getParticleLifetimeFromSystem(0, particleLifetime);
sprintf(buff, FORMAT_STRING, particleLifetime);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
particleLifetime = atof(buff);
pParent->updateParticleLifetimeToSystem(0, particleLifetime);
}
}
pWnd = GetDlgItem(IDC_PSEd_ParticleLifetimeMax);
if (pWnd) {
if (toUI) {
pParent->getParticleLifetimeFromSystem(1, particleLifetime);
sprintf(buff, FORMAT_STRING, particleLifetime);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
particleLifetime = atof(buff);
pParent->updateParticleLifetimeToSystem(1, particleLifetime);
}
}
}
{ // particle size
Real particleSize;
pWnd = GetDlgItem(IDC_PSEd_SizeMin);
if (pWnd) {
if (toUI) {
pParent->getParticleSizeFromSystem(0, particleSize);
sprintf(buff, FORMAT_STRING, particleSize);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
particleSize = atof(buff);
pParent->updateParticleSizeToSystem(0, particleSize);
}
}
pWnd = GetDlgItem(IDC_PSEd_SizeMax);
if (pWnd) {
if (toUI) {
pParent->getParticleSizeFromSystem(1, particleSize);
sprintf(buff, FORMAT_STRING, particleSize);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
particleSize = atof(buff);
pParent->updateParticleSizeToSystem(1, particleSize);
}
}
}
{ // start size rate
Real startSizeRate;
pWnd = GetDlgItem(IDC_PSEd_StartSizeRateMin);
if (pWnd) {
if (toUI) {
pParent->getStartSizeRateFromSystem(0, startSizeRate);
sprintf(buff, FORMAT_STRING, startSizeRate);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
startSizeRate = atof(buff);
pParent->updateStartSizeRateToSystem(0, startSizeRate);
}
}
pWnd = GetDlgItem(IDC_PSEd_StartSizeRateMax);
if (pWnd) {
if (toUI) {
pParent->getStartSizeRateFromSystem(1, startSizeRate);
sprintf(buff, FORMAT_STRING, startSizeRate);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
startSizeRate = atof(buff);
pParent->updateStartSizeRateToSystem(1, startSizeRate);
}
}
}
{ // size rate
Real sizeRate;
pWnd = GetDlgItem(IDC_PSEd_SizeRateMin);
if (pWnd) {
if (toUI) {
pParent->getSizeRateFromSystem(0, sizeRate);
sprintf(buff, FORMAT_STRING, sizeRate);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
sizeRate = atof(buff);
pParent->updateSizeRateToSystem(0, sizeRate);
}
}
pWnd = GetDlgItem(IDC_PSEd_SizeRateMax);
if (pWnd) {
if (toUI) {
pParent->getSizeRateFromSystem(1, sizeRate);
sprintf(buff, FORMAT_STRING, sizeRate);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
sizeRate = atof(buff);
pParent->updateSizeRateToSystem(1, sizeRate);
}
}
}
{ // size damping
Real sizeDamping;
pWnd = GetDlgItem(IDC_PSEd_SizeDampingMin);
if (pWnd) {
if (toUI) {
pParent->getSizeDampingFromSystem(0, sizeDamping);
sprintf(buff, FORMAT_STRING, sizeDamping);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
sizeDamping = atof(buff);
pParent->updateSizeDampingToSystem(0, sizeDamping);
}
}
pWnd = GetDlgItem(IDC_PSEd_SizeDampingMax);
if (pWnd) {
if (toUI) {
pParent->getSizeDampingFromSystem(1, sizeDamping);
sprintf(buff, FORMAT_STRING, sizeDamping);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
sizeDamping = atof(buff);
pParent->updateSizeDampingToSystem(1, sizeDamping);
}
}
}
{ // system lifetime
Real systemLifetime;
pWnd = GetDlgItem(IDC_PSEd_SystemLifetime);
if (pWnd) {
if (toUI) {
pParent->getSystemLifetimeFromSystem(systemLifetime);
sprintf(buff, FORMAT_STRING, systemLifetime);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
systemLifetime = atof(buff);
pParent->updateSystemLifetimeToSystem(systemLifetime);
}
}
}
{ // slave position offset
Real slaveOffset;
pWnd = GetDlgItem(IDC_PSEd_SlaveOffsetX);
if (pWnd) {
if (toUI) {
pParent->getSlaveOffsetFromSystem(0, slaveOffset);
sprintf(buff, FORMAT_STRING, slaveOffset);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
slaveOffset = atof(buff);
pParent->updateSlaveOffsetToSystem(0, slaveOffset);
}
}
pWnd = GetDlgItem(IDC_PSEd_SlaveOffsetY);
if (pWnd) {
if (toUI) {
pParent->getSlaveOffsetFromSystem(1, slaveOffset);
sprintf(buff, FORMAT_STRING, slaveOffset);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
slaveOffset = atof(buff);
pParent->updateSlaveOffsetToSystem(1, slaveOffset);
}
}
pWnd = GetDlgItem(IDC_PSEd_SlaveOffsetZ);
if (pWnd) {
if (toUI) {
pParent->getSlaveOffsetFromSystem(2, slaveOffset);
sprintf(buff, FORMAT_STRING, slaveOffset);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
slaveOffset = atof(buff);
pParent->updateSlaveOffsetToSystem(2, slaveOffset);
}
}
}
{ // drift velocity
Real driftVelocity;
pWnd = GetDlgItem(IDC_PSEd_DriftVelocityX);
if (pWnd) {
if (toUI) {
pParent->getDriftVelocityFromSystem(0, driftVelocity);
sprintf(buff, FORMAT_STRING, driftVelocity);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
driftVelocity = atof(buff);
pParent->updateDriftVelocityToSystem(0, driftVelocity);
}
}
pWnd = GetDlgItem(IDC_PSEd_DriftVelocityY);
if (pWnd) {
if (toUI) {
pParent->getDriftVelocityFromSystem(1, driftVelocity);
sprintf(buff, FORMAT_STRING, driftVelocity);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
driftVelocity = atof(buff);
pParent->updateDriftVelocityToSystem(1, driftVelocity);
}
}
pWnd = GetDlgItem(IDC_PSEd_DriftVelocityZ);
if (pWnd) {
if (toUI) {
pParent->getDriftVelocityFromSystem(2, driftVelocity);
sprintf(buff, FORMAT_STRING, driftVelocity);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
driftVelocity = atof(buff);
pParent->updateDriftVelocityToSystem(2, driftVelocity);
}
}
}
{ // slave system
CComboBox *pCombo;
pCombo = (CComboBox*) GetDlgItem(IDC_PSEd_SlaveSystem);
if (pCombo->GetCount() == 0) {
// This is done here because InitPanel is called before Particle Systems have been sent over.
pCombo->AddString(NONE_STRING);
std::list<std::string>::const_iterator cit;
const std::list<std::string> &r = pParent->getAllParticleSystems();
for (cit = r.begin(); cit != r.end(); ++cit) {
pCombo->AddString(cit->begin());
}
}
if (pCombo) {
if (toUI) {
pParent->getSlaveSystemFromSystem(buff, ARBITRARY_BUFF_SIZE - 1);
if (buff[0] == 0) {
pCombo->SelectString(-1, NONE_STRING);
} else {
pCombo->SelectString(-1, buff);
}
} else {
int selndx = pCombo->GetCurSel();
if (selndx >= 0) {
pCombo->GetLBText(selndx, buff);
if (strcmp(buff, NONE_STRING) == 0) {
pParent->updateSlaveSystemToSystem("");
} else {
pParent->updateSlaveSystemToSystem(buff);
}
}
}
}
}
{ // slave system
CComboBox *pCombo;
pCombo = (CComboBox*) GetDlgItem(IDC_PSEd_PerParticleSystem);
if (pCombo->GetCount() == 0) {
// This is done here because InitPanel is called before Particle Systems have been sent over.
pCombo->AddString(NONE_STRING);
std::list<std::string>::const_iterator cit;
const std::list<std::string> &r = pParent->getAllParticleSystems();
for (cit = r.begin(); cit != r.end(); ++cit) {
pCombo->AddString(cit->begin());
}
}
if (pCombo) {
if (toUI) {
pParent->getPerParticleSystemFromSystem(buff, ARBITRARY_BUFF_SIZE - 1);
if (buff[0] == 0) {
pCombo->SelectString(-1, NONE_STRING);
} else {
pCombo->SelectString(-1, buff);
}
} else {
int selndx = pCombo->GetCurSel();
if (selndx >= 0) {
pCombo->GetLBText(selndx, buff);
if (strcmp(buff, NONE_STRING) == 0) {
pParent->updatePerParticleSystemToSystem("");
} else {
pParent->updatePerParticleSystemToSystem(buff);
}
}
}
}
}
{ // ping pong wind start angle
Real angle;
pWnd = GetDlgItem(IDC_PSEd_WindPingPongStartAngleMin);
if (pWnd) {
if (toUI) {
pParent->getPingPongStartAngleFromSystem(0, angle);
sprintf(buff, FORMAT_STRING, angle);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
angle = atof(buff);
pParent->updatePingPongStartAngleToSystem(0, angle);
}
}
pWnd = GetDlgItem(IDC_PSEd_WindPingPongStartAngleMax);
if (pWnd) {
if (toUI) {
pParent->getPingPongStartAngleFromSystem(1, angle);
sprintf(buff, FORMAT_STRING, angle);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
angle = atof(buff);
pParent->updatePingPongStartAngleToSystem(1, angle);
}
}
}
{ // ping pong wind end angle
Real angle;
pWnd = GetDlgItem(IDC_PSEd_WindPingPongEndAngleMin);
if (pWnd) {
if (toUI) {
pParent->getPingPongEndAngleFromSystem(0, angle);
sprintf(buff, FORMAT_STRING, angle);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
angle = atof(buff);
pParent->updatePingPongEndAngleToSystem(0, angle);
}
}
pWnd = GetDlgItem(IDC_PSEd_WindPingPongEndAngleMax);
if (pWnd) {
if (toUI) {
pParent->getPingPongEndAngleFromSystem(1, angle);
sprintf(buff, FORMAT_STRING, angle);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
angle = atof(buff);
pParent->updatePingPongEndAngleToSystem(1, angle);
}
}
}
{ // wind angle change
Real angle;
pWnd = GetDlgItem(IDC_PSEd_WindAngleChangeMin);
if (pWnd) {
if (toUI) {
pParent->getWindAngleChangeFromSystem(0, angle);
sprintf(buff, FORMAT_STRING, angle);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
angle = atof(buff);
pParent->updateWindAngleChangeToSystem(0, angle);
}
}
pWnd = GetDlgItem(IDC_PSEd_WindAngleChangeMax);
if (pWnd) {
if (toUI) {
pParent->getWindAngleChangeFromSystem(1, angle);
sprintf(buff, FORMAT_STRING, angle);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
angle = atof(buff);
pParent->updateWindAngleChangeToSystem(1, angle);
}
}
}
{ // wind motion
CComboBox *pCombo;
pCombo = (CComboBox*) GetDlgItem(IDC_PSEd_WindMotion);
if (pCombo) {
int selndx;
if (toUI) {
ParticleSystemInfo::WindMotion windMotion;
pParent->getWindMotionFromSystem( windMotion );
selndx = pCombo->SelectString(-1, WindMotionNames[(long) windMotion]);
} else {
selndx = pCombo->GetCurSel();
if (selndx >= 0) {
pParent->updateWindMotionToSystem( (ParticleSystemInfo::WindMotion)(selndx + 1) );
}
}
}
}
}
}
void MoreParmsDialog::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(MoreParmsDialog, CDialog)
ON_EN_KILLFOCUS(IDC_PSEd_InitialDelayMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_InitialDelayMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_BurstDelayMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_BurstDelayMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_BurstCountMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_BurstCountMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_ColorScaleMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_ColorScaleMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_ParticleLifetimeMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_ParticleLifetimeMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SizeMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SizeMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_StartSizeRateMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_StartSizeRateMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SizeRateMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SizeRateMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SizeDampingMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SizeDampingMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SystemLifetime, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SlaveOffsetX, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SlaveOffsetY, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SlaveOffsetZ, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_DriftVelocityX, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_DriftVelocityY, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_DriftVelocityZ, OnParticleSystemEdit)
ON_CBN_SELCHANGE(IDC_PSEd_SlaveSystem, OnParticleSystemEdit)
ON_CBN_SELCHANGE(IDC_PSEd_PerParticleSystem, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_WindAngleChangeMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_WindAngleChangeMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_WindPingPongStartAngleMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_WindPingPongStartAngleMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_WindPingPongEndAngleMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_WindPingPongEndAngleMax, OnParticleSystemEdit)
ON_CBN_SELCHANGE(IDC_PSEd_WindMotion, OnParticleSystemEdit)
END_MESSAGE_MAP()

View file

@ -0,0 +1,64 @@
/*
** 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/>.
*/
// FILE: MoreParmsDialog.h
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: MoreParmsDialog.h */
/* Created: John K. McDonald, Jr., 3/23/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/23/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#pragma once
#ifndef _H_MOREPARMSDIALOG_
#define _H_MOREPARMSDIALOG_
// INCLUDES ///////////////////////////////////////////////////////////////////
#include "resource.h"
#include "Lib/BaseType.h"
// DEFINES ////////////////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////
class MoreParmsDialog : public CDialog
{
public:
enum { IDD = IDD_PSEd_EditMoreParms };
MoreParmsDialog(UINT nIDTemplate = MoreParmsDialog::IDD, CWnd* pParentWnd = NULL);
virtual ~MoreParmsDialog();
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
#endif /* _H_MOREPARMSDIALOG_ */

View file

@ -0,0 +1,422 @@
/*
** 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/>.
*/
// DebugWindow.cpp : Defines the initialization routines for the DLL.
//
#include "stdafx.h"
#include "ParticleEditor.h"
#include "ParticleEditorDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// Note!
//
// If this DLL is dynamically linked against the MFC
// DLLs, any functions exported from this DLL which
// call into MFC must have the AFX_MANAGE_STATE macro
// added at the very beginning of the function.
//
// For example:
//
// extern "C" BOOL PASCAL EXPORT ExportedFunction()
// {
// AFX_MANAGE_STATE(AfxGetStaticModuleState());
// // normal function body here
// }
//
// It is very important that this macro appear in each
// function, prior to any calls into MFC. This means that
// it must appear as the first statement within the
// function, even before any object variable declarations
// as their constructors may generate calls into the MFC
// DLL.
//
// Please see MFC Technical Notes 33 and 58 for additional
// details.
//
/////////////////////////////////////////////////////////////////////////////
// CDebugWindowApp
BEGIN_MESSAGE_MAP(CDebugWindowApp, CWinApp)
//{{AFX_MSG_MAP(CDebugWindowApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDebugWindowApp construction
CDebugWindowApp::CDebugWindowApp()
{
AfxInitialize(true);
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
m_DialogWindow = NULL;
}
DebugWindowDialog* CDebugWindowApp::GetDialogWindow(void)
{
return m_DialogWindow;
}
void CDebugWindowApp::SetDialogWindow(DebugWindowDialog* pWnd)
{
m_DialogWindow = pWnd;
}
CDebugWindowApp::~CDebugWindowApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CDebugWindowApp object
CDebugWindowApp theApp;
void __declspec(dllexport) CreateParticleSystemDialog(void)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd;
tmpWnd = new DebugWindowDialog;
tmpWnd->Create(DebugWindowDialog::IDD, NULL);
tmpWnd->SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
tmpWnd->InitPanel();
tmpWnd->ShowWindow(SW_SHOW);
if (tmpWnd->GetMainWndHWND()) {
SetFocus(tmpWnd->GetMainWndHWND());
}
theApp.SetDialogWindow(tmpWnd);
} catch (...) { }
}
void __declspec(dllexport) DestroyParticleSystemDialog(void)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->DestroyWindow();
delete tmpWnd;
theApp.SetDialogWindow(NULL);
}
} catch (...) { }
}
void __declspec(dllexport) RemoveAllParticleSystems(void)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->clearAllParticleSystems();
}
} catch (...) { }
}
void __declspec(dllexport) AppendParticleSystem(const char* particleSystemName)
{
try{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->addParticleSystem(particleSystemName);
}
} catch (...) { }
}
void __declspec(dllexport) RemoveAllThingTemplates( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->clearAllThingTemplates();
}
} catch (...) { }
}
void __declspec(dllexport) AppendThingTemplate( const char* thingTemplateName )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->addThingTemplate(thingTemplateName);
}
} catch (...) { }
}
Bool __declspec(dllexport) HasUpdatedSelectedParticleSystem( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->hasSelectionChanged();
}
} catch (...) { }
return false;
}
void __declspec(dllexport) GetSelectedParticleSystemName( char *bufferToCopyInto )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->getSelectedSystemName(bufferToCopyInto);
}
} catch (...) { }
}
void __declspec(dllexport) UpdateCurrentParticleCap( int currentParticleCap )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->updateCurrentParticleCap(currentParticleCap);
}
} catch (...) { }
}
void __declspec(dllexport) UpdateCurrentNumParticles( int currentParticleCount )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->updateCurrentNumParticles(currentParticleCount);
}
} catch (...) { }
}
int __declspec(dllexport) GetNewParticleCap( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->getNewParticleCap();
}
} catch (...) { }
return -1;
}
void __declspec(dllexport) GetSelectedParticleAsciiStringParm( int parmNum, char *bufferToCopyInto, ParticleSystemTemplate **whichTemplate)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->getSelectedParticleAsciiStringParm(parmNum, bufferToCopyInto);
if (whichTemplate) {
(*whichTemplate) = tmpWnd->getCurrentParticleSystem();
}
}
} catch (...) { }
}
void __declspec(dllexport) UpdateParticleAsciiStringParm( int parmNum, const char *bufferToCopyFrom, ParticleSystemTemplate **whichTemplate)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->updateParticleAsciiStringParm(parmNum, bufferToCopyFrom);
if (whichTemplate) {
(*whichTemplate) = tmpWnd->getCurrentParticleSystem();
}
}
} catch (...) { }
}
void __declspec(dllexport) UpdateCurrentParticleSystem( ParticleSystemTemplate *particleTemplate)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->updateCurrentParticleSystem(particleTemplate);
}
} catch (...) { }
}
void __declspec(dllexport) UpdateSystemUseParameters( ParticleSystemTemplate *particleTemplate)
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
tmpWnd->updateSystemUseParameters(particleTemplate);
}
} catch(...) { }
}
Bool __declspec(dllexport) ShouldWriteINI( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->shouldWriteINI();
}
} catch (...) { }
return false;
}
Bool __declspec(dllexport) HasRequestedReload( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->hasRequestedReload();
}
} catch (...) { }
return false;
}
Bool __declspec(dllexport) ShouldBusyWait( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->shouldBusyWait();
}
} catch (...) { }
return false;
}
Bool __declspec(dllexport) ShouldUpdateParticleCap( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->shouldUpdateParticleCap();
}
} catch (...) { }
return false;
}
Bool __declspec(dllexport) ShouldReloadTextures( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->shouldReloadTextures();
}
} catch (...) { }
return false;
}
Bool __declspec(dllexport) HasRequestedKillAllSystems( void )
{
try {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
DebugWindowDialog* tmpWnd = theApp.GetDialogWindow();
if (tmpWnd) {
return tmpWnd->shouldKillAllParticleSystems();
}
} catch (...) { }
return false;
}
int __declspec(dllexport) NextParticleEditorBehavior( void )
{
try {
if (HasUpdatedSelectedParticleSystem()) {
return PEB_UpdateCurrentSystem;
}
if (ShouldWriteINI()) {
return PEB_SaveAllSystems;
}
if (HasRequestedReload()) {
return PEB_ReloadCurrentSystem;
}
if (ShouldBusyWait()) {
return PEB_BusyWait;
}
if (ShouldUpdateParticleCap()) {
return PEB_SetParticleCap;
}
if (ShouldReloadTextures()) {
return PEB_ReloadTextures;
}
if (HasRequestedKillAllSystems()) {
return PEB_KillAllSystems;
}
return PEB_Continue;
} catch (...) { }
return PEB_Error;
}

View file

@ -0,0 +1,6 @@
; ParticleEditor.def : Declares the module parameters for the DLL.
LIBRARY "ParticleEditor"
DESCRIPTION 'ParticleEditor Windows Dynamic Link Library'
EXPORTS

View file

@ -0,0 +1,218 @@
# Microsoft Developer Studio Project File - Name="ParticleEditor" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=ParticleEditor - 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 "ParticleEditor.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 "ParticleEditor.mak" CFG="ParticleEditor - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ParticleEditor - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ParticleEditor - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "ParticleEditor"
# PROP Scc_LocalPath "..\ParticleEditor"
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "ParticleEditor - Win32 Release"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# 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" /D "_WINDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /Ob2 /I "./include" /I "./res" /I "../../libraries/include" /I "../../gameengine/include" /I "../../gameenginedevice/include/" /I "../../libraries/source/wwvegas" /I "../../libraries/source/wwvegas/ww3d2" /I "../../libraries/source/wwvegas/wwdebug" /I "../../libraries/source/wwvegas/wwlib" /I "../../libraries/source/wwvegas/wwmath" /I "../../libraries/source/wwvegas/wwsaveload" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "_USRDLL" /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"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 /nologo /subsystem:windows /dll /pdb:"../../../Run/ParticleEditor.pdb" /map:"../../../Run/ParticleEditor.map" /debug /machine:I386 /out:"../../../Run/ParticleEditor.dll"
# SUBTRACT LINK32
!ELSEIF "$(CFG)" == "ParticleEditor - Win32 Debug"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "./include" /I "./res" /I "../../libraries/include" /I "../../gameengine/include" /I "../../gameenginedevice/include/" /I "../../libraries/source/wwvegas" /I "../../libraries/source/wwvegas/ww3d2" /I "../../libraries/source/wwvegas/wwdebug" /I "../../libraries/source/wwvegas/wwlib" /I "../../libraries/source/wwvegas/wwmath" /I "../../libraries/source/wwvegas/wwsaveload" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "_USRDLL" /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"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386
# ADD LINK32 /nologo /subsystem:windows /dll /pdb:"../../../Run/ParticleEditorD.pdb" /map:"../../../Run/ParticleEditorD.map" /debug /machine:I386 /out:"../../../Run/ParticleEditorD.dll"
# SUBTRACT LINK32
!ENDIF
# Begin Target
# Name "ParticleEditor - Win32 Release"
# Name "ParticleEditor - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\CButtonShowColor.cpp
# End Source File
# Begin Source File
SOURCE=.\CColorAlphaDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\CSwitchesDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\EmissionTypePanels.cpp
# End Source File
# Begin Source File
SOURCE=.\MoreParmsDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\ParticleEditor.cpp
# End Source File
# Begin Source File
SOURCE=.\ParticleEditor.def
# End Source File
# Begin Source File
SOURCE=.\ParticleEditor.rc
# End Source File
# Begin Source File
SOURCE=.\ParticleEditorDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\ParticleTypePanels.cpp
# End Source File
# Begin Source File
SOURCE=.\ShaderTypePanels.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File
SOURCE=.\VelocityTypePanels.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\CButtonShowColor.h
# End Source File
# Begin Source File
SOURCE=.\CColorAlphaDialog.h
# End Source File
# Begin Source File
SOURCE=.\CSwitchesDialog.h
# End Source File
# Begin Source File
SOURCE=.\EmissionTypePanels.h
# End Source File
# Begin Source File
SOURCE=.\ISwapablePanel.h
# End Source File
# Begin Source File
SOURCE=.\MoreParmsDialog.h
# End Source File
# Begin Source File
SOURCE=.\ParticleEditor.h
# End Source File
# Begin Source File
SOURCE=.\ParticleEditorDialog.h
# End Source File
# Begin Source File
SOURCE=.\ParticleEditorExport.h
# End Source File
# Begin Source File
SOURCE=.\ParticleTypePanels.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\ShaderTypePanels.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# Begin Source File
SOURCE=.\VelocityTypePanels.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\ParticleEditor.rc2
# End Source File
# End Group
# End Target
# End Project

View file

@ -0,0 +1,33 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "ParticleEditor"=.\ParticleEditor.dsp - Package Owner=<4>
Package=<5>
{{{
begin source code control
ParticleEditor
..\ParticleEditor
end source code control
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View file

@ -0,0 +1,72 @@
/*
** 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/>.
*/
// DebugWindow.h : main header file for the DEBUGWINDOW DLL
//
#if !defined(AFX_DEBUGWINDOW_H__018E1800_6E59_4527_BA0C_8731EBF22953__INCLUDED_)
#define AFX_DEBUGWINDOW_H__018E1800_6E59_4527_BA0C_8731EBF22953__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
#include "ParticleEditorExport.h"
/////////////////////////////////////////////////////////////////////////////
// CDebugWindowApp
// See DebugWindow.cpp for the implementation of this class
//
class DebugWindowDialog;
class CDebugWindowApp : public CWinApp
{
public:
CDebugWindowApp();
~CDebugWindowApp();
DebugWindowDialog* GetDialogWindow(void);
void SetDialogWindow(DebugWindowDialog* pWnd);
protected:
DebugWindowDialog* m_DialogWindow;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDebugWindowApp)
//}}AFX_VIRTUAL
//{{AFX_MSG(CDebugWindowApp)
// 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_DEBUGWINDOW_H__018E1800_6E59_4527_BA0C_8731EBF22953__INCLUDED_)

View file

@ -0,0 +1,648 @@
//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\\ParticleEditor.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#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 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "DebugWindow DLL\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "DebugWindow\0"
VALUE "LegalCopyright", "Copyright (C) 2002\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "DebugWindow.DLL\0"
VALUE "ProductName", "DebugWindow Dynamic Link Library\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_PSEd DIALOGEX 0, 0, 215, 441
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP |
WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_NOPARENTNOTIFY | WS_EX_CONTROLPARENT
CAPTION "Particle Editor"
MENU IDR_FileMenu
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
COMBOBOX IDC_PSEd_ParticleSystem,38,19,137,419,CBS_DROPDOWN |
CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP
COMBOBOX IDC_PSEd_ParentSystem,38,35,137,403,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PSEd_EmissionType,77,78,103,189,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PSEd_VelocityType,77,94,103,206,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PSEd_ParticleType,77,110,103,205,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PSEd_ShaderType,77,126,103,186,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_PSEd_AngleXMin,25,161,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleXMax,53,161,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleYMin,25,177,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleYMax,53,177,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleZMin,25,193,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleZMax,53,193,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngularRateXMin,98,161,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngularRateXMax,127,161,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngularRateYMin,98,177,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngularRateYMax,127,177,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngularRateZMin,98,193,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngularRateZMax,127,193,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_Gravity,164,156,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleDampingMin,18,230,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AngleDampingMax,46,230,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_VelocityDampingMin,93,230,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_VelocityDampingMax,121,230,26,14,ES_AUTOHSCROLL
CONTROL "",IDC_PSEd_EmissionPanel,"Static",SS_BLACKRECT |
WS_TABSTOP,12,258,186,55
CONTROL "",IDC_PSEd_VelocityPanel,"Static",SS_BLACKRECT |
WS_TABSTOP,12,317,186,55
CONTROL "",IDC_PSEd_ParticlePanel,"Static",SS_BLACKRECT |
WS_TABSTOP,12,376,186,39
CONTROL "Colors/Alpha",IDC_PSEd_EditColorButton,"Button",
BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,12,421,50,14
CONTROL "Continued...",IDC_PSEd_Continued,"Button",
BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,148,421,50,14
PUSHBUTTON "Go",IDC_PSEd_Go,188,19,20,14
LTEXT "System:",IDC_STATIC,7,21,26,8
LTEXT "Parent:",IDC_STATIC,8,37,24,8
GROUPBOX "System Parameters",IDC_STATIC,7,52,201,386
LTEXT "Emission Type:",IDC_STATIC,19,81,48,8
LTEXT "Velocity Type:",IDC_STATIC,19,97,46,8
LTEXT "Particle Type:",IDC_STATIC,19,113,44,8
LTEXT "Shader Type:",IDC_STATIC,19,129,44,8
LTEXT "X:",IDC_STATIC,15,164,8,8
LTEXT "Y:",IDC_STATIC,15,180,8,8
LTEXT "Z:",IDC_STATIC,15,196,8,8
LTEXT "X:",IDC_STATIC,88,164,8,8
LTEXT "Y:",IDC_STATIC,88,180,8,8
LTEXT "Z:",IDC_STATIC,88,196,8,8
LTEXT "Min",IDC_STATIC,31,153,12,8
LTEXT "Max",IDC_STATIC,59,153,14,8
LTEXT "Min",IDC_STATIC,105,153,12,8
LTEXT "Max",IDC_STATIC,133,153,14,8
LTEXT "Min",IDC_STATIC,24,222,12,8
LTEXT "Max",IDC_STATIC,52,222,14,8
LTEXT "Min",IDC_STATIC,99,222,12,8
LTEXT "Max",IDC_STATIC,127,222,14,8
GROUPBOX "Angle",IDC_STATIC,12,145,70,65
GROUPBOX "Angular Rate",IDC_STATIC,85,145,70,65
GROUPBOX "Angular Damping",IDC_STATIC,12,212,70,35
GROUPBOX "Velocity Damping",IDC_STATIC,85,212,70,35
GROUPBOX "Gravity",IDC_STATIC,158,145,39,27
LTEXT "Particle Cap:",IDC_STATIC,7,5,41,8
EDITTEXT IDC_PSEd_CurrentParticleCap,50,2,25,14,ES_AUTOHSCROLL |
ES_NUMBER
LTEXT "Current Count:",IDC_STATIC,133,5,46,8
EDITTEXT IDC_PSEd_CurrentParticleCount,182,2,25,14,ES_AUTOHSCROLL |
ES_READONLY | ES_NUMBER
CONTROL "Switches",IDC_PSEd_EditSwitchesButton,"Button",
BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,92,421,50,14
COMBOBOX IDC_PSEd_Priority,77,63,103,198,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Priority",IDC_STATIC,19,67,22,8
PUSHBUTTON "Kill All",IDC_PSEd_KillAll,181,36,27,14
END
IDD_PSEd_EditColorAndAlpha DIALOGEX 0, 0, 199, 186
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_CONTROLPARENT
CAPTION "Color and Alpha"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LTEXT "1",IDC_STATIC,16,30,8,8
LTEXT "2",IDC_STATIC,16,45,8,8
LTEXT "3",IDC_STATIC,16,61,8,8
GROUPBOX "Color Keyframes",IDC_STATIC,12,11,67,163
LTEXT "4",IDC_STATIC,15,79,8,8
LTEXT "5",IDC_STATIC,15,94,8,8
LTEXT "6",IDC_STATIC,15,110,8,8
LTEXT "7",IDC_STATIC,15,126,8,8
LTEXT "8",IDC_STATIC,15,142,8,8
EDITTEXT IDC_PSEd_CF1_Frame,48,27,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF2_Frame,48,43,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF3_Frame,48,59,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF4_Frame,48,75,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF5_Frame,48,91,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF6_Frame,48,107,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF7_Frame,48,123,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CF8_Frame,48,139,26,14,ES_AUTOHSCROLL
LTEXT "Frame",IDC_STATIC,51,19,20,8
EDITTEXT IDC_PSEd_AF1_Min,97,27,26,14,ES_AUTOHSCROLL
LTEXT "1",IDC_STATIC,87,30,8,8
EDITTEXT IDC_PSEd_AF2_Min,97,43,26,14,ES_AUTOHSCROLL
LTEXT "2",IDC_STATIC,87,45,8,8
EDITTEXT IDC_PSEd_AF3_Min,97,59,26,14,ES_AUTOHSCROLL
LTEXT "3",IDC_STATIC,87,61,8,8
EDITTEXT IDC_PSEd_AF1_Max,125,27,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF2_Max,125,43,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF3_Max,125,59,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,103,19,12,8
LTEXT "Max",IDC_STATIC,131,19,14,8
GROUPBOX "Alpha Keyframes",IDC_STATIC,83,11,105,163
EDITTEXT IDC_PSEd_AF4_Min,97,75,26,14,ES_AUTOHSCROLL
LTEXT "4",IDC_STATIC,87,78,8,8
EDITTEXT IDC_PSEd_AF5_Min,97,91,26,14,ES_AUTOHSCROLL
LTEXT "5",IDC_STATIC,87,94,8,8
EDITTEXT IDC_PSEd_AF6_Min,97,107,26,14,ES_AUTOHSCROLL
LTEXT "6",IDC_STATIC,87,110,8,8
EDITTEXT IDC_PSEd_AF4_Max,125,75,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF5_Max,125,91,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF6_Max,125,107,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF7_Min,97,123,26,14,ES_AUTOHSCROLL
LTEXT "7",IDC_STATIC,87,126,8,8
EDITTEXT IDC_PSEd_AF8_Min,97,139,26,14,ES_AUTOHSCROLL
LTEXT "8",IDC_STATIC,87,142,8,8
EDITTEXT IDC_PSEd_AF7_Max,125,123,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF8_Max,125,139,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF1_Frame,153,27,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF2_Frame,153,43,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF3_Frame,153,59,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF4_Frame,153,75,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF5_Frame,153,91,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF6_Frame,153,107,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF7_Frame,153,123,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_AF8_Frame,153,139,26,14,ES_AUTOHSCROLL
LTEXT "Frame",IDC_STATIC,155,19,20,8
PUSHBUTTON "",IDC_PSEd_Color1,25,28,14,12
PUSHBUTTON "",IDC_PSEd_Color2,25,44,14,12
PUSHBUTTON "",IDC_PSEd_Color3,25,60,14,12
PUSHBUTTON "",IDC_PSEd_Color4,25,76,14,12
PUSHBUTTON "",IDC_PSEd_Color5,25,92,14,12
PUSHBUTTON "",IDC_PSEd_Color6,25,108,14,12
PUSHBUTTON "",IDC_PSEd_Color7,25,124,14,12
PUSHBUTTON "",IDC_PSEd_Color8,25,140,14,12
END
IDD_PSEd_EmissionPanelLine DIALOG DISCARDABLE 0, 0, 186, 55
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Emission Line Properties",IDC_EmissionProperties,0,0,
185,54
LTEXT "X",IDC_STATIC,49,10,8,8
LTEXT "Y",IDC_STATIC,75,10,8,8
LTEXT "Z",IDC_STATIC,100,10,8,8
EDITTEXT IDC_PSEd_LineStartX,38,19,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_LineStartY,65,19,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_LineStartZ,92,19,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_LineEndX,38,35,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_LineEndY,65,35,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_LineEndZ,92,35,26,14,ES_AUTOHSCROLL
LTEXT "Start",IDC_STATIC,17,23,16,8
LTEXT "End",IDC_STATIC,17,36,14,8
END
IDD_PSEd_EmissionPanelSphere DIALOG DISCARDABLE 0, 0, 185, 54
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Emission Sphere Properties",IDC_EmissionProperties,0,0,
185,54
EDITTEXT IDC_PSEd_SphereRadius,41,12,26,14,ES_AUTOHSCROLL
LTEXT "Radius",IDC_STATIC,16,16,23,8
END
IDD_PSEd_EmissionPanelBox DIALOG DISCARDABLE 0, 0, 185, 54
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Emission Box Properties",IDC_EmissionProperties,0,0,185,
54
LTEXT "X",IDC_STATIC,49,10,8,8
LTEXT "Y",IDC_STATIC,75,10,8,8
LTEXT "Z",IDC_STATIC,100,10,8,8
EDITTEXT IDC_PSEd_BoxHalfSizeX,38,19,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_BoxHalfSizeY,65,19,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_BoxHalfSizeZ,92,19,26,14,ES_AUTOHSCROLL
LTEXT "Half-Size",IDC_STATIC,5,23,29,8
END
IDD_PSEd_EmissionPanelCylinder DIALOG DISCARDABLE 0, 0, 186, 54
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Emission Cylinder Properties",IDC_EmissionProperties,0,
0,185,54
EDITTEXT IDC_PSEd_CylRadius,38,19,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CylLength,38,35,26,14,ES_AUTOHSCROLL
LTEXT "Radius",IDC_STATIC,13,23,23,8
LTEXT "Length",IDC_STATIC,13,36,23,8
END
IDD_PSEd_EmissionPanelPoint DIALOG DISCARDABLE 0, 0, 185, 54
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Emission Point Properties",IDC_EmissionProperties,0,0,
185,54
LTEXT "No parameters to edit",IDC_STATIC,38,22,68,8
END
IDD_PSEd_VelocityPanelOrtho DIALOG DISCARDABLE 0, 0, 186, 55
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Ortho Velocity Properties",IDC_VelocityProperties,0,0,
185,54
EDITTEXT IDC_PSEd_OrthoXMin,22,20,26,14,ES_AUTOHSCROLL
LTEXT "X",IDC_STATIC,11,24,8,8
EDITTEXT IDC_PSEd_OrthoXMax,51,20,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,29,10,12,8
LTEXT "Max",IDC_STATIC,57,10,14,8
LTEXT "Y",IDC_STATIC,11,39,8,8
EDITTEXT IDC_PSEd_OrthoYMin,22,36,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_OrthoYMax,51,36,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_OrthoZMin,113,20,26,14,ES_AUTOHSCROLL
LTEXT "Z",IDC_STATIC,102,24,8,8
EDITTEXT IDC_PSEd_OrthoZMax,142,20,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,120,10,12,8
LTEXT "Max",IDC_STATIC,148,10,14,8
END
IDD_PSEd_VelocityPanelSphere DIALOG DISCARDABLE 0, 0, 186, 55
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Spherical Velocity Properties",IDC_VelocityProperties,0,
0,185,54
EDITTEXT IDC_PSEd_SphereRadialMin,47,20,26,14,ES_AUTOHSCROLL
LTEXT "Radial",IDC_STATIC,21,24,21,8
EDITTEXT IDC_PSEd_SphereRadialMax,76,20,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,54,10,12,8
LTEXT "Max",IDC_STATIC,82,10,14,8
END
IDD_PSEd_VelocityPanelHemisphere DIALOG DISCARDABLE 0, 0, 186, 55
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Hemispherical Velocity Properties",
IDC_VelocityProperties,0,0,185,54
EDITTEXT IDC_PSEd_HemisphereRadialMin,47,20,26,14,ES_AUTOHSCROLL
LTEXT "Radial",IDC_STATIC,21,24,21,8
EDITTEXT IDC_PSEd_HemisphereRadialMax,76,20,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,54,10,12,8
LTEXT "Max",IDC_STATIC,82,10,14,8
END
IDD_PSEd_VelocityPanelCylinder DIALOG DISCARDABLE 0, 0, 186, 55
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Cylindrical Velocity Properties",IDC_VelocityProperties,
0,0,185,54
EDITTEXT IDC_PSEd_CylinderRadialMin,47,20,26,14,ES_AUTOHSCROLL
LTEXT "Radial",IDC_STATIC,23,24,21,8
LTEXT "Orthogonal",IDC_STATIC,8,40,36,8
EDITTEXT IDC_PSEd_CylinderRadialMax,76,20,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CylinderNormalMin,47,36,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_CylinderNormalMax,76,36,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,54,10,12,8
LTEXT "Max",IDC_STATIC,82,10,14,8
END
IDD_PSEd_VelocityPanelOutward DIALOG DISCARDABLE 0, 0, 186, 55
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Outward Velocity Properties",IDC_VelocityProperties,0,0,
185,54
EDITTEXT IDC_PSEd_OutwardSpeedMin,47,20,26,14,ES_AUTOHSCROLL
LTEXT "Major Axis",IDC_STATIC,12,24,33,8
EDITTEXT IDC_PSEd_OutwardSpeedMax,76,20,26,14,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,54,10,12,8
LTEXT "Max",IDC_STATIC,82,10,14,8
LTEXT "Minor Axis",IDC_STATIC,12,39,33,8
EDITTEXT IDC_PSEd_OutwardOtherMin,47,36,26,14,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_OutwardOtherMax,76,36,26,14,ES_AUTOHSCROLL
END
IDD_PSEd_ParticlePanelDrawable DIALOG DISCARDABLE 0, 0, 186, 39
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PSEd_ParticleTypeDrawable,44,14,130,409,CBS_DROPDOWN |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Particle:",IDC_STATIC,12,16,26,8
GROUPBOX "3-D Particle Parameters",IDC_STATIC,0,0,185,38
END
IDD_PSEd_ParticlePanelParticle DIALOG DISCARDABLE 0, 0, 186, 39
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PSEd_ParticleTypeParticle,44,14,130,409,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Particle:",IDC_STATIC,12,16,26,8
GROUPBOX "2-D Particle Parameters",IDC_STATIC,0,0,185,38
END
IDD_PSEd_EditMoreParms DIALOGEX 0, 0, 265, 204
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_NOPARENTNOTIFY | WS_EX_CONTROLPARENT
CAPTION "More Parameters"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
EDITTEXT IDC_PSEd_SizeMin,5,92,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_SizeMax,33,92,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,13,84,12,8
LTEXT "Max",IDC_STATIC,41,84,14,8
GROUPBOX "Start Size",IDC_STATIC,3,76,57,32
EDITTEXT IDC_PSEd_BurstDelayMin,66,20,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_BurstDelayMax,94,20,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,72,12,12,8
LTEXT "Max",IDC_STATIC,100,12,14,8
GROUPBOX "Burst Delay",IDC_STATIC,63,3,60,33
EDITTEXT IDC_PSEd_InitialDelayMin,6,20,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_InitialDelayMax,34,20,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,12,12,12,8
LTEXT "Max",IDC_STATIC,40,12,14,8
GROUPBOX "Initial Delay",IDC_STATIC,3,3,60,33
EDITTEXT IDC_PSEd_BurstCountMin,129,56,26,12,ES_AUTOHSCROLL |
WS_GROUP
EDITTEXT IDC_PSEd_BurstCountMax,157,56,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,135,48,12,8
LTEXT "Max",IDC_STATIC,163,48,14,8
GROUPBOX "Burst Count",IDC_STATIC,126,39,60,33
EDITTEXT IDC_PSEd_DriftVelocityX,131,21,24,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_DriftVelocityY,159,21,24,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_DriftVelocityZ,188,21,24,12,ES_AUTOHSCROLL
CTEXT "X",IDC_STATIC,139,12,8,8
CTEXT "Y",IDC_STATIC,166,12,8,8
CTEXT "Z",IDC_STATIC,195,12,8,8
GROUPBOX "Drift Velocity",IDC_STATIC,126,3,90,33
EDITTEXT IDC_PSEd_ColorScaleMin,68,56,24,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_ColorScaleMax,94,56,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,75,48,12,8
LTEXT "Max",IDC_STATIC,100,48,14,8
GROUPBOX "Color Scale",IDC_STATIC,66,39,57,33
COMBOBOX IDC_PSEd_SlaveSystem,136,117,111,263,CBS_DROPDOWN |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PSEd_PerParticleSystem,136,131,111,245,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Slave",IDC_STATIC,115,121,19,8
LTEXT "Per-Particle",IDC_STATIC,97,134,37,8
EDITTEXT IDC_PSEd_SlaveOffsetX,7,128,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_SlaveOffsetY,34,128,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_SlaveOffsetZ,61,128,26,12,ES_AUTOHSCROLL
CTEXT "X",IDC_STATIC,16,119,8,8
CTEXT "Y",IDC_STATIC,43,119,8,8
CTEXT "Z",IDC_STATIC,70,119,8,8
GROUPBOX "Slave Offset",IDC_STATIC,3,111,87,36
EDITTEXT IDC_PSEd_SystemLifetime,195,56,33,12,ES_AUTOHSCROLL
GROUPBOX "System Life",IDC_STATIC,189,39,60,33
EDITTEXT IDC_PSEd_ParticleLifetimeMin,6,56,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_ParticleLifetimeMax,34,56,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,12,48,12,8
LTEXT "Max",IDC_STATIC,40,48,14,8
GROUPBOX "Particle Lifetime",IDC_STATIC,3,39,60,33
EDITTEXT IDC_PSEd_SizeDampingMin,191,92,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_SizeDampingMax,220,93,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,199,84,12,8
LTEXT "Max",IDC_STATIC,227,84,14,8
GROUPBOX "Size Damping",IDC_STATIC,189,75,60,33
EDITTEXT IDC_PSEd_SizeRateMin,66,92,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_SizeRateMax,94,92,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,72,84,12,8
LTEXT "Max",IDC_STATIC,100,84,14,8
GROUPBOX "Size Rate",IDC_STATIC,63,75,60,33
EDITTEXT IDC_PSEd_StartSizeRateMin,128,92,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_StartSizeRateMax,156,92,26,12,ES_AUTOHSCROLL
LTEXT "Min",IDC_STATIC,135,84,12,8
LTEXT "Max",IDC_STATIC,163,84,14,8
GROUPBOX "Start Size Rate",IDC_STATIC,126,75,60,33
GROUPBOX "Wind",IDC_STATIC,3,147,261,54
EDITTEXT IDC_PSEd_WindAngleChangeMin,58,171,26,12,ES_AUTOHSCROLL
LTEXT "Angle Rate Min",IDC_STATIC,6,174,50,8
GROUPBOX "Ping Pong Wind",IDC_STATIC,87,156,174,36
LTEXT "Start Angle Min",IDC_STATIC,89,167,51,8
LTEXT "Start Angle Max",IDC_STATIC,89,179,51,8
EDITTEXT IDC_PSEd_WindPingPongStartAngleMin,143,165,28,12,
ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_WindPingPongStartAngleMax,143,177,28,12,
ES_AUTOHSCROLL
LTEXT "End Angle Min",IDC_STATIC,174,167,51,8
LTEXT "End Angle Max",IDC_STATIC,174,179,49,8
EDITTEXT IDC_PSEd_WindPingPongEndAngleMin,227,165,27,12,
ES_AUTOHSCROLL
EDITTEXT IDC_PSEd_WindPingPongEndAngleMax,227,177,27,12,
ES_AUTOHSCROLL
COMBOBOX IDC_PSEd_WindMotion,30,156,48,141,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
GROUPBOX "Systems",IDC_STATIC,93,111,156,36
LTEXT "Motion",IDC_STATIC,6,159,22,8
EDITTEXT IDC_PSEd_WindAngleChangeMax,57,186,27,12,ES_AUTOHSCROLL
LTEXT "Angle Rate Max",IDC_STATIC,6,188,52,8
END
IDD_PSEd_EditSwitchesDialog DIALOG DISCARDABLE 0, 0, 191, 102
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Emission Switches"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "One Shot Emitter",IDC_PSEd_OneShot,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,12,27,166,10
CONTROL "Hollow Emitter",IDC_PSEd_Hollow,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,12,40,166,10
CONTROL "Align on XY plane",IDC_PSEd_GroundAligned,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,12,53,166,10
CONTROL "Emit above ground only",IDC_PSEd_EmitAboveGroundOnly,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,67,166,10
GROUPBOX "Emitter Properties",IDC_STATIC,7,8,177,87
CONTROL "Particle Up towards emitter",
IDC_PSEd_ParticleUpTowardsEmitter,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,12,80,166,10
END
IDD_PSEd_ParticlePanelStreak DIALOG DISCARDABLE 0, 0, 185, 39
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "Streak Particle Parameters",IDC_STATIC,0,0,185,39
COMBOBOX IDC_PSEd_ParticleTypeParticle,44,14,130,409,
CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Streak:",IDC_STATIC,12,16,24,8
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_PSEd, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 1
BOTTOMMARGIN, 434
END
IDD_PSEd_EditColorAndAlpha, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 192
TOPMARGIN, 7
BOTTOMMARGIN, 179
END
IDD_PSEd_EditMoreParms, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 258
TOPMARGIN, 8
BOTTOMMARGIN, 197
END
IDD_PSEd_EditSwitchesDialog, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 184
TOPMARGIN, 7
BOTTOMMARGIN, 95
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_FileMenu MENU DISCARDABLE
BEGIN
POPUP "File"
BEGIN
MENUITEM "Reload Current System", ID_FILE_RELOADCURRENT
MENUITEM "Reload All", ID_FILE_RELOADALL, GRAYED
MENUITEM SEPARATOR
MENUITEM "Save Current", ID_FILE_SAVECURRENT, GRAYED
MENUITEM "Save All", ID_FILE_SAVEALL
MENUITEM SEPARATOR
MENUITEM "Reload Textures", ID_FILE_RELOADTEXTURES
END
END
#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\ParticleEditor.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,317 @@
/*
** 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/>.
*/
#pragma once
#include <map> // for std::pair
#include <string> // for std::string
#include <vector> // for std::vector
#include <list> // for std::list
#define DEFINE_PARTICLE_SYSTEM_NAMES 1
#include "Gameclient/ParticleSys.h"
#include "CColorAlphaDialog.h"
#include "CSwitchesDialog.h"
#include "MoreParmsDialog.h"
#define FORMAT_STRING "%.2f"
#define NONE_STRING "(None)"
struct RGBColorKeyframe;
struct RandomKeyframe;
interface ISwapablePanel;
#define NUM_EMISSION_TYPES 5
#define NUM_VELOCITY_TYPES 5
#define NUM_PARTICLE_TYPES 3
#define NUM_SHADER_TYPES 3
enum SwitchType
{
ST_HOLLOW = 0,
ST_ONESHOT,
ST_ALIGNXY,
ST_EMITABOVEGROUNDONLY,
ST_PARTICLEUPTOWARDSEMITTER,
};
class DebugWindowDialog : public CDialog
{
public:
enum {IDD = IDD_PSEd};
DebugWindowDialog(UINT nIDTemplate = DebugWindowDialog::IDD, CWnd* pParentWnd = NULL);
virtual ~DebugWindowDialog();
void InitPanel( void );
HWND GetMainWndHWND( void );
void addParticleSystem( IN const char *particleSystem );
void addThingTemplate( IN const char *thingTemplate );
void clearAllParticleSystems( void );
void clearAllThingTemplates( void );
Bool hasSelectionChanged( void );
void getSelectedSystemName( OUT char *bufferToCopyInto ) const;
void getSelectedParticleAsciiStringParm( IN int parmNum, OUT char *bufferToCopyInto ) const;
void updateParticleAsciiStringParm( IN int parmNum, IN const char *bufferToCopyFrom );
void updateCurrentParticleCap( IN int particleCap );
void updateCurrentNumParticles( IN int particleCount );
int getNewParticleCap( void );
void updateCurrentParticleSystem( IN ParticleSystemTemplate *particleTemplate );
void updateSystemUseParameters( IN ParticleSystemTemplate *particleTemplate );
void signalParticleSystemEdit( void );
// The purpose of these is to add as few friends as possible to the particle system classes.
// Therefore, this class has ALL the access to ParticleSystems, and dances on the data directly.
// Child panels make calls here
void getColorValueFromSystem( IN Int systemNum,
OUT RGBColorKeyframe &colorFrame ) const;
void updateColorValueToSystem( IN Int systemNum,
IN const RGBColorKeyframe &colorFrame );
void getAlphaRangeFromSystem( IN Int systemNum,
OUT ParticleSystemInfo::RandomKeyframe &randomVar ) const;
void updateAlphaRangeToSystem( IN Int systemNum,
IN const ParticleSystemInfo::RandomKeyframe &randomVar );
void getHalfSizeFromSystem( IN Int coordNum, // 0:X, 1:Y, 2:Z
OUT Real& halfSize ) const;
void updateHalfSizeToSystem( IN Int coordNum, // 0:X, 1:Y, 2:Z
IN const Real &halfSize );
void getSphereRadiusFromSystem( OUT Real &radius ) const;
void updateSphereRadiusToSystem( IN const Real &radius );
void getCylinderRadiusFromSystem( OUT Real &radius ) const;
void updateCylinderRadiusToSystem( IN const Real &radius );
void getCylinderLengthFromSystem( OUT Real &length ) const;
void updateCylinderLengthToSystem( IN const Real &length );
void getLineFromSystem( IN Int coordNum, // 0:X1, 1:Y1, 2:Z1, 3:X2, 4:Y2, 5:Z2
OUT Real& linePoint ) const;
void updateLineToSystem( IN Int coordNum, // 0:X, 1:Y, 2:Z, 3:X2, 4:Y2, 5:Z2
IN const Real &linePoint );
void getVelSphereFromSystem( IN Int velNum, // 0:min 1:max
OUT Real &radius ) const;
void updateVelSphereToSystem( IN Int velNum, // 0:min 1:max
IN const Real &radius );
void getVelHemisphereFromSystem( IN Int velNum, // 0:min 1:max
OUT Real &radius ) const;
void updateVelHemisphereToSystem( IN Int velNum, // 0:min 1:max
IN const Real &radius );
void getVelOrthoFromSystem( IN Int coordNum, // 0:Xmin, 1:Ymin, 2:Zmin, 3:Xmax, 4:Ymax, 5:Zmax
OUT Real& ortho ) const;
void updateVelOrthoToSystem( IN Int coordNum, // 0:Xmin, 1:Ymin, 2:Zmin, 3:Xmax, 4:Ymax, 5:Zmax
IN const Real& ortho );
void getVelCylinderFromSystem( IN Int coordNum, // 0:Radialmin, 1:Lengthmin, 2:Radialmax, 3:Lengthmax
OUT Real& ortho ) const;
void updateVelCylinderToSystem( IN Int coordNum, // 0:Radialmin, 1:Lengthmin, 2:Radialmax, 3:Lengthmax
IN const Real& ortho );
void getVelOutwardFromSystem( IN Int coordNum, // 0:Outwardmin, 1:Othermin, 2:Outwardmax, 3:Othermax
OUT Real& ortho ) const;
void updateVelOutwardToSystem( IN Int coordNum, // 0:Outwardmin, 1:Othermin, 2:Outwardmax, 3:Othermax
IN const Real& ortho );
void getParticleNameFromSystem( OUT char *buffer, IN int buffLen ) const;
void updateParticleNameToSystem( IN const char *buffer );
void getDrawableNameFromSystem( OUT char *buffer, IN int buffLen ) const;
void updateDrawableNameToSystem( IN const char *buffer );
void getInitialDelayFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& initialDelay ) const;
void updateInitialDelayToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& initialDelay );
void getBurstDelayFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& burstDelay ) const;
void updateBurstDelayToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& burstDelay );
void getBurstCountFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& burstCount ) const;
void updateBurstCountToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& burstCount );
void getColorScaleFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& colorScale ) const;
void updateColorScaleToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& colorScale );
void getParticleLifetimeFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& particleLifetime ) const;
void updateParticleLifetimeToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& particleLifetime );
void getParticleSizeFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& particleSize ) const;
void updateParticleSizeToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& particleSize );
void getStartSizeRateFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& startSizeRate ) const;
void updateStartSizeRateToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& startSizeRate );
void getSizeRateFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& sizeRate ) const;
void updateSizeRateToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& sizeRate );
void getSizeDampingFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& sizeDamping ) const;
void updateSizeDampingToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& sizeDamping );
void getSystemLifetimeFromSystem( OUT Real& systemLifetime ) const;
void updateSystemLifetimeToSystem( IN const Real& systemLifetime );
void getSlaveOffsetFromSystem( IN Int parmNum, // 0:min, 1:min
OUT Real& slaveOffset ) const;
void updateSlaveOffsetToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& slaveOffset );
void getDriftVelocityFromSystem( IN Int parmNum, // 0:X, 1:Y, 2:Z
OUT Real& driftVelocity ) const;
void updateDriftVelocityToSystem( IN Int parmNum, // 0:min, 1:min
IN const Real& driftVelocity );
void getSwitchFromSystem( IN SwitchType switchType,
OUT Bool& switchVal ) const;
void updateSwitchToSystem( IN SwitchType switchType,
IN const Bool& switchVal );
void getSlaveSystemFromSystem( OUT char *buffer, IN Int bufferSize) const;
void updateSlaveSystemToSystem( IN const char *buffer );
void getPerParticleSystemFromSystem( OUT char *buffer, IN Int bufferSize) const;
void updatePerParticleSystemToSystem( IN const char *buffer );
void getWindMotionFromSystem( OUT ParticleSystemInfo::WindMotion& windMotion ) const;
void updateWindMotionToSystem( IN const ParticleSystemInfo::WindMotion& windMotion );
void getPingPongStartAngleFromSystem( IN Int parmNum, OUT Real& angle ) const;
void updatePingPongStartAngleToSystem( IN Int parmNum, IN const Real& angle );
void getPingPongEndAngleFromSystem( IN Int parmNum, OUT Real& angle ) const;
void updatePingPongEndAngleToSystem( IN Int parmNum, IN const Real& angle );
void getWindAngleChangeFromSystem( IN Int parmNum, OUT Real& angle ) const;
void updateWindAngleChangeToSystem( IN Int parmNum, IN const Real& angle );
Bool shouldWriteINI( void );
Bool hasRequestedReload( void );
Bool shouldBusyWait( void );
Bool shouldUpdateParticleCap( void );
Bool shouldReloadTextures( void );
Bool shouldKillAllParticleSystems( void );
const std::list<std::string> &getAllThingTemplates( void ) const { return m_listOfThingTemplates; }
const std::list<std::string> &getAllParticleSystems( void ) const { return m_listOfParticleSystems; }
ParticleSystemTemplate *getCurrentParticleSystem( void ) { return m_particleSystem; }
protected:
HWND mMainWndHWND;
Bool m_changeHasOcurred;
ParticleSystemTemplate *m_particleSystem;
std::list<std::string> m_listOfThingTemplates;
std::vector<std::string> m_particleParmValues;
std::list<std::string> m_listOfParticleSystems;
Bool m_shouldWriteINI;
Bool m_showColorDlg;
Bool m_showSwitchesDlg;
Bool m_showMoreParmsDlg;
Bool m_shouldReload;
Bool m_shouldBusyWait;
Bool m_shouldUpdateParticleCap;
Bool m_shouldReloadTextures;
Bool m_shouldKillAllParticleSystems;
CColorAlphaDialog m_colorAlphaDialog;
CSwitchesDialog m_switchesDialog;
MoreParmsDialog m_moreParmsDialog;
int m_activeEmissionPage;
int m_activeVelocityPage;
int m_activeParticlePage;
ISwapablePanel *m_emissionTypePanels[NUM_EMISSION_TYPES];
ISwapablePanel *m_velocityTypePanels[NUM_VELOCITY_TYPES];
ISwapablePanel *m_particleTypePanels[NUM_PARTICLE_TYPES];
void appendParticleSystemToList( IN const std::string &rString );
void appendThingTemplateToList( IN const std::string &rString );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnClose();
afx_msg void OnParticleSystemChange(); // the current particle system isn't the same as the previous system
afx_msg void OnParticleSystemEdit(); // this system has been edited
afx_msg void OnKillAllParticleSystems(); // kill all particle systems in the world
afx_msg void OnEditColorAlpha();
afx_msg void OnEditMoreParms();
afx_msg void OnEditSwitches();
afx_msg void OnPushSave();
afx_msg void OnReloadTextures();
afx_msg void OnReloadSystem();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnReloadCurrent();
afx_msg void OnReloadAll();
afx_msg void OnSaveCurrent();
afx_msg void OnSaveAll();
afx_msg void OnParticleCapEdit();
DECLARE_MESSAGE_MAP()
};

View file

@ -0,0 +1,83 @@
/*
** 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/>.
*/
#pragma once
#include "Lib/BaseType.h"
class ParticleSystemTemplate;
// Declared extern C to prevent name mangling, which makes life very unhappy
extern "C" {
// Called to create the dialog
void __declspec(dllexport) CreateParticleSystemDialog( void );
// Called to (not surprisingly) destroy the dialog (and free the resources)
void __declspec(dllexport) DestroyParticleSystemDialog( void );
void __declspec(dllexport) RemoveAllParticleSystems( void );
void __declspec(dllexport) AppendParticleSystem( const char* particleSystemName );
void __declspec(dllexport) RemoveAllThingTemplates( void );
void __declspec(dllexport) AppendThingTemplate( const char* thingTemplateName );
Bool __declspec(dllexport) HasUpdatedSelectedParticleSystem( void );
void __declspec(dllexport) GetSelectedParticleSystemName( char *bufferToCopyInto );
void __declspec(dllexport) UpdateCurrentParticleCap( int currentParticleCap );
void __declspec(dllexport) UpdateCurrentNumParticles( int currentParticleCount );
int __declspec(dllexport) GetNewParticleCap( void );
# define PARM_ParticleTypeName 0x00
# define PARM_SlaveSystemName 0x01
# define PARM_AttachedSystemName 0x02
// Keep this one last
# define PARM_NumParms 0x03
// parmNum can be exactly one of the above defines (PARM_*)
void __declspec(dllexport) GetSelectedParticleAsciiStringParm( int parmNum, char *bufferToCopyInto, ParticleSystemTemplate **whichTemplate );
void __declspec(dllexport) UpdateParticleAsciiStringParm( int parmNum, const char *bufferToCopyFrom, ParticleSystemTemplate **whichTemplate );
void __declspec(dllexport) UpdateCurrentParticleSystem( ParticleSystemTemplate *particleTemplate );
void __declspec(dllexport) UpdateSystemUseParameters( ParticleSystemTemplate *particleTemplate );
Bool __declspec(dllexport) ShouldWriteINI( void );
Bool __declspec(dllexport) ShouldBusyWait( void );
Bool __declspec(dllexport) ShouldUpdateParticleCap( void );
Bool __declspec(dllexport) ShouldReloadTextures( void );
# define PEB_Continue 0x00
# define PEB_UpdateCurrentSystem 0x01
# define PEB_ChangeToAnotherSystem 0x02
# define PEB_SaveCurrentSystem 0x03
# define PEB_SaveAllSystems 0x03
# define PEB_ReloadCurrentSystem 0x04
# define PEB_SetParticleCap 0x05
# define PEB_ReloadTextures 0x06
# define PEB_KillAllSystems 0x07
# define PEB_BusyWait 0xFE
# define PEB_Error 0xFF
int __declspec(dllexport) NextParticleEditorBehavior( void );
}

View file

@ -0,0 +1,211 @@
/*
** 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/>.
*/
// FILE: ParticleTypePanels.cpp
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: ParticleTypePanels.cpp */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#include "StdAfx.h"
#include "ParticleTypePanels.h"
#include "ParticleEditorDialog.h"
#include <direct.h>
#define ARBITRARY_BUFF_SIZE 128
static const char *PATH = "Art\\Textures\\";
//static const char *PATH = "..\\FinalArt\\Textures\\";
static const char *PREFIX = "EX";
static const char *POSTFIX = "*.*";
// ParticlePanelParticle //////////////////////////////////////////////////////////
ParticlePanelParticle::ParticlePanelParticle(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void ParticlePanelParticle::InitPanel( void )
{
CFileFind finder;
CComboBox *pWnd = (CComboBox*) GetDlgItem(IDC_PSEd_ParticleTypeParticle);
if (!pWnd) {
return;
}
// first, clear out any items.
pWnd->ResetContent();
std::string findString;
findString = PATH;
findString += PREFIX;
findString += POSTFIX;
// DEBUG_LOG(("ParticlePanedParticle::InitPanel - looking for textures, search string is '%s'\n", findString.begin()));
BOOL bWorkin = finder.FindFile(findString.begin());
while (bWorkin) {
bWorkin = finder.FindNextFile();
pWnd->AddString(finder.GetFileName());
}
}
void ParticlePanelParticle::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update Particle parameters
CComboBox *pWnd;
// first Xmin
pWnd = (CComboBox*) GetDlgItem(IDC_PSEd_ParticleTypeParticle);
if (pWnd) {
if (toUI) {
pParent->getParticleNameFromSystem(buff, ARBITRARY_BUFF_SIZE - 1);
pWnd->SelectString(-1, buff);
} else {
int curSel = pWnd->GetCurSel();
if (curSel >= 0) {
pWnd->GetLBText(curSel, buff);
pParent->updateParticleNameToSystem(buff);
}
}
}
}
}
void ParticlePanelParticle::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(ParticlePanelParticle, ISwapablePanel)
ON_CBN_SELCHANGE(IDC_PSEd_ParticleTypeParticle, OnParticleSystemEdit)
END_MESSAGE_MAP()
// ParticlePanelDrawable //////////////////////////////////////////////////////////
ParticlePanelDrawable::ParticlePanelDrawable(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void ParticlePanelDrawable::InitPanel( void )
{
}
void ParticlePanelDrawable::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update Drawable parameters
CComboBox *pWnd = (CComboBox*) GetDlgItem(IDC_PSEd_ParticleTypeDrawable);
if (pWnd) {
if (pWnd->GetCount() == 0) {
// This is done here because InitPanel is called before ThingTemplates have been sent over.
std::list<std::string>::const_iterator cit;
pWnd->AddString(NONE_STRING);
const std::list<std::string> &r = pParent->getAllThingTemplates();
for (cit = r.begin(); cit != r.end(); ++cit) {
pWnd->AddString(cit->begin());
}
}
if (toUI) {
pParent->getDrawableNameFromSystem(buff, ARBITRARY_BUFF_SIZE - 1);
pWnd->SelectString(-1, buff);
} else {
int curSel = pWnd->GetCurSel();
if (curSel >= 0) {
pWnd->GetLBText(curSel, buff);
pParent->updateDrawableNameToSystem(buff);
}
}
}
}
}
void ParticlePanelDrawable::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
void ParticlePanelDrawable::clearAllThingTemplates( void )
{
CComboBox *pWnd = (CComboBox*) GetDlgItem(IDC_PSEd_ParticleTypeDrawable);
if (!pWnd) {
return;
}
pWnd->Clear();
}
BEGIN_MESSAGE_MAP(ParticlePanelDrawable, ISwapablePanel)
ON_CBN_SELCHANGE(IDC_PSEd_ParticleTypeDrawable, OnParticleSystemEdit)
END_MESSAGE_MAP()
// ParticlePanelStreak //////////////////////////////////////////////////////////
ParticlePanelStreak::ParticlePanelStreak(UINT nIDTemplate, CWnd* pParentWnd) : ParticlePanelParticle(nIDTemplate, pParentWnd)
{
}
void ParticlePanelStreak::InitPanel( void )
{
ParticlePanelParticle::InitPanel();
}
void ParticlePanelStreak::performUpdate( IN Bool toUI )
{
ParticlePanelParticle::performUpdate(toUI);
}
void ParticlePanelStreak::OnParticleSystemEdit()
{
ParticlePanelParticle::OnParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(ParticlePanelStreak, ParticlePanelParticle)
ON_CBN_SELCHANGE(IDC_PSEd_ParticleTypeParticle, OnParticleSystemEdit)
END_MESSAGE_MAP()

View file

@ -0,0 +1,102 @@
/*
** 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/>.
*/
// FILE: ParticleTypePanels.h
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: ParticleTypePanels.h */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#pragma once
#ifndef _H_PARTICLETYPEPANELS_
#define _H_PARTICLETYPEPANELS_
#include "resource.h"
#include "ISwapablePanel.h"
// DEFINES ////////////////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////
// ParticlePanelParticle //////////////////////////////////////////////////////////
class ParticlePanelParticle : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_ParticlePanelParticle};
virtual DWORD GetIDD( void ) { return IDD; }
ParticlePanelParticle(UINT nIDTemplate = ParticlePanelParticle::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// ParticlePanelDrawable //////////////////////////////////////////////////////////
class ParticlePanelDrawable : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_ParticlePanelDrawable};
virtual DWORD GetIDD( void ) { return IDD; }
ParticlePanelDrawable(UINT nIDTemplate = ParticlePanelDrawable::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
void clearAllThingTemplates( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// ParticlePanelStreak //////////////////////////////////////////////////////////
class ParticlePanelStreak : public ParticlePanelParticle
{
public:
enum {IDD = IDD_PSEd_ParticlePanelStreak};
virtual DWORD GetIDD( void ) { return IDD; }
ParticlePanelStreak(UINT nIDTemplate = ParticlePanelStreak::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
#endif /* _H_PARTICLETYPEPANELS_ */

View file

@ -0,0 +1,187 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by ParticleEditor.rc
//
#define IDD_PSEd 1000
#define IDC_PSEd_ParticleSystem 1000
#define IDC_PSEd_Go 1001
#define IDC_PSEd_ParentSystem 1002
#define IDD_PSEd_EditColorAndAlpha 1002
#define IDC_PSEd_EmissionType 1003
#define IDD_PSEd_EmissionPanelLine 1003
#define IDC_PSEd_AngleXMin 1004
#define IDD_PSEd_EmissionPanelSphere 1004
#define IDC_PSEd_VelocityType 1005
#define IDD_PSEd_EmissionPanelBox 1005
#define IDC_PSEd_LineStartY 1005
#define IDC_PSEd_DriftVelocityX 1005
#define IDC_PSEd_ParticleType 1006
#define IDD_PSEd_EmissionPanelCylinder 1006
#define IDC_PSEd_LineStartZ 1006
#define IDC_PSEd_SlaveOffsetX 1006
#define IDC_PSEd_ShaderType 1007
#define IDC_PSEd_LineEndX 1007
#define IDC_PSEd_AngleYMin 1008
#define IDC_PSEd_LineEndY 1008
#define IDD_PSEd_EmissionPanelPoint 1008
#define IDC_PSEd_AngleZMin 1009
#define IDC_PSEd_LineEndZ 1009
#define IDD_PSEd_VelocityPanelOrtho 1009
#define IDC_PSEd_AngularRateXMin 1010
#define IDD_PSEd_VelocityPanelSphere 1010
#define IDC_PSEd_AngularRateYMin 1011
#define IDD_PSEd_VelocityPanelHemisphere 1011
#define IDC_PSEd_AngularRateZMin 1012
#define IDD_PSEd_VelocityPanelCylinder 1012
#define IDC_PSEd_AngleXMax 1013
#define IDD_PSEd_VelocityPanelOutward 1013
#define IDC_PSEd_AngleYMax 1014
#define IDD_PSEd_ParticlePanelDrawable 1014
#define IDC_PSEd_AngleZMax 1015
#define IDD_PSEd_ParticlePanelParticle 1015
#define IDC_PSEd_AngularRateXMax 1016
#define IDD_PSEd_EditMoreParms 1016
#define IDR_FileMenu 1016
#define IDC_PSEd_AngularRateYMax 1017
#define IDD_PSEd_EditSwitchesDialog 1017
#define IDC_PSEd_AngularRateZMax 1018
#define IDD_PSEd_ParticlePanelStreak 1018
#define IDC_PSEd_AngleDampingMin 1019
#define IDC_PSEd_DriftVelocityY 1019
#define IDC_PSEd_AngleDampingMax 1020
#define IDC_PSEd_DriftVelocityZ 1020
#define IDC_PSEd_VelocityDampingMin 1021
#define IDC_PSEd_VelocityDampingMax 1022
#define IDC_PSEd_SlaveOffsetY 1023
#define IDC_PSEd_Save 1023
#define IDC_PSEd_Priority 1023
#define IDC_PSEd_Gravity 1024
#define IDC_PSEd_SlaveOffsetZ 1025
#define IDC_PSEd_Reload 1025
#define IDC_PSEd_KillAll 1025
#define IDC_PSEd_SystemLifetime 1026
#define IDC_PSEd_ParticleLifetimeMin 1027
#define IDC_PSEd_ParticleLifetimeMax 1028
#define IDC_PSEd_SizeRateMin 1029
#define IDC_PSEd_SizeRateMax 1030
#define IDC_PSEd_Color1 1031
#define IDC_PSEd_Color2 1032
#define IDC_PSEd_Color3 1033
#define IDC_PSEd_Color4 1034
#define IDC_PSEd_Color5 1035
#define IDC_PSEd_Color6 1036
#define IDC_PSEd_Color7 1037
#define IDC_PSEd_Color8 1038
#define IDC_PSEd_EditColorButton 1039
#define IDC_PSEd_Continued 1040
#define IDC_PSEd_EditSwitchesButton 1041
#define IDC_EmissionProperties 1045
#define IDC_PSEd_CylRadius 1046
#define IDC_PSEd_CylLength 1047
#define IDC_PSEd_BoxHalfSizeX 1048
#define IDC_PSEd_BoxHalfSizeY 1049
#define IDC_PSEd_BoxHalfSizeZ 1050
#define IDC_PSEd_LineStartX 1051
#define IDC_PSEd_SphereRadius 1052
#define IDC_PSEd_EmissionPanel 1053
#define IDC_PSEd_CylinderRadialMax 1053
#define IDC_PSEd_VelocityPanel 1054
#define IDC_PSEd_CylinderNormalMin 1054
#define IDC_PSEd_ParticlePanel 1055
#define IDC_PSEd_CylinderNormalMax 1055
#define IDC_VelocityProperties 1057
#define IDC_PSEd_CylinderRadialMin 1059
#define IDC_PSEd_HemisphereRadialMin 1060
#define IDC_PSEd_HemisphereRadialMax 1061
#define IDC_PSEd_SphereRadialMin 1062
#define IDC_PSEd_SphereRadialMax 1063
#define IDC_PSEd_OutwardOtherMin 1064
#define IDC_PSEd_OutwardOtherMax 1065
#define IDC_PSEd_OutwardSpeedMin 1066
#define IDC_PSEd_OutwardSpeedMax 1067
#define IDC_PSEd_CF1_Frame 1068
#define IDC_PSEd_OrthoZMin 1068
#define IDC_PSEd_CF2_Frame 1069
#define IDC_PSEd_OrthoZMax 1069
#define IDC_PSEd_CF3_Frame 1070
#define IDC_PSEd_OrthoXMin 1070
#define IDC_PSEd_CF4_Frame 1071
#define IDC_PSEd_OrthoXMax 1071
#define IDC_PSEd_CF5_Frame 1072
#define IDC_PSEd_OrthoYMin 1072
#define IDC_PSEd_CF6_Frame 1073
#define IDC_PSEd_OrthoYMax 1073
#define IDC_PSEd_CF7_Frame 1074
#define IDC_PSEd_OneShot 1074
#define IDC_PSEd_CF8_Frame 1075
#define IDC_PSEd_Hollow 1075
#define IDC_PSEd_AF1_Min 1076
#define IDC_PSEd_ParticleTypeDrawable 1076
#define IDC_PSEd_AF2_Min 1077
#define IDC_PSEd_ParticleTypeParticle 1077
#define IDC_PSEd_AF3_Min 1078
#define IDC_PSEd_BurstDelayMin 1078
#define IDC_PSEd_AF1_Max 1079
#define IDC_PSEd_BurstDelayMax 1079
#define IDC_PSEd_AF2_Max 1080
#define IDC_PSEd_InitialDelayMin 1080
#define IDC_PSEd_AF3_Max 1081
#define IDC_PSEd_InitialDelayMax 1081
#define IDC_PSEd_AF4_Min 1082
#define IDC_PSEd_BurstCountMin 1082
#define IDC_PSEd_AF5_Min 1083
#define IDC_PSEd_BurstCountMax 1083
#define IDC_PSEd_AF6_Min 1084
#define IDC_PSEd_ColorScaleMin 1084
#define IDC_PSEd_AF4_Max 1085
#define IDC_PSEd_ColorScaleMax 1085
#define IDC_PSEd_AF5_Max 1086
#define IDC_PSEd_AF6_Max 1087
#define IDC_PSEd_SlaveSystem 1087
#define IDC_PSEd_AF7_Min 1088
#define IDC_PSEd_PerParticleSystem 1088
#define IDC_PSEd_AF8_Min 1089
#define IDC_PSEd_SizeMin 1089
#define IDC_PSEd_AF7_Max 1090
#define IDC_PSEd_SizeMax 1090
#define IDC_PSEd_AF8_Max 1091
#define IDC_PSEd_SizeDampingMin 1091
#define IDC_PSEd_CurrentParticleCap 1091
#define IDC_PSEd_AF1_Frame 1092
#define IDC_PSEd_SizeDampingMax 1092
#define IDC_PSEd_CurrentParticleCount 1092
#define IDC_PSEd_AF2_Frame 1093
#define IDC_PSEd_GroundAligned 1093
#define IDC_PSEd_StartSizeRateMin 1093
#define IDC_PSEd_AF3_Frame 1094
#define IDC_PSEd_EmitAboveGroundOnly 1094
#define IDC_PSEd_StartSizeRateMax 1094
#define IDC_PSEd_AF4_Frame 1095
#define IDC_PSEd_ParticleUpTowardsEmitter 1095
#define IDC_PSEd_AF5_Frame 1096
#define IDC_PSEd_AF6_Frame 1097
#define IDC_PSEd_AF7_Frame 1098
#define IDC_PSEd_WindAngleChangeMin 1098
#define IDC_PSEd_AF8_Frame 1099
#define IDC_PSEd_WindPingPongStartAngleMin 1099
#define IDC_PSEd_WindPingPongStartAngleMax 1100
#define IDC_PSEd_WindMotion 1101
#define IDC_PSEd_WindAngleChangeMax 1102
#define IDC_PSEd_WindPingPongEndAngleMin 1103
#define IDC_PSEd_WindPingPongEndAngleMax 1104
#define ID_FILE_SAVEALL 32771
#define ID_FILE_SAVECURRENT 32772
#define ID_FILE_RELOADCURRENT 32773
#define ID_FILE_RELOADALL 32775
#define ID_FILE_RELOADTEXTURES 32776
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 1019
#define _APS_NEXT_COMMAND_VALUE 32777
#define _APS_NEXT_CONTROL_VALUE 1102
#define _APS_NEXT_SYMED_VALUE 1000
#endif
#endif

View file

@ -0,0 +1,35 @@
/*
** 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/>.
*/
// FILE: ShaderTypePanels.cpp
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: ShaderTypePanels.cpp */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#include "StdAfx.h"
#include "ShaderTypePanels.h"

View file

@ -0,0 +1,44 @@
/*
** 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/>.
*/
// FILE: ShaderTypePanels.h
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: ShaderTypePanels.h */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#pragma once
#ifndef _H_SHADERTYPEPANELS_
#define _H_SHADERTYPEPANELS_
// INCLUDES ///////////////////////////////////////////////////////////////////
// DEFINES ////////////////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////
#endif /* _H_SHADERTYPEPANELS_ */

View file

@ -0,0 +1,26 @@
/*
** 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/>.
*/
// stdafx.cpp : source file that includes just the standard includes
// DebugWindow.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View file

@ -0,0 +1,76 @@
/*
** 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/>.
*/
// 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__FB15454D_21B4_4F33_A593_C13A58B86008__INCLUDED_)
#define AFX_STDAFX_H__FB15454D_21B4_4F33_A593_C13A58B86008__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
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC Automation classes
#endif // _AFX_NO_OLE_SUPPORT
#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT
#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT
#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
// I don't care that debug symbols are longer than 255, I won't read them anyways.
#pragma warning (disable : 4786)
// Define IN and OUT. Use them for sementic emphasis.
#ifndef IN
# define IN
#endif
#ifndef OUT
# define OUT
#endif
#ifndef interface
# define interface struct
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__FB15454D_21B4_4F33_A593_C13A58B86008__INCLUDED_)

View file

@ -0,0 +1,517 @@
/*
** 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/>.
*/
// FILE: VelocityTypePanels.cpp
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: VelocityTypePanels.cpp */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#include "StdAfx.h"
#include "VelocityTypePanels.h"
#include "ParticleEditorDialog.h"
#define ARBITRARY_BUFF_SIZE 128
// VelocityPanelOrtho //////////////////////////////////////////////////////////
VelocityPanelOrtho::VelocityPanelOrtho(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void VelocityPanelOrtho::InitPanel( void )
{
}
void VelocityPanelOrtho::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update ortho parameters
Real ortho;
CWnd *pWnd;
// first Xmin
pWnd = GetDlgItem(IDC_PSEd_OrthoXMin);
if (pWnd) {
if (toUI) {
pParent->getVelOrthoFromSystem(0, ortho);
sprintf(buff, FORMAT_STRING, ortho);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
ortho = atof(buff);
pParent->updateVelOrthoToSystem(0, ortho);
}
}
// now the Ymin
pWnd = GetDlgItem(IDC_PSEd_OrthoYMin);
if (pWnd) {
if (toUI) {
pParent->getVelOrthoFromSystem(1, ortho);
sprintf(buff, FORMAT_STRING, ortho);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
ortho = atof(buff);
pParent->updateVelOrthoToSystem(1, ortho);
}
}
// now the Zmin
pWnd = GetDlgItem(IDC_PSEd_OrthoZMin);
if (pWnd) {
if (toUI) {
pParent->getVelOrthoFromSystem(2, ortho);
sprintf(buff, FORMAT_STRING, ortho);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
ortho = atof(buff);
pParent->updateVelOrthoToSystem(2, ortho);
}
}
// first the Xmax
pWnd = GetDlgItem(IDC_PSEd_OrthoXMax);
if (pWnd) {
if (toUI) {
pParent->getVelOrthoFromSystem(3, ortho);
sprintf(buff, FORMAT_STRING, ortho);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
ortho = atof(buff);
pParent->updateVelOrthoToSystem(3, ortho);
}
}
// now the Ymax
pWnd = GetDlgItem(IDC_PSEd_OrthoYMax);
if (pWnd) {
if (toUI) {
pParent->getVelOrthoFromSystem(4, ortho);
sprintf(buff, FORMAT_STRING, ortho);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
ortho = atof(buff);
pParent->updateVelOrthoToSystem(4, ortho);
}
}
// the Zmax
pWnd = GetDlgItem(IDC_PSEd_OrthoZMax);
if (pWnd) {
if (toUI) {
pParent->getVelOrthoFromSystem(5, ortho);
sprintf(buff, FORMAT_STRING, ortho);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
ortho = atof(buff);
pParent->updateVelOrthoToSystem(5, ortho);
}
}
}
}
void VelocityPanelOrtho::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(VelocityPanelOrtho, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_OrthoXMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OrthoYMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OrthoZMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OrthoXMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OrthoYMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OrthoZMax, OnParticleSystemEdit)
END_MESSAGE_MAP()
// VelocityPanelSphere ////////////////////////////////////////////////////////
VelocityPanelSphere::VelocityPanelSphere(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void VelocityPanelSphere::InitPanel( void )
{
}
void VelocityPanelSphere::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update Sphere Velocity Parameters
Real radial;
CWnd *pWnd;
// radial min
pWnd = GetDlgItem(IDC_PSEd_SphereRadialMin);
if (pWnd) {
if (toUI) {
pParent->getVelSphereFromSystem(0, radial);
sprintf(buff, FORMAT_STRING, radial);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
radial = atof(buff);
pParent->updateVelSphereToSystem(0, radial);
}
}
// radial max
pWnd = GetDlgItem(IDC_PSEd_SphereRadialMax);
if (pWnd) {
if (toUI) {
pParent->getVelSphereFromSystem(1, radial);
sprintf(buff, FORMAT_STRING, radial);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
radial = atof(buff);
pParent->updateVelSphereToSystem(1, radial);
}
}
}
}
void VelocityPanelSphere::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(VelocityPanelSphere, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_SphereRadialMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_SphereRadialMax, OnParticleSystemEdit)
END_MESSAGE_MAP()
// VelocityPanelHemisphere //////////////////////////////////////////////////////////
VelocityPanelHemisphere::VelocityPanelHemisphere(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void VelocityPanelHemisphere::InitPanel( void )
{
}
void VelocityPanelHemisphere::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update Sphere Velocity Parameters
Real radial;
CWnd *pWnd;
// radial min
pWnd = GetDlgItem(IDC_PSEd_HemisphereRadialMin);
if (pWnd) {
if (toUI) {
pParent->getVelHemisphereFromSystem(0, radial);
sprintf(buff, FORMAT_STRING, radial);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
radial = atof(buff);
pParent->updateVelHemisphereToSystem(0, radial);
}
}
// radial max
pWnd = GetDlgItem(IDC_PSEd_HemisphereRadialMax);
if (pWnd) {
if (toUI) {
pParent->getVelHemisphereFromSystem(1, radial);
sprintf(buff, FORMAT_STRING, radial);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
radial = atof(buff);
pParent->updateVelHemisphereToSystem(1, radial);
}
}
}
}
void VelocityPanelHemisphere::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(VelocityPanelHemisphere, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_HemisphereRadialMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_HemisphereRadialMax, OnParticleSystemEdit)
END_MESSAGE_MAP()
// VelocityPanelCylinder //////////////////////////////////////////////////////
VelocityPanelCylinder::VelocityPanelCylinder(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void VelocityPanelCylinder::InitPanel( void )
{
}
void VelocityPanelCylinder::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update cylinder parameters
Real cylinder;
CWnd *pWnd;
// first radial min
pWnd = GetDlgItem(IDC_PSEd_CylinderRadialMin);
if (pWnd) {
if (toUI) {
pParent->getVelCylinderFromSystem(0, cylinder);
sprintf(buff, FORMAT_STRING, cylinder);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
cylinder = atof(buff);
pParent->updateVelCylinderToSystem(0, cylinder);
}
}
// now the normal min
pWnd = GetDlgItem(IDC_PSEd_CylinderNormalMin);
if (pWnd) {
if (toUI) {
pParent->getVelCylinderFromSystem(1, cylinder);
sprintf(buff, FORMAT_STRING, cylinder);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
cylinder = atof(buff);
pParent->updateVelCylinderToSystem(1, cylinder);
}
}
// now the radial max
pWnd = GetDlgItem(IDC_PSEd_CylinderRadialMax);
if (pWnd) {
if (toUI) {
pParent->getVelCylinderFromSystem(2, cylinder);
sprintf(buff, FORMAT_STRING, cylinder);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
cylinder = atof(buff);
pParent->updateVelCylinderToSystem(2, cylinder);
}
}
// now normal max
pWnd = GetDlgItem(IDC_PSEd_CylinderNormalMax);
if (pWnd) {
if (toUI) {
pParent->getVelCylinderFromSystem(3, cylinder);
sprintf(buff, FORMAT_STRING, cylinder);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
cylinder = atof(buff);
pParent->updateVelCylinderToSystem(3, cylinder);
}
}
}
}
void VelocityPanelCylinder::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(VelocityPanelCylinder, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_CylinderRadialMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CylinderNormalMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CylinderRadialMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_CylinderNormalMax, OnParticleSystemEdit)
END_MESSAGE_MAP()
// VelocityPanelOutward ///////////////////////////////////////////////////////////
VelocityPanelOutward::VelocityPanelOutward(UINT nIDTemplate, CWnd* pParentWnd) : ISwapablePanel(nIDTemplate, pParentWnd)
{
}
void VelocityPanelOutward::InitPanel( void )
{
}
void VelocityPanelOutward::performUpdate( IN Bool toUI )
{
static char buff[ARBITRARY_BUFF_SIZE];
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
{ // update outward parameters
Real outward;
CWnd *pWnd;
// first radial min
pWnd = GetDlgItem(IDC_PSEd_OutwardSpeedMin);
if (pWnd) {
if (toUI) {
pParent->getVelOutwardFromSystem(0, outward);
sprintf(buff, FORMAT_STRING, outward);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
outward = atof(buff);
pParent->updateVelOutwardToSystem(0, outward);
}
}
// now the normal min
pWnd = GetDlgItem(IDC_PSEd_OutwardOtherMin);
if (pWnd) {
if (toUI) {
pParent->getVelOutwardFromSystem(1, outward);
sprintf(buff, FORMAT_STRING, outward);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
outward = atof(buff);
pParent->updateVelOutwardToSystem(1, outward);
}
}
// now the radial max
pWnd = GetDlgItem(IDC_PSEd_OutwardSpeedMax);
if (pWnd) {
if (toUI) {
pParent->getVelOutwardFromSystem(2, outward);
sprintf(buff, FORMAT_STRING, outward);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
outward = atof(buff);
pParent->updateVelOutwardToSystem(2, outward);
}
}
// first the normal max
pWnd = GetDlgItem(IDC_PSEd_OutwardOtherMax);
if (pWnd) {
if (toUI) {
pParent->getVelOutwardFromSystem(3, outward);
sprintf(buff, FORMAT_STRING, outward);
pWnd->SetWindowText(buff);
} else {
pWnd->GetWindowText(buff, ARBITRARY_BUFF_SIZE - 1);
outward = atof(buff);
pParent->updateVelOutwardToSystem(3, outward);
}
}
}
}
void VelocityPanelOutward::OnParticleSystemEdit()
{
DebugWindowDialog *pParent = (DebugWindowDialog*) GetParent();
if (!pParent) {
return;
}
pParent->signalParticleSystemEdit();
}
BEGIN_MESSAGE_MAP(VelocityPanelOutward, ISwapablePanel)
ON_EN_KILLFOCUS(IDC_PSEd_OutwardSpeedMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OutwardOtherMin, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OutwardSpeedMax, OnParticleSystemEdit)
ON_EN_KILLFOCUS(IDC_PSEd_OutwardOtherMax, OnParticleSystemEdit)
END_MESSAGE_MAP()

View file

@ -0,0 +1,138 @@
/*
** 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/>.
*/
// FILE: VelocityTypePanels.h
/*---------------------------------------------------------------------------*/
/* EA Pacific */
/* Confidential Information */
/* Copyright (C) 2001 - All Rights Reserved */
/* DO NOT DISTRIBUTE */
/*---------------------------------------------------------------------------*/
/* Project: RTS3 */
/* File name: VelocityTypePanels.h */
/* Created: John K. McDonald, Jr., 3/21/2002 */
/* Desc: // @todo */
/* Revision History: */
/* 3/21/2002 : Initial creation */
/*---------------------------------------------------------------------------*/
#pragma once
#ifndef _H_VELOCITYTYPEPANELS_
#define _H_VELOCITYTYPEPANELS_
// INCLUDES ///////////////////////////////////////////////////////////////////
#include "resource.h"
#include "ISwapablePanel.h"
// DEFINES ////////////////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////
// VelocityPanelOrtho //////////////////////////////////////////////////////////
class VelocityPanelOrtho : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_VelocityPanelOrtho};
virtual DWORD GetIDD( void ) { return IDD; }
VelocityPanelOrtho(UINT nIDTemplate = VelocityPanelOrtho::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// VelocityPanelSphere ////////////////////////////////////////////////////////
class VelocityPanelSphere : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_VelocityPanelSphere};
virtual DWORD GetIDD( void ) { return IDD; }
VelocityPanelSphere(UINT nIDTemplate = VelocityPanelSphere::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// VelocityPanelHemisphere //////////////////////////////////////////////////////////
class VelocityPanelHemisphere : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_VelocityPanelHemisphere};
virtual DWORD GetIDD( void ) { return IDD; }
VelocityPanelHemisphere(UINT nIDTemplate = VelocityPanelHemisphere::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// VelocityPanelCylinder //////////////////////////////////////////////////////
class VelocityPanelCylinder : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_VelocityPanelCylinder};
virtual DWORD GetIDD( void ) { return IDD; }
VelocityPanelCylinder(UINT nIDTemplate = VelocityPanelCylinder::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
// VelocityPanelOutward ///////////////////////////////////////////////////////////
class VelocityPanelOutward : public ISwapablePanel
{
public:
enum {IDD = IDD_PSEd_VelocityPanelOutward};
virtual DWORD GetIDD( void ) { return IDD; }
VelocityPanelOutward(UINT nIDTemplate = VelocityPanelOutward::IDD, CWnd* pParentWnd = NULL);
void InitPanel( void );
// if true, updates the UI from the Particle System.
// if false, updates the Particle System from the UI
void performUpdate( IN Bool toUI );
protected:
afx_msg void OnParticleSystemEdit();
DECLARE_MESSAGE_MAP()
};
#endif /* _H_VELOCITYTYPEPANELS_ */

View file

@ -0,0 +1 @@
@copy release\particleEditor.dll ..\..\..\Run

View file

@ -0,0 +1 @@
@copy debug\particleEditor.dll ..\..\..\Run

View file

@ -0,0 +1,13 @@
//
// DEBUGWINDOW.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...
/////////////////////////////////////////////////////////////////////////////