c type documentation

This commit is contained in:
2025-02-05 17:16:05 -06:00
parent f53e46ee9e
commit 8bd7dd00c7
74 changed files with 903 additions and 1372 deletions

View File

@@ -1 +0,0 @@
# base

View File

@@ -0,0 +1,16 @@
# PHYSFS_File
## close()
## write()
## buffer()
## tell()
## eof()

View File

@@ -0,0 +1,7 @@
# SDL_Camera
## frame()
## release_frame()

View File

@@ -0,0 +1 @@
# SDL_Cursor

View File

@@ -0,0 +1,4 @@
# SDL_GPUBuffer
## name()

View 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()

View File

@@ -0,0 +1,19 @@
# SDL_GPUComputePass
## dispatch()
## end()
## pipeline()
## samplers()
## storage_buffers()
## storage_textures()

View File

@@ -0,0 +1 @@
# SDL_GPUComputePipeline

View File

@@ -0,0 +1 @@
# SDL_GPUCopyPass

View 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()

View File

@@ -0,0 +1 @@
# SDL_GPUFence

View File

@@ -0,0 +1 @@
# SDL_GPUGraphicsPipeline

View 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()

View File

@@ -0,0 +1 @@
# SDL_GPUSampler

View File

@@ -0,0 +1 @@
# SDL_GPUShader

View File

@@ -0,0 +1,4 @@
# SDL_GPUTexture
## name()

View File

@@ -0,0 +1 @@
# SDL_GPUTransferBuffer

View 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()

View File

@@ -0,0 +1,16 @@
# SDL_Surface
## blit()
## scale()
## fill()
## rect()
## dup()

View File

@@ -0,0 +1,4 @@
# SDL_Texture
## mode()

View File

@@ -0,0 +1,4 @@
# SDL_Thread
## wait()

View 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()

View File

@@ -0,0 +1,22 @@
# datastream
## time()
## seek()
## advance()
## duration()
## framerate()
## get callback
## set callback()

19
docs/api/c_types/font.md Normal file
View 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
View File

@@ -0,0 +1,22 @@
# rtree
## add()
## delete()
## query()
## get size
## forEach()
## has()
## values()

View 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
View File

@@ -0,0 +1,13 @@
# timer
## get remain
## set remain()
## get fn
## set fn()

View 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()

View File

@@ -8,3 +8,6 @@
## write_modules()
## write_c_types()

View File

@@ -1 +0,0 @@
# engine

3
docs/api/index.md Normal file
View 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,

View File

@@ -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.

View File

@@ -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
```
Youll see `"Hello from Prosperon!"` in the console, and then the engine exits.
Thats it! Next, well explore writing more complex logic with actors, spawning objects, and drawing a game screen.