Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - spacefractal

Pages: [1] 2 3 ... 222
Off Topic / Re: Hacker News
« on: 2019-Mar-12 »

Off Topic / Re: Now that cool.....
« on: 2019-Mar-12 »
he thanks. Currectly we are doing a fun little side project to the Spectrum Next: Scramble from Konami

Here its a pretty much perfect port of the original and even keep the original resolution of the original (Next with the new tile mode can show 320x256px). Im also just seen a great Amstrad version of the same game. Must say its much better than the 2015 C64 effort. Even the port is not spot on, its still very close, and that is the point.

Snoopy, can you use the source code. its a easy fix with the total number objects really. Its can been happens more than 4096 is required throught if speed is not a issue.

Just change the define and rebuild it with the platforms _build.bat and then you can have more than 4096 objects.

Source Code is possible to download.

Im wasent aware of the other very old post and im property have not found it or aware of it. But. Here is so a integrated source code version of it, so you can invoke it by SETSCREEN command directly and its dosent break combatible, nor using inline when working.

This is how borderless windows should have been done really, which is what SETSCREEN is for. but both is actuelly valid and is not required if the old one still works.

Also there was various issues with the normal fullscreen in Windows 10 general, but its a totally different issue. But here all that was required is just mininmize its window when its got inactive from fullscreen.

PS. im also update the post for avoid a another little bug, so its fill the full window.

Here it's just so you could use SETSCREEN directly and do a borderless window more correctly. I'm haven't update with a tiny bug, but I'm know how to do it and is not home yet to update it.

I'm required such a window for a little arcade frontend for my pinball machine..... Other programs simply did dent like the full screen glbasic is using and freak out.

Found a little issue I'm take a look later. Look like y position is still taking the top border as it's should not do it. But worked OK for the extracly purpose I'm wanted througt.

gb.h: under // Extern Symbols

Code: GLBasic [Select]
extern int                              __DG_DOBORDERLESSWINDOW;

