Author Topic: OgerMagic installer  (Read 9660 times)

0 Members and 1 Guest are viewing this topic.

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
OgerMagic installer
« on: March 07, 2007 »
Hi all

Here is the first alpha version of freebasic installer , just install it in your FreeBasic folder.

Test it and please feed back your opinion.

Download it here

OgreMagic_fb.exe


Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: OgerMagic installer
« Reply #1 on: March 07, 2007 »
Cool stuff dude, some suggestions mate; do a way with the \Freebasic\ part to the path of were to extract and install to. And also if you compile with -s gui it will turn off the black dos window. I did find it a bit on the slow side when downloading, but thats nothing to do with your cool lib.

Welldone,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #2 on: March 07, 2007 »
Thanks Clyde for your feed back. :)

If I got it will , you want to a way to install the Examples and media in another place while installation , if so I will try it but it still needs the FreeBasic folder for installing the lib and the include file.

Yos I will compile them with –s gui ,thanks.

Did you try to compile the demos and did it work, you must use FB 0.16.


Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: OgerMagic installer
« Reply #3 on: March 08, 2007 »
Yeah I see what you mean about the libs and includes; silly me.

I've compiled all of them dude under Freebasic 0.17, and work a treat and some work quicker then the precompiled versions. And if I do say so, what a marvellous job you've done with your lib, fantastic stuff mate. Really cool.

Cheers and all the very best,
Clyde.

Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #4 on: March 08, 2007 »
FB 0.15 here   :'(
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #5 on: March 08, 2007 »
no problem shocky.

just download it and give it a try.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #6 on: March 08, 2007 »
Sadly and as I expected it won't run the sources. This is definately because I have an old version of FB, which I cannot update :( So sadly I guess that this means I won't be able to run your sources. Shame that, I've been enjoying the exe's, but the downloads were a bit huge!

Still, I can report that the installer worked fine and with no problems, I hope you get a lot of people using your lib mate.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #7 on: March 08, 2007 »

oh , that is bad news.

but do not wary , i will download a FB 0.15 and try to make it compatibale for you.

yes it is big becouse it has a new media in it.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #8 on: March 08, 2007 »
You're a really nice guy Emil. Thanks.  :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #9 on: March 08, 2007 »

Hi shocky.

here is a quick solution that let you compile some demos.

just reolace the Start.bas file in your computer with this

Code: [Select]
#include once "windows.bi"
#include once "win/d3d9.bi"
#include once "win/d3dx9.bi"

''-----------------------------------------------------------------------------
'' GLOBALS
''-----------------------------------------------------------------------------
dim shared as HWND              g_hWnd         = NULL
dim shared as LPDIRECT3D9       g_pD3D         = NULL
dim shared as LPDIRECT3DDEVICE9 g_pd3dDevice   = NULL
''-----------------------------------------------------------------------------
'' PROTOTYPES
''-----------------------------------------------------------------------------
declare function WindowProc( byval hWnd as HWND, byval msg as UINT, byval wParam as WPARAM, byval lParam as LPARAM ) as LRESULT
declare sub init()
declare sub shutDown()
declare sub render()

