Fli params

From Bennu Wiki
Jump to: navigation, search


Definition

INT fli_params ( <INT fli_id> , <INT x> , <INT y> , <INT z> , <INT angle> , <INT size> , <INT flags > )


Change the properties of the fli/flc animation loaded with Start_fli() or Fli_start(), such as the x, y, z, angle, size and flags. If only one specific property is to be changed, you might want to use Fli_move(), Fli_z(), Fli_angle(), Fli_size() or Fli_flags().


Parameters

INT fli_id - The handle id of the fli/flc file loaded with Start_fli() or Fli_start().
INT x - Change the horizontal position.
INT y - Change the vertical position.
INT z - Change the depth plane.
INT angle - Change the rotation.
INT size - Change the size.
INT flags - Change the mirroring.

Returns

INT : Success

0 - Changing the parameters failed, i.e. some error occurred.
1 - Changing the parameters was sucessfull.

Notes

There can only be one fli/flc animation beeing played at one given time, so it is not possible to play two or more animations at the same time.

Example

// import modules
IMPORT "mod_say";
IMPORT "mod_debug";
IMPORT "mod_proc";
IMPORT "mod_grproc";
IMPORT "mod_map";
IMPORT "mod_key";
IMPORT "mod_video";
IMPORT "mod_screen";
IMPORT "mod_flic";


GLOBAL

int fli_file1;

PRIVATE

PROCESS main ();

PRIVATE
int rewind_status;
int fli_angle=0;
int param_status=0;

BEGIN

   set_mode(640,480,16);
   
   // int start_fli (string filename, int x, int y);
   fli_file1=fli_start("video.fli",0,0,0,fli_angle,100,0);

   //           fli_params(int fli_id, int x, int y, int z, int angle, int size, int flags);
   param_status=fli_params(fli_file1, -200, 20, 0, 25000, 50, 0);
   
   say("param_status: "+param_status);
   
   WHILE (NOT key(_esc))
    
    IF (frame_fli()==0)      
       // rewind the fli file      
       rewind_status=reset_fli();      
    END                     
  
   FRAME;
  END
    
  // stop the fli file
  end_fli();
  
END

Used in example: Frame_fli(), End_fli(), Reset_fli(), say(), key()


Mod_flic
Functions Endfli()Fliangle()Fliend()Fliflags()Fliframe()Fligetinfo()Flimove()Fliparams()Flireset()Flisize()Flistart()Fliz()Framefli()Resetfli()Startfli()