wont use customizable noise lol, too niche

This commit is contained in:
kin fuyuki 2026-02-22 22:45:30 -03:00
commit c60a0ce031
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
16 changed files with 3620 additions and 281 deletions

View file

@ -1,2 +1,2 @@
#include "graph/window.h"
#include "graph/window.h"

View file

@ -1,24 +0,0 @@
#include "noise.h"
#include <cstddef>
Image* noise::gen(short w, short h, int x, int y) {
switch (this->type) {
case CLOUD:
return cloud(this,w, h, x, y);
case RANDOM:
return random(this,w, h, x, y);
default:
return nullptr;
}
}
Image* cloud(noise* noise,short w, short h,int x, int y) {
}
Image* random(noise* noise,short w, short h,int x, int y) {
}

View file

@ -1,40 +0,0 @@
#pragma once
struct buffer {
char**pixel;//rgba format
};
enum NOISETYPE {
CLOUD,
RANDOM,
};
enum DIMENSION {
ONE,TWO,THREE,FOUR
};
class noise {
public:
int freq;
int octave;
int amp;
NOISETYPE type;
DIMENSION dims;
noise(int freq,int octave, int amp, NOISETYPE type, DIMENSION dims):
freq(freq), octave(octave), amp(amp), type(type),dims(dims) {
}
/// to explain the image generator
/// \param x int
/// \param y int
/// ^ these here is the position the noise will start rendering
/// \param w
/// \param h
/// these are the image width and height. PLEASE DO NOT GET CONFUSED
buffer* gen(short w, short h,int x, int y);
};
buffer* cloud(noise* noise,short w, short h,int x, int y);
buffer* random(noise* noise, short w, short h,int x, int y);

View file

@ -1,4 +1,5 @@
#pragma once
#include <utility>
#include <vector>
#include "../gr.h"
@ -11,26 +12,27 @@
namespace nodes {
struct node{
public:
enginend::theme* theme;
virtual void boot()=0;
virtual void tick()=0;
virtual void draw()=0;
virtual void exit()=0;
enginend::theme*theme{};
virtual void boot()=0;
virtual void tick()=0;
virtual void draw()=0;
virtual void exit()=0;
virtual ~node()=0;
};
}
struct group : public virtual enginend::nodes::node {
std::vector<node*> children;
explicit group(std::vector<enginend::nodes::node *> nodes):children(nodes){};
explicit group(std::vector<enginend::nodes::node *> nodes):children(std::move(nodes)){};
void boot(){for (node* n: children){n->boot();}}
void tick(){for (node* n: children){n->tick();}}
void draw(){for (node* n: children){n->draw();}}
void exit(){for (node* n: children){n->exit();}}
void boot() override {for (node* n: children){n->boot();}}
void tick() override {for (node* n: children){n->tick();}}
void draw() override {for (node* n: children){n->draw();}}
void exit() override {for (node* n: children){n->exit();}}
};
typedef struct theme {
struct theme {
Color booleanbutton[6],button[3],booleantext[6],buttontext[3],text,buttonborder[3],booleanborder[6],border,background
,textfieldbg
;

View file

@ -2,6 +2,7 @@
#include "nodes.h"
#include "node2d.h"
#include "node3d.h"
#include "node2drelative.h"
#include <list>