summaryrefslogtreecommitdiff
path: root/FAQ-cd.txt
diff options
context:
space:
mode:
Diffstat (limited to 'FAQ-cd.txt')
-rw-r--r--FAQ-cd.txt53
1 files changed, 52 insertions, 1 deletions
diff --git a/FAQ-cd.txt b/FAQ-cd.txt
index b2ed2c5..5708ba2 100644
--- a/FAQ-cd.txt
+++ b/FAQ-cd.txt
@@ -866,7 +866,58 @@ A: First of all, my LUA distribution is the 5.0, slightly modified. The basic
iso:close()
- Pwieew, all done. Good luck ! ;-)
+ Pwieew, all done! ;-)
+
+ Well, almost actually. Only a few global functions remains.
+
+ exists(filename)
+
+ Will take a string as argument, and return a boolean to tell if the
+ corresponding file can be safely opened for reading.
+
+ bsdecode(handle, width, height)
+
+ Will return a buffer to a rgb24 picture (size width * height * 3)
+ corresponding to the decompressed bs picture passed as argument. Beware,
+ this function is weak, does no check at all, and will certainly crashes the
+ software if you gives a wrong type buffer.
+
+ bsencode(handle, width, height[, max_size[, q_scale]])
+
+ Well return a buffer to an encoded bs frame, corresponding to the
+ input handle, which has to be in rgb24 format. Eventually, the function
+ will also return the buffer size as second returned value. q_scale
+ is the initial q_scale value (default = 1), and max_size is the maximum
+ frame size in bytes, which defaults to 14112 (standard STR size). The
+ function will redo the encoding process, increasing q_scale each time,
+ until the final frame size is <= the max_size. Eventually, the function
+ will return the final q_scale as the third value returned.
+
+ blit(dest, source, dw, dh, sw, sh, sx, sy, bl)
+
+ This will blit the source image buffer into the destination image buffer.
+ The destination is always a 24 bits RGB picture, of size (dw, dh). The
+ source buffer can be a 24 bits RGB, or a 32 bits RGBA picture, of size
+ (sw, sh), and shall be placed into the destination picture at position
+ (sx, sy) using the method described by bl. The depth of the source buffer
+ is determined by bl. This argument can be:
+
+ BLIT_OVER - Source is 24 bits. Destination will be fully
+ overriten by the source picture.
+ BLIT_OVER32 - Source is 32 bits. Destination will be fully
+ overriten by the source picture. Source alpha ignored.
+ BLIT_ALPHA - Source is 32 bits. A full alpha blending will occur.
+ Alpha = 0: transparant, Alpha = 128: opaque.
+ BLIT_LIGHTEN - Source is 24 bits. The source will lighten the
+ destination.
+ BLIT_LIGHTEN32 - Source is 32 bits. The source will lighten the
+ destination. Alpha is used.
+ BLIT_DARKEN - Source is 24 bits. The source will darken the
+ destionation.
+ BLIT_DARKEN32 - Source is 32 bits. The source will darken the
+ destination. Alpha is used.
+
+ Good luck! ;-)
Q: What patch did you applied to the LUA compiler?