Xadvance

From Bennu Wiki
Jump to: navigation, search


Definition

INT xadvance ( <INT angle> , <INT distance> )

Moves a process a certain distance in a certain direction.

Parameters

INT angle - The angle in which to move the process, in thousandths of a degree.
INT distance - The distance to move the process, in pixels.

Returns

INT : Successrate

true - Success.
false - Error.

Example

Program example;
Global
    myproc;

Begin
 
    myproc=proc();

    Loop
        frame;
    End
End

Process proc();
Begin

    x=100;
    y=100;

    Loop
        xadvance(90000,10); //moves the process vertically (90 degrees) 10 pixels
        frame;
    End

End


Mod_grproc
Globals None
Imported:
DumptypeFadingFpsFrametimeFullscreenGraphmodeM7MouseRestoretypeScalemodeScaleresolutionScaleresolutionaspectratioScaleresolutionorientation
Constants None
Imported:
BACKGROUNDBABLENDBALPHABHMIRRORBNOCOLORKEYBSBLENDBTRANSLUCENTBVMIRRORCOMPLETEDUMPCOMPLETERESTORECSCREENDOUBLEBUFFERHWSURFACEM1024X768M1280X1024M320X200M320X240M320X400M360X240M376X282M400X300M512X384M640X400M640X480M800X600MODE16BITSMODE16BPPMODE2XSCALEMODE8BITSMODE8BPPMODEDOUBLEBUFFERMODEFRAMELESSMODEFULLSCREENMODEHARDWAREMODEMODALMODEWAITVSYNCMODEWINDOWNORESTOREPARTIALDUMPPARTIALRESTORESCALEHQ2XSCALENOFILTERSCALENONESCALENORMAL2XSCALESCALE2XSCALESCANLINE2XSCREEN
Locals None
Imported:
AngleCnumberCtypeSpecial:Badtitle/NS108:FileFlagsHeightRegionResolutionSizeSizexSizeyXXgraphYZ
Functions Advance()Collision()Collisionbox()Collisioncircle()Getangle()Getdist()Getrealpoint()Xadvance()