[Tut']Make a splash screen for flyff

04/23/2013 15:51 jtb1#1
Hallo,

I make my tut' in english for more people understands.


You want make this without GameGuard ?
[Only registered and activated users can see links. Click Here To Register...]


Humm okey listen :)

Go to the (city XD ) : \8_Neuz\Neuz.cpp

after :
Code:
#include "ClientMsg.h"
add :
Code:
#ifdef __LOADER_SPLASH

#include "loadersplash.h" // Hey mon chou <3

SPLASHLOAD NeuzLoad;

#endif

Find:
Code:
void CNeuzApp::WaitLoading()

{

    OutputDebugString("WaitLoading start\n");
Add :
Code:
#ifdef __LOADER_SPLASH

    NeuzLoad.Load(m_hInstance,ID_PRELOADER);

    NeuzLoad.Active(); // like splash :p

#endif
Find after:
Code:
void CNeuzApp::BeginLoadThread()

{

    CResFile::ScanResource( "" );
Remplace By
Code:
void CNeuzApp::BeginLoadThread()

{

#ifdef __LOADER_SPLASH

ShowWindow( m_hWnd, SW_HIDE ); // Et hop tu te casse <3

#endif

CResFile::ScanResource( "" );

Find :
Code:
#ifdef    __PROF

    SetFrameSkip( FALSE );

#endif

    m_texQuestEmoticon.LoadScript( m_pd3dDevice, MakePath( DIR_ICON, "icon_QuestEmoticon.inc" ) );

    m_TexturePackPVP.LoadScript( m_pd3dDevice, MakePath( DIR_SFX, "CountFight.inc" ) );

#if __VER >= 15 // __BS_CHANGING_ENVIR

    TexturePool::Get()->Init( m_pd3dDevice );

#endif    //__BS_CHANGING_ENVIR
Add:
Code:
#ifdef __LOADER_SPLASH

    ShowWindow( m_hWnd, SW_SHOW ); // reviens mon pti coeur <3

    if(NeuzLoad.SHOW)

        NeuzLoad.exit(); // now c'est bon tu peu aller dormir :3

#endif
Now the neuz call the splash if you want custom the splash NOT TOUCH the neuz ...

Create loadersplash.h

Past in loadersplash.h

Code:
//////////////////////////////////////////////////////////////////////

//                                                                    //

// loadersplash.h , Affichage du splatch pour flyff                    //

//                                                                    //

//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FLYFF_SPLASH)

#define AFX_FLYFF_SPLASH

#if _MSC_VER > 1000

#pragma once

#endif // _MSC_VER > 1000

// bon sa devrais tourner , cherche pas je rox le boeuf bourée xD

#ifdef __LOADER_SPLASH

class SPLASHLOAD

{

public:

    void exit();

    void Active();

    void Load(HINSTANCE hInstance,int resid);

    BOOL SHOW;

    SPLASHLOAD();

    virtual ~SPLASHLOAD();

private:

    UINT TimerID;

    HWND hParentWindow;

    HWND hSplashWnd;

};

#endif

#endif // !defined(AFX_FLYFF_SPLASH)
Create loadersplash.cpp

past in loadersplash.cpp

Code:
//////////////////////////////////////////////////////////////////////

//                                                                    //

// loadersplash.cpp , Affichage du splatch pour flyff                //

//                                                                    //

//////////////////////////////////////////////////////////////////////

#include "stdafx.h"    // Prérequis

#include "windows.h"    // Vu que on Cheat par windows

#include "loadersplash.h"    // on appel notre .h

//////////////////////////////////////////////////////////////////////

// Construction/Destruction

//////////////////////////////////////////////////////////////////////

#ifdef __LOADER_SPLASH

SPLASHLOAD::SPLASHLOAD()

{

}

SPLASHLOAD::~SPLASHLOAD()

{

DestroyWindow(hSplashWnd);

}

void SPLASHLOAD::Load(HINSTANCE hInstance,int resid)

{

hSplashWnd=CreateWindowEx(WS_EX_CLIENTEDGE,"STATIC","Chargement en Cours",

    WS_POPUP|WS_DLGFRAME|SS_BITMAP,301,301,550,300,NULL,NULL,hInstance,NULL); // 550 = länge , 300 = breite , in german for german :p

SendMessage(hSplashWnd,STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)LoadBitmap(hInstance,MAKEINTRESOURCE(resid)));

// on utilisera une fenetre avec du BMP en fond vu que je suis un gros faignant pour vous expliquer comment mettre une lib

this->SHOW = FALSE;

}

void SPLASHLOAD::Active()

{

  int x,y;

  int tx,ty;

  HDWP windefer;

  RECT rect;

  GetClientRect(hSplashWnd,&rect);

  x=rect.right;y=rect.bottom;

  POINT Ecran = {GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)} ;

  // on prend la taille de l'ecran - la fenaitre pour centrer

  tx = ((Ecran.x/2)-(x/2)); // Taille de ecran divisée par 2 moins taille de image divisée par 2 =  center

  ty = ((Ecran.y/2)-(y/2));

  windefer=BeginDeferWindowPos(1);

  DeferWindowPos(windefer,hSplashWnd,HWND_NOTOPMOST,tx,ty,50,50,SWP_NOSIZE|SWP_SHOWWINDOW|SWP_NOZORDER);

  EndDeferWindowPos(windefer);

  ShowWindow(hSplashWnd,SW_SHOWNORMAL);

  UpdateWindow(hSplashWnd);

  this->SHOW = TRUE;

}

void SPLASHLOAD::exit()

{

  ShowWindow(hSplashWnd,SW_HIDE);

// si ta eu le courage de lire , c'est moi qui est pré-ecrit le discours de karles pour le cadeau :3 Oui moi :p

// Pourquoi sa te choque que moi , davedevils puis écrire des chose censée ?

  this->SHOW = FALSE;

}

#endif
Paste the cpp and h in /8_Neuz/

Now , Go to : \8_Neuz\Resource.h

find :
Quote:
#define IDM_TOGGLEALLHITS 40013
add:
Quote:
#define ID_PRELOADER 40020
Open with NOTPAD++ the file \8_Neuz\WinMain.rc

Find :
Quote:
IDI_MAIN_ICON ICON "Resource\\main_ico.ico"
add:
Quote:
ID_PRELOADER BITMAP "Resource\\Preloader.bmp"
Add your splash in : \8_Neuz\Resource\Preloader.bmp

(Splash for test : [Only registered and activated users can see links. Click Here To Register...] or [Only registered and activated users can see links. Click Here To Register...])


go to \8_Neuz\VersionCommon.h

add :
Quote:
#define __LOADER_SPLASH // splash for neuz by davedevils /jtb1
In Neuz.sln in visual studio 2003 , right click

Add -> Add existing Item

add : loadersplash.cpp et loadersplash.h

Now Build and try ;)

