ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:packshorts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
functions:packshorts [2017/03/19 18:09] korshunfunctions:packshorts [2017/04/15 17:38] korshun
Line 4: Line 4:
  
 ===== Description ===== ===== Description =====
-Packs two short integers (-32768 to 32767) into one integer and returns the result. The short integers must be in the [-32768, 32767] range.+Packs two short integers (-32768 to 32767) into one integer and returns the result.
  
-The packed values can be retrieved using [[UnpackShorts]].+The packed values can be retrieved using [[UnpackShort]].
  
 <note tip> <note tip>
Line 28: Line 28:
     // Pack rounded 2D actor position into a single integer.     // Pack rounded 2D actor position into a single integer.
     int pos = PackShorts(GetActorX(0)>>16, GetActorY(0)>>16);     int pos = PackShorts(GetActorX(0)>>16, GetActorY(0)>>16);
-    ACS_ExecuteAlways(somescript, 0, stuffstuff, pos);+    ACS_ExecuteAlways(somescript, 0, stuff1stuff2, pos);
 } }
  
-script somescript (int stuff, int stuff, int pos)+script somescript (int stuff1, int stuff2, int pos)
 { {
     // Extract actor position     // Extract actor position
functions/packshorts.txt · Last modified: 2017/04/17 20:48 by korshun