the sound of progress

This commit is contained in:
IonutParau 2025-06-02 20:34:36 +02:00
parent 76993bc971
commit 65ebf5d4f3
4 changed files with 19 additions and 73 deletions

View File

@ -1,64 +0,0 @@
.{
// This is the default name used by packages depending on this one. For
// example, when a user runs `zig fetch --save <url>`, this field is used
// as the key in the `dependencies` table. Although the user can choose a
// different name, most users will stick with this provided value.
//
// It is redundant to include "zig" in this name because it is already
// within the Zig package namespace.
.name = "neonucleus",
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.0.0",
// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
//.minimum_zig_version = "0.11.0",
// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
// See `zig fetch --save <url>` for a command-line interface for adding dependencies.
//.example = .{
// // When updating this field to a new URL, be sure to delete the corresponding
// // `hash`, otherwise you are communicating that you expect to find the old hash at
// // the new URL.
// .url = "https://example.com/foo.tar.gz",
//
// // This is computed from the file contents of the directory of files that is
// // obtained after fetching `url` and applying the inclusion rules given by
// // `paths`.
// //
// // This field is the source of truth; packages do not come from a `url`; they
// // come from a `hash`. `url` is just one of many possible mirrors for how to
// // obtain a package matching this `hash`.
// //
// // Uses the [multihash](https://multiformats.io/multihash/) format.
// .hash = "...",
//
// // When this is provided, the package is found in a directory relative to the
// // build root. In this case the package's hash is irrelevant and therefore not
// // computed. This field and `url` are mutually exclusive.
// .path = "foo",
// // When this is set to `true`, a package is declared to be lazily
// // fetched. This makes the dependency only get fetched if it is
// // actually used.
// .lazy = false,
//},
},
.paths = .{
"build.zig",
"build.zig.zon",
"src",
// For example...
"LICENSE",
"README.md",
},
}

1
src/components/screen.c Normal file
View File

@ -0,0 +1 @@
#include "screen.h"

View File

@ -1,3 +1,6 @@
#ifndef NN_SCREEN_H
#define NN_SCREEN_H
#include "../neonucleus.h" #include "../neonucleus.h"
typedef struct nn_screen { typedef struct nn_screen {
@ -14,4 +17,9 @@ typedef struct nn_screen {
int editableColors; int editableColors;
int paletteColors; int paletteColors;
int *palette; int *palette;
bool isOn;
nn_address keyboards[NN_MAX_SCREEN_KEYBOARDS];
size_t keyboardCount;
} nn_screen; } nn_screen;
#endif

View File

@ -567,6 +567,7 @@ void nn_setEditableColors(nn_screen *screen, int count);
int nn_getEditableColors(nn_screen *screen); int nn_getEditableColors(nn_screen *screen);
void nn_setPaletteColor(nn_screen *screen, int idx, int color); void nn_setPaletteColor(nn_screen *screen, int idx, int color);
int nn_getPaletteColor(nn_screen *screen, int idx); int nn_getPaletteColor(nn_screen *screen, int idx);
int nn_getPaletteCount(nn_screen *screen);
int nn_maxDepth(nn_screen *screen); int nn_maxDepth(nn_screen *screen);
int nn_getDepth(nn_screen *screen); int nn_getDepth(nn_screen *screen);
@ -584,15 +585,15 @@ void nn_setTouchModeInverted(nn_screen *screen, bool touchModeInverted);
bool nn_isOn(nn_screen *buffer); bool nn_isOn(nn_screen *buffer);
void nn_setOn(nn_screen *buffer, bool on); void nn_setOn(nn_screen *buffer, bool on);
// Easy setup shortcuts. 1-4 are valid.
// Basic tiers:
// - Tier 1 has 50x16 max resolution, 1 bit color depth. 1 editable palette color, used as the accent color.
// - Tier 2 has 80x25 max resolution, 4 bit color depth. 16 fixed palette colors.
// - Tier 3 has 160x50 max resolution, 8 bit color depth. 256 palette colors, 16 are editable, 240 are fixed.
// - Tier 4 has 240x80 max resolution, 16 bit color depth. 256 editable palette colors.
void nn_screen_setBasicTier(nn_screen *screen, int tier);
nn_component *nn_addScreen(nn_computer *computer, nn_address address, int slot, nn_screen *screen); nn_component *nn_addScreen(nn_computer *computer, nn_address address, int slot, nn_screen *screen);
nn_component *nn_addGPU(nn_computer *computer, nn_address address, int slot, int maxWidth, int maxHeight, int maxDepth, int totalVRAM);
typedef struct nn_gpuControl {
int maxWidth;
int maxHeight;
int maxDepth;
} nn_gpuControl;
// the control is COPIED.
nn_component *nn_addGPU(nn_computer *computer, nn_address address, nn_gpuControl *control);
#endif #endif