sub InitDirectX9(wwidth as integer ,height as integer )

        dim x = (GetSystemMetrics(SM_CXSCREEN)-wwidth) shr 1
        dim y = (GetSystemMetrics(SM_CYSCREEN)-height) shr 1
        SetWindowPos(g_hWnd,NULL,x,y,wwidth,height,SWP_NOZORDER or SWP_FRAMECHANGED)
         
        g_pD3D = Direct3DCreate9( D3D_SDK_VERSION )

        dim as D3DDISPLAYMODE d3ddm

        IDirect3D9_GetAdapterDisplayMode( g_pD3D, D3DADAPTER_DEFAULT, @d3ddm )

        dim as D3DPRESENT_PARAMETERS d3dpp
        clear( d3dpp, 0, len(d3dpp) )

        d3dpp.Windowed               = TRUE
        d3dpp.SwapEffect             = D3DSWAPEFFECT_DISCARD
        d3dpp.BackBufferFormat       = d3ddm.Format
        d3dpp.EnableAutoDepthStencil = TRUE
        d3dpp.AutoDepthStencilFormat = D3DFMT_D16
        d3dpp.PresentationInterval   = D3DPRESENT_INTERVAL_IMMEDIATE
        d3dpp.BackBufferWidth     = wwidth
        d3dpp.BackBufferHeight = height
        d3dpp.BackBufferCount     = 2

       
        IDirect3D9_CreateDevice( g_pD3D, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, _
                          D3DCREATE_HARDWARE_VERTEXPROCESSING, _
                          @d3dpp, @g_pd3dDevice )
        if(g_pD3D = NULL) then IDirect3D9_CreateDevice( g_pD3D, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd, _
                          D3DCREATE_HARDWARE_VERTEXPROCESSING, _
                          @d3dpp, @g_pd3dDevice )
                         
        if(g_pD3D = NULL) then end -1 
       
        '' create camera
        dim as D3DXMATRIXA16 mView , Projection
        dim as D3DXVECTOR3 Eye , LookAt , Up
        Eye.x = 0.0 : Eye.y = 0.0 : Eye.Z =-1.0
        LookAt.x = 0.0 : LookAt.y = 0.0 : LookAt.Z = 0.0
        Up.x = 0.0 : Up.y = 1.0 : Up.Z = 0.0
       
        D3DXMatrixLookAtLH(@mView, @Eye, @LookAt, @Up)   
        IDirect3DDevice9_SetTransform(g_pd3dDevice, D3DTS_VIEW, @mView)           
                                                     
        dim as D3DXMATRIX mProjection
        D3DXMatrixPerspectiveFovLH( @mProjection, D3DXToRadian( 45.0f ), 1.0f, 1.0f, 3000.0f )
        IDirect3DDevice9_SetTransform(g_pd3dDevice, D3DTS_PROJECTION, @mProjection )                 
       
        IDirect3DDevice9_SetRenderState(g_pd3dDevice,D3DRS_LIGHTING, FALSE)
     IDirect3DDevice9_SetRenderState(g_pd3dDevice,D3DRS_CULLMODE, D3DCULL_NONE)
       
End sub

sub DX9_BiginScene(_color as integer)
        IDirect3DDevice9_Clear( g_pd3dDevice, 0, NULL, D3DCLEAR_TARGET or D3DCLEAR_ZBUFFER, _
                            _color, 1.0f, 0 )
     IDirect3DDevice9_BeginScene(g_pd3dDevice)
end sub

       
sub DX9_EndScene()
        IDirect3DDevice9_EndScene(g_pd3dDevice)
        IDirect3DDevice9_Present(g_pd3dDevice, NULL, NULL, NULL, NULL )
end sub

sub closeDirectX9()
      if( g_pd3dDevice <> NULL ) then
        IDirect3DDevice9_Release(g_pd3dDevice)
    end if

    if( g_pD3D <> NULL ) then
        IDirect3D9_Release( g_pD3D )
    end if
end sub

''-----------------------------------------------------------------------------
'' Name: WinMain()
'' Desc: The application's entry point
''-----------------------------------------------------------------------------
function WinMain(byval hInstance as HINSTANCE, _
byval hPrevInstance as HINSTANCE, _
byval lpCmdLine as string, _
byval nCmdShow as integer _
) as integer

dim as WNDCLASSEX winClass
dim as MSG        uMsg

with winClass
.lpszClassName = @"MY_WINDOWS_CLASS"
.cbSize        = len(WNDCLASSEX)
.style         = CS_HREDRAW or CS_VREDRAW
.lpfnWndProc   = @WindowProc
.hInstance     = hInstance
.hIcon        = LoadIcon(hInstance, cast(LPCTSTR,IDI_APPLICATION))
    .hIconSm    = LoadIcon(hInstance, cast(LPCTSTR,IDI_APPLICATION))
.hCursor       = LoadCursor(NULL, IDC_ARROW)
.hbrBackground = cast(HBRUSH,GetStockObject(BLACK_BRUSH))
.lpszMenuName  = NULL
.cbClsExtra    = 0
.cbWndExtra    = 0
end with

if( RegisterClassEx( @winClass ) = FALSE ) then
return E_FAIL
end if

g_hWnd = CreateWindowEx( NULL, "MY_WINDOWS_CLASS", _
                             "Direct3D (DX9) - Primitive Types", _
     WS_OVERLAPPEDWINDOW or WS_VISIBLE, _
         0, 0, 640, 480, NULL, NULL, hInstance, NULL )

if( g_hWnd = NULL ) then
return E_FAIL
end if

    ShowWindow( g_hWnd, nCmdShow )
    UpdateWindow( g_hWnd )

init()

do while( uMsg.message <> WM_QUIT )
if( PeekMessage( @uMsg, NULL, 0, 0, PM_REMOVE ) ) then
TranslateMessage( @uMsg )
DispatchMessage( @uMsg )
        else
    render()
