Exemplo n.º 1
0
aui_Control::aui_Control
(
	AUI_ERRCODE *           retval,
	uint32                  id,
	MBCHAR *                ldlBlock,
	ControlActionCallback * ActionFunc,
	void *                  cookie
)
:
	aui_ImageBase           (ldlBlock),
	aui_TextBase            (ldlBlock, (const MBCHAR *) NULL),
	aui_Region              (retval, id, ldlBlock),
	aui_SoundBase           (ldlBlock),
	m_stringTable           (NULL),
	m_allocatedTip          (false),
	m_statusText            (NULL),
	m_numberOfLayers        (0),
	m_imagesPerLayer        (0),
	m_imageLayerList        (NULL),
	m_layerRenderFlags      (NULL),
	m_statusTextCopy        (NULL)
{
	if (AUI_SUCCESS(*retval))
	{
		*retval = InitCommonLdl(ldlBlock, ActionFunc, cookie);
	}
}
aui_HyperTextBase::aui_HyperTextBase(
	AUI_ERRCODE *retval,
	MBCHAR *ldlBlock )
{
	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 3
0
HighScoreListItem::HighScoreListItem(AUI_ERRCODE *retval, MBCHAR *name, sint32 score, MBCHAR *ldlBlock)
	:
	aui_ImageBase(ldlBlock),
	aui_TextBase(ldlBlock, (MBCHAR *)NULL),
	ctp2_ListItem( retval, ldlBlock)
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl(name, score, ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 4
0
aui_TipWindow::aui_TipWindow(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock )
	:
	aui_Window( retval, id, ldlBlock, 0, AUI_WINDOW_TYPE_TIP )
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
c3_HyperTipWindow::c3_HyperTipWindow(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock )
	:
	aui_TipWindow( retval, id, ldlBlock ),
	PatternBase( ldlBlock, NULL )
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 6
0
ns_ListItem::ns_ListItem(
	AUI_ERRCODE *retval,
	const MBCHAR *name,
	MBCHAR *ldlBlock )
	:
	aui_ImageBase(ldlBlock),
	aui_TextBase(ldlBlock, (MBCHAR *)NULL),
	c3_ListItem( retval, ldlBlock)
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl(name, ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 7
0
aui_TabGroup::aui_TabGroup(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_SwitchGroup( retval, id, ldlBlock )
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 8
0
c3_ColoredStatic::c3_ColoredStatic(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (MBCHAR *)NULL ),
	c3_Static( retval, id, ldlBlock )
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 9
0
aui_Static::aui_Static
(
	AUI_ERRCODE *   retval,
	uint32          id,
	MBCHAR *        ldlBlock 
)
:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_Control( retval, id, ldlBlock )
{
	if (AUI_SUCCESS(*retval))
    {
	    *retval = InitCommonLdl(ldlBlock);
    }
}
Exemplo n.º 10
0
aui_Region::aui_Region
(
	AUI_ERRCODE *   retval,
	uint32          id,
	MBCHAR const *  ldlBlock
)
:
    aui_Base                    (),
    m_id                        (id),
    m_x                         (0),
    m_y                         (0),
    m_width                     (0),
    m_height                    (0),
    m_dim                       (new aui_Dimension()),
    m_attributes                (0),
    m_parent                    (NULL),
    m_childList                 (new tech_WLList<aui_Region *>()),
    m_childListChanged          (false),
    m_blind                     (false),
    m_mouseCode                 (AUI_ERRCODE_UNHANDLED),
    m_draw                      (0),
    m_drawMask                  (k_AUI_REGION_DRAWFLAG_DEFAULTMASK),
    m_ignoreEvents              (false),
    m_isMouseInside             (false),
    //	aui_MouseEvent	m_mouseState;
    m_xLastTime                 (0),
    m_yLastTime                 (0),
    m_noChange                  (false),
    m_noChangeTime              (0),
    m_doubleLClickStartWaitTime (0),
    m_doubleRClickStartWaitTime (0),
    m_doubleClickingInside      (true),
    m_doubleClickTimeOut        (0),
    // POINT		m_doubleClickOldPos;
    m_ldlBlock                  (NULL),
    // POINT		m_editGrabPoint;
    m_editGrabPointAttributes   (0),
    m_showCallback              (NULL),
    m_hideCallback              (NULL),
    m_showCallbackData          (NULL),
    m_hideCallbackData          (NULL)
{
    m_editGrabPoint.x = -1;
    m_editGrabPoint.y = -1;

    *retval           = InitCommonLdl(id, ldlBlock);
}
Exemplo n.º 11
0
ns_HPlayerItem::ns_HPlayerItem(
	AUI_ERRCODE *retval,
	void *player,
	BOOL isAI,
	MBCHAR *ldlBlock)
	:
	aui_ImageBase(ldlBlock),
	aui_TextBase(ldlBlock, (MBCHAR *)NULL),
	c3_ListItem( retval, ldlBlock)
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl(player, isAI, ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 12
0
BattleViewWindow::BattleViewWindow
(
    AUI_ERRCODE *   retval,
	uint32          id,
    MBCHAR *        ldlBlock,
    sint32          bpp,
    AUI_WINDOW_TYPE type
)
:
	C3Window                (retval, id, ldlBlock, bpp, type),
	m_battleView            (NULL),
//	RECT					m_battleViewRect;
	m_topBorder             (NULL),
    m_leftBorder            (NULL),
    m_rightBorder           (NULL),
    m_bottomBorder          (NULL),
    m_exitButton            (NULL),
    m_retreatButton         (NULL),
    m_titleText             (NULL),
    m_attackersText         (NULL),
    m_attackersName         (NULL),
    m_attackersFlag         (NULL),
    m_defendersText         (NULL),
    m_defendersName         (NULL),
    m_defendersFlag         (NULL),
    m_terrainBonusText      (NULL),
    m_terrainBonusValue     (NULL),
    m_cityBonusText         (NULL),
    m_cityBonusValue        (NULL),
    m_citylandattackBonusText (NULL),
    m_citylandattackBonusValue (NULL),
    m_cityairattackBonusText (NULL),
    m_cityairattackBonusValue (NULL),
    m_cityseaattackBonusText (NULL),
    m_cityseaattackBonusValue (NULL),
    m_cityName              (NULL),
    m_fortBonusText         (NULL),
    m_fortBonusValue        (NULL),
    m_fortBonusImage        (NULL),
    m_fortifiedBonusText    (NULL),
    m_fortifiedBonusValue   (NULL),
    m_sequence              (NULL)
{
	InitCommonLdl(ldlBlock);
}
Exemplo n.º 13
0
aui_TextBox::aui_TextBox(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_ListBox( retval, id, ldlBlock, ActionFunc, cookie )
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 14
0
MessageEyePointListItem::MessageEyePointListItem
(
    AUI_ERRCODE *   retval,
    MBCHAR const *  name,
    sint32          index,
    MBCHAR const *  ldlBlock
)
:
	aui_ImageBase(ldlBlock),
	aui_TextBase(ldlBlock, (MBCHAR const *) NULL),
	c3_ListItem( retval, ldlBlock)
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl(name, index, ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 15
0
ChatWindow::ChatWindow
(
    AUI_ERRCODE *   retval,
    uint32          id,
    MBCHAR *        ldlBlock,
    sint32          bpp,
    AUI_WINDOW_TYPE type,
    ChatBox *       parent
)
:
    C3Window        (retval, id, ldlBlock, bpp, type),
    m_textBox       (NULL),
    m_textField     (NULL),
    m_chatBox       (parent)
{
	*retval = InitCommonLdl(ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 16
0
aui_Button::aui_Button(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_Control     (retval, id, ldlBlock, ActionFunc, cookie),
    m_isRepeating   (false),
    m_repeatCount   (0)
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 17
0
c3_Radio::c3_Radio(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (MBCHAR *)NULL ),
	aui_Radio( retval, id, ldlBlock, ActionFunc, cookie ),
	PatternBase(ldlBlock, NULL)
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 18
0
ctp2_MenuButton::ctp2_MenuButton(AUI_ERRCODE *retval,
								 uint32 id,
								 MBCHAR *ldlBlock,
								 ControlActionCallback *ActionFunc,
								 void *cookie)
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (MBCHAR *)NULL ),
	c3_Button( retval, id, ldlBlock, ActionFunc, cookie ),
	m_menu(NULL),
	m_rightNeighbor(NULL),
	m_leftNeighbor(NULL)
{
	Assert(AUI_SUCCESS(*retval));
	if(!AUI_SUCCESS(*retval)) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 19
0
ctp2_HyperTextBox::ctp2_HyperTextBox(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
	:

	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_HyperTextBox(),
	PatternBase(ldlBlock, NULL)
{



	*retval = aui_Region::InitCommonLdl(id, ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_Control::InitCommonLdl(ldlBlock, ActionFunc, cookie);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_SoundBase::InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_HyperTextBase::InitCommonLdl(ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_HyperTextBox::InitCommonLdl(ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = CreateRanger( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 20
0
aui_TextField::aui_TextField(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_Win( retval, id, ldlBlock, ActionFunc, cookie ),
#ifndef __AUI_USE_DIRECTX__
	m_Font( NULL ),
#endif
	m_holdfont( NULL )
{
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
}
Exemplo n.º 21
0
aui_MovieButton::aui_MovieButton(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (const MBCHAR *)NULL ),
	aui_Button( retval, id, ldlBlock, ActionFunc, cookie )
{
	m_flags = 0;
	m_fullScreen = false;

	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 22
0
c3_Ranger::c3_Ranger(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	ControlActionCallback *ActionFunc,
	void *cookie )
	:
	aui_ImageBase( ldlBlock ),
	aui_TextBase( ldlBlock, (MBCHAR *)NULL ),
	aui_Ranger()
{
	*retval = aui_Region::InitCommonLdl( id, ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_Control::InitCommonLdl( ldlBlock, ActionFunc, cookie );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_Ranger::InitCommonLdl(ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = aui_SoundBase::InitCommonLdl( ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = PatternBase::InitCommonLdl( ldlBlock, (MBCHAR *)NULL );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = InitCommonLdl( ldlBlock );
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;

	*retval = CreateButtonsAndThumb(ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;
}
Exemplo n.º 23
0
SpriteEditWindow::SpriteEditWindow(
	AUI_ERRCODE *retval,
	uint32 id,
	MBCHAR *ldlBlock,
	sint32 bpp,
	AUI_WINDOW_TYPE type )
	:
	C3Window(retval, id, ldlBlock, bpp, type)
{

	m_Load=NULL;
	m_Save=NULL;
	m_drawX=400;
	m_drawY=300;

	m_largeSurface = NULL;
	m_largeImage = NULL;

	*retval = InitCommonLdl(ldlBlock);
	Assert( AUI_SUCCESS(*retval) );
	if ( !AUI_SUCCESS(*retval) ) return;




	m_largeSurface = NULL;

	InitializeControls(retval,ldlBlock);

	m_loopInProgress	=false;
	m_stopAfterLoop		=true;
	m_lastTime			=0;

	m_facing		=k_DEFAULTSPRITEFACING;
	m_frame			=0;
	m_animation		=UNITACTION_MOVE;
	m_currentAnim	=NULL;

	m_actionObj		= new Action();

	aui_Dimension	*dimension=GetDim();

	if (dimension!=NULL)
	{
		sint32	height=dimension->VerticalSizeData();

		m_mouseChangeY = g_ScreenHeight-height;

		Move(0,m_mouseChangeY);

		Resize(g_ScreenWidth,height);
	}

	dimension=m_largeImage->GetDim();

	if (dimension!=NULL)
	{
		sint32	height=dimension->VerticalSizeData();
		sint32  width =dimension->HorizontalSizeData();
		sint32	posX=dimension->HorizontalPositionData();

		m_largeImage->Move(posX,g_ScreenHeight-height);

		m_largeRectAbs.left		= posX;
		m_largeRectAbs.top		= g_ScreenHeight-height;
		m_largeRectAbs.right	= posX+width;
		m_largeRectAbs.bottom	= m_largeRectAbs.top+height;

		m_largeRect.left	= 0;
		m_largeRect.top		= 0;
		m_largeRect.right	= width;
		m_largeRect.bottom	= height;
	}

	m_currentSprite=NULL;
	m_spriteSurface=NULL;

	g_compression_buff = new unsigned char[COM_BUFF_SIZE];
	LoadSprite("GU02");
}