summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2025-01-01 10:36:50 +1100
committerquou <quou@disroot.org>2025-01-01 10:36:50 +1100
commit5435a055bde131e500e5b59899ecc5e894304b84 (patch)
tree25d609de5b6e9a502ad31bfe0a9ebb3d53601565
parent832039a2113e73fdb185861d90674db1cc12b3b5 (diff)
remove debugger thing
-rw-r--r--Makefile5
-rw-r--r--c2.cpp3
-rw-r--r--debugger.cpp74
-rw-r--r--debugger.hpp8
4 files changed, 1 insertions, 89 deletions
diff --git a/Makefile b/Makefile
index 3fc811e..0828805 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ textures = $(data_dir)/22.tex $(data_dir)/kita.tex
models = $(data_dir)/monkey.mdl
packed_files = $(shaders) $(textures) $(models)
tools = qstd cfg sc
-objects = app.o c2.o video.o pipeline.o asset.o ui.o maths.o model.o debugger.o
+objects = app.o c2.o video.o pipeline.o asset.o ui.o maths.o model.o
includes = -Iqstd
defines = -Dplat_x86 -Dplat_posix -Dplat_x11 -Dallocation_default_alignment=8
cflags = -MMD -MF $(basename $@).d $(includes) $(defines) $(DEBUG_COMPILE_FLAG)
@@ -77,9 +77,6 @@ maths.o:
model.o:
$(CXX) -c $(cflags) model.cpp -o model.o
-debugger.o:
- $(CXX) -c $(cflags) debugger.cpp -o debugger.o
-
c2.o:
$(CXX) -c $(cflags) c2.cpp -o c2.o
diff --git a/c2.cpp b/c2.cpp
index fb2aa38..fd02e50 100644
--- a/c2.cpp
+++ b/c2.cpp
@@ -1,5 +1,4 @@
#include "app.hpp"
-#include "debugger.hpp"
#include "model.hpp"
#include "ui.hpp"
#include "video.hpp"
@@ -137,8 +136,6 @@ extern "C" int entrypoint() {
v3f raxis(0.0f, 1.0f, 0.0);
vbo = upload_verts(dev);
ui->layout(app->w, app->h);
- auto toolbar = ui->create_element<UI::Toolbar>(ui->root);
- register_debuggers(ui, toolbar);
auto fps_label = ui->create_element<UI::Label>(ui->root, "");
while (app->running) {
Arena frame_arena;
diff --git a/debugger.cpp b/debugger.cpp
deleted file mode 100644
index 6cda856..0000000
--- a/debugger.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-#include "debugger.hpp"
-extern "C" {
-#include "plat.h"
-}
-
-struct Vram_Debugger : UI::Modal {
- UI::Element* enable_btn;
-
- Vram_Debugger(UI* ui, UI::Element* parent):
- UI::Modal(ui, parent, "VRAM debugger") {
- }
-};
-
-struct Device_Debugger : UI::Modal {
- UI::Element* enable_btn;
-
- Device_Debugger(UI* ui, UI::Element* parent):
- UI::Modal(ui, parent, "Device debugger") {
- }
-};
-
-void create_vram_debugger(
- UI* ui,
- UI::Element* parent,
- UI::Element* button
-) {
- auto window = ui->create_element<Vram_Debugger>(parent);
- window->enable_btn = button;
- window->handler = [](UI::Element* e, const UI::Message& m) {
- if (m.type == UI::Message::Type::destroy) {
- auto window = (Vram_Debugger*)e;
- window->enable_btn->enable();
- }
- return 0;
- };
- ui->create_element<UI::Label>(window->contents, "Hello, I'm the VRAM debugger!");
-}
-
-void create_device_debugger(
- UI* ui,
- UI::Element* parent,
- UI::Element* button
-) {
- auto window = ui->create_element<Device_Debugger>(parent);
- window->enable_btn = button;
- window->handler = [](UI::Element* e, const UI::Message& m) {
- if (m.type == UI::Message::Type::destroy) {
- auto window = (Device_Debugger*)e;
- window->enable_btn->enable();
- }
- return 0;
- };
- ui->create_element<UI::Label>(window->contents, "Hello, I'm the device debugger!");
-}
-
-void register_debuggers(UI* ui, UI::Toolbar* toolbar) {
- auto btnvram = ui->create_element<UI::Button>(toolbar, "VRAM Debugger");
- btnvram->handler = [](UI::Element* e, const UI::Message& m) {
- if (m.type == UI::Message::Type::click) {
- e->disable();
- create_vram_debugger(e->ui, e->ui->root, e);
- }
- return 0;
- };
- auto btndevice = ui->create_element<UI::Button>(toolbar, "Device Debugger");
- btndevice->handler = [](UI::Element* e, const UI::Message& m) {
- if (m.type == UI::Message::Type::click) {
- e->disable();
- create_device_debugger(e->ui, e->ui->root, e);
- }
- return 0;
- };
-}
-
diff --git a/debugger.hpp b/debugger.hpp
deleted file mode 100644
index 0124f13..0000000
--- a/debugger.hpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef debugger_hpp
-#define debugger_hpp
-
-#include "ui.hpp"
-
-void register_debuggers(UI* ui, UI::Toolbar* toolbar);
-
-#endif