WikiPendium

(beta)

Getrez()

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are 216.73.216.35

Getrez()


WORD Getrez( VOID )


Getrez() returns a machine-dependent code representing the current screen mode/ratio.

Opcode

4 (0x04)

Availability

Getres()? is avaliable in all TOS versions, but the EdDI? cookie (when present) should be consulted instead, and VgetMode()? can be used when the _VDO cookie has a value of 0x00030000.

Binding

	move.w	#$04,-(sp)
	trap	#14
	addq.l	#2,sp


Return Value

Getrez() returns a value representing the current video display mode as detailed in the following table:

Getres()? returns Screen dimentions Colors _VDO cookie value prerequisite
0 320x200 16 0x00020000 or less
1 640x200 4 0x00020000 or less
2 640x400 2 0x00020000 or less
4 640x480 16 0x00020000 only
6 1280x960 2 0x00020000 only
7 320x480 256 0x00020000 only

For completeness only, we provide here the following chart that details the returned values on all systems with _VDO cookie from 0x00000000 to 0x00030000:

Screen Dimension 2 Colors 4 Colors 16 Colors 256 Colors True Color
320x200 X X 0 0 X
320x240 X 0 0 0 0
320x480 X 7 7 7 7
640x200 1 X X X X
640x400 2 X X X X
640x480 2 2 2 or 4† 2 2
1280x960 6 X X X X
† This value varies. TT030? Medium resolution returns a value of 4, however, the Falcon030? returns a value of 2.

Caveats

This call is extremely machine-dependent and should be used only on early system as mentionned above. Dependence on this call will make your program incompatible with third-party video boards and future hardware.
Screen attributes should be determined using the values returned by v_opnvwk()?.

Comments

Use of this call in preparing to call v_opnvwk()? is acceptable and must be done to specify the correct fonts to load from GDOS.

See Also

VgetMode()?, Egetshift()?, Setscreen()

Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]