mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 09:03:32 +02:00
Merge branch 'main' of https://github.com/NeoFlock/neonucleus
This commit is contained in:
commit
8288f647c1
6
src/components/hologram.c
Normal file
6
src/components/hologram.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "hologram.h"
|
||||
|
||||
void nn_hologram_clear() {
|
||||
|
||||
}
|
||||
|
38
src/components/hologram.h
Normal file
38
src/components/hologram.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef NN_HOLOGRAM_H
|
||||
#define NN_HOLOGRAM_H
|
||||
|
||||
#include "../neonucleus.h"
|
||||
|
||||
typedef struct nn_hologram {
|
||||
nn_Context ctx;
|
||||
nn_guard *lock;
|
||||
nn_refc refc;
|
||||
|
||||
int pallette_len;
|
||||
int* pallette_array;
|
||||
|
||||
int width_x;
|
||||
int width_z;
|
||||
int height;
|
||||
|
||||
float minScale;
|
||||
float maxScale;
|
||||
float scale;
|
||||
int depth;
|
||||
|
||||
float min_translationX;
|
||||
float max_translationX;
|
||||
float translationX;
|
||||
|
||||
float min_translationY;
|
||||
float max_translationY;
|
||||
float translationY;
|
||||
|
||||
float min_translationZ;
|
||||
float max_translationZ;
|
||||
float translationZ;
|
||||
|
||||
int* grid; // I don't know what to call this
|
||||
} nn_hologram;
|
||||
|
||||
#endif
|
@ -1047,7 +1047,31 @@ nn_bool_t nn_destroyDiskDrive(nn_diskDrive *diskDrive);
|
||||
|
||||
nn_component *nn_addDiskDrive(nn_computer *computer, nn_address address, int slot, nn_diskDrive *diskDrive);
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef struct nn_hologram nn_hologram;
|
||||
|
||||
nn_hologram *nn_newHologram(nn_Context *context, int pallette_len, int width_x, int width_z, int height, int depth);
|
||||
nn_guard *nn_getHologramLock(nn_hologram *hologram);
|
||||
void nn_retainHologram(nn_hologram *hologram);
|
||||
nn_bool_t nn_destroyHologram(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);
|
||||
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_fill(nn_hologram *hologram, int x, int z, int minY, int maxY, int value);
|
||||
void nn_hologram_copy(nn_hologram *hologram, int x, int z, int sx, int sz, int tx, int tz);
|
||||
float nn_hologram_getScale(nn_hologram *hologram);
|
||||
void nn_hologram_setScale(nn_hologram *hologram, float value);
|
||||
void nn_hologram_getTranslation(nn_hologram *hologram, int *x, int *y, int *z);
|
||||
void nn_hologram_setTranslation(nn_hologram *hologram, int x, int y, int z);
|
||||
int nn_hologram_maxDepth(nn_hologram *hologram);
|
||||
int nn_hologram_getPaletteColor(nn_hologram *hologram, int index);
|
||||
int nn_hologram_setPaletteColor(nn_hologram *hologram, int index, int value);
|
||||
|
||||
#ifdef __cplusplus // c++ sucks
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user