patchSystemFn() {
		const _this = this;

		// patch renderable.js
		plugin.patch(Renderable, "postDraw", function (renderer) {
			// call the original Renderable.postDraw function
			// biome-ignore lint/style/noArguments: <explanation>
			this._patched.apply(this, arguments);

			// increment the sprites counter
			if (typeof this.image !== "undefined") {
				_this.counters.inc("sprites");
			}

			// increment the bound counter
			_this.counters.inc("bounds");

			// increment the children counter
			if (this instanceof Container) {
				_this.counters.inc("children");
			}

			// don't do anything else if the panel is hidden
			if (_this.visible) {
				// omit following object as they are patched later through different methods
				// XXX TODO: make this patched method more generic at Renderable level
				if (
					!(this instanceof Entity) &&
					!(this.ancestor instanceof Entity) &&
					!(this instanceof Text) &&
					!(this instanceof BitmapText) &&
					!(this instanceof Camera2d) &&
					!(this instanceof ImageLayer)
				) {
					// draw the renderable bounding box
					if (
						_this.checkbox.renderHitBox.selected &&
						this.getBounds().isFinite()
					) {
						if (typeof this.ancestor !== "undefined") {
							renderer.save();
							if (!this.floating) {
								const absolutePosition = this.ancestor.getAbsolutePosition();
								renderer.translate(-absolutePosition.x, -absolutePosition.y);
							}
						}

						const bounds = this.getBounds();

						renderer.setColor("green");
						renderer.stroke(bounds);

						// the sprite mask if defined
						if (typeof this.mask !== "undefined") {
							renderer.setColor("orange");
							renderer.stroke(this.mask);
						}

						if (typeof this.body !== "undefined") {
							renderer.translate(bounds.x, bounds.y);

							renderer.setColor("orange");
							renderer.stroke(this.body.getBounds());

							// draw all defined shapes
							renderer.setColor("red");
							for (const shape of this.body.shapes) {
								renderer.stroke(shape);
								_this.counters.inc("shapes");
							}
							renderer.translate(-bounds.x, -bounds.y);
						}

						if (typeof this.ancestor !== "undefined") {
							renderer.restore();
						}
					}
				}
			}
		});

		plugin.patch(BitmapText, "draw", function (renderer) {
			// call the original Sprite.draw function
			// biome-ignore lint/style/noArguments: <explanation>
			this._patched.apply(this, arguments);

			// draw the font rectangle
			if (
				_this.visible &&
				_this.checkbox.renderHitBox.selected &&
				this.name !== "debugPanelFont"
			) {
				const bounds = this.getBounds();

				if (typeof this.ancestor !== "undefined") {
					const ax = this.anchorPoint.x * bounds.width;
					const ay = this.anchorPoint.y * bounds.height;
					// translate back as the bounds position
					// is already adjusted to the anchor Point
					renderer.save();
					renderer.translate(ax, ay);
				}

				renderer.setColor("green");
				renderer.stroke(bounds);

				if (typeof this.ancestor !== "undefined") {
					renderer.restore();
				}
			}
		});

		// patch text.js
		plugin.patch(Text, "draw", function (renderer) {
			// call the original Text.draw function
			// biome-ignore lint/style/noArguments: <explanation>
			this._patched.apply(this, arguments);

			if (_this.visible && _this.checkbox.renderHitBox.selected) {
				const bounds = this.getBounds();

				if (typeof this.ancestor !== "undefined") {
					renderer.save();

					// if this object of this renderable parent is not the root container
					if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
						const absolutePosition = this.ancestor.getAbsolutePosition();
						renderer.translate(-absolutePosition.x, -absolutePosition.y);
					}
				}

				renderer.setColor("green");
				renderer.stroke(bounds);

				if (typeof this.ancestor !== "undefined") {
					renderer.restore();
				}
			}
		});

		// patch entities.js
		plugin.patch(Entity, "postDraw", function (renderer) {
			// don't do anything else if the panel is hidden
			if (_this.visible) {
				// check if debug mode is enabled
				if (_this.checkbox.renderHitBox.selected) {
					renderer.save();

					if (typeof this.ancestor !== "undefined") {
						// if this object of this renderable parent is not the root container
						if (!this.floating) {
							const absolutePosition = this.ancestor.getAbsolutePosition();
							renderer.translate(-absolutePosition.x, -absolutePosition.y);
						}
					}

					if (this.renderable instanceof Renderable) {
						const rbounds = this.renderable.getBounds();
						const rx = -rbounds.x - this.anchorPoint.x * rbounds.width;
						const ry = -rbounds.y - this.anchorPoint.y * rbounds.height;

						renderer.setColor("green");
						renderer.translate(rx, ry);
						renderer.stroke(rbounds);
						renderer.translate(-rx, -ry);
					}

					renderer.translate(this.body.getBounds().x, this.body.getBounds().y);

					renderer.translate(
						-this.anchorPoint.x * this.body.getBounds().width,
						-this.anchorPoint.y * this.body.getBounds().height,
					);

					// draw the bounding rect shape
					renderer.setColor("orange");
					renderer.stroke(this.body.getBounds());

					// draw all defined shapes
					renderer.setColor("red");
					for (const shape of this.body.shapes) {
						renderer.stroke(shape);
						_this.counters.inc("shapes");
					}

					renderer.restore();
				}

				if (
					_this.checkbox.renderVelocity.selected &&
					(this.body.vel.x || this.body.vel.y)
				) {
					const bounds = this.body.getBounds();
					const hWidth = bounds.width / 2;
					const hHeight = bounds.height / 2;

					renderer.save();
					renderer.setLineWidth(1);

					renderer.setColor("blue");
					renderer.translate(0, -hHeight);
					renderer.strokeLine(
						0,
						0,
						~~(this.body.vel.x * hWidth),
						~~(this.body.vel.y * hHeight),
					);
					_this.counters.inc("velocity");

					renderer.restore();
				}
			}
			// call the original Entity.postDraw function
			// biome-ignore lint/style/noArguments: <explanation>
			this._patched.apply(this, arguments);
		});
	}
patch system fn to draw debug information