minor changes

This commit is contained in:
IonutParau 2025-07-26 14:11:56 +02:00
parent 8288f647c1
commit eb6037ee27
3 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,13 @@
#include "hologram.h" #include "hologram.h"
void nn_hologram_clear() { // safety:
// For valid indexes to be valid,
// stuff must be from 0 to limit - 1
nn_size_t nn_positionToIndex(nn_hologram *h, unsigned x, unsigned y, unsigned z) {
return x + y * h->width_x + z * h->width_x * h->height;
}
void nn_hologram_clear(nn_hologram *h) {
} }

View File

@ -618,7 +618,7 @@ void ne_log(void *_, void *__, nn_component *component, nn_computer *computer) {
} }
} }
int main() { int main(int argc, char **argv) {
printf("Setting up universe\n"); printf("Setting up universe\n");
nn_Context ctx = nn_libcContext(); nn_Context ctx = nn_libcContext();
nn_Alloc alloc = ctx.allocator; nn_Alloc alloc = ctx.allocator;
@ -665,7 +665,7 @@ int main() {
nn_addEEPROM(computer, NULL, 0, genericEEPROM); nn_addEEPROM(computer, NULL, 0, genericEEPROM);
nn_address fsFolder = "OpenOS"; nn_address fsFolder = argc > 1 ? argv[1] : "OpenOS";
nn_filesystemTable genericFSTable = { nn_filesystemTable genericFSTable = {
.userdata = fsFolder, .userdata = fsFolder,
.deinit = NULL, .deinit = NULL,

View File

@ -1056,8 +1056,6 @@ nn_bool_t nn_destroyHologram(nn_hologram *hologram);
nn_component *nn_addHologram(nn_computer *computer, nn_address address, int slot, nn_hologram *hologram); nn_component *nn_addHologram(nn_computer *computer, nn_address address, int slot, nn_hologram *hologram);
int nn_XYZtoIndex(int x, int y, int z);
void nn_hologram_clear(nn_hologram *hologram); void nn_hologram_clear(nn_hologram *hologram);
int nn_hologram_get(nn_hologram *hologram, int x, int y, int z); int nn_hologram_get(nn_hologram *hologram, int x, int y, int z);
void nn_hologram_set(nn_hologram *hologram, int x, int y, int z, int value); void nn_hologram_set(nn_hologram *hologram, int x, int y, int z, int value);