end if
loop

shutDown()

    UnregisterClass( "MY_WINDOWS_CLASS", winClass.hInstance )

return uMsg.wParam
end function

''-----------------------------------------------------------------------------
'' Name: WindowProc()
'' Desc: The window's message handler
''-----------------------------------------------------------------------------
function WindowProc( byval hWnd as HWND, _
byval msg as UINT, _
byval wParam as WPARAM, _
byval lParam as LPARAM _
   ) as LRESULT

    select case ( msg )
        case WM_KEYDOWN
select case( wParam )
case VK_ESCAPE
PostQuitMessage(0)

end select

case WM_CLOSE
PostQuitMessage(0)

        case WM_DESTROY
            PostQuitMessage(0)

case else
return DefWindowProc( hWnd, msg, wParam, lParam )
end select

return 0
end function

''-----------------------------------------------------------------------------
'' Name: shutDown()
'' Desc: Release all Direct3D resources.
''-----------------------------------------------------------------------------
sub shutDown( )

    closeDirectX9()
   
end sub

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #10 on: March 08, 2007 »
When you say "start.bas" in your computer, do you mean the one in c:\programs\freebasic\ogermagic\examples
Because I replaced that and the examples still won't compile.
It's really nice of you to go to all this trouble but I really think I am holding up the development of your library now, I can't update from 1.5 because of other problems.. My hard drive has errors on it now from a corrupt installation of Visual C studio, at least it works well for Clyde so that you know it will work without problems on 0.17 :)

Thanks for trying, blame my bad setup!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #11 on: March 08, 2007 »

yes i meant that , but it is weird , i have downloaded a fb 0.15 verstion and installed it under FreeBasic_0.15 folder to not overied my 0.16 version then i have installed OgreMagic there and replace the start.bas as i mentioned and 14 demos was correctlly compiled and workd ok.

any way you can use many version of FB in the same computer.

hope that help you.

see you.

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #12 on: March 08, 2007 »

Hi shocky.

just i want to know your own opinion about this presentation of OgreMagicfeatures.
Code: [Select]
Features of Magic Library
•  Playing Movie:
       Magic Library allows you to playing movie in your scene ,you can play any format that it's codec was installed in your system ,also you can apply many effects when playing movie such as playing movie in grayscale color  ,you could  fade in and out the movie ,playing the movie  in a texture then do any effect on the texture ,i.e. rotating it around any axis ,scaling it ,or apply this texture to your 3d model ...............
•  BlitzMax  features:
               Magic Library has some functions that the same as BlitxMax basic language ,of course all of us already heard about this awesome language so you can blending an image with background, rotating ,scaling ,tilling it ,even you can convert some BlitzMax programs for work with your code. also you can apply endless of effects with this Blitz compatible functions.
•  Gif Animations:
     Magic Library  will allow you to merge a GIF animation with your 3d world ,so if you have a pretty  Gif animation ,you do not have to convert it to another format to include it with your scene .also you could fade in and out ,blending ,scaling rotating your GIF Animation as usual.
•  Keyboard & Mouse:
    Magic Library allows you to directly check your Keyboard and Mouse  ,all you have to do is to call one function to see if the user take some actions.
•   Animated Images:
    Magic Library allows you to play animated image ,if you remember old 2d animation that is a one big image which contains many frames that displayed after each other to make the animation ,always you will use this for playing 2d sprite and explosion animations.
•   Fading In & Out:
Magic Library allows you to  fade in & out your images ,Gif animation and animated Images ......

•  Amiga Amos:
Magic Library allows some features from this old and fantastic basic language, so with RectangleZone & circleZone and ellipseZone  you can easily define a rectangle or circular zone on your screen and check if the mouse is over any zone or not. usually you will use this in the start of your game for example to allow the user to select from game Options menus.
•  HLSL Shader :
              Magic Library  allows you to write your one high level shader program in simple and easy way ,there are endless effects could be done by shader language.
•  Screens :
              Magic Library  allows you to redirect the render operation to a texture then use this texture as a sprite.

•  Editing sprite buffer :
              Magic Library  allows you to lock the buffer of any sprite then write to any color channels , also you can make any software work then copy that work to the sprite then use the sprite as you usual doing.
•  Zoom effect :
              Magic Library  allows you to easily zoom in or out your drawing.
•  clip drawing area :
              Magic Library  allows you to clip your drawing to specific rectangle , so any drawing outside that rectangle area will not take place.
