Skip to content

Commit

Permalink
Use latest zeptolibc, fix header paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ringtailsoftware committed Dec 8, 2024
1 parent 909286d commit 58cb0bd
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 16 deletions.
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ fn addExample(b: *std.Build, comptime name: []const u8, flags: ?[]const []const
.optimize = optimize,
});
exe.root_module.addImport("zeptolibc", zeptolibc_dep.module("zeptolibc"));
exe.addIncludePath(zeptolibc_dep.path("src/"));
exe.root_module.addIncludePath(zeptolibc_dep.path("include"));

exe.addIncludePath(b.path("src/"));

b.installFile("src/" ++ name ++ "/" ++ name ++ ".html", name ++ ".html");
Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
.hash = "12209083b0c43d0f68a26a48a7b26ad9f93b22c9cff710c78ddfebb47b89cfb9c7a4",
},
.zeptolibc = .{
.url = "git+https://github.com/ringtailsoftware/zeptolibc.git#3b87af23668bb3834bd964201990ee06d02606dc",
.hash = "12206a118dbe6ccbe0a2673dbae777e1126f768292d9f61bf69ddecaf2881301bdc1",
.url = "git+https://github.com/ringtailsoftware/zeptolibc.git#03717dc35bd1eb7b0d5afe0438bee73793ca8334",
.hash = "12202a7c100a234ad042d4e1eda738e04652a1b20ddc50aed529954702198fa09f42",
},
},
.paths = .{
Expand Down
3 changes: 1 addition & 2 deletions src/agnes/agnes.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <zeptolibc/zeptolibc.h>
/*
SPDX-License-Identifier: MIT
Expand Down Expand Up @@ -42,8 +43,6 @@ extern "C"
#include <stddef.h>
#include <stdint.h>

#include "zeptolibc.h"

enum {
AGNES_SCREEN_WIDTH = 256,
AGNES_SCREEN_HEIGHT = 240
Expand Down
2 changes: 1 addition & 1 deletion src/doom/puredoom/DOOM.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#ifndef __DOOM_H__
#define __DOOM_H__

#include "zeptolibc.h"
#include <zeptolibc/zeptolibc.h>

#pragma pack(push, 1)

Expand Down
2 changes: 1 addition & 1 deletion src/terminal/libvterm/terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdint.h>
#include <stdarg.h>

#include "zeptolibc.h"
#include <zeptolibc/zeptolibc.h>

#include "libvterm/vterm.h"

Expand Down
2 changes: 1 addition & 1 deletion src/terminal/libvterm/vterm.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extern "C" {
#include <stdlib.h>
#include <stdbool.h>

#include "zeptolibc.h"
#include <zeptolibc/zeptolibc.h>

#include "vterm_keycodes.h"

Expand Down
2 changes: 1 addition & 1 deletion src/terminal/libvterm/vterm_internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef __VTERM_INTERNAL_H__
#define __VTERM_INTERNAL_H__
#include "zeptolibc.h"
#include <zeptolibc/zeptolibc.h>
#include "vterm.h"

#include <stdarg.h>
Expand Down
2 changes: 1 addition & 1 deletion src/terminal/stb_truetype.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define STB_TRUETYPE_IMPLEMENTATION

#include "zeptolibc.h"
#include <zeptolibc/zeptolibc.h>

#define STBTT_ifloor(x) ((int) floor(x))
#define STBTT_iceil(x) ((int) ceil(x))
Expand Down
2 changes: 1 addition & 1 deletion src/tinygl/TinyGL/src/zbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Z buffer
*/

#include "zeptolibc.h"
#include <zeptolibc/zeptolibc.h>

#include "zfeatures.h"

Expand Down
8 changes: 3 additions & 5 deletions src/tinygl/TinyGL/src/zgl.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _tgl_zgl_h_
#define _tgl_zgl_h_

#include "zeptolibc.h"

#define NULL ((void *)0)
#define M_PI 3.14159265358979323846264338328

Expand All @@ -15,11 +13,11 @@
#define zsqrt sqrt
#define zpow pow

//#include <stdlib.h>
//#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
//#include <math.h>
//#include <assert.h>
//#include <string.h>
#include <string.h>
#include <GL/gl.h>
#include "zbuffer.h"
#include "zmath.h"
Expand Down

0 comments on commit 58cb0bd

Please sign in to comment.