Author Topic: Uffo2  (Read 11378 times)

0 Members and 3 Guests are viewing this topic.

Peter

  • Guest
Uffo2
« on: April 10, 2011, 09:58:01 AM »
Deleted
« Last Edit: April 26, 2015, 06:37:30 AM by Peter »

Charles Pegge

  • Guest
Re: Uffo2
« Reply #1 on: April 10, 2011, 01:06:44 PM »

Earthlings, Earthlings! We want your planet. Resistance is useless!

Aurel

  • Guest
Re: Uffo2
« Reply #2 on: April 10, 2011, 08:51:19 PM »
Excellent Peter :)

JRS

  • Guest
Re: Uffo2
« Reply #3 on: April 10, 2011, 09:31:56 PM »
I can't seem to get it to run under Wine.

Is this program requesting the full screen to run?

Quote
hardcore hoby programmer

hobby not hoby

« Last Edit: April 11, 2011, 08:44:08 AM by JRS »

Aurel

  • Guest
Re: Uffo2
« Reply #4 on: April 11, 2011, 11:34:14 AM »
OK ..OK ..hobby ;D
No John ,this program don't need full screen.
Code: [Select]
OpenWindow "Uffo2",800,600,ws_popup

JRS

  • Guest
Re: Uffo2
« Reply #5 on: April 11, 2011, 08:41:31 PM »
I never see a window either.  ???

Maybe Charles can try it on his version of Wine and see if it's just my PC.


Charles Pegge

  • Guest
Re: Uffo2
« Reply #6 on: April 11, 2011, 09:01:35 PM »
I can't seem to get it to run under Wine.

John,
One possible problem: WS_POPUP

Ypu could try:

Code: [Select]
  OpenWindow "Uffo2",800,600,CS_HREDRAW or CS_VREDRAW 'ws_popup

Charles

JRS

  • Guest
Re: Uffo2
« Reply #7 on: April 11, 2011, 10:25:00 PM »
No luck.

There is a brief frame of a window displayed  (no client content) and it immediately closes.

JRS

  • Guest
Re: Uffo2
« Reply #8 on: April 12, 2011, 03:45:02 PM »
The full screen went black and when it returned, I was left in 800x600 resolution mode. I had to log out to recover.


Charles Pegge

  • Guest
Re: Uffo2
« Reply #9 on: April 12, 2011, 04:56:37 PM »


I could get it to run at about 1 frame per second by bypassing the Esc Key test. I think the only way to resolve this in the long term is if Peter could test his software with Wine/Ubuntu - if he is willing.

A few months ago I made a version of "func.inc" that worked correctly in Wine though it is out of date now. The main principle is to stick rigorously to the WinMain / WndProc message processing conventions and also mask off the upper 16 bits of the virtual key state which I think was the cause of the blank window in this case.

Charles


[attachment deleted by admin]

JRS

  • Guest
Re: Uffo2
« Reply #10 on: April 12, 2011, 06:20:07 PM »
I was able to get 2 or the 3 programs to run.

magic8erw.exe failed in a similar way to the Uffo program I can't run.

Charles Pegge

  • Guest
Re: Uffo2
« Reply #11 on: April 12, 2011, 06:30:17 PM »
That's okay John. The exe file is now defunct but the scripts are valid.

JRS

  • Guest
Re: Uffo2
« Reply #12 on: April 12, 2011, 10:52:09 PM »
The recompile solved the problem.

That still doesn't explain why Peter's Uffo example doesn't work. Are you saying that Peter is bypassing standard Windows API calls and accessing Windows services at a lower level?

Aurel

  • Guest
Re: Uffo2
« Reply #13 on: April 13, 2011, 01:04:56 AM »
Its not low level then is in wine.
Wine probably dont recognize ws_popup style.
ws_popup is style without caption and without sysmenu.
You can try this example:
Code: [Select]
indexbase 0
include "wFunc.inc"
% WS_CAPTION = 0xC00000
% WS_SYSMENU = 0x80000
INT wstyle
INT w1
wstyle = ws_popup or WS_CAPTION or WS_SYSMENU
w1=OpenWindow "Uffo2",300,300,wstyle
 
'
do while bRet := GetMessage (&wm, 0, 0, 0)
    if bRet = -1 then
      'show an error message
    else
      TranslateMessage &wm
      DispatchMessage &wm
    end if
  wend

[attachment deleted by admin]
« Last Edit: April 13, 2011, 04:42:30 AM by Aurel »

JRS

  • Guest
Re: Uffo2
« Reply #14 on: April 13, 2011, 05:29:05 AM »
I was able to get your example to run but the CPU was at 100% and I couldn't get any of the keyboard functions to work. When I closed the window, it left a mess in my upper left corner of my screen. (like previous examples you wrote)

[attachment deleted by admin]