glb-full somewhere under namespace __GLBASIC__ {
Code: GLBasic [Select]
int             __DG_DOBORDERLESSWINDOW=0;

gb_pc.cpp: under void   SETSCREEN(DGNat w, DGNat h, DGNat fs) {

Code: GLBasic [Select]
        // do you want a borderless window?
        if (fs==2) { __DG_DOBORDERLESSWINDOW=1; fs=0; }
openglrainbows.cpp in the function bool OpenGLRainbows::DoWindowed()

replaec all code between    // -------- WIN32 -------- and  // update desktop

Code: GLBasic [Select]
        #elif defined(WIN32)
                if (m_WND.fullscreen)
                        ::ChangeDisplaySettings(NULL, 0);

                if (__DG_DOBORDERLESSWINDOW==1)
                        ::SetWindowLong(m_WND.hwnd, GWL_STYLE, WS_POPUP);
                        ::SetWindowLong(m_WND.hwnd, GWL_EXSTYLE, 0);
                        ::SetWindowLong(m_WND.hwnd, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX); // | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);

                WINDOWPLACEMENT wpl;
                if(0  ) // !::GetWindowPlacement(m_WND.hwnd, &wpl)) // Win98 will fail this here...
                        ::OffsetRect(&wpl.rcNormalPosition, (::GetSystemMetrics(SM_CXSCREEN)-m_WND.width)/2, (::GetSystemMetrics(SM_CYSCREEN)-m_WND.width)/2);
                        RECT rcCenter, rcArea;
                        ::GetWindowRect(m_WND.hwnd, &rcCenter);
                        HMONITOR hMonitor = MonitorFromRect(&rcCenter, MONITOR_DEFAULTTONEAREST);
                                MONITORINFO MonitorInfo = { sizeof MonitorInfo };
                                GetMonitorInfo(hMonitor, &MonitorInfo);
                                rcArea = MonitorInfo.rcWork;
                                ::SystemParametersInfo(SPI_GETWORKAREA, 0, &rcArea, 0);

                        wpl.rcNormalPosition.right=m_WND.width                                   +::GetSystemMetrics(SM_CXBORDER)*6;
                        ::OffsetRect(&wpl.rcNormalPosition, ((rcArea.right-rcArea.left)-m_WND.width)/2, ((;

                if (__DG_DOBORDERLESSWINDOW==0)
                        ::SetWindowPos(m_WND.hwnd, HWND_NOTOPMOST,
                                                wpl.rcNormalPosition.right - wpl.rcNormalPosition.left,
                        ::SetWindowPos(m_WND.hwnd,HWND_NOTOPMOST,wpl.rcNormalPosition.left,, m_WND.width, m_WND.height, 0);
                ::ShowWindow(m_WND.hwnd, SW_SHOWNORMAL);

Now you can set a borderless window by just SETSCREEN, X, Y, 2

GLBasic - en / Re: Smooth scroll
« on: 2019-Mar-05 »
im remember im did used floats in a least both Karma Miwa and Genius Greedy Mouse and the camera even can zoom in and out in the last game. Howover im did allways make sure the tiles was in a Interger size as well the camera positon, so yes im did fighted with a similar issues due the floats imprecision. you can eventuelly round it and Interger it. Its was something like that im did in my games to avoid various artifact in that fact im newer used virtual screen.

There is a _build.bat for every platform, which will compile the whole platform. Then done then you can build as normal. There is a limit of 4096 objects in this case, but would been nice if you can set it  to any number by your self. but for now, this is the way for go.


howover if you have access to the source code and download it. Not sure why Gernot limit it, since its could been higher. its currectly limited to 4096. If you ask me, this should been possible to change to whatever limit, so its a array issue.

But if you have download the source code, you can change this line in the file rainbows3d.h to a higher value:

#define GLR_MAX_OBJECTS      0x1000

0x1000 is set to extractly 4096 and not sure its possible to REDIM it.

You can actuelly download the source code and recompile it.

im put the source code under compiler/platform/source from the downloaded one (can been download from the main site). then you can build the source code by using _build.bat from each platform.

Hopefully Gernot adds this to the glbasic 16 soon. Im only just added 2 lines or code or such in glb_pc.cpp.

Here im do manual minimize it (which worked best in this case), if its fullscreen when the windows inactivate status is called.

This seens to also make sure the Windows dosent got stuck in the game, which was happens (im was needed to reset it).

GLBasic - en / Re: Android Stuck Wake Lock
« on: 2019-Feb-12 »
yes im see in the source code both subs is not called when AUTOPAUSE is set to FALSE and might is harder to control or checking if HIBERNATE is got stuck.

Could look like a similar issue, even in Windows 10, where a paused HIBERNATE() state dosent not allways resumed or killed correctly?

just use the source code modification, then its works as intended (and dont try to detect alt-tab etc, which might conflict so). Windows 10 simply just do not minimize the window as its should. Then you dosent need to detect the alt-tab anymore.

Etc the main issue is in the glbasic source code when WA_INACTIVE is called:
LRESULT CALLBACK __WndProc_(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)

The new code checks, if the windows is fullscreen, then manually minimize it. Done with success with 3 of my games, with 2 is remaining.

GLBasic - en / Re: Android Stuck Wake Lock
« on: 2019-Feb-12 »

im have still got issues, but im do found a very simple fix in the c++ code, all its actuelly was need to do is MINIMIZE the window, when its in FULLSCREEN,  then its escape its correctly!

Code: GLBasic [Select]
        case WM_ACTIVATE:
                        switch(wParam & 0xffff)
                                case WA_ACTIVE: case WA_CLICKACTIVE:
                                                if(!__g_paused && __g_allowPause)
                                                        ::SetWindowText(__hWnd, __g_Caption().c_str());
                                case WA_INACTIVE:
                                        if (__DG_FULLSCREEN==1)
                                                if(__g_paused && __g_allowPause)
                                                        ::SetWindowText(__hWnd, (__g_Caption() + CGStr(" <pause>")).c_str());
                return 0L;

Actuelly pretty simple fix! Windows 10 simply dosent minimize from fullscreen as its should? So im just let it minimze if its fullscreen. You dont need to maximize, which works as intended.

Pages: [1] 2 3 ... 222