Now you have this :
[Only registered and activated users can see links. Click Here To Register...]

Credit :
99% Dave devil's / jtb1
1% Gala-lab For flyff
04/23/2013 16:45 Rhyder`#2
Tnx dude very nice release!
04/23/2013 16:50 Avalion#3
Thanks for this release man! It is very nice :P
04/24/2013 10:07 tangia1426#4
HOW TO FIX THIS ONE??

[Only registered and activated users can see links. Click Here To Register...]
04/24/2013 12:45 jtb1#5
You read post ?

Quote:
In Neuz.sln in visual studio 2003 , right click

Add -> Add existing Item

add : loadersplash.cpp et loadersplash.h

Now Build and try
Read ALL word in post before post after ;) it's a good idea for you :p
04/26/2013 05:04 bhengot#6
is there anyway that the picture can be in PNG format? so there can be transparent parts in the image ?
04/28/2013 00:15 jtb1#7
You can make this with LIB
[Only registered and activated users can see links. Click Here To Register...]
04/28/2013 03:53 Rhyder`#8
why is it .png are not allowed to use with this?
04/28/2013 07:24 xDillema#9
Quote:
Originally Posted by jayjei14 View Post
why is it .png are not allowed to use with this?
hey master look at this code
here ---> ID_PRELOADER BITMAP "Resource\\Preloader.bmp" It read .bmp file if you want to change in .jpeg/png and what so ever it's up to you.
btw you said you are pro now :) but this time ?
05/14/2013 20:20 .Shikura#10
Das geht ja ganz schnell :o

Kann man das nicht verlängern? :-)
05/14/2013 22:07 lanzelord996#11
Ja einen langsameren PC kaufen? xD
Der ist halt solange da bis der Client geladen hat :D
Du kannst auch noch nach dem laden eine Zeit hinzufügen aber wo ist dann der Sinn?
11/29/2014 20:41 Wezzy_Dev#12
how to change bmp to png??
11/30/2014 12:00 raventh1984#13
Quote:
Originally Posted by Wezzy_Dev View Post
how to change bmp to png??
D_PRELOADER BITMAP "Resource\\Preloader.bmp"

Change that to .png and it should work
04/02/2015 08:11 Wharsh#14
^ It will put an error i think? and BITMAP = bmp right? And can anyone give me an Idea so the splash screen wont put not responding and remove the box around the picture? it sucks :3
04/07/2015 21:15 Jomex#15
what if I told you there is code ready and better than your in source already?