Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Prism DLL:
- // Creates a new Prism of the indicated size.
- // Returns the ID of the Prism created.
- PrismCreate(width,height,depth);
- // Saves the indicated Prism to a file.
- // Returns 1 if successful, -1 if failed.
- /*
- Prism saves in "short" format, in short format every 8 cells
- are merged into one cell. This keeps the raw data from being
- read by normal humans, but keeps the raw data without data loss.
- Amount of bytes saved is the same decompressed and compressed.
- */
- PrismSave(id,fname);
- // Loads a Prism from the indicated file.
- // Returns the ID of the newly loaded Prism if sucessful, -1 if failed.
- /*
- Loads the prism saved in short format in the indicated file.
- Amount of bytes saved is the same decompressed and compressed.
- */
- PrismLoad(fname);
- // Deletes the indicated Prism from memory.
- // Returns 1 if successful, -1 if the Prism does not exist.
- /*
- The target is reset if the Prism being deleted is the current target.
- */
- PrismDelete(id);
- // Checks to see if the given Prism exists.
- // Returns 1 if successful, -1 if failed.
- PrismExists(id);
- // Sets the indicated Prism as the target for editing.
- // Returns 1 if the prism exists, -1 if the prism does not exist.
- PrismTarget(id);
- // Sets the target for editing to null(no target).
- // Returns 1.
- PrismReset();
- // Checks to see if a target is set.
- // Returns 1 if a target is set, -1 if not set.
- PrismHasTarget();
- // Returns the ID of the current target.
- PrismAddress();
- // Resets the target to null and deletes all existing Prisms from memory.
- // Returns the number of Prisms deleted from memory.
- PrismDeallocate();
- // Returns the size of the target in cells(width * height * depth).
- // Returns -1 if the prism does not exist.
- PrismCells();
- // Returns the width of the target.
- // Returns -1 if the prism does not exist.
- PrismWidth();
- // Returns the height of the target.
- // Returns -1 if the prism does not exist.
- PrismHeight();
- // Returns the depth of the target.
- // Returns -1 if the prism does not exist.
- PrismDepth();
- // Copies the contents of the source Prism to the destination Prism.
- // Returns the total number of cells that could be copied if successful, -1 if failed.
- // NOTE: Setting the target is not necessary for this function.
- /*
- This will copy the ocntents of Prisms of different sizes.
- However not all data can always be copied.
- For example: a Prism of size 14x16x2 cannot be 100% copied
- into a Prism of size 12x20x5.
- */
- PrismCopy(srce,dest);
- // Copies the contents of an area of the source Prism to an area of the destination Prism.
- // Returns the total number of cells that could be copied if successful, -1 if failed.
- // NOTE: Setting the target is not necessary for this function.
- /*
- NOTE: Out of bounds cells are not registered as set.
- */
- PrismCopyExt(srce,dest,srcex,srcey,srcez,destx,desty,destz,width,height,depth);
- // Returns the value of the specified cell.
- // Returns -1 if no target is set.
- PrismGet(x,y,z);
- // Returns the value of the specified cell.
- /* This function will "wrap" the x,y,z position from one end of the structure to the other
- if the position exceeds the size of the structure.
- Structure Size: Width: 100, Height: 100, Depth: 100
- Example: x: -10, y: -10, z: -10
- Wrap Of x,y,z: 90, 90, 90 */
- // Returns -1 if no target is set.
- PrismGetWrap(x,y,z);
- // Sets the specified cell to a value.
- // Returns -1 if no target is set.
- PrismSet(x,y,z,val);
- // Sets the specified cell to a value.
- /* This function will "wrap" the x,y,z position from one end of the structure to the other
- if the position exceeds the size of the structure.
- Structure Size: Width: 100, Height: 100, Depth: 100
- Example: x: -10, y: -10, z: -10
- Wrap Of x,y,z: 90, 90, 90 */
- // Returns -1 if no target is set.
- PrismSetWrap(x,y,z);
- // Adds a value to the current value to the specified cell.
- // Returns -1 if no target is set.
- PrismAdd(x,y,z,val);
- // Subtracts a value from the current value of the specified cell.
- // Returns -1 if no target is set.
- PrismSubtract(x,y,z,val);
- // Multiplies the value of the specified cell by a value.
- // Returns -1 if no target is set.
- PrismMultiply(x,y,z,val);
- // Divides the value of the specified cell by a value.
- // Returns -1 if no target is set.
- PrismDivide(z,y,x,val);
- // Performs a modulo operation on the value of the current cell by a value.
- // Returns -1 if no target is set.
- PrismModulo(x,y,z,val);
- // Bit-shifts the value of the specified cell by a value in the desired direction.
- // Returns -1 if no target is set.
- /*
- Shift if set to 0, shifts left, if set to 1, shifts right.
- */
- PrismBitShift(x,y,z,val,shift);
- // Performs a bitwise AND operation on the value of the current cell by a value.
- // Returns -1 if no target is set.
- PrismBitAnd(x,y,z,val);
- // Performs a bitwise OR operation on the value of the current cell by a value.
- // Returns -1 if no target is set.
- PrismBitOr(x,y,z,val);
- // Performs a bitwise XOR operation o nthe value of the current cell by a value.
- // Returns -1 if no target is set.
- PrismBitXor(x,y,z,val);
- // Sets an area of cells of the target to a value.
- // Returns the number of in-bounds cells that could be set.
- // Returns -1 if no target is set.
- PrismAreaSet(x,y,z,width,height,depth,val);
- // Adds a value to an area of cells of the target.
- // Returns the number of in-bounds cells that could be added.
- // Returns -1 if no target is set.
- PrismAreaAdd(x,y,z,width,height,depth,val);
- // Subtracts a value from an area of cells of the target.
- // Returns the number of in-bounds cells that could be subtracted.
- // Returns -1 if no target is set.
- PrismAreaSubtract(x,y,z,width,height,depth,val);
- // Multiplies a value to an area of cells of the target.
- // Returns the number of in-bounds cells that could be multiplied.
- // Returns -1 if no target is set.
- PrismAreaMultiply(x,y,z,width,height,depth,val);
- // Divides a value from an area of cells of the target.
- // Returns the number of in-bounds cells that could be divided.
- // Returns -1 if no target is set.
- PrismAreaDivide(x,y,z,width,height,depth,val);
- // Performs a modulo operation on an area of cells of the target.
- // Returns the number of in-bounds cells that could be modulo'd.
- // Returns -1 if no target is set.
- PrismAreaModulo(x,y,z,width,height,depth,val);
- // Bitshifts an area of cells of the target by a value.
- // Returns the number of in-bounds cells that could be bit-shifted.
- // Returns -1 if no target is set.
- PrismAreaBitshift(x,y,z,width,height,depth,val,shift);
- // Performs a bitwise AND operation on an area of cells by a value.
- // Returns the number of in-bounds cells that could be bitwise AND set.
- // Returns -1 if no target is set.
- PrismAreaBitAnd(x,y,z,width,height,depth,val);
- // Performs a bitwise OR operation on an area of cells by a value.
- // Returns the number of in-bounds cells that could be bitwise OR set.
- // Returns -1 if no target is set.
- PrismAreaBitOr(x,y,z,width,height,depth,val);
- // Performs a bitwise XOR operation on an area of cells by a value.
- // Returns the number of in-bounds cells that could be bitwise XOR set.
- // Returns -1 if no target is set.
- PrismAreaBitXor(x,y,z,width,height,depth,val);
- // Returns the sum of the indicated area of cells.
- // Returns -1 if no target is set.
- PrismAreaSum(x,y,z,width,height,depth);
- // Returns the minimum value of the indicated area of cells.
- // Returns -1 if no target is set.
- PrismAreaMin(x,y,z,width,height,depth);
- // Returns the maximum value of the indicated area of cells.
- // Returns -1 if no target is set.
- PrismAreaMax(x,y,z,width,height,depth);
- // Returns the mean(average) value of the indicated area of cells.
- // Returns -1 if no target is set.
- PrismAreaMean(x,y,z,width,height,depth);
- // Returns 1 if all of the cells of an area are within a minimum and maximum range.
- // Returns -1 if no target is set.
- PrismAreaRange(x,y,z,width,height,depth,min,max);
- // Sets a spherical-area of cells of the target to a value.
- // Returns the number of in-bounds cells that could be set.
- // Returns -1 if no target is set.
- PrismSphereSet(x,y,z,radius,val);
- // Adds a value to a spherical-area of cells of the target.
- // Returns the number of in-bounds cells that could be added.
- // Returns -1 if no target is set.
- PrismSphereAdd(x,y,z,radius,val);
- // Subtracts a value from a spherical-area of cells of the target.
- // Returns the number of in-bounds cells that could be subtracted.
- // Returns -1 if no target is set.
- PrismSphereSubtract(x,y,z,radius,val);
- // Multiplies a value to a spherical-area of cells of the target.
- // Returns the number of in-bounds cells that could be multiplied.
- // Returns -1 if no target is set.
- PrismSphereMultiply(x,y,z,radius,val);
- // Divides a value from a spherical-area of cells of the target.
- // Returns the number of in-bounds cells that could be divided.
- // Returns -1 if no target is set.
- PrismSphereDivide(x,y,z,radius,val);
- // Performs a modulo operation on a spherical-area of cells of the target.
- // Returns the number of in-bounds cells that could be modulo'd.
- // Returns -1 if no target is set.
- PrismSphereModulo(x,y,z,radius,val);
- // Bitshifts a spherical-area of cells of the target by a value.
- // Returns the number of in-bounds cells that could be bit-shifted.
- // Returns -1 if no target is set.
- PrismSphereBitshift(x,y,z,radius,val,shift);
- // Performs a bitwise AND operation on a spherical-area of cells by a value.
- // Returns the number of in-bounds cells that could be bitwise AND set.
- // Returns -1 if no target is set.
- PrismSphereBitAnd(x,y,z,radius,val);
- // Performs a bitwise OR operation on a spherical-area of cells by a value.
- // Returns the number of in-bounds cells that could be bitwise OR set.
- // Returns -1 if no target is set.
- PrismSphereBitOr(x,y,z,radius,val);
- // Performs a bitwise XOR operation on a spherical-area of cells by a value.
- // Returns the number of in-bounds cells that could be bitwise XOR set.
- // Returns -1 if no target is set.
- PrismSphereBitXor(x,y,z,val);
- // Returns the sum of the indicated spherical-area of cells.
- // Returns -1 if no target is set.
- PrismSphereSum(x,y,z,radius);
- // Returns the minimum value of the indicated spherical-area of cells.
- // Returns -1 if no target is set.
- PrismSphereMin(x,y,z,radius);
- // Returns the maximum value of the indicated spherical-area of cells.
- // Returns -1 if no target is set.
- PrismSphereMax(x,y,z,radius);
- // Returns the mean(average) value of the indicated spherical-area of cells.
- // Returns -1 if no target is set.
- PrismSphereMean(x,y,z,radius);
- // Returns 1 if all of the cells of a spherical-area are within a minimum and maximum range.
- // Returns -1 if no target is set.
- PrismSphereRange(x,y,z,raidus,min,max);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement