English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 14 October 2018, 13:21   #1
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
C Intuition Help

...

Last edited by plasmab; 08 November 2018 at 03:13.
plasmab is offline  
Old 14 October 2018, 18:07   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,966
I think you can render directly to the Screen (i.e. not need to open a window) if you want. Pass a pointer to the RastPort field of the Screen structure to various graphics.library routines like Text(), Move(), Draw() etc.

You can also open a borderless backdrop window to cover the whole screen if you need to use Intuition stuff like gadgets etc. Specify the WFLG_BACKDROP and WFLG_BORDERLESS flags in the Flags field or your NewWindow structure.
mark_k is offline  
Old 14 October 2018, 18:15   #3
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Thanks. Will give it a whirl and report back .
plasmab is offline  
Old 14 October 2018, 20:41   #4
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,727
You can indeed draw directly to the screen, but be aware there will be no clipping. If you draw past the right edge of the screen, it will appear on the left and vice versa. While this might still be funny, it's dangerous to draw beyond the top or bottom border because you will hit memory you don't own.

Also you won't receive any user input. With only a screen you can only wait a while and then close it. If you want to react on user input you need a window.

Maybe you like the attached example. It opens a screen and a window and display mouse coordinated when the mouse is moved with a font loaded from disk.
Attached Files
File Type: c scrmouse.c (3.7 KB, 36 views)
thomas is offline  
Old 14 October 2018, 20:43   #5
pipper
Registered User

 
Join Date: Jul 2017
Location: San Jose
Posts: 98
Also look into the SA_Quiet and SCREENQUIET tag/flag when opening the screen.
pipper is offline  
Old 15 October 2018, 00:38   #6
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Thanks all. I compiled that C up but it didnt work, no output and stopped. But i got the gist of what it was doing.
plasmab is offline  
Old 15 October 2018, 10:01   #7
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,727
Then you did something wrong becasue it does work. I wouldn't publish a demo without having it tested.
thomas is offline  
Old 15 October 2018, 10:05   #8
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
C Intuition Help

Compiled ok. Just silently didn’t do anything. I did notice it’s requesting more bitplanes than a standard Amiga has. I dropped that to 3 but same behaviour. I’ll dig in later.

EDiT: I did notice there are no braces around the else clauses which sets my code OCD off big time.... seen so many bugs caused by that over the years.

Last edited by plasmab; 15 October 2018 at 10:20.
plasmab is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
1.x Intuition knob gadget arcanist Coders. System 0 30 January 2018 18:49
intuition.library zharn Coders. System 8 22 February 2015 13:50
Intuition Prefs daemon problem: Mogsy support.Hardware 4 09 November 2012 21:14
Intuition - Menus Gilloo Coders. System 1 05 March 2012 11:11
Intuition window WinAPI integration? Mequa support.WinUAE 10 12 November 2010 22:46

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06767 seconds with 14 queries