c type documentation
This commit is contained in:
@@ -1 +0,0 @@
|
||||
# base
|
||||
16
docs/api/c_types/PHYSFS_File.md
Normal file
16
docs/api/c_types/PHYSFS_File.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# PHYSFS_File
|
||||
|
||||
## close()
|
||||
|
||||
|
||||
## write()
|
||||
|
||||
|
||||
## buffer()
|
||||
|
||||
|
||||
## tell()
|
||||
|
||||
|
||||
## eof()
|
||||
|
||||
7
docs/api/c_types/SDL_Camera.md
Normal file
7
docs/api/c_types/SDL_Camera.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# SDL_Camera
|
||||
|
||||
## frame()
|
||||
|
||||
|
||||
## release_frame()
|
||||
|
||||
1
docs/api/c_types/SDL_Cursor.md
Normal file
1
docs/api/c_types/SDL_Cursor.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_Cursor
|
||||
4
docs/api/c_types/SDL_GPUBuffer.md
Normal file
4
docs/api/c_types/SDL_GPUBuffer.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# SDL_GPUBuffer
|
||||
|
||||
## name()
|
||||
|
||||
55
docs/api/c_types/SDL_GPUCommandBuffer.md
Normal file
55
docs/api/c_types/SDL_GPUCommandBuffer.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# SDL_GPUCommandBuffer
|
||||
|
||||
## render_pass()
|
||||
|
||||
|
||||
## compute_pass()
|
||||
|
||||
|
||||
## swapchain_pass()
|
||||
|
||||
|
||||
## acquire_swapchain()
|
||||
|
||||
|
||||
## bind_vertex_buffer()
|
||||
|
||||
|
||||
## bind_index_buffer()
|
||||
|
||||
|
||||
## bind_fragment_sampler()
|
||||
|
||||
|
||||
## push_vertex_uniform_data()
|
||||
|
||||
|
||||
## push_fragment_uniform_data()
|
||||
|
||||
|
||||
## push_compute_uniform_data()
|
||||
|
||||
|
||||
## submit()
|
||||
|
||||
|
||||
## cancel()
|
||||
|
||||
|
||||
## camera()
|
||||
|
||||
|
||||
## hud()
|
||||
|
||||
|
||||
## push_debug_group()
|
||||
|
||||
|
||||
## pop_debug_group()
|
||||
|
||||
|
||||
## debug_label()
|
||||
|
||||
|
||||
## blit()
|
||||
|
||||
19
docs/api/c_types/SDL_GPUComputePass.md
Normal file
19
docs/api/c_types/SDL_GPUComputePass.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# SDL_GPUComputePass
|
||||
|
||||
## dispatch()
|
||||
|
||||
|
||||
## end()
|
||||
|
||||
|
||||
## pipeline()
|
||||
|
||||
|
||||
## samplers()
|
||||
|
||||
|
||||
## storage_buffers()
|
||||
|
||||
|
||||
## storage_textures()
|
||||
|
||||
1
docs/api/c_types/SDL_GPUComputePipeline.md
Normal file
1
docs/api/c_types/SDL_GPUComputePipeline.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUComputePipeline
|
||||
1
docs/api/c_types/SDL_GPUCopyPass.md
Normal file
1
docs/api/c_types/SDL_GPUCopyPass.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUCopyPass
|
||||
55
docs/api/c_types/SDL_GPUDevice.md
Normal file
55
docs/api/c_types/SDL_GPUDevice.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# SDL_GPUDevice
|
||||
|
||||
## claim_window()
|
||||
|
||||
|
||||
## make_pipeline()
|
||||
|
||||
|
||||
## compute_pipeline()
|
||||
|
||||
|
||||
## set_swapchain()
|
||||
|
||||
|
||||
## sort_sprite()
|
||||
|
||||
|
||||
## make_sampler()
|
||||
|
||||
|
||||
## load_texture()
|
||||
|
||||
|
||||
## texture()
|
||||
|
||||
|
||||
## make_quad()
|
||||
|
||||
|
||||
## driver()
|
||||
|
||||
|
||||
## make_shader()
|
||||
|
||||
|
||||
## acquire_cmd_buffer()
|
||||
|
||||
|
||||
## upload()
|
||||
|
||||
|
||||
## wait_for_fences()
|
||||
|
||||
|
||||
## query_fence()
|
||||
|
||||
|
||||
## shader_format()
|
||||
|
||||
|
||||
## slice9()
|
||||
|
||||
|
||||
## tile()
|
||||
|
||||
1
docs/api/c_types/SDL_GPUFence.md
Normal file
1
docs/api/c_types/SDL_GPUFence.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUFence
|
||||
1
docs/api/c_types/SDL_GPUGraphicsPipeline.md
Normal file
1
docs/api/c_types/SDL_GPUGraphicsPipeline.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUGraphicsPipeline
|
||||
34
docs/api/c_types/SDL_GPURenderPass.md
Normal file
34
docs/api/c_types/SDL_GPURenderPass.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# SDL_GPURenderPass
|
||||
|
||||
## bind_pipeline()
|
||||
|
||||
|
||||
## viewport()
|
||||
|
||||
|
||||
## scissor()
|
||||
|
||||
|
||||
## draw()
|
||||
|
||||
|
||||
## draw_indexed()
|
||||
|
||||
|
||||
## end()
|
||||
|
||||
|
||||
## bind_index_buffer()
|
||||
|
||||
|
||||
## bind_buffers()
|
||||
|
||||
|
||||
## bind_samplers()
|
||||
|
||||
|
||||
## bind_storage_buffers()
|
||||
|
||||
|
||||
## bind_storage_textures()
|
||||
|
||||
1
docs/api/c_types/SDL_GPUSampler.md
Normal file
1
docs/api/c_types/SDL_GPUSampler.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUSampler
|
||||
1
docs/api/c_types/SDL_GPUShader.md
Normal file
1
docs/api/c_types/SDL_GPUShader.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUShader
|
||||
4
docs/api/c_types/SDL_GPUTexture.md
Normal file
4
docs/api/c_types/SDL_GPUTexture.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# SDL_GPUTexture
|
||||
|
||||
## name()
|
||||
|
||||
1
docs/api/c_types/SDL_GPUTransferBuffer.md
Normal file
1
docs/api/c_types/SDL_GPUTransferBuffer.md
Normal file
@@ -0,0 +1 @@
|
||||
# SDL_GPUTransferBuffer
|
||||
76
docs/api/c_types/SDL_Renderer.md
Normal file
76
docs/api/c_types/SDL_Renderer.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# SDL_Renderer
|
||||
|
||||
## draw_color()
|
||||
|
||||
|
||||
## present()
|
||||
|
||||
|
||||
## clear()
|
||||
|
||||
|
||||
## rect()
|
||||
|
||||
|
||||
## fillrect()
|
||||
|
||||
|
||||
## line()
|
||||
|
||||
|
||||
## point()
|
||||
|
||||
|
||||
## load_texture()
|
||||
|
||||
|
||||
## texture()
|
||||
|
||||
|
||||
## slice9()
|
||||
|
||||
|
||||
## tile()
|
||||
|
||||
|
||||
## get_image()
|
||||
|
||||
|
||||
## fasttext()
|
||||
|
||||
|
||||
## geometry()
|
||||
|
||||
|
||||
## scale()
|
||||
|
||||
|
||||
## logical_size()
|
||||
|
||||
|
||||
## viewport()
|
||||
|
||||
|
||||
## clip()
|
||||
|
||||
|
||||
## vsync()
|
||||
|
||||
|
||||
## coords()
|
||||
|
||||
|
||||
## camera()
|
||||
|
||||
|
||||
## get_viewport()
|
||||
|
||||
|
||||
## screen2world()
|
||||
|
||||
|
||||
## target()
|
||||
|
||||
|
||||
## make_sprite_mesh()
|
||||
|
||||
16
docs/api/c_types/SDL_Surface.md
Normal file
16
docs/api/c_types/SDL_Surface.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# SDL_Surface
|
||||
|
||||
## blit()
|
||||
|
||||
|
||||
## scale()
|
||||
|
||||
|
||||
## fill()
|
||||
|
||||
|
||||
## rect()
|
||||
|
||||
|
||||
## dup()
|
||||
|
||||
4
docs/api/c_types/SDL_Texture.md
Normal file
4
docs/api/c_types/SDL_Texture.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# SDL_Texture
|
||||
|
||||
## mode()
|
||||
|
||||
4
docs/api/c_types/SDL_Thread.md
Normal file
4
docs/api/c_types/SDL_Thread.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# SDL_Thread
|
||||
|
||||
## wait()
|
||||
|
||||
40
docs/api/c_types/SDL_Window.md
Normal file
40
docs/api/c_types/SDL_Window.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# SDL_Window
|
||||
|
||||
## fullscreen()
|
||||
|
||||
|
||||
## make_renderer()
|
||||
|
||||
|
||||
## make_gpu()
|
||||
|
||||
|
||||
## keyboard_shown()
|
||||
|
||||
|
||||
## theme()
|
||||
|
||||
|
||||
## safe_area()
|
||||
|
||||
|
||||
## bordered()
|
||||
|
||||
|
||||
## set_icon()
|
||||
|
||||
|
||||
## get title
|
||||
|
||||
|
||||
## set title()
|
||||
|
||||
|
||||
## get size
|
||||
|
||||
|
||||
## set size()
|
||||
|
||||
|
||||
## mouse_grab()
|
||||
|
||||
22
docs/api/c_types/datastream.md
Normal file
22
docs/api/c_types/datastream.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# datastream
|
||||
|
||||
## time()
|
||||
|
||||
|
||||
## seek()
|
||||
|
||||
|
||||
## advance()
|
||||
|
||||
|
||||
## duration()
|
||||
|
||||
|
||||
## framerate()
|
||||
|
||||
|
||||
## get callback
|
||||
|
||||
|
||||
## set callback()
|
||||
|
||||
19
docs/api/c_types/font.md
Normal file
19
docs/api/c_types/font.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# font
|
||||
|
||||
## get linegap
|
||||
|
||||
|
||||
## set linegap()
|
||||
|
||||
|
||||
## get height
|
||||
|
||||
|
||||
## get ascent
|
||||
|
||||
|
||||
## get descent
|
||||
|
||||
|
||||
## text_size()
|
||||
|
||||
22
docs/api/c_types/rtree.md
Normal file
22
docs/api/c_types/rtree.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# rtree
|
||||
|
||||
## add()
|
||||
|
||||
|
||||
## delete()
|
||||
|
||||
|
||||
## query()
|
||||
|
||||
|
||||
## get size
|
||||
|
||||
|
||||
## forEach()
|
||||
|
||||
|
||||
## has()
|
||||
|
||||
|
||||
## values()
|
||||
|
||||
22
docs/api/c_types/sprite.md
Normal file
22
docs/api/c_types/sprite.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# sprite
|
||||
|
||||
## set_affine()
|
||||
|
||||
|
||||
## set_rect()
|
||||
|
||||
|
||||
## set_image()
|
||||
|
||||
|
||||
## get layer
|
||||
|
||||
|
||||
## set layer()
|
||||
|
||||
|
||||
## get color
|
||||
|
||||
|
||||
## set color()
|
||||
|
||||
13
docs/api/c_types/timer.md
Normal file
13
docs/api/c_types/timer.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# timer
|
||||
|
||||
## get remain
|
||||
|
||||
|
||||
## set remain()
|
||||
|
||||
|
||||
## get fn
|
||||
|
||||
|
||||
## set fn()
|
||||
|
||||
67
docs/api/c_types/transform.md
Normal file
67
docs/api/c_types/transform.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# transform
|
||||
|
||||
## get pos
|
||||
|
||||
|
||||
## set pos()
|
||||
|
||||
|
||||
## get scale
|
||||
|
||||
|
||||
## set scale()
|
||||
|
||||
|
||||
## get rotation
|
||||
|
||||
|
||||
## set rotation()
|
||||
|
||||
|
||||
## get parent
|
||||
|
||||
|
||||
## set parent()
|
||||
|
||||
|
||||
## get change_hook
|
||||
|
||||
|
||||
## set change_hook()
|
||||
|
||||
|
||||
## trs()
|
||||
|
||||
|
||||
## phys2d()
|
||||
|
||||
|
||||
## move()
|
||||
|
||||
|
||||
## rotate()
|
||||
|
||||
|
||||
## angle()
|
||||
|
||||
|
||||
## lookat()
|
||||
|
||||
|
||||
## direction()
|
||||
|
||||
|
||||
## unit()
|
||||
|
||||
|
||||
## rect()
|
||||
|
||||
|
||||
## array()
|
||||
|
||||
|
||||
## torect()
|
||||
|
||||
|
||||
## children()
|
||||
|
||||
@@ -8,3 +8,6 @@
|
||||
|
||||
## write_modules()
|
||||
|
||||
|
||||
## write_c_types()
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# engine
|
||||
3
docs/api/index.md
Normal file
3
docs/api/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Prosperon builtin modules
|
||||
|
||||
Here is the scripting guide for prosperon with dull. It is split into essentially two sections: modules, and types that may be created during the course of a running program. For example,
|
||||
@@ -2,6 +2,16 @@
|
||||
|
||||
## encode(val,space,replacer,whitelist)
|
||||
|
||||
Produce a JSON text from a Javascript object. If a record value, at any level, contains a json() method, it will be called, and the value it returns (usually a simpler record) will be JSONified.
|
||||
|
||||
If the record does not have a json() method, and if whitelist is a record, then only the keys that are associated with true in the whitelist are included.
|
||||
|
||||
If the space input is true, then line breaks and extra whitespace will be included in the text.
|
||||
|
||||
|
||||
## decode(text,reviver)
|
||||
|
||||
The text text is parsed, and the resulting value (usually a record or an array) is returned.
|
||||
|
||||
The optional reviver input is a method that will be called for every key and value at every level of the result. Each value will be replaced by the result of the reviver function. This can be used to reform data-only records into method-bearing records, or to transform date strings into seconds.
|
||||
|
||||
|
||||
@@ -1,2 +1,43 @@
|
||||
# Engine Tour
|
||||
# Getting Started
|
||||
|
||||
This guide explains how to set up a minimal Prosperon project and run it.
|
||||
|
||||
## Installation
|
||||
|
||||
1. **Download/Install Prosperon**:
|
||||
(Describe your installation steps or where to get Prosperon.)
|
||||
|
||||
2. **Folder Structure**:
|
||||
A typical project might have:
|
||||
```
|
||||
my-game/
|
||||
game.js <-- main entry script
|
||||
config.js <-- runs at engine startup, sets up environment
|
||||
scripts/ <-- .js, .jso, or actor-based script files
|
||||
assets/ <-- images, sounds, etc.
|
||||
```
|
||||
|
||||
3. **Run the Engine**:
|
||||
From your project folder, run:
|
||||
```
|
||||
prosperon
|
||||
```
|
||||
By default, it will look for `config.js` (if present), then `main.js` (or editor scripts) to start.
|
||||
|
||||
## Hello World Example
|
||||
|
||||
1. Create a file named `config.js` in your project folder:
|
||||
```js
|
||||
console.log("Hello from Prosperon!")
|
||||
this.kill() // quits immediately after printing
|
||||
```
|
||||
|
||||
2. Run `prosperon` in that folder:
|
||||
```
|
||||
prosperon
|
||||
```
|
||||
You’ll see `"Hello from Prosperon!"` in the console, and then the engine exits.
|
||||
|
||||
That’s it! Next, we’ll explore writing more complex logic with actors, spawning objects, and drawing a game screen.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user