Looking for SymbOS Quigs documentation

Pagina 3/8
1 | 2 | | 4 | 5 | 6 | 7 | 8

Van Trebmint2

Master (242)

afbeelding van Trebmint2

30-08-2021, 23:31

@AxelStone maps are purely a for v9990 development. Its like game mode as opposed to GUI, and allows you to group Tile patterns into large two layer maps with objects/collisions

As v9990 and the engine is still in development its not yet fully implemented anyway.

Sheets is fully working, and primarily used to create/export graphics in the 4/16 colour symbos format.

Well Ctrl.Image.Tile.Set is a way of attaching a graphic thats held within a sheet to a Image Control. So once you drop an image control onto the form, you can either use Ctrl.Image.Tile.Set or [Name].Tile.Set

For Ctrl.Image.Tile.Set the Id would be the name of the Control, its often easier to use the [Name].Image.Set though... you then supply the sheet name it was on, and then the tile number. Once you then [Name].refresh the Image control should show the tile from the sheet you required

Hope that helps, if not dop a line and I will do a little example project for you

Van Trebmint2

Master (242)

afbeelding van Trebmint2

30-08-2021, 23:34

Yes there are two ways to get access to controls, either directly with [Name].Refresh for instance or Ctrl.Refresh Name. This is so can group a sequence of instructions to controls if you wish. I can give an example project of that if you need too.
Cheers

Van NYYRIKKI

Enlighted (5880)

afbeelding van NYYRIKKI

31-08-2021, 07:19

AxelStone wrote:

The most "ASM" code I would use should be some routines to call BIOS functions, but probably someone should help me.

Sorry to say, but these kind of ideas must be scrapped immediately. MSX-BIOS is not compatible with SymbOS, so trying will most likely end up to data corruption on MSX and even worse results on other SymbOS compatible platforms that don't have similar MSX ROMs. SymbOS does not have any own BIOS either. In SymbOS all functionality happens by sending and receiving messages between processes instead.

Van gflorez

Resident (42)

afbeelding van gflorez

31-08-2021, 08:32

Yes, remember that SymbOS Runs also on CPC, Enterprise and PCW. All general apps in SymbOS run on all 4 systems. Of course there are apps tailored by Jörn for just only some of the systems, for better integration of the SymbOS operative system on these computers, but new applications should work on all 4 systems.

By now only MSX, CPC and Enterprise have G9K support, not the PCW, but this will probably change on a "near" future.(At least it is the firm intention of the hardware developers....)

Van edoz

Prophet (2392)

afbeelding van edoz

31-08-2021, 08:41

NYYRIKKI wrote:

Sorry to say, but these kind of ideas must be scrapped immediately. MSX-BIOS is not compatible with SymbOS, so trying will most likely end up to data corruption on MSX and even worse results on other SymbOS compatible platforms that don't have similar MSX ROMs. SymbOS does not have any own BIOS either. In SymbOS all functionality happens by sending and receiving messages between processes instead.

No Bios Calls here? LOL!
Youtube

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 09:41

Hello @Trebmint2, clear the topic of Map. About use of Ctrl, you are right, use directly the name is easier but sometimes it's not efficient to do it and you need to use ID, for example if you define a grid of images. In 2048 example you define a grid of 16 Images (Image1..Image16) and you get all their IDs doing this:

	// Create List of NTiles ID's
	h=0
	For f=Image1.Display To Image1.Display+15
		NTilesID(h)=Ctrl.GetID(Form1,f)
		h=h+1
	Next

My question is, why the IDs are calculated in this way? I mean, why Image2.Display = Image1.Display+1?

Thanks.

Van edoz

Prophet (2392)

afbeelding van edoz

31-08-2021, 09:55

This is because, Trebmint placed the imagesboxes on the form in a row of displaynumbers. This happens when you put the imagebox one after a one on the FORM then the ID's are in a row of numbers. Then he just started a loop from the ID of image1.display to image1.display+15 which is the last image for the gameplay on the form. I assume image1.display to image17.display also works. I think it is faster to code like this as you only have to lookup the ID once and not twice in one line of code. The display ID you can see in the FORM designer for each object.

Van Trebmint2

Master (242)

afbeelding van Trebmint2

31-08-2021, 10:06

AxelStone wrote:

Hello @Trebmint2, clear the topic of Map. About use of Ctrl, you are right, use directly the name is easier but sometimes it's not efficient to do it and you need to use ID, for example if you define a grid of images. In 2048 example you define a grid of 16 Images (Image1..Image16) and you get all their IDs doing this:

	// Create List of NTiles ID's
	h=0
	For f=Image1.Display To Image1.Display+15
		NTilesID(h)=Ctrl.GetID(Form1,f)
		h=h+1
	Next

My question is, why the IDs are calculated in this way? I mean, why Image2.Display = Image1.Display+1?

Thanks.

Hey @AxelStone. The answer is Ctrl.GetID() returns the unique Control value that symbos requires to operate on it.

The concept behind [Name].Display is the the location its has on the Form. So in effect a control can be pointed too by the Form number and Display number.
Symbos can display an individual Control, but its faster to group them together. So in the instance of 2048 image 16 graphics they are grouped into a linear order for speed.... as you can redraw them in a single call upto 16 controls at once

As you say yes Ctrl.... is used for when you're working more generally in the same manner on a group of controls. In this case I put all the Control ID's into an array so I can loop through.

Does this answer your question?

TBH Symbos has a rather rigid format for Controls, and consequently they are in effect static... Each is allocated 16bytes, with some additional if needed. This is why display position on form is used, as it wont actually change.

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 11:24

Wow I answered before reading son many answers, so just to recap:

  • So to understand, BIOS calls are not possible, right? At least if you want to make software compatible with other systems. It makes sense.
  • Clear the point of GetID, I didn't see that info in the bottom of the IDE, quite useful!

Quite impressive that Demo @NYYRIKKI, did you use Quigs or it's made in pure ASM? I've downloaded several games from main page to learn but they are coded all in pure ASM, like Pac-Man.

Thanks guys for your support.

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 11:52

Ok after some tests with IDs something seems wrong with IDE info, or I'm doing something wrong. I'm building a simple app to practice with sheets, this is the form:

Acording to it, Logo Image ID is 4. I've tried the following code without success:

	LogoSheet.Load App.Path+"logo.qs1"
	Ctrl.Image.Tile.Set 4,LogoSheet,0
	logoImage.Refresh

I've extracted logo ID with following piece of code:

id = Ctrl.GetID(FrmTest01, logoImage.Display)

And got this weird ID, -7339 !!

But with this ID, this code works:

	id = Ctrl.GetID(FrmTest01, logoImage.Display)
	LogoSheet.Load App.Path+"logo.qs1"
	Ctrl.Image.Tile.Set id,LogoSheet,0
	logoImage.Refresh

Why it's using -7339 as ID instead of 4?

Thanks

Pagina 3/8
1 | 2 | | 4 | 5 | 6 | 7 | 8