make apps customizable

This commit is contained in:
2025-03-29 15:02:27 -05:00
parent aff69960a0
commit 0d61a369fc
11 changed files with 49 additions and 241 deletions

View File

@@ -1,6 +1,6 @@
#include "Print.h"
Print::Print(void* h, App& a) : Module(h, a) {
Print::Print(void* h, Archimedes::App* a) : Archimedes::Module(h, a) {
name = "Print";
}
@@ -10,5 +10,9 @@ Print::~Print() {
void Print::run() {
std::cout << "Print lib loaded and run!\n";
app.stopModule(self);
for(auto m : Archimedes::Module::GetModules())
std::cout << m << std::endl;
app->stopModule(self);
}

View File

@@ -1,9 +1,9 @@
#include "../../../include/Archimedes.h"
#include "Archimedes.h"
class Print : public Module {
class Print : public Archimedes::Module {
public:
Print(void*, App&);
Print(void*, Archimedes::App*);
~Print();
void run();
void onLoad() {}
@@ -11,7 +11,7 @@ class Print : public Module {
};
extern "C" {
Module* create(void* handle, App& app) {
Archimedes::Module* create(void* handle, Archimedes::App* app) {
return new Print(handle, app);
}
}