BCXDX9&Irrlicht project

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

BCXDX9&Irrlicht project

Post by Emil_halim »

hi all

just want to let you know that , i am working in BCXDX9&Irrlicht project.

so what is BCXDX9&Irrlicht project ?

it is an add on DLL library to Irrlicht ,it extendes the features of Irrlicht engine, it designed
for work with BCX language,but because it is a DLL so you can use it with any c++ compiler too.

it allows you to use 2d windows API drawing functions to your background, take screenshot ,playing any movie
(mpeg, avi , asf,....) in your background or in a texture,so you can play your movie in a rotating
texture or make a cube and draw the movie in it's side.

also you can control the FPS of your animation, so you can play movie in slowmotion or fastmotion,
you can apply image processing of your movie (play grayscale movie,nigative the movie...).

her is the herder so you can check out that functions that you can use.

BCXDX9.h
==================================
#ifndef __I_BCXDX9_H_INCLUDED__
#define __I_BCXDX9_H_INCLUDED__

#include "irrlicht.h"
// Irrlicht Namespaces
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

typedef void (*MY_FUNC_TYPE) (void);
typedef BOOL (*MY_BOOLFUNC_TYPE) (void);

typedef struct
{
void* pAMStream;
void* pPrimaryVidStream;
void* pDDStream;
void* pSample;
void* pSurface;
RECT Movie_rect;
void* MySrfc;
}MOVIE, * TMovie;


class IDX9 : public irr::iUnknown
{
public:

virtual ~IDX9() {};
virtual IrrlichtDevice* GetDevice()=0;
virtual IVideoDriver* GetVideo()=0;
virtual ISceneManager* GetSceneMgr()=0;
virtual void* GetBackBuf()=0;
virtual HDC GetDC(void* Buf)=0;
virtual void ReleaseDC(void* Buf)=0;
virtual void DrawText(int x, int y,char* text)=0;
virtual void DrawLine(int x1,int y1,int x2,int y2)=0;
virtual void MoveTo(int x1,int y1)=0;
virtual void DrawLineTo(int x2,int y2)=0;
virtual void DrawRectangle(int x1,int y1,int x2,int y2)=0;
virtual void DrawRoundRect(int x1,int y1,int x2,int y2,int xx,int yy)=0;
virtual void DrawCircle(int x1,int y1,int r)=0;
virtual void DrawBorder(int x1,int y1,int x2,int y2)=0;
virtual void UsePen(int Style,int Width,int Clr)=0;
virtual void UseBrush(int Style,int Color,int Hatch)=0;
virtual void UseFont(char* nam,int size,int bold)=0;
virtual void PlayMaxSpeedAnim(MY_FUNC_TYPE func,DWORD duration);
virtual void PlayAnim(MY_FUNC_TYPE func,DWORD duration,int fps);
virtual void PlayAnimForever(MY_FUNC_TYPE func,int fps);
virtual void PlayAnimUntil(MY_BOOLFUNC_TYPE func,int fps);
virtual void* CreateSurface(UINT w,UINT h)=0;
virtual TMovie LoadMedia(char* filename)=0;
virtual int NextMediaFrame(TMovie Mv)=0;
virtual int MediaWidth(TMovie Mv)=0;
virtual int MediaHeight(TMovie Mv)=0;
virtual void DrawMedia(TMovie Mv,int x,int y,void* Buf)=0;
virtual void DrawMediaToFit(TMovie Mv,void* ds)=0;
virtual void MediaLock(TMovie Mv)=0;
virtual void MediaUnlock(TMovie Mv)=0;
virtual void FreeMovie(TMovie Mv)=0;
virtual void Gray(void* BufAddr,LONG pitch,int x1,int y1,int x2,int y2)=0;
virtual void Blend(LPBYTE SrcbufAddr,LPBYTE DestBufAddr,int bufLen ,DWORD alpha)=0;
virtual void Negative(LPVOID BufAddr,LONG pitch,int x1,int y1,int x2,int y2)=0;
virtual void Intensity(LPVOID BufAddr,LONG pitch,float intnsty,int x1,int y1,int x2,int y2)=0;
virtual void* GetMovieBuffer()=0;
virtual LONG GetMoviePitch()=0;
virtual void DrawMedia(TMovie Mv,int x,int y,ITexture* Buf)=0;
virtual void TakeScreenShot(char* filename, int format =1 )=0;
virtual BOOL KEYDOWN(DWORD vk_code);
virtual BOOL KEYUp(DWORD vk_code);
virtual BOOL MouseLeftKeyDown();
virtual BOOL MouseLeftKeyUp();
virtual BOOL MouseRightKeyDown();
virtual BOOL MouseRightKeyUp();

};

extern "C"
{
IDX9* CreateDX9(int Width,int Height,BOOL FullScrn);
}


#endif

=====================================================================


Note:
1- i had to put the next line to CVideoDirectX9::initDriver Function to allow us to lock the backbuffer

present.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;


2- BCXDX9.DLL will only work with direct9 driver.

please let me know your opinion.

thanks
Post Reply