piscometro Posted September 3, 2012 Author Share Posted September 3, 2012 Hi, i searched the forum for psot related with fullscreen, but none of them was for the directx8 eclipse origins. Can someone help me on this, and give me some tips? I searched the code for windowed, and change that to false, but a error happier in loggin screen. Ty for the help ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
blkcrow Posted September 3, 2012 Share Posted September 3, 2012 []([url]http://directx4vb.vbgamer.com/DirectX4VB/Tutorials/DirectX8/GR_Lesson01.asp[/url])[http://directx4vb.vbgamer.com/DirectX4VB/Tutorials/DirectX8/GR_Lesson01.asp](http://directx4vb.vbgamer.com/DirectX4VB/Tutorials/DirectX8/GR_Lesson01.asp)at the end of the page it tells you how to configure for fullscreen Link to comment Share on other sites More sharing options...
piscometro Posted September 3, 2012 Author Share Posted September 3, 2012 I tried to follow that tutorial, but do what I do the error appear :x Can you help me in a more detailed way? ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
dimx Posted September 4, 2012 Share Posted September 4, 2012 TryDispMode.Format = D3DFMT_X8R8G8B8DispMode.Width = 800DispMode.Height = 600D3Dwindow.SwapEffect = D3DSWAPEFFECT_FLIPD3Dwindow.BackBufferCount = 1 '//1 backbuffer onlyD3Dwindow.BackBufferFormat = DispMode.Format 'What we specified earlierD3Dwindow.BackBufferHeight = 600D3Dwindow.BackBufferWidth = 800D3Dwindow.hDeviceWindow = frmMain.hWndI wouldnt reccomend it this way, I would get the user resolution first and then adjust the game screen based on the resolution, but that would streatch everything depending on the the persons resolution.Maybe have a couple of options available and let the user decide which one works the best for them. Link to comment Share on other sites More sharing options...
blkcrow Posted September 4, 2012 Share Posted September 4, 2012 > I tried to follow that tutorial, but do what I do the error appear :x Can you help me in a more detailed way? ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)what does the error sayies Link to comment Share on other sites More sharing options...
piscometro Posted September 4, 2012 Author Share Posted September 4, 2012 Direct3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, Display_Mode 'Use the current display mode that you'are already on. Incase you are confused, I'm'talking about your current screen resolution. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)Direct3D_window.Windowed = False 'The app will be in windowed mode.Direct3D_window.BackBufferFormat = D3DFMT_X8R8G8B8Direct3D_window.SwapEffect = D3DSWAPEFFECT_DISCARD 'Refresh when the monitor does.Direct3D_window.BackBufferFormat = Display_Mode.Format 'Sets the format that was retrieved into the backbuffer.Direct3D_window.BackBufferCount = 1 '1 backbuffer onlyDirect3D_window.BackBufferWidth = 800 ' frmMain.picScreen.ScaleWidth 'Match the backbuffer width with the display widthDirect3D_window.BackBufferHeight = 600 'frmMain.picScreen.ScaleHeight 'Match the backbuffer height with the display heightDirect3D_window.hDeviceWindow = frmMain.picScreen.hWnd 'Use frmMain as the device window.I have this code, but it fails to create device, can someone help? Link to comment Share on other sites More sharing options...
Exception Posted September 4, 2012 Share Posted September 4, 2012 ``` ' Stop us from going ahead if it's minimised.. If frmMain.WindowState = vbMinimized Then Exit Sub MAX_MAPX = RoundUpTo32(frmMain.ScaleWidth) / 32 - 1 MAX_MAPY = RoundUpTo32(frmMain.ScaleHeight) / 32 - 1 HalfX = ((MAX_MAPX + 1) / 2) * PIC_X HalfY = ((MAX_MAPY + 1) / 2) * PIC_Y ScreenX = (MAX_MAPX + 1) * PIC_X ScreenY = (MAX_MAPY + 1) * PIC_Y If Fullscreen = True Then ActualX = TwipsToPixels(Screen.Width, 0) ActualY = TwipsToPixels(Screen.Height, 1) Else ActualX = Me.ScaleWidth ActualY = Me.ScaleHeight End If StartXValue = ((MAX_MAPX + 1) / 2) - 1 StartYValue = ((MAX_MAPY + 1) / 2) - 1 EndXValue = (MAX_MAPX + 1) + 1 EndYValue = (MAX_MAPY + 1) + 1 Direct3D_window.BackBufferWidth = frmMain.ScaleWidth 'Match the backbuffer width with the display width Direct3D_window.BackBufferHeight = frmMain.ScaleHeight 'Match the backbuffer height with the display height Direct3D_Device.Reset Direct3D_Window DirectX_ReInit```That is literally all I use in my resizing code for resolutions and fullscreen (Although, you have to keep in mind that I have stuff drawing to the form, not to the picScreen, and I changed all of the camera constants to variables. I also did a few other things that I can't remember, but this should provide a good base ;>). That's in the Form_Resize procedure. Link to comment Share on other sites More sharing options...
Exception Posted September 4, 2012 Share Posted September 4, 2012 Oh, and you may want these procedures…```Public Function RoundUpTo32(ByVal Number As Long) As Long RoundUpTo32 = CLng(Number / 32) * 32End FunctionPublic Sub SetResolution(ByVal Width As Long, ByVal Height As Long) frmMain.WindowState = vbNormal 'If Fullscreen = True Then ToggleFullscreen frmMain.Width = PixelsToTwips(Width, 0) frmMain.Height = PixelsToTwips(Height, 1) frmMain.Left = 0 '(Screen.Width / 2) - (frmMain.ScaleWidth / 2) frmMain.Top = 0 '(Screen.Height / 2) - (frmMain.ScaleHeight / 2) Options.ResoX = Width Options.ResoY = Height SaveOptionsEnd SubPublic Sub ToggleFullscreen() frmMain.WindowState = vbNormal If Fullscreen = True Then Fullscreen = False Options.Fullscreen = 0 frmMain.BorderStyle = 1 frmMain.Caption = frmMain.Caption SetResolution Options.ResoX, Options.ResoY AddText "Fullscreen Mode disabled.", White Else Fullscreen = True frmMain.BorderStyle = 0 frmMain.Caption = frmMain.Caption frmMain.Width = Screen.Width frmMain.Height = Screen.Width frmMain.Left = 0 frmMain.Top = 0 frmMain.Caption = frmMain.Caption Options.Fullscreen = 1 AddText "Fullscreen Mode enabled.", White End If SaveOptionsEnd Sub```(Apologies for the double post, but for some reason, editing a post removes all of the nesting.) Link to comment Share on other sites More sharing options...
piscometro Posted September 5, 2012 Author Share Posted September 5, 2012 I tried all this but now it goes full screen, but i cant resize maps to bigger values :X Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now