Little help with Drop_Log

04/03/2018 11:00 babyminion#1
Fixed!
04/04/2018 05:32 Avalion#2
look for code for that system ^^; if use applet to determine, move applet. if just print text / image, move to center by calc center point and position. or disable system sir! ^_^
04/04/2018 20:35 Professor Linebeck#3
Yes sir it is in WndDropLog.cpp but as sir Availon said you need to calculate the center and work from there sir. Some dirty but useful way is this sir:

WndDropLog.h
class CWndDropLog
Search this
Code:
	void			Render( C2DRender* p2DRender, const int &nWindowHeight);
Replace with this sir
Code:
	void			Render( C2DRender* p2DRender, const int &nWindowHeight, const int &nWindowWidth);

WndDropLog.cpp
CWndDropLog::Render
Replace your function with this(just added calculated center sir)
Code:
void CWndDropLog::Render( C2DRender* p2DRender, const int &nWindowHeight, const int &nWindowWidth)
{
	CPoint	pt;
	DWORD	dwTick = GetTickCount();
	DWORD	dwLeft;
	int 	i = 0;

	if( ( dwLeft = ( dwTick - m_dwLastAddGold ) ) < GOLD_FADEOUT + 1000 )
	{
		DWORD dwAlpha = 255;
		if( dwLeft >= GOLD_FADEOUT )
		{
			dwLeft -= GOLD_FADEOUT;
			DOUBLE alpha = 255.0 - ceil( 255.0 * ( (DOUBLE)dwLeft * 0.001 ) );
			if( alpha < 0.0 )
				dwAlpha = 0;
			else if( alpha > 255.0 )
				dwAlpha = 255;
			else
				dwAlpha = (DWORD)alpha;
		}
		else
		{
			dwLeft = min( 250, dwLeft );
			dwAlpha = (DWORD)ceil( 255.0 * ( (DOUBLE)dwLeft / 250.0 ) );
		}

		pt.SetPoint(-32 + nWindowWidth / 2, 100 + nWindowHeight / 2 );
		p2DRender->RenderTexture( pt, m_pGoldTexture, dwAlpha, 0.75f, 0.75f );
		p2DRender->TextOut( nWindowWidth / 2, 100 + nWindowHeight / 2 + 7, m_szTotalReapGold, D3DCOLOR_ARGB( dwAlpha, 255, 255, 0 ) );
	}
	t_dropLog ptr = m_pHead;
	while( ( ptr ) && ( i++ < 10 ) )
	{
		pt.SetPoint(-32 + nWindowWidth / 2, 100 + nWindowHeight / 2 + ( 27 * i ) );
		p2DRender->RenderTexture( pt, ptr->pTexture, ptr->dwAlpha, 0.75f, 0.75f );
		p2DRender->TextOut(nWindowWidth / 2, 100 + nWindowHeight / 2 + ( 27 * i ) + 7, ptr->szName, ptr->dwNameColor );
		ptr = ptr->next;
	}
}
WndWorld.cpp
CWndWorld::OnDraw
Search for this
Code:
CWndDropLog::GetInstance()->Render( p2DRender, rc.bottom);
Replace with
Code:
CWndDropLog::GetInstance()->Render( p2DRender, rc.bottom, rc.right );
[Only registered and activated users can see links. Click Here To Register...]



If you still can't get this working then please follow this helpful advice:

Quote:
Originally Posted by Avalion View Post
disable system sir! ^_^
:)
04/05/2018 16:46 Professor Linebeck#4
Quote:
Originally Posted by babyminion View Post
haha! you make me laugh with sir @[Only registered and activated users can see links. Click Here To Register...] advice haha! btw sir @[Only registered and activated users can see links. Click Here To Register...] thank you very much! appriciated! im going to try this
prof. :handsdown::handsdown:



Edit: i got this sir @[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
You forgot to edit the WndDropLog.h.
04/05/2018 17:03 babyminion#5
Quote:
Originally Posted by Professor Linebeck View Post
You forgot to edit the WndDropLog.h.
this?
WndDroplog.cpp

or this sir?
WndDroplog.h
04/05/2018 17:18 Professor Linebeck#6
Quote:
Originally Posted by babyminion View Post
this?
WndDroplog.cpp

or this sir?
WndDroplog.h
You got
Code:
void Render( C2DRender* p2DRender, const int &nWindowHeight, rc.right );
But it must be
Code:
void Render( C2DRender* p2DRender, const int &nWindowHeight, const int &nWindowWidth);
You also didnt replace the function in cpp sir