diff --git a/doc/implementation.tex b/doc/implementation.tex index 647f18c..a0e82bf 100644 --- a/doc/implementation.tex +++ b/doc/implementation.tex @@ -109,15 +109,15 @@ Functions: \namespaceis{Gzip}{gzip} \begin{outline} -\1\formalsynopsis{comp}{String}[Uint8Array]{Compresses the given string.} -\1\formalsynopsis{comp}{Uint8Array}[Uint8Array]{Compresses the given bytes.} +\1\formalsynopsis{comp}{String}[Int8Array]{Compresses the given string.} +\1\formalsynopsis{comp}{Int8Array}[Int8Array]{Compresses the given bytes.} \1\formalsynopsis{compTo}{str: String, outputptr: Int}[Int]{Compresses the given string onto the memory, then returns the size of the compressed bytes.} -\1\formalsynopsis{compTo}{bytes: Uint8Array, outputptr: Int}[Int]{Compresses the given bytes onto the memory, then returns the size of the compressed bytes.} +\1\formalsynopsis{compTo}{bytes: Int8Array, outputptr: Int}[Int]{Compresses the given bytes onto the memory, then returns the size of the compressed bytes.} \1\formalsynopsis{compFromTo}{inputptr: Int, length: Int, outputptr: Int}[Int]{Compresses the bytes onto the memory, then returns the size of the compressed bytes.} -\1\formalsynopsis{decomp}{String}[Uint8Array]{Decompresses the given string (compressed bytes represented as series of characters)} -\1\formalsynopsis{decomp}{Uint8Array}[Uint8Array]{Decompresses the given bytes.} +\1\formalsynopsis{decomp}{String}[Int8Array]{Decompresses the given string (compressed bytes represented as series of characters)} +\1\formalsynopsis{decomp}{Int8Array}[Int8Array]{Decompresses the given bytes.} \1\formalsynopsis{decompTo}{str: String, outputptr: Int}[Int]{Decompresses the given string onto the memory, then returns the size of the decompressed bytes.} -\1\formalsynopsis{decompTo}{bytes: Uint8Array, outputptr: Int}[Int]{Decompresses the given bytes onto the memory, then returns the size of the decompressed bytes.} +\1\formalsynopsis{decompTo}{bytes: Int8Array, outputptr: Int}[Int]{Decompresses the given bytes onto the memory, then returns the size of the decompressed bytes.} \1\formalsynopsis{decompFromTo}{inputptr: Int, length: Int, outputptr: Int}[Int]{Decompresses the bytes onto the memory, then returns the size of the decompressed bytes.} \end{outline} @@ -130,9 +130,9 @@ Functions: \namespaceis{Base64}{base64} \begin{outline} -\1\formalsynopsis{atob}{String}[Uint8Array]{Decodes the Base64 string to bytes.} +\1\formalsynopsis{atob}{String}[Int8Array]{Decodes the Base64 string to bytes.} \1\formalsynopsis{atostr}{String}[String]{Decodes the Base64 string to string.} -\1\formalsynopsis{btoa}{Uint8Array}[String]{Encodes bytes to Base64 string.} +\1\formalsynopsis{btoa}{Int8Array}[String]{Encodes bytes to Base64 string.} \end{outline} diff --git a/doc/tvdos.tex b/doc/tvdos.tex index f8289fb..d6db87f 100644 --- a/doc/tvdos.tex +++ b/doc/tvdos.tex @@ -201,11 +201,11 @@ Functions: {Writes the bytes stored in the memory starting from the pointer to file.\\Note: due to the limitation of the protocol, the non-zero offset is not supported on the serial-connected disk drives.} \2\argsynopsis{count}{how many bytes to write} \2\argsynopsis{offset}{when writing to the file, how many bytes on the file to skip before writing a first byte.} -\1\formalsynopsis{bwrite}{bytes: Uint8Array}{Writes the bytes to the file.} +\1\formalsynopsis{bwrite}{bytes: Int8Array}{Writes the bytes to the file.} \1\formalsynopsis{swrite}{string: String}{Writes the string to the file.} \1\formalsynopsis{pappend}{pointer: Int, count: Int}{Appends the bytes stored in the memory starting from the pointer to the end of the file.} \2\argsynopsis{count}{how many bytes to write} -\1\formalsynopsis{bappend}{bytes: Uint8Array}{Appends the bytes to the end of the file.} +\1\formalsynopsis{bappend}{bytes: Int8Array}{Appends the bytes to the end of the file.} \1\formalsynopsis{sappend}{string: String}{Appends the string to the end of the file.} \1\formalsynopsis{flush}{}{Flush the contents on the write buffer to the file immediately. Will do nothing if there is no write buffer implemented --- a write operation will always be performed imemdiately in such cases.} \1\formalsynopsis{close}{}{Tells the underlying device (usually a disk drive) to close a file. When dealing with multiple files on a single disk drive (in which can only have a single active---or opened---file), the underlying filesystem driver will automatically swap the files around, so this function is normally unused.} @@ -287,8 +287,8 @@ Input events are Javascript array of: $$ [\mathrm{event\ name,\ arg_1,\ arg_2 \c Classes: \begin{outline} -\1\inlinesynopsis[new GL]{Texture}[width: Int, height: Int, bytes: Uint8Array]{Creates an GL Texture.} -\1\inlinesynopsis[new GL]{MonoTex}[width: Int, height: Int, bytes: Uint8Array]{Creates an 1bpp Texture.} +\1\inlinesynopsis[new GL]{Texture}[width: Int, height: Int, bytes: Int8Array]{Creates an GL Texture.} +\1\inlinesynopsis[new GL]{MonoTex}[width: Int, height: Int, bytes: Int8Array]{Creates an 1bpp Texture.} \1\inlinesynopsis[new GL]{SpriteSheet}[tileWidth: Int, tileHeight: Int, texture: Texture or MonoTex]{Creates an Spritesheet backed by the given texture.} \end{outline} @@ -336,9 +336,9 @@ External libraries can be stored in following locations: and can be loaded by: \begin{enumerate} - \item \code{let name = require(libraryname)} // no .js extension + \item \code{let name = require(libraryname)} // no .mjs extension \item \code{let name = require(./libraryname)} // the relative path must start with a dot-slash - \item \code{let name = require(A:/path/to/library.js)} // full path WITH the .js extension + \item \code{let name = require(A:/path/to/library.mjs)} // full path WITH the .mjs extension \end{enumerate} @@ -356,4 +356,4 @@ const BAR = 127 // following line exports the function and the variable exports = { foo, BAR } -\end{lstlisting} \ No newline at end of file +\end{lstlisting}