•  Time Line :
              Magic Library  allows you to fully control your animation time , by specify the start and end time of each pace of code .
•  Bitmap fonts :
              Magic Library  allows you to load a bitmap font the use this font for drawing any text you want , also it allows you to create a windows system font and use it.
•  using 3D world :
              Magic Library  allows you to draw sprite and fonts and movie in a real 3D world , even you can create a mesh and mix it with your 2D work.
•  playing sound :
              Magic Library  allows you to load and play sounds , it uses Fmod library.





Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #13 on: March 08, 2007 »
Nice :) Do you want me to correct the grammar for you Emil? There are a few things that could be worded differently.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #14 on: March 08, 2007 »

yes , please.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #15 on: March 08, 2007 »
Code: [Select]
Features of Magic Library
•  Playing Movies:
       Magic Library allows you to play movies in your scene ,you can play any format as long as it's codec is installed on your system ,also you can apply many effects when playing movies such as playing movies in grayscale ,you could  fade in and out ,play the movie  as a texture then do any effect to the texture ,i.e. rotate it around any axis ,scale it ,or apply this texture to a 3d model ...............
•  BlitzMax  features:
               Magic Library has some functions that are the same as the BlitxMax basic language ,of course all of us already heard about this awesome language so you can blend an image with the background, rotate ,scale ,tile it ,you can even convert some BlitzMax programs to work with your code. also you can apply endless amounts of effects with the Blitz compatible functions.
•  Gif Animations:
     Magic Library  will allow you to merge a GIF animation with your 3d world ,so if you have a pretty  Gif animation ,you do not have to convert it to another format to include it with your scene .also you could fade in and out ,blend ,scale and rotate your GIF Animation as usual.
•  Keyboard & Mouse:
    Magic Library allows you to directly check your Keyboard and Mouse  ,all you have to do is to call one function to check the mouse status.
•   Animated Images:
    Magic Library allows you to play animated images ,if you remember the old 2d animation method that was a one big image which contained many frames that displayed after each other to make the animation , you can do this with Magic Library. You could use this for playing 2d sprite and explosion animations.
•   Fading In & Out:
Magic Library allows you to  fade your images in & out , includes Gif animation and animated Images ......

•  Amiga Amos:
Magic Library enables some features from this old and fantastic basic language, so with RectangleZone & circleZone and ellipseZone  you can easily define a rectangle or circular zone on your screen and check if the mouse is over any zone or not. usually you will use this in the start of your game for example to allow the user to select from game Options menus.
•  HLSL Shader :
              Magic Library  allows you to write your one high level shader program in simple and easy way ,there are endless effects that can be done by using shader language.
•  Screens :
              Magic Library  allows you to redirect the render operation to a texture then use this texture as a sprite.

•  Editing the sprite buffer :
              Magic Library  allows you to lock the buffer of any sprite then write to any color channels , also you can make any software work then copy that work to the sprite then use the sprite as you usually do.
•  Zoom effect :
              Magic Library  allows you to easily zoom in or out of your drawing.
•  clip drawing area :
              Magic Library  allows you to clip your drawing area to a specific rectangle.
•  Time Line :
              Magic Library  allows you to fully control your animation time , by specify the start and end time of each piece of code . This makes it easy to time events, music anything according to the time that has elapsed.
•  Bitmap fonts :
              Magic Library  allows you to load a bitmap font! You can  then use this font for drawing any text you want , also it allows you to create a windows system font and use it.
•  using 3D world :
              Magic Library  allows you to draw sprite and fonts and movies in a real 3D world , even you can create a mesh and mix it with your 2D work.
•  playing sound :
              Magic Library  allows you to load and play sounds , it uses Fmod library.

There you go. :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Emil_halim

  • Atari ST
  • ***
  • Posts: 248
  • Karma: 21
    • View Profile
    • OgreMagic Library
Re: OgerMagic installer
« Reply #16 on: March 08, 2007 »

that is great work shocky , thanks you very much.

aprociate that.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #17 on: March 08, 2007 »
Happy to help!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Paul

  • Pentium
  • *****
  • Posts: 1490
  • Karma: 47
    • View Profile
Re: OgerMagic installer
« Reply #18 on: March 08, 2007 »
shockey, would it work to have both freebasic .15 and .17 installed at different places on your hard drive?
I will bite you - http://s5.bitefight.se/c.php?uid=31059
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: OgerMagic installer
« Reply #19 on: March 08, 2007 »
It would work if I hadn't messed up my HD, Paul  :-\
Shockwave ^ Codigos
Challenge Trophies Won: