ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


mulretval

This is an old revision of the document!


Multiple return values

acsutils uses a simple convention for functions returning multiple values, like RotateVector():

There are global variables r1 through r8. The functions write their return values to them.

  RotateVector(x, y, angle); // Call the function
  int newX = r1; // Get the first returned value
  int newY = r2; // And the second one

Warning: you should retrieve the return values AS SOON AS POSSIBLE, or else they may get overwritten by other functions that return multiple values.

mulretval.1461533141.txt.gz ยท Last modified: 2016/04/25 00:25 by korshun