add AGENTS.md and fix rect render
Some checks failed
Build and Deploy / build-macos (push) Failing after 9s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
Some checks failed
Build and Deploy / build-macos (push) Failing after 9s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
This commit is contained in:
27
AGENTS.md
Normal file
27
AGENTS.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Project Overview
|
||||
This is a game engine developed using a QuickJS fork as its scripting language. It is an actor based system, based on Douglas Crockford's Misty. It is a Meson compiled project with a number of dependencies.
|
||||
|
||||
## File Structure
|
||||
- `source/`: Contains the C source code
|
||||
- `scripts/`: Contains script code that is loaded on executable start, and modules
|
||||
- `shaders/`: Contains shaders that ship with the engine (for shader based backends)
|
||||
- `benchmarks/`: Benchmark programs for testing speed
|
||||
- `tests/`: Unit tests
|
||||
- `examples/`: Contains full game examples
|
||||
|
||||
## Coding Practices
|
||||
- Use K&R style C
|
||||
- Use as little whitespace as possible
|
||||
- Javascript style prefers objects and prototypical inheritence over ES6 classes, liberal use of closures, and var everywhere
|
||||
|
||||
## Instructions
|
||||
- When generating code, adhere to the coding practices outlined above.
|
||||
- When adding new features, ensure they align with the project's goals.
|
||||
- When fixing bugs, review the code carefully before making changes.
|
||||
- When writing unit tests, cover all important scenarios.
|
||||
|
||||
## Compiling, running, and testing
|
||||
- To compile the code, run "make", which generates a prosperon executable in build_dbg/, and copy it into the root folder
|
||||
- Run a test by giving it as its command: so ./prosperon tests/overling.js would run the test overling.js, ./prosperon tests/nota.js runs the nota benchmark
|
||||
@@ -347,10 +347,8 @@ function software_fill_round_rect(rect, radius)
|
||||
|
||||
var rect_def = {
|
||||
thickness:1,
|
||||
mode: 'fill',
|
||||
color: Color.white,
|
||||
radius: 0,
|
||||
thickness:1
|
||||
radius: 0
|
||||
}
|
||||
draw.rectangle = function render_rectangle(rect, def, pipeline) {
|
||||
var opt = def ? {...rect_def, ...def} : rect_def
|
||||
@@ -390,18 +388,6 @@ draw.slice9 = function slice9(image, rect = [0,0], slice = 0, info = slice9_info
|
||||
image = graphics.texture(image)
|
||||
|
||||
render.slice9(image, rect, slice, slice9_info, pipeline);
|
||||
// var mesh = geometry.slice9(image.texture, rect, util.normalizeSpacing(slice), info)
|
||||
// console.log(json.encode(mesh))
|
||||
// render.geometry(image, mesh, pipeline)
|
||||
/* render.queue({
|
||||
type: 'geometry',
|
||||
mesh,
|
||||
image,
|
||||
pipeline,
|
||||
first_index:0,
|
||||
num_indices:mesh.num_indices
|
||||
})
|
||||
*/
|
||||
}
|
||||
draw.slice9[prosperon.DOC] = `
|
||||
:param image: An image object or string path to a texture.
|
||||
|
||||
@@ -2894,7 +2894,7 @@ JSC_CCALL(renderer_rects,
|
||||
|
||||
/* single-rect path */
|
||||
rect w = js2rect(js, argv[0]);
|
||||
w = renderer_worldrect_to_screen(ctx, w);
|
||||
w = renderer_worldrect_to_screen(ctx, w);
|
||||
if (!SDL_RenderFillRects(r, &w, 1))
|
||||
return JS_ThrowReferenceError(js, "SDL_RenderFillRects: %s", SDL_GetError());
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user