/*
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* 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 .
--- HISTORICAL COMMENTS FOLLOW ---
* $Logfile: /DescentIII/Main/editor/AnimStatesDialog.cpp $
* $Revision: 1.1.1.1 $
* $Date: 2003-08-26 03:57:37 $
* $Author: kevinb $
*
* AnimStatesDialog.cpp : implementation file
*
* $Log: not supported by cvs2svn $
*
* 17 10/22/99 6:04p Jeff
* fixed bugs and compiler errors resulting from mac code merge
*
* 16 9/21/99 5:06p Chris
* Faster animation dialog updates - an editor ONLY change
*
* 15 6/15/98 4:00p Jason
* replaced monochromatic polymodel lighting with rgb lighting
*
* 14 5/03/98 5:38p Chris
* Added sounds to anim page
*
* 13 4/16/98 2:56p Chris
* Added birth Animation
*
* 12 4/13/98 2:20p Chris
* IDLe works (kindof)
*
* 11 4/02/98 3:54p Jason
* first pass in getting polymodel paging to work
*
* 10 2/16/98 2:49p Chris
* Made the MAX_SUBOBJECTS determine the number of normalized_time values
* to be processed. No longer a 'literal' problem.
*
* 9 2/16/98 2:47a Chris
* Massive improvements to the animation system and the AI
*
* 8 12/19/97 11:25a Samir
* g3_StartFrame and g3_EndFrame replaced by EditorStartFrame and
* EditorEndFrame
*
* 7 12/17/97 3:17p Jason
* fixed potential fabs/abs bug
*
* 6 10/05/97 5:30a Chris
* Added more support for TIMED animations
*
* 5 9/08/97 11:51a Chris
* Added support for entering seconds-per-cycle animation information
*
* 4 8/08/97 11:45a Matt
* Made anim states dialog keep local copy of anim array. The caller then
* copies the data to his own array if the user exits from the dialog via
* OK.
*
* 3 8/06/97 1:35p Matt
* Changes for new generic object_info struct which replace robot-specific
* structure
*
* 2 7/24/97 6:35p Matt
* Created symbolic constant for default zoom, and used it every place
* that specifies zoom
*
* $NoKeywords: $
*/
#include "stdafx.h"
#include "editor.h"
#include "AnimStatesDialog.h"
#include "polymodel.h"
#include "gr.h"
#include "soundpage.h"
#include "soundload.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnimStatesDialog dialog
CAnimStatesDialog::CAnimStatesDialog(int render_handle,anim_elem *anim_info,CWnd* pParent /*=NULL*/)
: CDialog(CAnimStatesDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CAnimStatesDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_render_handle = render_handle;
for (int i=0;iGetWindowRect(&rect);
ScreenToClient(&rect);
Desktop_surf->attach_to_window((unsigned)m_hWnd);
w=rect.right-rect.left;
h=rect.bottom-rect.top;
bm_handle = m_render_handle; //GetObjectImage(m_current_id);
vector zero_vector;
vector view_vector={0,0,-20};
matrix id_matrix,rot_matrix;
poly_model *pm=GetPolymodelPointer (bm_handle);
vm_MakeZero (&zero_vector);
vm_MakeIdentity (&id_matrix);
float norm_angles[MAX_SUBOBJECTS];
float keyframe = frame_start + frame_diff*((float)frame/(float)NUM_ANIM_FRAMES);
SetNormalizedTimeAnim(keyframe, norm_angles, pm);
vm_AnglesToMatrix (&rot_matrix,0,m_SpinFrame*400,0);
view_vector.z=-(fabs(pm->maxs.z-pm->mins.z)*2);
surf.create(128, 128, BPP_16);
grViewport *vport=new grViewport (&surf);
StartEditorFrame (vport,&view_vector,&id_matrix,D3_DEFAULT_ZOOM);
DrawPolygonModel (&zero_vector,&rot_matrix,bm_handle,norm_angles,0,1.0,1.0,1.0);
EndEditorFrame();
x = rect.left + ((rect.right-rect.left)/2) - surf.width()/2;
y = rect.top + ((rect.bottom-rect.top)/2) - surf.height()/2;
Desktop_surf->blt(x, y, &surf);
delete vport;
surf.free();
}
void CAnimStatesDialog::UpdateDialog()
{
CEdit *ebox;
char str[20];
int mc=m_current_state;
int max_states=24;
int control_froms[]={IDC_ALERT_FROM_EDIT,IDC_DEATH_FROM_EDIT,IDC_MISSILE1_FROM_EDIT,
IDC_RECOIL1_FROM_EDIT, IDC_MISSILE2_FROM_EDIT,
IDC_RECOIL2_FROM_EDIT,IDC_MELEE1_FROM_EDIT,IDC_MRECOIL1_FROM_EDIT,
IDC_MELEE2_FROM_EDIT,IDC_MRECOIL2_FROM_EDIT,IDC_IDLE_FROM_EDIT,
IDC_QUIRK_FROM_EDIT,IDC_FLINCH_FROM_EDIT,IDC_TAUNT_FROM_EDIT,
IDC_SPECIAL1_FROM_EDIT,IDC_SPECIAL2_FROM_EDIT,IDC_SPECIAL3_FROM_EDIT,
IDC_SPECIAL4_FROM_EDIT,IDC_SPECIAL5_FROM_EDIT,
IDC_STANDING_FROM_EDIT,IDC_FLYING_FROM_EDIT,IDC_ROLLING_FROM_EDIT,
IDC_WALKING_FROM_EDIT,IDC_JUMPING_FROM_EDIT};
int control_tos[]= {IDC_ALERT_TO_EDIT,IDC_DEATH_TO_EDIT,IDC_MISSILE1_TO_EDIT,
IDC_RECOIL1_TO_EDIT, IDC_MISSILE2_TO_EDIT,
IDC_RECOIL2_TO_EDIT,IDC_MELEE1_TO_EDIT,IDC_MRECOIL1_TO_EDIT,
IDC_MELEE2_TO_EDIT,IDC_MRECOIL2_TO_EDIT,IDC_IDLE_TO_EDIT,
IDC_QUIRK_TO_EDIT,IDC_FLINCH_TO_EDIT,IDC_TAUNT_TO_EDIT,
IDC_SPECIAL1_TO_EDIT,IDC_SPECIAL2_TO_EDIT,IDC_SPECIAL3_TO_EDIT,
IDC_SPECIAL4_TO_EDIT,IDC_SPECIAL5_TO_EDIT,
IDC_STANDING_TO_EDIT,IDC_FLYING_TO_EDIT,IDC_ROLLING_TO_EDIT,
IDC_WALKING_TO_EDIT,IDC_JUMPING_TO_EDIT};
int control_spc[]= {IDC_SEC_PER_CYCLE_EDIT1, IDC_SEC_PER_CYCLE_EDIT2, IDC_SEC_PER_CYCLE_EDIT3,
IDC_SEC_PER_CYCLE_EDIT4, IDC_SEC_PER_CYCLE_EDIT5, IDC_SEC_PER_CYCLE_EDIT6,
IDC_SEC_PER_CYCLE_EDIT7, IDC_SEC_PER_CYCLE_EDIT8, IDC_SEC_PER_CYCLE_EDIT9,
IDC_SEC_PER_CYCLE_EDIT10, IDC_SEC_PER_CYCLE_EDIT11, IDC_SEC_PER_CYCLE_EDIT12,
IDC_SEC_PER_CYCLE_EDIT13, IDC_SEC_PER_CYCLE_EDIT14, IDC_SEC_PER_CYCLE_EDIT15,
IDC_SEC_PER_CYCLE_EDIT16, IDC_SEC_PER_CYCLE_EDIT17, IDC_SEC_PER_CYCLE_EDIT18,
IDC_SEC_PER_CYCLE_EDIT19, IDC_SEC_PER_CYCLE_EDIT20, IDC_SEC_PER_CYCLE_EDIT21,
IDC_SEC_PER_CYCLE_EDIT22, IDC_SEC_PER_CYCLE_EDIT23, IDC_SEC_PER_CYCLE_EDIT24};
int anim_sounds[]= {IDC_ANIM_SOUND0_PULLDOWN, IDC_ANIM_SOUND1_PULLDOWN, IDC_ANIM_SOUND2_PULLDOWN,
IDC_ANIM_SOUND3_PULLDOWN, IDC_ANIM_SOUND4_PULLDOWN, IDC_ANIM_SOUND5_PULLDOWN,
IDC_ANIM_SOUND6_PULLDOWN, IDC_ANIM_SOUND7_PULLDOWN, IDC_ANIM_SOUND8_PULLDOWN,
IDC_ANIM_SOUND9_PULLDOWN, IDC_ANIM_SOUND10_PULLDOWN, IDC_ANIM_SOUND11_PULLDOWN,
IDC_ANIM_SOUND12_PULLDOWN, IDC_ANIM_SOUND13_PULLDOWN, IDC_ANIM_SOUND14_PULLDOWN,
IDC_ANIM_SOUND15_PULLDOWN, IDC_ANIM_SOUND16_PULLDOWN, IDC_ANIM_SOUND17_PULLDOWN,
IDC_ANIM_SOUND18_PULLDOWN, IDC_ANIM_SOUND19_PULLDOWN, IDC_ANIM_SOUND20_PULLDOWN,
IDC_ANIM_SOUND21_PULLDOWN, IDC_ANIM_SOUND22_PULLDOWN, IDC_ANIM_SOUND23_PULLDOWN};
CheckDlgButton (IDC_ALERT_CHECK,m_anim[mc].elem[AS_ALERT].used?1:0);
CheckDlgButton (IDC_DEATH_CHECK,m_anim[mc].elem[AS_DEATH].used?1:0);
CheckDlgButton (IDC_MISSILE1_CHECK,m_anim[mc].elem[AS_BIRTH].used?1:0);
CheckDlgButton (IDC_MISSILE1_RECOIL_CHECK,m_anim[mc].elem[AS_MISSILE1_RECOIL].used?1:0);
CheckDlgButton (IDC_MISSILE2_CHECK,m_anim[mc].elem[AS_MISSILE2].used?1:0);
CheckDlgButton (IDC_MISSILE2_RECOIL_CHECK,m_anim[mc].elem[AS_MISSILE2_RECOIL].used?1:0);
CheckDlgButton (IDC_MELEE1_CHECK,m_anim[mc].elem[AS_MELEE1].used?1:0);
CheckDlgButton (IDC_MELEE1_RECOIL_CHECK,m_anim[mc].elem[AS_MELEE1_RECOIL].used?1:0);
CheckDlgButton (IDC_MELEE2_CHECK,m_anim[mc].elem[AS_MELEE2].used?1:0);
CheckDlgButton (IDC_MELEE2_RECOIL_CHECK,m_anim[mc].elem[AS_MELEE2_RECOIL].used?1:0);
CheckDlgButton (IDC_QUIRK_CHECK,m_anim[mc].elem[AS_QUIRK].used?1:0);
CheckDlgButton (IDC_IDLE_CHECK,m_anim[mc].elem[AS_IDLE].used?1:0);
CheckDlgButton (IDC_TAUNT_CHECK,m_anim[mc].elem[AS_TAUNT].used?1:0);
CheckDlgButton (IDC_FLINCH_CHECK,m_anim[mc].elem[AS_FLINCH].used?1:0);
CheckDlgButton (IDC_SPECIAL1_CHECK,m_anim[mc].elem[AS_GOTO_IDLE_STANDING].used?1:0);
CheckDlgButton (IDC_SPECIAL2_CHECK,m_anim[mc].elem[AS_GOTO_IDLE_FLYING].used?1:0);
CheckDlgButton (IDC_SPECIAL3_CHECK,m_anim[mc].elem[AS_GOTO_IDLE_ROLLING].used?1:0);
CheckDlgButton (IDC_SPECIAL4_CHECK,m_anim[mc].elem[AS_GOTO_IDLE_WALKING].used?1:0);
CheckDlgButton (IDC_SPECIAL5_CHECK,m_anim[mc].elem[AS_GOTO_IDLE_JUMPING].used?1:0);
CheckDlgButton (IDC_GOTO_STANDING_CHECK,m_anim[mc].elem[AS_GOTO_ALERT_STANDING].used?1:0);
CheckDlgButton (IDC_GOTO_FLYING_CHECK,m_anim[mc].elem[AS_GOTO_ALERT_FLYING].used?1:0);
CheckDlgButton (IDC_GOTO_WALKING_CHECK,m_anim[mc].elem[AS_GOTO_ALERT_WALKING].used?1:0);
CheckDlgButton (IDC_GOTO_ROLLING_CHECK,m_anim[mc].elem[AS_GOTO_ALERT_ROLLING].used?1:0);
CheckDlgButton (IDC_GOTO_JUMPING_CHECK,m_anim[mc].elem[AS_GOTO_ALERT_JUMPING].used?1:0);
for (int i=0;iSetWindowText (str);
ebox=(CEdit *) GetDlgItem (control_tos[i]);
itoa (m_anim[mc].elem[i].to,str,10);
ebox->SetWindowText (str);
ebox=(CEdit *) GetDlgItem (control_spc[i]);
sprintf(str, "%f", m_anim[mc].elem[i].spc);
ebox->SetWindowText (str);
}
if(!m_setup_sound_dialogs)
{
m_setup_sound_dialogs = true;
for (i=0;i= 0 && m_anim[mc].elem[i].anim_sound_index < MAX_SOUNDS && Sounds[m_anim[mc].elem[i].anim_sound_index].used != 0)
SendDlgItemMessage( anim_sounds[i], CB_SELECTSTRING,0,(LPARAM) (LPCTSTR) Sounds[m_anim[mc].elem[i].anim_sound_index].name);
else
SendDlgItemMessage( anim_sounds[i], CB_SELECTSTRING,0,(LPARAM) (LPCTSTR) "\0");
}
SendDlgItemMessage( IDC_CURRENT_STATE_PULLDOWN, CB_RESETCONTENT,0,0);
for (i=0;iGetWindowText (str,20);
int frame=atoi (str);
if (framemax_keyframe)
frame=max_keyframe;
m_anim[mc].elem[anim_state].from=frame;
UpdateDialog();
}
void CAnimStatesDialog::KillFocusSPC(int num)
{
int control_spc[]= {IDC_SEC_PER_CYCLE_EDIT1, IDC_SEC_PER_CYCLE_EDIT2, IDC_SEC_PER_CYCLE_EDIT3,
IDC_SEC_PER_CYCLE_EDIT4, IDC_SEC_PER_CYCLE_EDIT5, IDC_SEC_PER_CYCLE_EDIT6,
IDC_SEC_PER_CYCLE_EDIT7, IDC_SEC_PER_CYCLE_EDIT8, IDC_SEC_PER_CYCLE_EDIT9,
IDC_SEC_PER_CYCLE_EDIT10, IDC_SEC_PER_CYCLE_EDIT11, IDC_SEC_PER_CYCLE_EDIT12,
IDC_SEC_PER_CYCLE_EDIT13, IDC_SEC_PER_CYCLE_EDIT14, IDC_SEC_PER_CYCLE_EDIT15,
IDC_SEC_PER_CYCLE_EDIT16, IDC_SEC_PER_CYCLE_EDIT17, IDC_SEC_PER_CYCLE_EDIT18,
IDC_SEC_PER_CYCLE_EDIT19, IDC_SEC_PER_CYCLE_EDIT20, IDC_SEC_PER_CYCLE_EDIT21,
IDC_SEC_PER_CYCLE_EDIT22, IDC_SEC_PER_CYCLE_EDIT23, IDC_SEC_PER_CYCLE_EDIT24};
char str[20];
int mc=m_current_state;
int i;
int max_states=24;
// Find the index into the array
for (i = 0;i < max_states; i++)
if (control_spc[i] == num)
break;
// Make sure that we find it
ASSERT (i != max_states);
int anim_state = i;
CEdit *ebox=(CEdit *) GetDlgItem (num);
ebox->GetWindowText (str,20);
float spc = atof(str);
if (spc <= 0.0 || spc >= 10000.0)
spc = 1.0f;
m_anim[mc].elem[anim_state].spc = spc;
UpdateDialog();
}
void CAnimStatesDialog::KillFocusTos(int num)
{
int control_tos[]={ IDC_ALERT_TO_EDIT,IDC_DEATH_TO_EDIT,IDC_MISSILE1_TO_EDIT,
IDC_RECOIL1_TO_EDIT, IDC_MISSILE2_TO_EDIT,
IDC_RECOIL2_TO_EDIT,IDC_MELEE1_TO_EDIT,IDC_MRECOIL1_TO_EDIT,
IDC_MELEE2_TO_EDIT,IDC_MRECOIL2_TO_EDIT,IDC_IDLE_TO_EDIT,
IDC_QUIRK_TO_EDIT,IDC_FLINCH_TO_EDIT,IDC_TAUNT_TO_EDIT,
IDC_SPECIAL1_TO_EDIT,IDC_SPECIAL2_TO_EDIT,IDC_SPECIAL3_TO_EDIT,
IDC_SPECIAL4_TO_EDIT,IDC_SPECIAL5_TO_EDIT,
IDC_STANDING_TO_EDIT,IDC_FLYING_TO_EDIT,IDC_ROLLING_TO_EDIT,
IDC_WALKING_TO_EDIT,IDC_JUMPING_TO_EDIT};
char str[20];
int mc=m_current_state;
int min_keyframe = Poly_models[m_render_handle].frame_min;
int max_keyframe = Poly_models[m_render_handle].frame_max;
int i;
int max_states=24;
for (i=0;iGetWindowText (str,20);
int frame=atoi (str);
if (framemax_keyframe)
frame=max_keyframe;
m_anim[mc].elem[anim_state].to=frame;
UpdateDialog();
}
void CAnimStatesDialog::OnKillfocusDeathFromEdit()
{
KillFocusFroms (IDC_DEATH_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusDeathToEdit()
{
KillFocusTos (IDC_DEATH_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusFlinchFromEdit()
{
KillFocusFroms (IDC_FLINCH_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusFlinchToEdit()
{
KillFocusTos (IDC_FLINCH_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusFlyingFromEdit()
{
KillFocusFroms (IDC_FLYING_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusFlyingToEdit()
{
KillFocusTos (IDC_FLYING_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusIdleFromEdit()
{
KillFocusFroms (IDC_IDLE_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusIdleToEdit()
{
KillFocusTos (IDC_IDLE_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusJumpingFromEdit()
{
KillFocusFroms (IDC_JUMPING_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusJumpingToEdit()
{
KillFocusTos (IDC_JUMPING_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusMelee1FromEdit()
{
KillFocusFroms (IDC_MELEE1_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusMelee1ToEdit()
{
KillFocusTos (IDC_MELEE1_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusMelee2FromEdit()
{
KillFocusFroms (IDC_MELEE2_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusMissile1FromEdit()
{
KillFocusFroms (IDC_MISSILE1_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusMissile1ToEdit()
{
KillFocusTos (IDC_MISSILE1_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusMissile2FromEdit()
{
KillFocusFroms (IDC_MISSILE2_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusMissile2ToEdit()
{
KillFocusTos (IDC_MISSILE2_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusMrecoil1ToEdit()
{
KillFocusTos (IDC_MRECOIL1_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusMrecoil1FromEdit()
{
KillFocusFroms (IDC_MRECOIL1_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusMrecoil2FromEdit()
{
KillFocusFroms (IDC_MRECOIL2_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusMrecoil2ToEdit()
{
KillFocusTos (IDC_MRECOIL2_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusQuirkFromEdit()
{
KillFocusFroms (IDC_QUIRK_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusQuirkToEdit()
{
KillFocusTos (IDC_QUIRK_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusRecoil1FromEdit()
{
KillFocusFroms (IDC_RECOIL1_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusRecoil1ToEdit()
{
KillFocusTos (IDC_RECOIL1_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusRecoil2FromEdit()
{
KillFocusFroms (IDC_RECOIL2_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusRecoil2ToEdit()
{
KillFocusTos (IDC_RECOIL2_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusRollingFromEdit()
{
KillFocusFroms (IDC_ROLLING_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusRollingToEdit()
{
KillFocusTos (IDC_ROLLING_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial1FromEdit()
{
KillFocusFroms (IDC_SPECIAL1_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial1ToEdit()
{
KillFocusTos (IDC_SPECIAL1_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial2FromEdit()
{
KillFocusFroms (IDC_SPECIAL2_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial2ToEdit()
{
KillFocusTos (IDC_SPECIAL2_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial3FromEdit()
{
KillFocusFroms (IDC_SPECIAL3_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial3ToEdit()
{
KillFocusTos (IDC_SPECIAL3_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial4FromEdit()
{
KillFocusFroms (IDC_SPECIAL4_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial4ToEdit()
{
KillFocusTos (IDC_SPECIAL4_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial5FromEdit()
{
KillFocusFroms (IDC_SPECIAL5_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusSpecial5ToEdit()
{
KillFocusTos (IDC_SPECIAL5_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusStandingFromEdit()
{
KillFocusFroms (IDC_STANDING_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusStandingToEdit()
{
KillFocusTos (IDC_STANDING_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusTauntFromEdit()
{
KillFocusFroms (IDC_TAUNT_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusTauntToEdit()
{
KillFocusTos (IDC_TAUNT_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusWalkingFromEdit()
{
KillFocusFroms (IDC_WALKING_FROM_EDIT);
}
void CAnimStatesDialog::OnKillfocusWalkingToEdit()
{
KillFocusTos (IDC_WALKING_TO_EDIT);
}
void CAnimStatesDialog::OnKillfocusMelee2ToEdit()
{
KillFocusTos (IDC_MELEE2_TO_EDIT);
}
void CAnimStatesDialog::OnResetAnimZero()
{
int mc=m_current_state;
memset (m_anim[mc].elem,0,NUM_ANIMS_PER_CLASS*sizeof(anim_entry));
UpdateDialog();
}
void CAnimStatesDialog::OnRotLeft()
{
m_SpinFrame-=3;
}
void CAnimStatesDialog::OnRotRight()
{
m_SpinFrame+=3;
}
//Copy data from CAnimStatesDialog class to anim struct
void CAnimStatesDialog::GetAnimData(anim_elem *anim_info)
{
for (int i=0;i