diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 7b5c9d9..b0b811d 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -53,7 +53,7 @@ jobs:
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
- version: 0.16.0
+ version: 0.17.0
- name: Resolve artifact version
run: |
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 6d3e6b0..3afdf4a 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -26,7 +26,7 @@ on:
- published
workflow_dispatch:
env:
- zig_version: 0.16.0
+ zig_version: 0.17.0
jobs:
build-macos:
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index f0c0035..602920a 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -42,7 +42,7 @@ jobs:
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
- version: 0.16.0
+ version: 0.17.0
- name: Resolve artifact version
shell: pwsh
diff --git a/.mise.toml b/.mise.toml
index ef36926..2886ecf 100644
--- a/.mise.toml
+++ b/.mise.toml
@@ -1,2 +1,2 @@
[tools]
-zig = "0.16.0"
+zig = "0.17.0"
diff --git a/README.md b/README.md
index 323d24a..2f143e9 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ It also incorporates several open-source components:
### Prerequisites
-* [Zig 0.16.0-dev](https://ziglang.org/download/) or later.
+* [Zig 0.17.0](https://ziglang.org/download/) or later.
### macOS
diff --git a/assets/Info.plist b/assets/Info.plist
index 7e81993..3124e86 100644
--- a/assets/Info.plist
+++ b/assets/Info.plist
@@ -13,11 +13,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.0.1
+ 1.0.2
CFBundleSignature
????
CFBundleVersion
- 2
+ 3
CFBundleIconFile
AppIcon
CFBundleIconName
diff --git a/build.zig b/build.zig
index cc7c85a..ca64593 100644
--- a/build.zig
+++ b/build.zig
@@ -76,7 +76,7 @@ pub fn build(b: *std.Build) void {
// build.zig.zon and compile only the backend matching the target OS.
const dep_nfd = b.dependency("nfd_extended", .{});
exe.root_module.addIncludePath(dep_nfd.path("src/include"));
- const nfd_cflags = &[_][]const u8{ "-fno-sanitize=all" };
+ const nfd_cflags = &[_][]const u8{"-fno-sanitize=all"};
switch (target.result.os.tag) {
.macos => {
addMacFrameworkPathFromSdkRoot(b, exe.root_module);
@@ -100,7 +100,7 @@ pub fn build(b: *std.Build) void {
exe.root_module.linkSystemLibrary("shell32", .{});
// Link as a GUI app (not console) so launching the .exe does not
// also spawn a console ("DOS") window alongside the main window.
- exe.subsystem = .Windows;
+ exe.subsystem = .windows;
// Embed a manifest that sets the process ACP to UTF-8 so
// C runtime fopen()/CRT path APIs round-trip non-ASCII paths.
exe.root_module.addWin32ResourceFile(.{
@@ -281,6 +281,52 @@ pub fn build(b: *std.Build) void {
.flags = &.{ "-fno-sanitize=all", b.fmt("-D{s}", .{nk_backend_define}) },
});
+ // C headers for the Zig side (Zig 0.17 removed @cImport; each module is
+ // produced by a translate-c step from an entry header in src/cimport/).
+ const np2_c = b.addTranslateC(.{
+ .root_source_file = b.path("src/cimport/np2_c.h"),
+ .target = target,
+ .optimize = optimize,
+ });
+ for (np2_includes) |include| {
+ np2_c.addIncludePath(b.path(include));
+ }
+ for (np2_defines) |define| {
+ np2_c.defineCMacroRaw(define);
+ }
+
+ const nfd_c = b.addTranslateC(.{
+ .root_source_file = b.path("src/cimport/nfd_c.h"),
+ .target = target,
+ .optimize = optimize,
+ });
+ nfd_c.addIncludePath(dep_nfd.path("src/include"));
+
+ const nk_c = b.addTranslateC(.{
+ .root_source_file = b.path("src/cimport/nk_c.h"),
+ .target = target,
+ .optimize = optimize,
+ });
+ nk_c.addIncludePath(b.path("third_party/nuklear"));
+ nk_c.addIncludePath(b.path("third_party/sokol"));
+ nk_c.addIncludePath(dep_sokol.path("src/sokol/c"));
+
+ const stdio_c = b.addTranslateC(.{
+ .root_source_file = b.path("src/cimport/stdio_c.h"),
+ .target = target,
+ .optimize = optimize,
+ });
+
+ const c_imports = [_]struct { []const u8, *std.Build.Module }{
+ .{ "np2_c", np2_c.createModule() },
+ .{ "nfd_c", nfd_c.createModule() },
+ .{ "nk_c", nk_c.createModule() },
+ .{ "stdio_c", stdio_c.createModule() },
+ };
+ for (c_imports) |imp| {
+ exe.root_module.addImport(imp[0], imp[1]);
+ }
+
exe.root_module.link_libc = true;
exe.root_module.link_libcpp = true;
@@ -295,56 +341,31 @@ pub fn build(b: *std.Build) void {
const macos_dir = b.fmt("{s}/MacOS", .{contents_dir});
const resources_dir = b.fmt("{s}/Resources", .{contents_dir});
- // 1. Create directory structure
- const mkdir = b.addSystemCommand(&.{ "mkdir", "-p" });
- mkdir.addArgs(&.{
- b.getInstallPath(.prefix, macos_dir),
- b.getInstallPath(.prefix, resources_dir),
+ // Install steps create the directory structure themselves.
+ // 1. Copy the executable
+ const install_exe = b.addInstallArtifact(exe, .{
+ .dest_dir = .{ .override = .{ .custom = macos_dir } },
});
- bundle_step.dependOn(&mkdir.step);
-
- // 2. Copy the executable
- const cp_exe = b.addSystemCommand(&.{ "cp" });
- cp_exe.addArtifactArg(exe);
- cp_exe.addArg(b.getInstallPath(.prefix, macos_dir));
- cp_exe.step.dependOn(&mkdir.step);
- bundle_step.dependOn(&cp_exe.step);
-
- // 3. Copy Info.plist
- const cp_plist = b.addSystemCommand(&.{ "cp", "assets/Info.plist" });
- cp_plist.addArg(b.getInstallPath(.prefix, b.fmt("{s}/Info.plist", .{contents_dir})));
- cp_plist.step.dependOn(&mkdir.step);
- bundle_step.dependOn(&cp_plist.step);
-
- // 4. Copy AppIcon.icns
- const cp_icon = b.addSystemCommand(&.{ "cp", "assets/AppIcon.icns" });
- cp_icon.addArg(b.getInstallPath(.prefix, b.fmt("{s}/AppIcon.icns", .{resources_dir})));
- cp_icon.step.dependOn(&mkdir.step);
- bundle_step.dependOn(&cp_icon.step);
-
- // 5. Copy the bundled font's OFL license text. M PLUS 1p is embedded in
+ bundle_step.dependOn(&install_exe.step);
+
+ // 2. Copy Info.plist
+ const install_plist = b.addInstallFile(b.path("assets/Info.plist"), b.fmt("{s}/Info.plist", .{contents_dir}));
+ bundle_step.dependOn(&install_plist.step);
+
+ // 3. Copy AppIcon.icns
+ const install_icon = b.addInstallFile(b.path("assets/AppIcon.icns"), b.fmt("{s}/AppIcon.icns", .{resources_dir}));
+ bundle_step.dependOn(&install_icon.step);
+
+ // 4. Copy the bundled font's OFL license text. M PLUS 1p is embedded in
// the binary, so the SIL Open Font License 1.1 + copyright notice must
// travel with the distributed .app per the OFL's redistribution terms.
- const cp_ofl = b.addSystemCommand(&.{ "cp", "assets/fonts/OFL.txt" });
- cp_ofl.addArg(b.getInstallPath(.prefix, b.fmt("{s}/MPLUS1p-OFL.txt", .{resources_dir})));
- cp_ofl.step.dependOn(&mkdir.step);
- bundle_step.dependOn(&cp_ofl.step);
-
- // 6. Touch the bundle to refresh Finder cache
- const touch = b.addSystemCommand(&.{ "touch" });
- touch.addArg(b.getInstallPath(.prefix, app_name));
- touch.step.dependOn(&cp_exe.step);
- touch.step.dependOn(&cp_plist.step);
- touch.step.dependOn(&cp_icon.step);
- touch.step.dependOn(&cp_ofl.step);
- bundle_step.dependOn(&touch.step);
+ const install_ofl = b.addInstallFile(b.path("assets/fonts/OFL.txt"), b.fmt("{s}/MPLUS1p-OFL.txt", .{resources_dir}));
+ bundle_step.dependOn(&install_ofl.step);
}
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
- if (b.args) |args| {
- run_cmd.addArgs(args);
- }
+ run_cmd.addPassthruArgs();
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
@@ -361,6 +382,9 @@ pub fn build(b: *std.Build) void {
}),
});
zig_tests.root_module.addImport("sokol", dep_sokol.module("sokol"));
+ for (c_imports) |imp| {
+ zig_tests.root_module.addImport(imp[0], imp[1]);
+ }
for (np2_includes) |include| {
zig_tests.root_module.addIncludePath(b.path(include));
}
@@ -396,6 +420,9 @@ pub fn build(b: *std.Build) void {
}),
});
path_tests.root_module.addImport("sokol", dep_sokol.module("sokol"));
+ for (c_imports) |imp| {
+ path_tests.root_module.addImport(imp[0], imp[1]);
+ }
for (np2_includes) |include| {
path_tests.root_module.addIncludePath(b.path(include));
}
diff --git a/build.zig.zon b/build.zig.zon
index 7577378..7e036ba 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -9,7 +9,7 @@
.name = .UsaProject,
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
- .version = "1.0.1",
+ .version = "1.0.2",
// Together with name, this represents a globally unique package
// identifier. This field is generated by the Zig toolchain when the
// package is first created, and then *never changes*. This allows
@@ -25,7 +25,7 @@
.fingerprint = 0x14ba4c43ad61d144, // Changing this has security and trust implications.
// Tracks the earliest Zig version that the package considers to be a
// supported use case.
- .minimum_zig_version = "0.16.0-dev.3142+5ccfeb926",
+ .minimum_zig_version = "0.17.0",
// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
@@ -33,12 +33,12 @@
// internet connectivity.
.dependencies = .{
.sokol = .{
- .url = "git+https://github.com/floooh/sokol-zig?ref=master#712ff4bf36761592656a7f648b2e80c59bfa6c95",
- .hash = "sokol-0.1.0-pb1HK8RqNwCA1y9yR1y0VNeYPv0m2TxtWsQP9y3w6rrS",
+ .url = "git+https://github.com/floooh/sokol-zig?ref=master#3990b6629704f988041ac7e76ed010348eabd098",
+ .hash = "sokol-0.1.0-pb1HK6dlQgAVK2z6p9B8rDIzrWEdxn0DeVTcpZrXmATG",
},
.nfd_extended = .{
- .url = "git+https://github.com/btzy/nativefiledialog-extended#c9cc7baf287f969686561674a555af5be7ac82b1",
- .hash = "N-V-__8AAKkPCwAjJKxq_ALyZqptz0YE1UmwjlUlTGABdCPR",
+ .url = "git+https://github.com/btzy/nativefiledialog-extended?ref=v1.4.1#65b2f070a0fcfee0d453a64e770a217ab0b6ff4f",
+ .hash = "N-V-__8AAEXCCwCK8Vr9EDrBMGx0bV1Lt7QiWcrFZ3X2DA75",
},
},
.paths = .{
diff --git a/src/archive.zig b/src/archive.zig
index 797bf8c..9ef6eb1 100644
--- a/src/archive.zig
+++ b/src/archive.zig
@@ -157,7 +157,7 @@ fn extractPlaylist(io: std.Io, allocator: std.mem.Allocator, m3u_path: [:0]const
const cwd = std.Io.Dir.cwd();
var list: std.ArrayList(Image) = .empty;
for (entries.items) |e| {
- const p = a.dupeZ(u8, e.path) catch return Error.OutOfMemory;
+ const p = a.dupeSentinel(u8, e.path, 0) catch return Error.OutOfMemory;
cwd.access(io, p, .{}) catch {
std.debug.print("!! playlist entry not found, skipping: {s}\n", .{p});
continue;
@@ -526,13 +526,13 @@ fn dirname(path: []const u8) []const u8 {
fn displayName(a: std.mem.Allocator, raw: []const u8, index: usize) ![:0]const u8 {
if (raw.len == 0 or hasBlankStem(raw))
return std.fmt.allocPrintSentinel(a, "Disk {d}", .{index + 1}, 0);
- return a.dupeZ(u8, raw);
+ return a.dupeSentinel(u8, raw, 0);
}
/// Derive a renderable source label (archive/folder name) from a real path's
/// basename — used verbatim (UTF-8) — falling back to `fallback` when empty.
fn displaySource(a: std.mem.Allocator, raw: []const u8, fallback: []const u8) ![:0]const u8 {
- return a.dupeZ(u8, if (raw.len == 0) fallback else raw);
+ return a.dupeSentinel(u8, if (raw.len == 0) fallback else raw, 0);
}
/// Drop the "_" extraction prefix that unpackImages prepends, recovering
diff --git a/src/audio.zig b/src/audio.zig
index 1bcab80..d43e645 100644
--- a/src/audio.zig
+++ b/src/audio.zig
@@ -11,11 +11,11 @@ pub fn convertPcmToFloat(dst: []f32, src: [*]const i32, samples: usize) void {
}
test "convertPcmToFloat handles boundary values" {
- var dst = [_]f32{0.0} ** 6;
+ var dst: [6]f32 = @splat(0.0);
const src = [_]i32{
32767, -32768, // Max / Min
- 0, 1, // Zero / Small positive
- -1, 16384, // Small negative / Half max
+ 0, 1, // Zero / Small positive
+ -1, 16384, // Small negative / Half max
};
convertPcmToFloat(&dst, &src, 3);
diff --git a/src/c.zig b/src/c.zig
index 397cb59..0d21465 100644
--- a/src/c.zig
+++ b/src/c.zig
@@ -1,15 +1,4 @@
-pub const c = @cImport({
- @cInclude("compiler.h");
- @cInclude("pccore.h");
- @cInclude("dosio.h");
- @cInclude("scrnmng.h");
- @cInclude("soundmng.h");
- @cInclude("sysmng.h");
- @cInclude("taskmng.h");
- @cInclude("keystat.h");
- @cInclude("vram/scrndraw.h");
- @cInclude("sound/sound.h");
-});
+pub const c = @import("np2_c");
// NP2kai core entry points (re-exported through c.zig so callers don't
// need to mix cz.foo and c.bar).
diff --git a/src/cimport/nfd_c.h b/src/cimport/nfd_c.h
new file mode 100644
index 0000000..f39e9fd
--- /dev/null
+++ b/src/cimport/nfd_c.h
@@ -0,0 +1,2 @@
+// translate-c entry point for nativefiledialog-extended (imported as "nfd_c").
+#include "nfd.h"
diff --git a/src/cimport/nk_c.h b/src/cimport/nk_c.h
new file mode 100644
index 0000000..e9e5222
--- /dev/null
+++ b/src/cimport/nk_c.h
@@ -0,0 +1,13 @@
+// translate-c entry point for Nuklear + sokol_nuklear (imported as "nk_c").
+#include "sokol_gfx.h"
+#include "sokol_app.h"
+#define NK_INCLUDE_FIXED_TYPES
+#define NK_INCLUDE_STANDARD_IO
+#define NK_INCLUDE_DEFAULT_ALLOCATOR
+#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
+#define NK_INCLUDE_FONT_BAKING
+#define NK_INCLUDE_DEFAULT_FONT
+#define NK_INCLUDE_STANDARD_VARARGS
+#define NK_BUTTON_TRIGGER_ON_RELEASE
+#include "nuklear.h"
+#include "sokol_nuklear.h"
diff --git a/src/cimport/np2_c.h b/src/cimport/np2_c.h
new file mode 100644
index 0000000..ea2f2b5
--- /dev/null
+++ b/src/cimport/np2_c.h
@@ -0,0 +1,11 @@
+// translate-c entry point for the NP2kai core (imported as "np2_c").
+#include "compiler.h"
+#include "pccore.h"
+#include "dosio.h"
+#include "scrnmng.h"
+#include "soundmng.h"
+#include "sysmng.h"
+#include "taskmng.h"
+#include "keystat.h"
+#include "vram/scrndraw.h"
+#include "sound/sound.h"
diff --git a/src/cimport/stdio_c.h b/src/cimport/stdio_c.h
new file mode 100644
index 0000000..612efc5
--- /dev/null
+++ b/src/cimport/stdio_c.h
@@ -0,0 +1,2 @@
+// translate-c entry point for libc stdio (imported as "stdio_c").
+#include
diff --git a/src/cli.zig b/src/cli.zig
index af7eb85..c9de69e 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -118,23 +118,23 @@ pub fn parse(allocator: std.mem.Allocator, args: []const []const u8) ParseError!
if (i >= args.len) return error.MissingValue;
const v = args[i];
if (v.len > model_max_len) return error.ModelTooLong;
- opts.model = try allocator.dupeZ(u8, v);
+ opts.model = try allocator.dupeSentinel(u8, v, 0);
continue;
}
if (std.mem.startsWith(u8, a, "--model=")) {
const v = a["--model=".len..];
if (v.len > model_max_len) return error.ModelTooLong;
- opts.model = try allocator.dupeZ(u8, v);
+ opts.model = try allocator.dupeSentinel(u8, v, 0);
continue;
}
if (std.mem.eql(u8, a, "--audio-capture")) {
i += 1;
if (i >= args.len) return error.MissingValue;
- opts.audio_capture = try allocator.dupeZ(u8, args[i]);
+ opts.audio_capture = try allocator.dupeSentinel(u8, args[i], 0);
continue;
}
if (std.mem.startsWith(u8, a, "--audio-capture=")) {
- opts.audio_capture = try allocator.dupeZ(u8, a["--audio-capture=".len..]);
+ opts.audio_capture = try allocator.dupeSentinel(u8, a["--audio-capture=".len..], 0);
continue;
}
if (std.mem.eql(u8, a, "--audio-autotest")) {
@@ -164,7 +164,7 @@ pub fn parse(allocator: std.mem.Allocator, args: []const []const u8) ParseError!
// enforced when the contained images are mounted.
.archive => {},
}
- const path = try allocator.dupeZ(u8, a);
+ const path = try allocator.dupeSentinel(u8, a, 0);
try disks.append(allocator, .{ .kind = kind, .path = path });
}
diff --git a/src/config.zig b/src/config.zig
index 7df8821..0d01248 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -4,9 +4,7 @@ const input = @import("input.zig");
const history = @import("history.zig");
const cli = @import("cli.zig");
-const c = @cImport({
- @cInclude("stdio.h");
-});
+const c = @import("stdio_c");
const cfg_filename = "np2kai.cfg";
const section_header = "[NekoProjectIIkai]\n";
@@ -23,7 +21,7 @@ pub fn setDataDir(dir: []const u8) void {
fn cfgPathZ(buf: *[4096:0]u8) ?[*:0]const u8 {
if (dir_len == 0) return null;
const dir = dir_buf[0..dir_len];
- const result = std.fmt.bufPrintZ(buf, "{s}/{s}", .{ dir, cfg_filename }) catch return null;
+ const result = std.mem.printSentinel(buf, "{s}/{s}", .{ dir, cfg_filename }, 0) catch return null;
return result.ptr;
}
@@ -174,7 +172,7 @@ pub fn save() void {
// model
const model_slice = std.mem.sliceTo(&cz.c.np2cfg.model, 0);
var mbuf: [64:0]u8 = undefined;
- const mline = std.fmt.bufPrintZ(&mbuf, "pc_model = {s}\n", .{model_slice}) catch return;
+ const mline = std.mem.printSentinel(&mbuf, "pc_model = {s}\n", .{model_slice}, 0) catch return;
_ = c.fputs(mline.ptr, fp);
const ents = getEntries();
@@ -183,15 +181,15 @@ pub fn save() void {
const line = switch (e.kind) {
.u8_val => blk: {
const p: *const u8 = @ptrCast(@alignCast(e.ptr));
- break :blk std.fmt.bufPrintZ(&wbuf, "{s} = {d}\n", .{ e.key, p.* }) catch continue;
+ break :blk std.mem.printSentinel(&wbuf, "{s} = {d}\n", .{ e.key, p.* }, 0) catch continue;
},
.u16_val => blk: {
const p: *const u16 = @ptrCast(@alignCast(e.ptr));
- break :blk std.fmt.bufPrintZ(&wbuf, "{s} = {d}\n", .{ e.key, p.* }) catch continue;
+ break :blk std.mem.printSentinel(&wbuf, "{s} = {d}\n", .{ e.key, p.* }, 0) catch continue;
},
.u32_val => blk: {
const p: *const u32 = @ptrCast(@alignCast(e.ptr));
- break :blk std.fmt.bufPrintZ(&wbuf, "{s} = {d}\n", .{ e.key, p.* }) catch continue;
+ break :blk std.mem.printSentinel(&wbuf, "{s} = {d}\n", .{ e.key, p.* }, 0) catch continue;
},
};
_ = c.fputs(line.ptr, fp);
@@ -203,7 +201,7 @@ pub fn save() void {
writeU8Field(fp, &obuf, "DrawSkip", cz.usa_get_draw_skip());
writeU8Field(fp, &obuf, "keyboard", cz.usa_get_keyboard());
writeU8Field(fp, &obuf, "cpu_type", @intCast(cz.usa_get_cpu_index()));
- if (std.fmt.bufPrintZ(&obuf, "MouseSensi = {d}\n", .{input.getSensitivity()})) |line| {
+ if (std.mem.printSentinel(&obuf, "MouseSensi = {d}\n", .{input.getSensitivity()}, 0)) |line| {
_ = c.fputs(line.ptr, fp);
} else |_| {}
@@ -217,13 +215,13 @@ pub fn save() void {
}
fn writeU8Field(fp: *c.FILE, buf: *[64:0]u8, key: []const u8, val: u8) void {
- const line = std.fmt.bufPrintZ(buf, "{s} = {d}\n", .{ key, val }) catch return;
+ const line = std.mem.printSentinel(buf, "{s} = {d}\n", .{ key, val }, 0) catch return;
_ = c.fputs(line.ptr, fp);
}
fn writeRecent(fp: *c.FILE, buf: *[4160:0]u8, kind: cli.DiskKind, prefix: []const u8) void {
for (0..history.count(kind)) |i| {
- const line = std.fmt.bufPrintZ(buf, "{s}{d} = {s}\n", .{ prefix, i, history.at(kind, i) }) catch continue;
+ const line = std.mem.printSentinel(buf, "{s}{d} = {s}\n", .{ prefix, i, history.at(kind, i) }, 0) catch continue;
_ = c.fputs(line.ptr, fp);
}
}
diff --git a/src/history.zig b/src/history.zig
index 389fd00..943cc62 100644
--- a/src/history.zig
+++ b/src/history.zig
@@ -17,7 +17,7 @@ pub const cap = 8;
const alloc = std.heap.page_allocator;
const List = struct {
- items: [cap]?[:0]u8 = .{null} ** cap,
+ items: [cap]?[:0]u8 = @splat(null),
len: usize = 0,
};
@@ -55,7 +55,7 @@ pub fn record(kind: cli.DiskKind, path: []const u8) void {
return;
}
- const dup = alloc.dupeZ(u8, path) catch return;
+ const dup = alloc.dupeSentinel(u8, path, 0) catch return;
if (l.len < cap) {
l.len += 1;
@@ -74,7 +74,7 @@ pub fn append(kind: cli.DiskKind, path: []const u8) void {
const l = listFor(kind);
if (l.len >= cap) return;
if (indexOf(l, path) != null) return;
- const dup = alloc.dupeZ(u8, path) catch return;
+ const dup = alloc.dupeSentinel(u8, path, 0) catch return;
l.items[l.len] = dup;
l.len += 1;
}
diff --git a/src/input.zig b/src/input.zig
index 03d436f..60bbe43 100644
--- a/src/input.zig
+++ b/src/input.zig
@@ -153,7 +153,7 @@ fn scaledMouseDelta(dx: f32, dy: f32) struct { x: c_int, y: c_int } {
// Track which PC-98 keys are currently held on the host side,
// so we can re-send them after a reset (which clears keystat).
-var keys_held: [128]bool = [_]bool{false} ** 128;
+var keys_held: [128]bool = @splat(false);
fn resendHeldKeys() void {
for (0..128) |i| {
diff --git a/src/main.zig b/src/main.zig
index 4ce4c81..f90b434 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -162,7 +162,7 @@ export fn init() void {
.width = FB_WIDTH,
.height = FB_HEIGHT,
.pixel_format = .RGBA8,
- .usage = .{ .stream_update = true },
+ .usage = .{ .write_transient = true },
});
state.view = sg.makeView(.{
@@ -183,16 +183,16 @@ export fn init() void {
// Full-screen quad; placement within the window is done via sg.applyViewport.
const vertices = [_]f32{
- -1.0, 1.0, 0.5, 0.0, 0.0,
- 1.0, 1.0, 0.5, 1.0, 0.0,
- 1.0, -1.0, 0.5, 1.0, 1.0,
- -1.0, -1.0, 0.5, 0.0, 1.0,
+ -1.0, 1.0, 0.5, 0.0, 0.0,
+ 1.0, 1.0, 0.5, 1.0, 0.0,
+ 1.0, -1.0, 0.5, 1.0, 1.0,
+ -1.0, -1.0, 0.5, 0.0, 1.0,
};
state.bindings.vertex_buffers[0] = sg.makeBuffer(.{
.data = sg.asRange(&vertices),
});
- const indices = [_]u16{ 0, 1, 2, 0, 2, 3 };
+ const indices = [_]u16{ 0, 1, 2, 0, 2, 3 };
state.bindings.index_buffer = sg.makeBuffer(.{
.usage = .{ .index_buffer = true },
.data = sg.asRange(&indices),
@@ -402,7 +402,7 @@ export fn frame() void {
var i: u32 = 0;
while (i < frames) : (i += 1) {
// Only the final emulated frame of this host frame is ever uploaded
- // to the GPU (a single updateImage() after the loop), so only it
+ // to the GPU (a single writeImageTransient() after the loop), so only it
// needs the expensive scrndraw_draw() + HSV filter pass. Intermediate
// frames just advance the CPU with draw=false; rendering them — and
// especially running the per-pixel HSV-smooth filter on them — is
@@ -441,9 +441,10 @@ export fn frame() void {
pixel.rgb565BufferToRgba8(&fb_rgba, cz.pc98_framebuffer[0 .. FB_WIDTH * FB_HEIGHT]);
- var img_data = sg.ImageData{};
- img_data.mip_levels[0] = sg.asRange(&fb_rgba);
- sg.updateImage(state.image, img_data);
+ sg.writeImageTransient(.{
+ .src = .{ .data = sg.asRange(&fb_rgba) },
+ .dst = .{ .image = state.image },
+ });
// Update UI overlay state.
cz.usa_lamp_tick();
diff --git a/src/nfd.zig b/src/nfd.zig
index e38634e..b9e6193 100644
--- a/src/nfd.zig
+++ b/src/nfd.zig
@@ -1,10 +1,8 @@
const std = @import("std");
-const c = @cImport({
- @cInclude("nfd.h");
-});
+const c = @import("nfd_c");
-pub const Error = error{InitFailed, DialogFailed, OutOfMemory};
+pub const Error = error{ InitFailed, DialogFailed, OutOfMemory };
const NFD_ERROR: c_int = 0;
const NFD_OKAY: c_int = 1;
diff --git a/src/nk.zig b/src/nk.zig
index 121da52..26a57a1 100644
--- a/src/nk.zig
+++ b/src/nk.zig
@@ -5,20 +5,7 @@ const sapp = sokol.app;
// 埋め込んだ TTF バイト列。アプリ全体で生存する静的データ。
const ja_font = @embedFile("ja_font");
-pub const c = @cImport({
- @cInclude("sokol_gfx.h");
- @cInclude("sokol_app.h");
- @cDefine("NK_INCLUDE_FIXED_TYPES", "");
- @cDefine("NK_INCLUDE_STANDARD_IO", "");
- @cDefine("NK_INCLUDE_DEFAULT_ALLOCATOR", "");
- @cDefine("NK_INCLUDE_VERTEX_BUFFER_OUTPUT", "");
- @cDefine("NK_INCLUDE_FONT_BAKING", "");
- @cDefine("NK_INCLUDE_DEFAULT_FONT", "");
- @cDefine("NK_INCLUDE_STANDARD_VARARGS", "");
- @cDefine("NK_BUTTON_TRIGGER_ON_RELEASE", "");
- @cInclude("nuklear.h");
- @cInclude("sokol_nuklear.h");
-});
+pub const c = @import("nk_c");
pub fn setup(desc: c.snk_desc_t) void {
c.snk_setup(&desc);
@@ -47,7 +34,7 @@ pub fn setupFont(px: f32) void {
const font = c.nk_font_atlas_add_from_memory(
font_atlas,
- @constCast(@ptrCast(ja_font)),
+ @ptrCast(@constCast(ja_font)),
ja_font.len,
px,
&cfg,
diff --git a/src/np2_sources.zig b/src/np2_sources.zig
index 618f6aa..9cf119f 100644
--- a/src/np2_sources.zig
+++ b/src/np2_sources.zig
@@ -1,575 +1,575 @@
pub const sources = &[_][]const u8{
-"core/np2kai/common/parts.c",
-"core/np2kai/common/rect.c",
-"core/np2kai/common/resize.c",
-"core/np2kai/common/milstr.c",
-"core/np2kai/common/textfile.c",
-"core/np2kai/common/_memory.c",
-"core/np2kai/common/strres.c",
-"core/np2kai/common/mimpidef.c",
-"core/np2kai/common/profile.c",
-"core/np2kai/common/bmpdata.c",
-"core/np2kai/common/wavefile.c",
-"core/np2kai/common/lstarray.c",
-"core/np2kai/pccore.c",
-"core/np2kai/nevent.c",
-"core/np2kai/timing.c",
-"core/np2kai/keystat.c",
-"core/np2kai/statsave.c",
-"core/np2kai/calendar.c",
-"core/np2kai/debugsnapshot.c",
-"core/np2kai/bios/bios1c.c",
-"core/np2kai/bios/bios09.c",
-"core/np2kai/bios/bios0c.c",
-"core/np2kai/bios/bios13.c",
-"core/np2kai/bios/bios19.c",
-"core/np2kai/bios/bios.c",
-"core/np2kai/bios/bios1b.c",
-"core/np2kai/bios/bios1f.c",
-"core/np2kai/bios/sxsibios.c",
-"core/np2kai/bios/bios18.c",
-"core/np2kai/bios/bios12.c",
-"core/np2kai/bios/bios1a.c",
-"core/np2kai/cbus/boardso.c",
-"core/np2kai/cbus/boardx2.c",
-"core/np2kai/cbus/boardpx.c",
-"core/np2kai/cbus/pcm86io.c",
-"core/np2kai/cbus/gpibio.c",
-"core/np2kai/cbus/board118.c",
-"core/np2kai/cbus/amd98.c",
-"core/np2kai/cbus/board14.c",
-"core/np2kai/cbus/boardspb.c",
-"core/np2kai/cbus/board86.c",
-"core/np2kai/cbus/boardsb16.c",
-"core/np2kai/cbus/boardlol.c",
-"core/np2kai/cbus/smpu98.c",
-"core/np2kai/cbus/ct1745io.c",
-"core/np2kai/cbus/ct1741io.c",
-"core/np2kai/cbus/scsicmd.c",
-"core/np2kai/cbus/ideio.c",
-"core/np2kai/cbus/board26k.c",
-"core/np2kai/cbus/sasiio.c",
-"core/np2kai/cbus/boardmo.c",
-"core/np2kai/cbus/cs4231io.c",
-"core/np2kai/cbus/atapicmd.c",
-"core/np2kai/cbus/scsiio.c",
-"core/np2kai/cbus/pc9861k.c",
-"core/np2kai/cbus/cbuscore.c",
-"core/np2kai/cbus/mpu98ii.c",
-"core/np2kai/diskimage/img_strres.c",
-"core/np2kai/diskimage/fd/fdd_nfd.c",
-"core/np2kai/diskimage/fd/fdd_bkdsk.c",
-"core/np2kai/diskimage/fd/fdd_dcp.c",
-"core/np2kai/diskimage/fd/fdd_xdf.c",
-"core/np2kai/diskimage/fd/fdd_d88.c",
-"core/np2kai/diskimage/fd/fdd_vfdd.c",
-"core/np2kai/diskimage/fddfile.c",
-"core/np2kai/diskimage/cddfile.c",
-"core/np2kai/diskimage/cd/cdd_real.c",
-"core/np2kai/diskimage/cd/cdd_ccd.c",
-"core/np2kai/diskimage/cd/cdd_nrg.c",
-"core/np2kai/diskimage/cd/cdd_iso.c",
-"core/np2kai/diskimage/cd/cdd_cue.c",
-"core/np2kai/diskimage/cd/cdd_mds.c",
-"core/np2kai/diskimage/cd/cdd_libcdio.c",
-"core/np2kai/fdd/newdisk.c",
-"core/np2kai/fdd/sxsicd.c",
-"core/np2kai/fdd/fdd_mtr.c",
-"core/np2kai/fdd/sxsihdd.c",
-"core/np2kai/fdd/sxsi.c",
-"core/np2kai/fdd/diskdrv.c",
-"core/np2kai/fdd/sxsihdd_nvl.c",
-"core/np2kai/font/fontx68k.c",
-"core/np2kai/font/fontmake.c",
-"core/np2kai/font/fontfm7.c",
-"core/np2kai/font/font.c",
-"core/np2kai/font/fontv98.c",
-"core/np2kai/font/fontdata.c",
-"core/np2kai/font/fontx1.c",
-"core/np2kai/font/fontpc88.c",
-"core/np2kai/font/fontpc98.c",
-"core/np2kai/generic/cmjasts.c",
-"core/np2kai/generic/cmndraw.c",
-"core/np2kai/generic/dipswbmp.c",
-"core/np2kai/generic/hostdrv.c",
-"core/np2kai/generic/softkbd.c",
-"core/np2kai/generic/np2info.c",
-"core/np2kai/generic/hostdrvnt.c",
-"core/np2kai/generic/keydisp.c",
-"core/np2kai/generic/memdbg32.c",
-"core/np2kai/generic/cmver.c",
-"core/np2kai/generic/hostdrvs.c",
-"core/np2kai/generic/unasm.c",
-"core/np2kai/i386c/cpumem.c",
-"core/np2kai/i386c/cpucore.c",
-"core/np2kai/i386c/ia32/instructions/fpu.c",
-"core/np2kai/i386c/ia32/instructions/sse4a/sse4a.c",
-"core/np2kai/i386c/ia32/instructions/string_inst.c",
-"core/np2kai/i386c/ia32/instructions/mmx/mmx.c",
-"core/np2kai/i386c/ia32/instructions/mmx/3dnow.c",
-"core/np2kai/i386c/ia32/instructions/sse/sse.c",
-"core/np2kai/i386c/ia32/instructions/bit_byte.c",
-"core/np2kai/i386c/ia32/instructions/sse4/sse4_1.c",
-"core/np2kai/i386c/ia32/instructions/sse4/sse4_2.c",
-"core/np2kai/i386c/ia32/instructions/sse3/sse3.c",
-"core/np2kai/i386c/ia32/instructions/sse2/sse2.c",
-"core/np2kai/i386c/ia32/instructions/dec_arith.c",
-"core/np2kai/i386c/ia32/instructions/ctrl_trans.c",
-"core/np2kai/i386c/ia32/instructions/misc_inst.c",
-"core/np2kai/i386c/ia32/instructions/data_trans.c",
-"core/np2kai/i386c/ia32/instructions/ssse3/ssse3.c",
-"core/np2kai/i386c/ia32/instructions/seg_reg.c",
-"core/np2kai/i386c/ia32/instructions/bin_arith.c",
-"core/np2kai/i386c/ia32/instructions/logic_arith.c",
-"core/np2kai/i386c/ia32/instructions/system_inst.c",
-"core/np2kai/i386c/ia32/instructions/shift_rotate.c",
-"core/np2kai/i386c/ia32/instructions/fpu/fpemul_dosbox2.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat/softfloat.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToExtF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToExtF80UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_mulAdd.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_lt128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/softfloat_raiseFlags.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam64Extra.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f32UIToCommonNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF32Sig.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF64Sig.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF16UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_mulAdd.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToI64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul64To128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_mulAdd.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_eq128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecipSqrt_1Ks.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_sub128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF128UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToI16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF128UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF32UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToUI32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF64UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecip_1Ks.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_mulAdd.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftLeft128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam64Extra.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam256M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f128UIToCommonNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsExtF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros8.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToI32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_lt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_extF80UIToCommonNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f16UIToCommonNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul128To256M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_add128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_le128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam128Extra.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/softfloat_state.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF16Sig.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_add256M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_sub.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_add.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsExtF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_extF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul64ByShifted32To128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_mul.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF16UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f64UIToCommonNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam128Extra.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF64UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_sqrt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecipSqrt32_1.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_isSignalingNaN.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNExtF80UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_roundToInt.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalExtF80Sig.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF32UI.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_eq_signaling.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_le_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_mulAdd.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul128By32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_sub256M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_le.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_div.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF128Sig.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_lt_quiet.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui32_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToUI64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToExtF80.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_rem.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros16.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecip32_1.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_extF80M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_eq.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRight128.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui64.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f128M.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui64_r_minMag.c",
-"core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_f32.c",
-"core/np2kai/i386c/ia32/instructions/fpu/fpdummy.c",
-"core/np2kai/i386c/ia32/instructions/fpu/fpemul_softfloat.c",
-"core/np2kai/i386c/ia32/instructions/fpu/fpemul_dosbox.c",
-"core/np2kai/i386c/ia32/instructions/fpu/fpemul_softfloat3.cpp",
-"core/np2kai/i386c/ia32/instructions/flag_ctrl.c",
-"core/np2kai/i386c/ia32/segments.c",
-"core/np2kai/i386c/ia32/ia32.c",
-"core/np2kai/i386c/ia32/interface.c",
-"core/np2kai/i386c/ia32/paging.c",
-"core/np2kai/i386c/ia32/cpu.c",
-"core/np2kai/i386c/ia32/disasm.c",
-"core/np2kai/i386c/ia32/exception.c",
-"core/np2kai/i386c/ia32/resolve.c",
-"core/np2kai/i386c/ia32/groups.c",
-"core/np2kai/i386c/ia32/cpu_io.c",
-"core/np2kai/i386c/ia32/task.c",
-"core/np2kai/i386c/ia32/debug.c",
-"core/np2kai/i386c/ia32/cpu_mem.c",
-"core/np2kai/i386c/ia32/ctrlxfer.c",
-"core/np2kai/i386c/ia32/inst_table.c",
-"core/np2kai/io/crtc.c",
-"core/np2kai/io/pic.c",
-"core/np2kai/io/pcidev.c",
-"core/np2kai/io/pci/cbusbridge.c",
-"core/np2kai/io/pci/98graphbridge.c",
-"core/np2kai/io/serial.c",
-"core/np2kai/io/dmac.c",
-"core/np2kai/io/pegc.c",
-"core/np2kai/io/artic.c",
-"core/np2kai/io/sysport.c",
-"core/np2kai/io/epsonio.c",
-"core/np2kai/io/np2sysp.c",
-"core/np2kai/io/egc.c",
-"core/np2kai/io/upd4990.c",
-"core/np2kai/io/fdd320.c",
-"core/np2kai/io/cpuio.c",
-"core/np2kai/io/gdc_sub.c",
-"core/np2kai/io/iocore.c",
-"core/np2kai/io/nmiio.c",
-"core/np2kai/io/bmsio.c",
-"core/np2kai/io/mouseif.c",
-"core/np2kai/io/printif.c",
-"core/np2kai/io/gdc.c",
-"core/np2kai/io/fdc.c",
-"core/np2kai/io/dipsw.c",
-"core/np2kai/io/necio.c",
-"core/np2kai/io/gdc_pset.c",
-"core/np2kai/io/cgrom.c",
-"core/np2kai/io/emsio.c",
-"core/np2kai/io/pit.c",
-"core/np2kai/mem/memems.c",
-"core/np2kai/mem/memvram.c",
-"core/np2kai/mem/memvga.c",
-"core/np2kai/mem/dmax86.c",
-"core/np2kai/mem/memepp.c",
-"core/np2kai/mem/dmav30.c",
-"core/np2kai/mem/memtram.c",
-"core/np2kai/mem/memegc.c",
-"core/np2kai/sound/opngeng.c",
-"core/np2kai/sound/oplgenc.c",
-"core/np2kai/sound/opngenc.c",
-"core/np2kai/sound/oplgeng.c",
-"core/np2kai/sound/s98.c",
-"core/np2kai/sound/opntimer.c",
-"core/np2kai/sound/pcm86c.c",
-"core/np2kai/sound/mame/fmopl.c",
-"core/np2kai/sound/mame/ymf262.c",
-"core/np2kai/sound/mame/ymdeltat.c",
-"core/np2kai/sound/pcm86g.c",
-"core/np2kai/sound/opl3.c",
-"core/np2kai/sound/getsnd/getmp3.c",
-"core/np2kai/sound/getsnd/getsnd.c",
-"core/np2kai/sound/getsnd/getogg.c",
-"core/np2kai/sound/getsnd/getsmix.c",
-"core/np2kai/sound/getsnd/getwave.c",
-"core/np2kai/sound/ct1741g.c",
-"core/np2kai/sound/adpcmg.c",
-"core/np2kai/sound/ct1741c.c",
-"core/np2kai/sound/adpcmc.c",
-"core/np2kai/sound/opna.c",
-"core/np2kai/sound/cs4231g.c",
-"core/np2kai/sound/psggenc.c",
-"core/np2kai/sound/sndcsec.c",
-"core/np2kai/sound/fmgen/fmgen_fmgen.cpp",
-"core/np2kai/sound/fmgen/fmgen_psg.cpp",
-"core/np2kai/sound/fmgen/fmgen_opm.cpp",
-"core/np2kai/sound/fmgen/fmgen_fmtimer.cpp",
-"core/np2kai/sound/fmgen/fmgen_file.cpp",
-"core/np2kai/sound/fmgen/fmgen_fmgwrap.cpp",
-"core/np2kai/sound/fmgen/fmgen_opna.cpp",
-"core/np2kai/sound/psggeng.c",
-"core/np2kai/sound/cs4231c.c",
-"core/np2kai/sound/rhythmc.c",
-"core/np2kai/sound/mamebsd/ymfm_opq.cpp",
-"core/np2kai/sound/mamebsd/ymfm_misc.cpp",
-"core/np2kai/sound/mamebsd/ymfm_ssg.cpp",
-"core/np2kai/sound/mamebsd/ymfm_pcm.cpp",
-"core/np2kai/sound/mamebsd/ymfm_adpcm.cpp",
-"core/np2kai/sound/mamebsd/np2interop.cpp",
-"core/np2kai/sound/mamebsd/ymfm_opn.cpp",
-"core/np2kai/sound/mamebsd/ymfm_opl.cpp",
-"core/np2kai/sound/mamebsd/ymfm_opz.cpp",
-"core/np2kai/sound/mamebsd/ymfm_opm.cpp",
-"core/np2kai/sound/mamebsd/np2compatible.cpp",
-"core/np2kai/sound/sound.c",
-"core/np2kai/sound/tms3631g.c",
-"core/np2kai/sound/beepg.c",
-"core/np2kai/sound/beepc.c",
-"core/np2kai/sound/tms3631c.c",
-"core/np2kai/sound/pcmmix.c",
-"core/np2kai/sound/fmboard.c",
-"core/np2kai/sound/soundrom.c",
-"core/np2kai/vram/scrndraw.c",
-"core/np2kai/vram/sdraw.c",
-"core/np2kai/vram/makegrph.c",
-"core/np2kai/vram/makegrex.c",
-"core/np2kai/vram/scrnsave.c",
-"core/np2kai/vram/vram.c",
-"core/np2kai/vram/palettes.c",
-"core/np2kai/vram/maketext.c",
-"core/np2kai/vram/dispsync.c",
-"core/np2kai/vram/sdrawq16.c",
-"core/np2kai/vram/maketgrp.c",
-"core/np2kai/vram/videofilter.c",
-"core/np2kai/trap/inttrap.c",
-"core/np2kai/trap/steptrap.c",
-"core/np2kai/codecnv/utf8ucs2.c",
-"core/np2kai/codecnv/ucs4ucs2.c",
-"core/np2kai/codecnv/sjisucs2.c",
-"core/np2kai/codecnv/tcswap32.c",
-"core/np2kai/codecnv/ucs2sjis.c",
-"core/np2kai/codecnv/eucsjis.c",
-"core/np2kai/codecnv/utf8ucs4.c",
-"core/np2kai/codecnv/ucs2utf8.c",
-"core/np2kai/codecnv/sjiseuc.c",
-"core/np2kai/codecnv/eucucs2.c",
-"core/np2kai/codecnv/textcnv.c",
-"core/np2kai/codecnv/ucs4utf8.c",
-"core/np2kai/codecnv/ucs2ucs4.c",
-"core/np2kai/codecnv/jisucs2.c",
-"core/np2kai/codecnv/tcswap16.c",
-"core/np2kai/embed/vramhdl.c",
-"core/np2kai/embed/vrammix.c",
+ "core/np2kai/common/parts.c",
+ "core/np2kai/common/rect.c",
+ "core/np2kai/common/resize.c",
+ "core/np2kai/common/milstr.c",
+ "core/np2kai/common/textfile.c",
+ "core/np2kai/common/_memory.c",
+ "core/np2kai/common/strres.c",
+ "core/np2kai/common/mimpidef.c",
+ "core/np2kai/common/profile.c",
+ "core/np2kai/common/bmpdata.c",
+ "core/np2kai/common/wavefile.c",
+ "core/np2kai/common/lstarray.c",
+ "core/np2kai/pccore.c",
+ "core/np2kai/nevent.c",
+ "core/np2kai/timing.c",
+ "core/np2kai/keystat.c",
+ "core/np2kai/statsave.c",
+ "core/np2kai/calendar.c",
+ "core/np2kai/debugsnapshot.c",
+ "core/np2kai/bios/bios1c.c",
+ "core/np2kai/bios/bios09.c",
+ "core/np2kai/bios/bios0c.c",
+ "core/np2kai/bios/bios13.c",
+ "core/np2kai/bios/bios19.c",
+ "core/np2kai/bios/bios.c",
+ "core/np2kai/bios/bios1b.c",
+ "core/np2kai/bios/bios1f.c",
+ "core/np2kai/bios/sxsibios.c",
+ "core/np2kai/bios/bios18.c",
+ "core/np2kai/bios/bios12.c",
+ "core/np2kai/bios/bios1a.c",
+ "core/np2kai/cbus/boardso.c",
+ "core/np2kai/cbus/boardx2.c",
+ "core/np2kai/cbus/boardpx.c",
+ "core/np2kai/cbus/pcm86io.c",
+ "core/np2kai/cbus/gpibio.c",
+ "core/np2kai/cbus/board118.c",
+ "core/np2kai/cbus/amd98.c",
+ "core/np2kai/cbus/board14.c",
+ "core/np2kai/cbus/boardspb.c",
+ "core/np2kai/cbus/board86.c",
+ "core/np2kai/cbus/boardsb16.c",
+ "core/np2kai/cbus/boardlol.c",
+ "core/np2kai/cbus/smpu98.c",
+ "core/np2kai/cbus/ct1745io.c",
+ "core/np2kai/cbus/ct1741io.c",
+ "core/np2kai/cbus/scsicmd.c",
+ "core/np2kai/cbus/ideio.c",
+ "core/np2kai/cbus/board26k.c",
+ "core/np2kai/cbus/sasiio.c",
+ "core/np2kai/cbus/boardmo.c",
+ "core/np2kai/cbus/cs4231io.c",
+ "core/np2kai/cbus/atapicmd.c",
+ "core/np2kai/cbus/scsiio.c",
+ "core/np2kai/cbus/pc9861k.c",
+ "core/np2kai/cbus/cbuscore.c",
+ "core/np2kai/cbus/mpu98ii.c",
+ "core/np2kai/diskimage/img_strres.c",
+ "core/np2kai/diskimage/fd/fdd_nfd.c",
+ "core/np2kai/diskimage/fd/fdd_bkdsk.c",
+ "core/np2kai/diskimage/fd/fdd_dcp.c",
+ "core/np2kai/diskimage/fd/fdd_xdf.c",
+ "core/np2kai/diskimage/fd/fdd_d88.c",
+ "core/np2kai/diskimage/fd/fdd_vfdd.c",
+ "core/np2kai/diskimage/fddfile.c",
+ "core/np2kai/diskimage/cddfile.c",
+ "core/np2kai/diskimage/cd/cdd_real.c",
+ "core/np2kai/diskimage/cd/cdd_ccd.c",
+ "core/np2kai/diskimage/cd/cdd_nrg.c",
+ "core/np2kai/diskimage/cd/cdd_iso.c",
+ "core/np2kai/diskimage/cd/cdd_cue.c",
+ "core/np2kai/diskimage/cd/cdd_mds.c",
+ "core/np2kai/diskimage/cd/cdd_libcdio.c",
+ "core/np2kai/fdd/newdisk.c",
+ "core/np2kai/fdd/sxsicd.c",
+ "core/np2kai/fdd/fdd_mtr.c",
+ "core/np2kai/fdd/sxsihdd.c",
+ "core/np2kai/fdd/sxsi.c",
+ "core/np2kai/fdd/diskdrv.c",
+ "core/np2kai/fdd/sxsihdd_nvl.c",
+ "core/np2kai/font/fontx68k.c",
+ "core/np2kai/font/fontmake.c",
+ "core/np2kai/font/fontfm7.c",
+ "core/np2kai/font/font.c",
+ "core/np2kai/font/fontv98.c",
+ "core/np2kai/font/fontdata.c",
+ "core/np2kai/font/fontx1.c",
+ "core/np2kai/font/fontpc88.c",
+ "core/np2kai/font/fontpc98.c",
+ "core/np2kai/generic/cmjasts.c",
+ "core/np2kai/generic/cmndraw.c",
+ "core/np2kai/generic/dipswbmp.c",
+ "core/np2kai/generic/hostdrv.c",
+ "core/np2kai/generic/softkbd.c",
+ "core/np2kai/generic/np2info.c",
+ "core/np2kai/generic/hostdrvnt.c",
+ "core/np2kai/generic/keydisp.c",
+ "core/np2kai/generic/memdbg32.c",
+ "core/np2kai/generic/cmver.c",
+ "core/np2kai/generic/hostdrvs.c",
+ "core/np2kai/generic/unasm.c",
+ "core/np2kai/i386c/cpumem.c",
+ "core/np2kai/i386c/cpucore.c",
+ "core/np2kai/i386c/ia32/instructions/fpu.c",
+ "core/np2kai/i386c/ia32/instructions/sse4a/sse4a.c",
+ "core/np2kai/i386c/ia32/instructions/string_inst.c",
+ "core/np2kai/i386c/ia32/instructions/mmx/mmx.c",
+ "core/np2kai/i386c/ia32/instructions/mmx/3dnow.c",
+ "core/np2kai/i386c/ia32/instructions/sse/sse.c",
+ "core/np2kai/i386c/ia32/instructions/bit_byte.c",
+ "core/np2kai/i386c/ia32/instructions/sse4/sse4_1.c",
+ "core/np2kai/i386c/ia32/instructions/sse4/sse4_2.c",
+ "core/np2kai/i386c/ia32/instructions/sse3/sse3.c",
+ "core/np2kai/i386c/ia32/instructions/sse2/sse2.c",
+ "core/np2kai/i386c/ia32/instructions/dec_arith.c",
+ "core/np2kai/i386c/ia32/instructions/ctrl_trans.c",
+ "core/np2kai/i386c/ia32/instructions/misc_inst.c",
+ "core/np2kai/i386c/ia32/instructions/data_trans.c",
+ "core/np2kai/i386c/ia32/instructions/ssse3/ssse3.c",
+ "core/np2kai/i386c/ia32/instructions/seg_reg.c",
+ "core/np2kai/i386c/ia32/instructions/bin_arith.c",
+ "core/np2kai/i386c/ia32/instructions/logic_arith.c",
+ "core/np2kai/i386c/ia32/instructions/system_inst.c",
+ "core/np2kai/i386c/ia32/instructions/shift_rotate.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/fpemul_dosbox2.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat/softfloat.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToExtF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToExtF80UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_mulAdd.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_lt128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/softfloat_raiseFlags.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam64Extra.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f32UIToCommonNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF32Sig.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF64Sig.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF16UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_mulAdd.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToI64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul64To128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_mulAdd.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_eq128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecipSqrt_1Ks.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_sub128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF128UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToI16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF128UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF32UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToUI32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF64UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecip_1Ks.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_mulAdd.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftLeft128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam64Extra.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam256M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f128UIToCommonNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsExtF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros8.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToI32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_lt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_extF80UIToCommonNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f16UIToCommonNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul128To256M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_add128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_le128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRightJam128Extra.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/softfloat_state.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF16Sig.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_i64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_add256M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_sub.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_add.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsExtF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_extF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul64ByShifted32To128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_mul.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF16UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i32_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_f64UIToCommonNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam128Extra.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNF64UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_sqrt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_addMagsF64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mulAddF32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecipSqrt32_1.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_i64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_isSignalingNaN.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shiftRightJam128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_subMagsF16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128M_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_propagateNaNExtF80UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_roundToInt.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalExtF80Sig.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_commonNaNToF32UI.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_eq_signaling.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_le_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToF64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_mulAdd.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_mul128By32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_sub256M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_le.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_div.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normSubnormalF128Sig.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_lt_quiet.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_normRoundPackToF64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui32_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_ui32_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundToUI64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_roundPackToExtF80.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_rem.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/ui64_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_f64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80_to_f128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_countLeadingZeros16.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_approxRecip32_1.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/i64_to_extF80M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f16_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_eq.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/s_shortShiftRight128.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f32_to_ui64.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_i32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f64_to_f128M.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/extF80M_to_ui64_r_minMag.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/softfloat3/f128_to_f32.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/fpdummy.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/fpemul_softfloat.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/fpemul_dosbox.c",
+ "core/np2kai/i386c/ia32/instructions/fpu/fpemul_softfloat3.cpp",
+ "core/np2kai/i386c/ia32/instructions/flag_ctrl.c",
+ "core/np2kai/i386c/ia32/segments.c",
+ "core/np2kai/i386c/ia32/ia32.c",
+ "core/np2kai/i386c/ia32/interface.c",
+ "core/np2kai/i386c/ia32/paging.c",
+ "core/np2kai/i386c/ia32/cpu.c",
+ "core/np2kai/i386c/ia32/disasm.c",
+ "core/np2kai/i386c/ia32/exception.c",
+ "core/np2kai/i386c/ia32/resolve.c",
+ "core/np2kai/i386c/ia32/groups.c",
+ "core/np2kai/i386c/ia32/cpu_io.c",
+ "core/np2kai/i386c/ia32/task.c",
+ "core/np2kai/i386c/ia32/debug.c",
+ "core/np2kai/i386c/ia32/cpu_mem.c",
+ "core/np2kai/i386c/ia32/ctrlxfer.c",
+ "core/np2kai/i386c/ia32/inst_table.c",
+ "core/np2kai/io/crtc.c",
+ "core/np2kai/io/pic.c",
+ "core/np2kai/io/pcidev.c",
+ "core/np2kai/io/pci/cbusbridge.c",
+ "core/np2kai/io/pci/98graphbridge.c",
+ "core/np2kai/io/serial.c",
+ "core/np2kai/io/dmac.c",
+ "core/np2kai/io/pegc.c",
+ "core/np2kai/io/artic.c",
+ "core/np2kai/io/sysport.c",
+ "core/np2kai/io/epsonio.c",
+ "core/np2kai/io/np2sysp.c",
+ "core/np2kai/io/egc.c",
+ "core/np2kai/io/upd4990.c",
+ "core/np2kai/io/fdd320.c",
+ "core/np2kai/io/cpuio.c",
+ "core/np2kai/io/gdc_sub.c",
+ "core/np2kai/io/iocore.c",
+ "core/np2kai/io/nmiio.c",
+ "core/np2kai/io/bmsio.c",
+ "core/np2kai/io/mouseif.c",
+ "core/np2kai/io/printif.c",
+ "core/np2kai/io/gdc.c",
+ "core/np2kai/io/fdc.c",
+ "core/np2kai/io/dipsw.c",
+ "core/np2kai/io/necio.c",
+ "core/np2kai/io/gdc_pset.c",
+ "core/np2kai/io/cgrom.c",
+ "core/np2kai/io/emsio.c",
+ "core/np2kai/io/pit.c",
+ "core/np2kai/mem/memems.c",
+ "core/np2kai/mem/memvram.c",
+ "core/np2kai/mem/memvga.c",
+ "core/np2kai/mem/dmax86.c",
+ "core/np2kai/mem/memepp.c",
+ "core/np2kai/mem/dmav30.c",
+ "core/np2kai/mem/memtram.c",
+ "core/np2kai/mem/memegc.c",
+ "core/np2kai/sound/opngeng.c",
+ "core/np2kai/sound/oplgenc.c",
+ "core/np2kai/sound/opngenc.c",
+ "core/np2kai/sound/oplgeng.c",
+ "core/np2kai/sound/s98.c",
+ "core/np2kai/sound/opntimer.c",
+ "core/np2kai/sound/pcm86c.c",
+ "core/np2kai/sound/mame/fmopl.c",
+ "core/np2kai/sound/mame/ymf262.c",
+ "core/np2kai/sound/mame/ymdeltat.c",
+ "core/np2kai/sound/pcm86g.c",
+ "core/np2kai/sound/opl3.c",
+ "core/np2kai/sound/getsnd/getmp3.c",
+ "core/np2kai/sound/getsnd/getsnd.c",
+ "core/np2kai/sound/getsnd/getogg.c",
+ "core/np2kai/sound/getsnd/getsmix.c",
+ "core/np2kai/sound/getsnd/getwave.c",
+ "core/np2kai/sound/ct1741g.c",
+ "core/np2kai/sound/adpcmg.c",
+ "core/np2kai/sound/ct1741c.c",
+ "core/np2kai/sound/adpcmc.c",
+ "core/np2kai/sound/opna.c",
+ "core/np2kai/sound/cs4231g.c",
+ "core/np2kai/sound/psggenc.c",
+ "core/np2kai/sound/sndcsec.c",
+ "core/np2kai/sound/fmgen/fmgen_fmgen.cpp",
+ "core/np2kai/sound/fmgen/fmgen_psg.cpp",
+ "core/np2kai/sound/fmgen/fmgen_opm.cpp",
+ "core/np2kai/sound/fmgen/fmgen_fmtimer.cpp",
+ "core/np2kai/sound/fmgen/fmgen_file.cpp",
+ "core/np2kai/sound/fmgen/fmgen_fmgwrap.cpp",
+ "core/np2kai/sound/fmgen/fmgen_opna.cpp",
+ "core/np2kai/sound/psggeng.c",
+ "core/np2kai/sound/cs4231c.c",
+ "core/np2kai/sound/rhythmc.c",
+ "core/np2kai/sound/mamebsd/ymfm_opq.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_misc.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_ssg.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_pcm.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_adpcm.cpp",
+ "core/np2kai/sound/mamebsd/np2interop.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_opn.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_opl.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_opz.cpp",
+ "core/np2kai/sound/mamebsd/ymfm_opm.cpp",
+ "core/np2kai/sound/mamebsd/np2compatible.cpp",
+ "core/np2kai/sound/sound.c",
+ "core/np2kai/sound/tms3631g.c",
+ "core/np2kai/sound/beepg.c",
+ "core/np2kai/sound/beepc.c",
+ "core/np2kai/sound/tms3631c.c",
+ "core/np2kai/sound/pcmmix.c",
+ "core/np2kai/sound/fmboard.c",
+ "core/np2kai/sound/soundrom.c",
+ "core/np2kai/vram/scrndraw.c",
+ "core/np2kai/vram/sdraw.c",
+ "core/np2kai/vram/makegrph.c",
+ "core/np2kai/vram/makegrex.c",
+ "core/np2kai/vram/scrnsave.c",
+ "core/np2kai/vram/vram.c",
+ "core/np2kai/vram/palettes.c",
+ "core/np2kai/vram/maketext.c",
+ "core/np2kai/vram/dispsync.c",
+ "core/np2kai/vram/sdrawq16.c",
+ "core/np2kai/vram/maketgrp.c",
+ "core/np2kai/vram/videofilter.c",
+ "core/np2kai/trap/inttrap.c",
+ "core/np2kai/trap/steptrap.c",
+ "core/np2kai/codecnv/utf8ucs2.c",
+ "core/np2kai/codecnv/ucs4ucs2.c",
+ "core/np2kai/codecnv/sjisucs2.c",
+ "core/np2kai/codecnv/tcswap32.c",
+ "core/np2kai/codecnv/ucs2sjis.c",
+ "core/np2kai/codecnv/eucsjis.c",
+ "core/np2kai/codecnv/utf8ucs4.c",
+ "core/np2kai/codecnv/ucs2utf8.c",
+ "core/np2kai/codecnv/sjiseuc.c",
+ "core/np2kai/codecnv/eucucs2.c",
+ "core/np2kai/codecnv/textcnv.c",
+ "core/np2kai/codecnv/ucs4utf8.c",
+ "core/np2kai/codecnv/ucs2ucs4.c",
+ "core/np2kai/codecnv/jisucs2.c",
+ "core/np2kai/codecnv/tcswap16.c",
+ "core/np2kai/embed/vramhdl.c",
+ "core/np2kai/embed/vrammix.c",
};
diff --git a/src/ui.zig b/src/ui.zig
index 192c239..ae03f64 100644
--- a/src/ui.zig
+++ b/src/ui.zig
@@ -146,8 +146,8 @@ pub fn setup() void {
});
const desc = c.snk_image_desc_t{
- .texture_view = @bitCast(view),
- .sampler = @bitCast(sampler),
+ .texture_view = .{ .id = view.id },
+ .sampler = .{ .id = sampler.id },
};
about_icon = c.snk_make_image(&desc);
about_icon_valid = true;
@@ -218,13 +218,13 @@ pub fn flushPendingActions() void {
fn checkLabel(buf: *[64]u8, checked: bool, label: []const u8) [*:0]const u8 {
const prefix: []const u8 = if (checked) "[*] " else "[ ] ";
- const result = std.fmt.bufPrintZ(buf, "{s}{s}", .{ prefix, label }) catch "?";
+ const result = std.mem.printSentinel(buf, "{s}{s}", .{ prefix, label }, 0) catch "?";
return result.ptr;
}
fn radioLabel(buf: *[64]u8, selected: bool, label: []const u8) [*:0]const u8 {
const prefix: []const u8 = if (selected) "(*) " else "( ) ";
- const result = std.fmt.bufPrintZ(buf, "{s}{s}", .{ prefix, label }) catch "?";
+ const result = std.mem.printSentinel(buf, "{s}{s}", .{ prefix, label }, 0) catch "?";
return result.ptr;
}
@@ -478,12 +478,12 @@ fn drawStatusBar(ctx: *c.nk_context, win_w: u32, win_h: u32, st: State) void {
c.nk_layout_row_template_end(ctx);
var mbuf: [16]u8 = undefined;
- const mline = std.fmt.bufPrintZ(&mbuf, "{s}", .{st.model}) catch "?";
+ const mline = std.mem.printSentinel(&mbuf, "{s}", .{st.model}, 0) catch "?";
c.nk_label(ctx, mline.ptr, c.NK_TEXT_LEFT);
drawSeparatorCell(ctx);
var cbuf: [16]u8 = undefined;
- const cline = std.fmt.bufPrintZ(&cbuf, "{d:.1}MHz", .{st.cpu_mhz}) catch "?";
+ const cline = std.mem.printSentinel(&cbuf, "{d:.1}MHz", .{st.cpu_mhz}, 0) catch "?";
c.nk_label(ctx, cline.ptr, c.NK_TEXT_LEFT);
drawSeparatorCell(ctx);
@@ -500,7 +500,7 @@ fn drawStatusBar(ctx: *c.nk_context, win_w: u32, win_h: u32, st: State) void {
drawSeparatorCell(ctx);
var fbuf: [16]u8 = undefined;
- const fline = std.fmt.bufPrintZ(&fbuf, "{d:.1} FPS", .{st.fps}) catch "? FPS";
+ const fline = std.mem.printSentinel(&fbuf, "{d:.1} FPS", .{st.fps}, 0) catch "? FPS";
c.nk_label(ctx, fline.ptr, c.NK_TEXT_RIGHT);
}
c.nk_end(ctx);
@@ -716,7 +716,7 @@ fn drawAbout(ctx: *c.nk_context, win_w: u32, win_h: u32) void {
if (c.nk_group_begin(ctx, "about_text", c.NK_WINDOW_NO_SCROLLBAR) != 0) {
c.nk_layout_row_dynamic(ctx, 20, 1);
c.nk_label(ctx, "Usa Project", c.NK_TEXT_LEFT);
- c.nk_label(ctx, "Version: 1.0.1", c.NK_TEXT_LEFT);
+ c.nk_label(ctx, "Version: 1.0.2", c.NK_TEXT_LEFT);
c.nk_label(ctx, "Core: NP2kai 0.86", c.NK_TEXT_LEFT);
c.nk_group_end(ctx);
}
@@ -1024,7 +1024,7 @@ pub fn handleDrop() void {
const n = sapp.getNumDroppedFiles();
var i: i32 = 0;
while (i < n) : (i += 1) {
- const owned = disk_alloc.dupeZ(u8, sapp.getDroppedFilePath(i)) catch {
+ const owned = disk_alloc.dupeSentinel(u8, sapp.getDroppedFilePath(i), 0) catch {
std.debug.print("!! out of memory queueing dropped file\n", .{});
return;
};
@@ -1306,7 +1306,7 @@ fn drawRecentSelect(ctx: *c.nk_context, win_w: u32, win_h: u32) void {
const path = history.at(rs_kind, i);
const base = std.fs.path.basename(path);
var lbuf: [512]u8 = undefined;
- const label = std.fmt.bufPrintZ(&lbuf, "{s}", .{base}) catch continue;
+ const label = std.mem.printSentinel(&lbuf, "{s}", .{base}, 0) catch continue;
if (c.nk_button_label(ctx, label.ptr) != 0) chosen = path;
}
}
@@ -1403,7 +1403,7 @@ fn drawStateMsg(ctx: *c.nk_context, win_w: u32, win_h: u32) void {
var dismiss = false;
if (c.nk_begin(ctx, title, bounds, flags) != 0) {
var tbuf: [256]u8 = undefined;
- const msg = std.fmt.bufPrintZ(&tbuf, "{s}", .{ss_text_buf[0..ss_text_len]}) catch "?";
+ const msg = std.mem.printSentinel(&tbuf, "{s}", .{ss_text_buf[0..ss_text_len]}, 0) catch "?";
c.nk_layout_row_dynamic(ctx, 70, 1);
c.nk_label_wrap(ctx, msg.ptr);
@@ -1422,7 +1422,7 @@ fn drawStateMsg(ctx: *c.nk_context, win_w: u32, win_h: u32) void {
if (do_load) {
ss_on = false;
// Copy the held path into an owned slice for the pending slot.
- const p = disk_alloc.dupeZ(u8, ss_pending_path[0..ss_pending_path_len]) catch {
+ const p = disk_alloc.dupeSentinel(u8, ss_pending_path[0..ss_pending_path_len], 0) catch {
ss_showError("Out of memory.");
return;
};
diff --git a/src/ui_dialog.zig b/src/ui_dialog.zig
index 205532f..00c03f8 100644
--- a/src/ui_dialog.zig
+++ b/src/ui_dialog.zig
@@ -157,8 +157,9 @@ const model_names = [_][*:0]const u8{ "VM", "VX", "PC286" };
const snd_board_vals = [_]u8{ 0x00, 0x02, 0x04, 0x06, 0x14, 0x08, 0x80 };
const snd_board_labels = [_][*:0]const u8{
- "Disable", "PC-9801-26K", "PC-9801-86",
- "26K + 86", "86 + Chibi-oto", "PC-9801-118", "AMD-98",
+ "Disable", "PC-9801-26K", "PC-9801-86",
+ "26K + 86", "86 + Chibi-oto", "PC-9801-118",
+ "AMD-98",
};
const mem_vals = [_]u16{ 0, 1, 3, 7, 13, 16, 32, 64, 128 };
const mem_labels_arr = [_][*:0]const u8{ "640KB", "1.6MB", "3.6MB", "7.6MB", "13.6MB", "16.6MB", "32.6MB", "64.6MB", "128.6MB" };
@@ -255,10 +256,12 @@ fn drawSystemTab(ctx: *c.nk_context, cfg: anytype) void {
c.nk_layout_row_push(ctx, 180);
var mul_idx: usize = 0;
for (multipliers, 0..) |m, i| {
- if (cfg.multiple == m) { mul_idx = i; break; }
+ if (cfg.multiple == m) {
+ mul_idx = i;
+ break;
+ }
}
- const new_mul: usize = @intCast(c.nk_combo(ctx, &multipliers_labels,
- multipliers_labels.len, @intCast(mul_idx), 22, c.nk_vec2(180, 200)));
+ const new_mul: usize = @intCast(c.nk_combo(ctx, &multipliers_labels, multipliers_labels.len, @intCast(mul_idx), 22, c.nk_vec2(180, 200)));
cfg.multiple = multipliers[new_mul];
c.nk_layout_row_end(ctx);
c.nk_group_end(ctx);
@@ -279,11 +282,16 @@ fn drawSystemTab(ctx: *c.nk_context, cfg: anytype) void {
c.nk_layout_row_dynamic(ctx, 22, 1);
var mem_idx: usize = 1;
for (mem_vals, 0..) |v, i| {
- if (cfg.EXTMEM == v) { mem_idx = i; break; }
- if (v > cfg.EXTMEM) { mem_idx = if (i > 0) i - 1 else 0; break; }
+ if (cfg.EXTMEM == v) {
+ mem_idx = i;
+ break;
+ }
+ if (v > cfg.EXTMEM) {
+ mem_idx = if (i > 0) i - 1 else 0;
+ break;
+ }
}
- const new_mem: usize = @intCast(c.nk_combo(ctx, &mem_labels_arr,
- mem_labels_arr.len, @intCast(mem_idx), 22, c.nk_vec2(200, 200)));
+ const new_mem: usize = @intCast(c.nk_combo(ctx, &mem_labels_arr, mem_labels_arr.len, @intCast(mem_idx), 22, c.nk_vec2(200, 200)));
cfg.EXTMEM = mem_vals[new_mem];
c.nk_group_end(ctx);
}
@@ -309,7 +317,7 @@ fn drawSystemTab(ctx: *c.nk_context, cfg: anytype) void {
input.setSensitivity(@intFromFloat(s_f));
c.nk_layout_row_push(ctx, 45);
var sbuf: [8:0]u8 = undefined;
- const sstr = std.fmt.bufPrintZ(&sbuf, "{d}%", .{input.getSensitivity()}) catch "?";
+ const sstr = std.mem.printSentinel(&sbuf, "{d}%", .{input.getSensitivity()}, 0) catch "?";
c.nk_label(ctx, sstr.ptr, c.NK_TEXT_RIGHT);
c.nk_layout_row_end(ctx);
c.nk_group_end(ctx);
@@ -336,8 +344,7 @@ fn drawScreenTab(ctx: *c.nk_context, cfg: anytype) void {
c.nk_label(ctx, "Frame skip:", c.NK_TEXT_LEFT);
c.nk_layout_row_push(ctx, 160);
const cur_skip: usize = @intCast(cz.usa_get_draw_skip());
- const new_skip: usize = @intCast(c.nk_combo(ctx, &skip_labels,
- skip_labels.len, @intCast(cur_skip), 22, c.nk_vec2(160, 150)));
+ const new_skip: usize = @intCast(c.nk_combo(ctx, &skip_labels, skip_labels.len, @intCast(cur_skip), 22, c.nk_vec2(160, 150)));
if (new_skip != cur_skip) cz.usa_set_draw_skip(@intCast(new_skip));
c.nk_layout_row_end(ctx);
c.nk_group_end(ctx);
@@ -368,9 +375,7 @@ fn drawScreenTab(ctx: *c.nk_context, cfg: anytype) void {
const gc_color16 = [_]u8{ 0, 0, 1, 2 };
var gc_idx: usize = 0;
if (cfg.grcg != 0) {
- if (cfg.color16 == 0) gc_idx = 1
- else if (cfg.color16 == 1) gc_idx = 2
- else gc_idx = 3;
+ if (cfg.color16 == 0) gc_idx = 1 else if (cfg.color16 == 1) gc_idx = 2 else gc_idx = 3;
}
for (gc_labels, 0..) |lbl, i| {
const was: c_int = if (gc_idx == i) 1 else 0;
@@ -437,10 +442,12 @@ fn drawSoundTab(ctx: *c.nk_context, cfg: anytype) void {
c.nk_layout_row_push(ctx, 190);
var snd_idx: usize = 0;
for (snd_board_vals, 0..) |v, i| {
- if (cfg.SOUND_SW == v) { snd_idx = i; break; }
+ if (cfg.SOUND_SW == v) {
+ snd_idx = i;
+ break;
+ }
}
- const new_snd: usize = @intCast(c.nk_combo(ctx, &snd_board_labels,
- snd_board_labels.len, @intCast(snd_idx), 22, c.nk_vec2(190, 170)));
+ const new_snd: usize = @intCast(c.nk_combo(ctx, &snd_board_labels, snd_board_labels.len, @intCast(snd_idx), 22, c.nk_vec2(190, 170)));
cfg.SOUND_SW = snd_board_vals[new_snd];
c.nk_layout_row_end(ctx);
@@ -453,7 +460,7 @@ fn drawSoundTab(ctx: *c.nk_context, cfg: anytype) void {
cfg.delayms = @intFromFloat(delay_f);
c.nk_layout_row_push(ctx, 35);
var delay_buf: [8:0]u8 = undefined;
- const delay_str = std.fmt.bufPrintZ(&delay_buf, "{d}", .{cfg.delayms}) catch "?";
+ const delay_str = std.mem.printSentinel(&delay_buf, "{d}", .{cfg.delayms}, 0) catch "?";
c.nk_label(ctx, delay_str.ptr, c.NK_TEXT_RIGHT);
c.nk_layout_row_end(ctx);
c.nk_group_end(ctx);
@@ -465,8 +472,7 @@ fn drawSoundTab(ctx: *c.nk_context, cfg: anytype) void {
c.nk_label(ctx, "Beep volume:", c.NK_TEXT_LEFT);
c.nk_layout_row_push(ctx, 120);
const cur_beep: usize = @intCast(cfg.BEEP_VOL);
- const new_beep: usize = @intCast(c.nk_combo(ctx, &beep_labels,
- beep_labels.len, @intCast(cur_beep), 22, c.nk_vec2(120, 130)));
+ const new_beep: usize = @intCast(c.nk_combo(ctx, &beep_labels, beep_labels.len, @intCast(cur_beep), 22, c.nk_vec2(120, 130)));
if (new_beep != cur_beep) cz.usa_beep_setvol(@intCast(new_beep));
c.nk_layout_row_end(ctx);
@@ -504,7 +510,7 @@ fn drawSoundTab(ctx: *c.nk_context, cfg: anytype) void {
}
c.nk_layout_row_push(ctx, 35);
var vbuf: [8:0]u8 = undefined;
- const vstr = std.fmt.bufPrintZ(&vbuf, "{d}", .{entry.val.*}) catch "?";
+ const vstr = std.mem.printSentinel(&vbuf, "{d}", .{entry.val.*}, 0) catch "?";
c.nk_label(ctx, vstr.ptr, c.NK_TEXT_RIGHT);
c.nk_layout_row_end(ctx);
}
diff --git a/third_party/nuklear/nuklear.h b/third_party/nuklear/nuklear.h
index 727b838..f191219 100644
--- a/third_party/nuklear/nuklear.h
+++ b/third_party/nuklear/nuklear.h
@@ -439,6 +439,7 @@ struct nk_panel;
struct nk_context;
struct nk_draw_vertex_layout_element;
struct nk_style_button;
+struct nk_style_link;
struct nk_style_toggle;
struct nk_style_selectable;
struct nk_style_slide;
@@ -472,6 +473,11 @@ NK_STATIC_ASSERT(!((nk_bool)1) == !(nk_true));
enum nk_heading {NK_UP, NK_RIGHT, NK_DOWN, NK_LEFT};
enum nk_button_behavior {NK_BUTTON_DEFAULT, NK_BUTTON_REPEATER};
+enum nk_link_underline {
+ NK_LINK_UNDERLINE_NONE,
+ NK_LINK_UNDERLINE_HOVER,
+ NK_LINK_UNDERLINE_ALWAYS
+};
enum nk_modify {NK_FIXED = nk_false, NK_MODIFIABLE = nk_true};
enum nk_orientation {NK_VERTICAL, NK_HORIZONTAL};
enum nk_collapse_states {NK_MINIMIZED = nk_false, NK_MAXIMIZED = nk_true};
@@ -526,6 +532,11 @@ enum nk_symbol_type {
NK_SYMBOL_TRIANGLE_DOWN_OUTLINE,
NK_SYMBOL_TRIANGLE_LEFT_OUTLINE,
NK_SYMBOL_TRIANGLE_RIGHT_OUTLINE,
+ NK_SYMBOL_CHEVRON_UP,
+ NK_SYMBOL_CHEVRON_RIGHT,
+ NK_SYMBOL_CHEVRON_DOWN,
+ NK_SYMBOL_CHEVRON_LEFT,
+ NK_SYMBOL_HAMBURGER, /** Three horizontal lines. */
NK_SYMBOL_MAX
};
/* =============================================================================
@@ -3369,6 +3380,23 @@ NK_API void nk_value_color_byte(struct nk_context*, const char *prefix, struct n
NK_API void nk_value_color_float(struct nk_context*, const char *prefix, struct nk_color);
NK_API void nk_value_color_hex(struct nk_context*, const char *prefix, struct nk_color);
#endif
+/* =============================================================================
+ *
+ * LINK
+ *
+ * ============================================================================= */
+NK_API nk_bool nk_link_text(struct nk_context*, const char *title, int len, nk_flags align);
+NK_API nk_bool nk_link_label(struct nk_context*, const char *title, nk_flags align);
+NK_API nk_bool nk_link_text_styled(struct nk_context*, const struct nk_style_link*, const char *title, int len, nk_flags align);
+NK_API nk_bool nk_link_label_styled(struct nk_context*, const struct nk_style_link*, const char *title, nk_flags align);
+NK_API nk_bool nk_link_text_underline(struct nk_context*, const char *title, int len, nk_flags align, enum nk_link_underline);
+NK_API nk_bool nk_link_label_underline(struct nk_context*, const char *title, nk_flags align, enum nk_link_underline);
+NK_API nk_bool nk_link_text_hover_underline(struct nk_context*, const char *title, int len, nk_flags align);
+NK_API nk_bool nk_link_label_hover_underline(struct nk_context*, const char *title, nk_flags align);
+NK_API nk_bool nk_link_text_no_underline(struct nk_context*, const char *title, int len, nk_flags align);
+NK_API nk_bool nk_link_label_no_underline(struct nk_context*, const char *title, nk_flags align);
+NK_API nk_bool nk_link_text_colored(struct nk_context*, const char *title, int len, nk_flags align, struct nk_color);
+NK_API nk_bool nk_link_label_colored(struct nk_context*, const char *title, nk_flags align, struct nk_color);
/* =============================================================================
*
* BUTTON
@@ -3810,6 +3838,9 @@ NK_API void nk_contextual_end(struct nk_context*);
* ============================================================================= */
NK_API void nk_tooltip(struct nk_context*, const char*);
NK_API void nk_tooltip_offset(struct nk_context *ctx, const char *text, enum nk_tooltip_pos position, struct nk_vec2 offset);
+NK_API void nk_do_tooltip(struct nk_context*, const char*, struct nk_rect);
+NK_API void nk_do_tooltip_delay(struct nk_context*, const char*, struct nk_rect, float*);
+NK_API void nk_do_tooltip_delay_clicked(struct nk_context*, const char*, struct nk_rect, float* timer, nk_bool*);
#ifdef NK_INCLUDE_STANDARD_VARARGS
NK_API void nk_tooltipf(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(2);
NK_API void nk_tooltipfv(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(2);
@@ -4935,6 +4966,10 @@ NK_API nk_bool nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, en
NK_API nk_bool nk_input_any_mouse_click_in_rect(const struct nk_input*, struct nk_rect);
NK_API nk_bool nk_input_is_mouse_prev_hovering_rect(const struct nk_input*, struct nk_rect);
NK_API nk_bool nk_input_is_mouse_hovering_rect(const struct nk_input*, struct nk_rect);
+NK_API nk_bool nk_input_is_mouse_hovering_still_rect(const struct nk_input*, struct nk_rect);
+NK_API nk_bool nk_input_is_mouse_hovering_delay_rect(const struct nk_context*, struct nk_rect, float*, float);
+NK_API nk_bool nk_input_is_mouse_hovering_still_delay_rect(const struct nk_context*, struct nk_rect, float*, float);
+NK_API nk_bool nk_input_is_mouse_hovering_still_delay_clicked_rect(const struct nk_context*, struct nk_rect, float*, float, nk_bool*);
NK_API nk_bool nk_input_is_mouse_moved(const struct nk_input*);
NK_API nk_bool nk_input_mouse_clicked(const struct nk_input*, enum nk_buttons, struct nk_rect);
NK_API nk_bool nk_input_is_mouse_down(const struct nk_input*, enum nk_buttons);
@@ -5125,6 +5160,18 @@ struct nk_style_text {
float disabled_factor;
};
+struct nk_style_link {
+ struct nk_color text_normal;
+ struct nk_color text_hover;
+ struct nk_color text_active;
+ enum nk_link_underline underline;
+ float underline_thickness;
+ struct nk_vec2 padding;
+ struct nk_vec2 touch_padding;
+ float color_factor;
+ float disabled_factor;
+};
+
struct nk_style_button {
/* background */
struct nk_style_item normal;
@@ -5570,6 +5617,7 @@ struct nk_style_window {
enum nk_tooltip_pos tooltip_origin;
struct nk_vec2 tooltip_offset;
+ float tooltip_delay;
};
struct nk_style {
@@ -5580,6 +5628,7 @@ struct nk_style {
int cursor_visible;
struct nk_style_text text;
+ struct nk_style_link link;
struct nk_style_button button;
struct nk_style_button contextual_button;
struct nk_style_button menu_button;
@@ -5982,7 +6031,10 @@ struct nk_context {
#define NK_PI 3.141592654f
#define NK_PI_HALF 1.570796326f
#define NK_UTF_INVALID 0xFFFD
+/* Digits after decimal for nk_property_float/double display. Overridable before include. */
+#ifndef NK_MAX_FLOAT_PRECISION
#define NK_MAX_FLOAT_PRECISION 2
+#endif
#define NK_UNUSED(x) ((void)(x))
#define NK_SATURATE(x) (NK_MAX(0, NK_MIN(1.0f, x)))
@@ -6318,6 +6370,10 @@ struct nk_text {
NK_LIB void nk_widget_text(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, nk_flags a, const struct nk_user_font *f);
NK_LIB void nk_widget_text_wrap(struct nk_command_buffer *o, struct nk_rect b, const char *string, int len, const struct nk_text *t, const struct nk_user_font *f);
+/* link */
+NK_LIB void nk_draw_link(struct nk_command_buffer *out, const struct nk_rect *bounds, nk_flags state, const struct nk_style_link *style, const char *str, int len, nk_flags align, const struct nk_user_font *font, struct nk_color background);
+NK_LIB nk_bool nk_do_link(nk_flags *state, struct nk_command_buffer *out, struct nk_rect bounds, const char *str, int len, nk_flags align, const struct nk_style_link *style, const struct nk_input *in, const struct nk_user_font *font, struct nk_color background);
+
/* button */
NK_LIB nk_bool nk_button_behavior(nk_flags *state, struct nk_rect r, const struct nk_input *i, enum nk_button_behavior behavior);
NK_LIB const struct nk_style_item* nk_draw_button(struct nk_command_buffer *out, const struct nk_rect *bounds, nk_flags state, const struct nk_style_button *style);
@@ -6461,34 +6517,34 @@ nk_stbtt_free(void *ptr, void *user_data) {
* MATH
*
* ===============================================================*/
-/*/// ### Math
-/// Since nuklear is supposed to work on all systems providing floating point
-/// math without any dependencies I also had to implement my own math functions
-/// for sqrt, sin and cos. Since the actual highly accurate implementations for
-/// the standard library functions are quite complex and I do not need high
-/// precision for my use cases I use approximations.
-///
-/// Sqrt
-/// ----
-/// For square root nuklear uses the famous fast inverse square root:
-/// https://en.wikipedia.org/wiki/Fast_inverse_square_root with
-/// slightly tweaked magic constant. While on today's hardware it is
-/// probably not faster it is still fast and accurate enough for
-/// nuklear's use cases. IMPORTANT: this requires float format IEEE 754
-///
-/// Sine/Cosine
-/// -----------
-/// All constants inside both function are generated Remez's minimax
-/// approximations for value range 0...2*PI. The reason why I decided to
-/// approximate exactly that range is that nuklear only needs sine and
-/// cosine to generate circles which only requires that exact range.
-/// In addition I used Remez instead of Taylor for additional precision:
-/// www.lolengine.net/blog/2011/12/21/better-function-approximations.
-///
-/// The tool I used to generate constants for both sine and cosine
-/// (it can actually approximate a lot more functions) can be
-/// found here: www.lolengine.net/wiki/oss/lolremez
-*/
+/**
+ * \page Math
+ * Since nuklear is supposed to work on all systems providing floating point
+ * math without any dependencies I also had to implement my own math functions
+ * for sqrt, sin and cos. Since the actual highly accurate implementations for
+ * the standard library functions are quite complex and I do not need high
+ * precision for my use cases I use approximations.
+ *
+ * # Sqrt
+ * For square root nuklear uses the famous fast inverse square root:
+ * https://en.wikipedia.org/wiki/Fast_inverse_square_root with
+ * slightly tweaked magic constant. While on today's hardware it is
+ * probably not faster it is still fast and accurate enough for
+ * nuklear's use cases. IMPORTANT: this requires float format IEEE 754
+ *
+ * # Sine/Cosine
+ * All constants inside both function are generated Remez's minimax
+ * approximations for value range 0...2*PI. The reason why I decided to
+ * approximate exactly that range is that nuklear only needs sine and
+ * cosine to generate circles which only requires that exact range.
+ * In addition I used Remez instead of Taylor for additional precision:
+ * https://web.archive.org/web/20220629122951/www.lolengine.net/blog/2011/12/21/better-function-approximations
+ *
+ * The tool I used to generate constants for both sine and cosine
+ * (it can actually approximate a lot more functions) can be found here:
+ * https://github.com/samhocevar/lolremez
+ * https://web.archive.org/web/20160306205304/www.lolengine.net/wiki/oss/lolremez
+ */
#ifdef NK_INV_SQRT_NEEDED
NK_LIB float
nk_inv_sqrt(float n)
@@ -7731,7 +7787,10 @@ nk_strfmt(char *buf, int buf_size, const char *fmt, va_list args)
NK_API nk_hash
nk_murmur_hash(const void * key, int len, nk_hash seed)
{
- /* 32-Bit MurmurHash3: https://code.google.com/p/smhasher/wiki/MurmurHash3*/
+ /* 32-Bit MurmurHash3: https://github.com/aappleby/smhasher
+ * https://github.com/aappleby/smhasher/blob/07bb4de10a63e8cc2e1724865454eba635742383/src/MurmurHash3.cpp#L94-L146
+ * https://web.archive.org/web/20150906085947/https://code.google.com/p/smhasher/wiki/MurmurHash3 */
+
#define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r)))
nk_uint h1 = seed;
@@ -17700,7 +17759,7 @@ nk_font_config(float pixel_height)
cfg.ttf_size = 0;
cfg.ttf_data_owned_by_atlas = 0;
cfg.size = pixel_height;
- cfg.oversample_h = 3;
+ cfg.oversample_h = 1;
cfg.oversample_v = 1;
cfg.pixel_snap = 0;
cfg.coord_type = NK_COORD_UV;
@@ -18008,9 +18067,21 @@ nk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,
#ifdef NK_INCLUDE_DEFAULT_FONT
/* no font added so just use default font */
- if (!atlas->font_num)
- atlas->default_font = nk_font_atlas_add_default(atlas, 13.0f, 0);
+ /* FIXME(sleeptightAnsiC): This "fallback" exists for compatibility
+ * with code that creates empty atlas and immediately bakes it.
+ * Several demos do this, but it doesn't make sense for API to allow it.
+ * It was never documented anywhere and it's more of a hack than feature.
+ * App/backend should call nk_font_atlas_add_default() on it's own
+ * with whatever config it wants, and treat it like any other font.
+ * Worth to consider this for removal during next major release... */
+ if (!atlas->font_num) {
+ struct nk_font_config config;
+ config = nk_font_config(0);
+ config.oversample_h = 3;
+ atlas->default_font = nk_font_atlas_add_default(atlas, 13.0f, &config);
+ }
#endif
+
NK_ASSERT(atlas->font_num);
if (!atlas->font_num) return 0;
@@ -18425,6 +18496,139 @@ nk_input_is_mouse_hovering_rect(const struct nk_input *i, struct nk_rect rect)
if (!i) return nk_false;
return NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h);
}
+
+/**
+ * # nk_input_is_mouse_hovering_still_rect
+ * Returns true if the mouse is hovering over rect and hasn't moved since the last
+ * frame, false otherwise.
+ */
+NK_API nk_bool
+nk_input_is_mouse_hovering_still_rect(const struct nk_input *i, struct nk_rect rect)
+{
+ if (!i) return nk_false;
+ return (NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h) &&
+ !nk_input_is_mouse_moved(i));
+}
+
+/**
+ * # nk_input_is_mouse_hovering_delay_rect
+ * Returns true if the mouse has been hovering over rect for `delay` seconds or more.
+ *
+ * Parameter | Description
+ * ------------|---------------------------------------------------------------
+ * \param[in] ctx | Must point to an either stack or heap allocated `nk_context` struct
+ * \param[in] rect | The rect area you're checking against
+ * \param[in|out] timer | Must point to a float used to track the total seconds hovered across frames
+ * \param[in] delay | The wait time in seconds
+ *
+ * \returns `true` if the the mouse has hovered long enough, `false otherwise`
+ */
+NK_API nk_bool
+nk_input_is_mouse_hovering_delay_rect(const struct nk_context *ctx, struct nk_rect rect, float* timer, float delay)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) {
+ return nk_false;
+ } else {
+ const struct nk_input* i = &ctx->input;
+ if (NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h)) {
+ *timer += ctx->delta_time_seconds;
+ return *timer >= delay;
+ } else if (NK_INBOX(i->mouse.prev.x, i->mouse.prev.y, rect.x, rect.y, rect.w, rect.h)) {
+ *timer = 0;
+ }
+ return nk_false;
+ }
+
+}
+
+/**
+ * # nk_input_is_mouse_hovering_still_delay_rect
+ * Returns true if the mouse has been hovering motionless over rect for `delay` seconds or more. The timer
+ * does not reset once the delay is reached as long as you are still hovering over the rect.
+ *
+ * Parameter | Description
+ * ------------|---------------------------------------------------------------
+ * \param[in] ctx | Must point to an either stack or heap allocated `nk_context` struct
+ * \param[in] rect | The rect area you're checking against
+ * \param[in|out] timer | Must point to a float used to track the total seconds hovered across frames
+ * \param[in] delay | The wait time in seconds
+ *
+ * \returns `true` if the the mouse has hovered without moving long enough, `false otherwise`
+ */
+NK_API nk_bool
+nk_input_is_mouse_hovering_still_delay_rect(const struct nk_context *ctx, struct nk_rect rect, float* timer, float delay)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) {
+ return nk_false;
+ } else {
+ const struct nk_input* i = &ctx->input;
+ if (NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h)) {
+ /* once it triggers, moving within the bounds should not make it disappear */
+ if (*timer >= delay) {
+ return nk_true;
+ }
+ if (!nk_input_is_mouse_moved(i)) {
+ *timer += ctx->delta_time_seconds;
+ return *timer >= delay;
+ }
+ *timer = 0;
+ } else if (NK_INBOX(i->mouse.prev.x, i->mouse.prev.y, rect.x, rect.y, rect.w, rect.h)) {
+ *timer = 0;
+ }
+ return nk_false;
+ }
+}
+
+/**
+ * # nk_input_is_mouse_hovering_still_delay_clicked_rect
+ * Works the same as `nk_input_is_mouse_hovering_still_delay_rect` unless clicked is set. If clicked is true,
+ * then it returns false regardless of the timer value as long as the mouse is motionless. It goes back to working
+ * as normal once the mouse has moved (clicked is set to false, timer to 0).
+ *
+ * Parameter | Description
+ * ------------|---------------------------------------------------------------
+ * \param[in] ctx | Must point to an either stack or heap allocated `nk_context` struct
+ * \param[in] rect | The rect area you're checking against
+ * \param[in|out] timer | Must point to a float used to track the total seconds hovered across frames
+ * \param[in] delay | The wait time in seconds
+ * \param[in|out] clicked | Must point to an nk_bool used to indicate whether the item in question has been clicked (reset to false internally on mouse motion)
+ *
+ * \returns `true` if the the mouse has hovered without moving long enough, `false otherwise`
+ */
+NK_API nk_bool
+nk_input_is_mouse_hovering_still_delay_clicked_rect(const struct nk_context *ctx, struct nk_rect rect, float* timer, float delay, nk_bool* clicked)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) {
+ return nk_false;
+ } else {
+ const struct nk_input* i = &ctx->input;
+ if (*clicked) {
+ /* could also be based on maintaining hover rather than motionless once clicked */
+ if (!nk_input_is_mouse_moved(i)) {
+ return nk_false;
+ }
+ *clicked = nk_false;
+ *timer = 0;
+ }
+ if (NK_INBOX(i->mouse.pos.x, i->mouse.pos.y, rect.x, rect.y, rect.w, rect.h)) {
+ /* once it triggers, moving within the bounds should not make it disappear */
+ if (*timer >= delay) {
+ return nk_true;
+ }
+ if (!nk_input_is_mouse_moved(i)) {
+ *timer += ctx->delta_time_seconds;
+ return *timer >= delay;
+ }
+ *timer = 0;
+ } else if (NK_INBOX(i->mouse.prev.x, i->mouse.prev.y, rect.x, rect.y, rect.w, rect.h)) {
+ *timer = 0;
+ }
+ return nk_false;
+ }
+}
NK_API nk_bool
nk_input_is_mouse_prev_hovering_rect(const struct nk_input *i, struct nk_rect rect)
{
@@ -18594,6 +18798,7 @@ nk_style_from_table(struct nk_context *ctx, const struct nk_color *table)
{
struct nk_style *style;
struct nk_style_text *text;
+ struct nk_style_link *link;
struct nk_style_button *button;
struct nk_style_toggle *toggle;
struct nk_style_selectable *select;
@@ -18620,6 +18825,19 @@ nk_style_from_table(struct nk_context *ctx, const struct nk_color *table)
text->color_factor = 1.0f;
text->disabled_factor = NK_WIDGET_DISABLED_FACTOR;
+ /* default link */
+ link = &style->link;
+ nk_zero_struct(*link);
+ link->text_normal = table[NK_COLOR_TEXT];
+ link->text_hover = table[NK_COLOR_TEXT];
+ link->text_active = table[NK_COLOR_TEXT];
+ link->underline = NK_LINK_UNDERLINE_ALWAYS;
+ link->underline_thickness = 1.0f;
+ link->padding = nk_vec2(0,0);
+ link->touch_padding = nk_vec2(0,0);
+ link->color_factor = 1.0f;
+ link->disabled_factor = NK_WIDGET_DISABLED_FACTOR;
+
/* default button */
button = &style->button;
nk_zero_struct(*button);
@@ -19221,13 +19439,14 @@ nk_style_from_table(struct nk_context *ctx, const struct nk_color *table)
win->tooltip_padding = nk_vec2(4,4);
/* default tooltip just down and to the right of the cursor
- * so it doesn't cover the text
+ * so it doesn't cover the text and a default delay of 0.5 seconds
*
* TODO might be worth consolidating tooltip styling
* into its own style structure, though it is a
* type of window...*/
win->tooltip_origin = NK_TOP_LEFT;
win->tooltip_offset = nk_vec2(12, 12);
+ win->tooltip_delay = 0.5f;
}
NK_API void
nk_style_set_font(struct nk_context *ctx, const struct nk_user_font *font)
@@ -21391,6 +21610,7 @@ nk_nonblock_begin(struct nk_context *ctx,
root->flags |= NK_WINDOW_REMOVE_ROM;
root = root->parent;
}
+ win->popup.buf.active = 0;
return is_active;
}
popup->bounds = body;
@@ -23077,10 +23297,10 @@ nk_tree_element_image_push_hashed_base(struct nk_context *ctx, enum nk_tree_type
/* draw label */
{nk_flags dummy = 0;
struct nk_rect label;
- /* calculate size of the text and tooltip */
+ /* selectable insets by padding on both sides */
text_len = nk_strlen(title);
text_width = style->font->width(style->font->userdata, style->font->height, title, text_len);
- text_width += (4 * padding.x);
+ text_width += 2 * padding.x;
header.w = NK_MAX(header.w, sym.w + item_spacing.x);
label.x = sym.x + sym.w + item_spacing.x;
@@ -23764,6 +23984,7 @@ nk_widget_disable_begin(struct nk_context* ctx)
style->tab.tab_minimize_button.color_factor_text = style->tab.tab_minimize_button.disabled_factor;
style->tab.tab_minimize_button.color_factor_background = style->tab.tab_minimize_button.disabled_factor;
style->text.color_factor = style->text.disabled_factor;
+ style->link.color_factor = style->link.disabled_factor;
}
NK_API void
nk_widget_disable_end(struct nk_context* ctx)
@@ -23827,6 +24048,7 @@ nk_widget_disable_end(struct nk_context* ctx)
style->tab.tab_minimize_button.color_factor_text = 1.0f;
style->tab.tab_minimize_button.color_factor_background = 1.0f;
style->text.color_factor = 1.0f;
+ style->link.color_factor = 1.0f;
}
@@ -24132,6 +24354,260 @@ nk_label_colored_wrap(struct nk_context *ctx, const char *str, struct nk_color c
+/* ===============================================================
+ *
+ * LINK
+ *
+ * ===============================================================*/
+NK_INTERN void
+nk_link_text_bounds(struct nk_rect bounds, const char *string, int len,
+ struct nk_vec2 padding, nk_flags align, const struct nk_user_font *font,
+ struct nk_rect *out_label, float *out_glyph_width)
+{
+ struct nk_rect label;
+ float glyph_width;
+ float text_width;
+ nk_flags a = align;
+
+ NK_ASSERT(out_label);
+ NK_ASSERT(out_glyph_width);
+ NK_ASSERT(font);
+ if (!out_label || !out_glyph_width || !font) return;
+
+ bounds.h = NK_MAX(bounds.h, 2 * padding.y);
+ glyph_width = font->width(font->userdata, font->height, string, len);
+ text_width = glyph_width + (2.0f * padding.x);
+
+ if (!(a & (NK_TEXT_ALIGN_LEFT | NK_TEXT_ALIGN_CENTERED | NK_TEXT_ALIGN_RIGHT)))
+ a |= NK_TEXT_ALIGN_LEFT;
+ if (!(a & (NK_TEXT_ALIGN_TOP | NK_TEXT_ALIGN_MIDDLE | NK_TEXT_ALIGN_BOTTOM)))
+ a |= NK_TEXT_ALIGN_TOP;
+
+ if (a & NK_TEXT_ALIGN_LEFT) {
+ label.x = bounds.x + padding.x;
+ label.w = NK_MAX(0, bounds.w - 2 * padding.x);
+ } else if (a & NK_TEXT_ALIGN_CENTERED) {
+ label.w = NK_MAX(1, 2 * padding.x + (float)text_width);
+ label.x = (bounds.x + padding.x + ((bounds.w - 2 * padding.x) - label.w) / 2);
+ label.x = NK_MAX(bounds.x + padding.x, label.x);
+ label.w = NK_MIN(bounds.x + bounds.w, label.x + label.w);
+ if (label.w >= label.x) label.w -= label.x;
+ } else {
+ label.x = NK_MAX(bounds.x + padding.x, (bounds.x + bounds.w) - (2 * padding.x + (float)text_width));
+ label.w = (float)text_width + 2 * padding.x;
+ }
+
+ if (a & NK_TEXT_ALIGN_TOP) {
+ label.y = bounds.y + padding.y;
+ label.h = NK_MIN(font->height, bounds.h - 2 * padding.y);
+ } else if (a & NK_TEXT_ALIGN_MIDDLE) {
+ label.y = bounds.y + bounds.h/2.0f - (float)font->height/2.0f;
+ label.h = NK_MAX(bounds.h/2.0f, bounds.h - (bounds.h/2.0f + font->height/2.0f));
+ } else {
+ label.y = bounds.y + bounds.h - font->height;
+ label.h = font->height;
+ }
+
+ *out_label = label;
+ *out_glyph_width = glyph_width;
+}
+NK_LIB void
+nk_draw_link(struct nk_command_buffer *out, const struct nk_rect *bounds,
+ nk_flags state, const struct nk_style_link *style, const char *str, int len,
+ nk_flags align, const struct nk_user_font *font, struct nk_color background)
+{
+ struct nk_text text;
+ struct nk_rect label;
+ struct nk_color color;
+ float glyph_width;
+ nk_bool draw_underline = nk_false;
+
+ NK_ASSERT(out);
+ NK_ASSERT(bounds);
+ NK_ASSERT(style);
+ NK_ASSERT(font);
+ if (!out || !bounds || !style || !font || !str)
+ return;
+
+ if (state & NK_WIDGET_STATE_HOVER)
+ color = style->text_hover;
+ else if (state & NK_WIDGET_STATE_ACTIVED)
+ color = style->text_active;
+ else color = style->text_normal;
+ color = nk_rgb_factor(color, style->color_factor);
+
+ text.padding = style->padding;
+ text.background = background;
+ text.text = color;
+ nk_widget_text(out, *bounds, str, len, &text, align, font);
+
+ if (style->underline == NK_LINK_UNDERLINE_ALWAYS)
+ draw_underline = nk_true;
+ else if (style->underline == NK_LINK_UNDERLINE_HOVER &&
+ (state & (NK_WIDGET_STATE_HOVER|NK_WIDGET_STATE_ACTIVED)))
+ draw_underline = nk_true;
+
+ if (!draw_underline || style->underline_thickness <= 0)
+ return;
+
+ nk_link_text_bounds(*bounds, str, len, style->padding, align, font, &label, &glyph_width);
+ {
+ float x0 = label.x;
+ float x1 = label.x + NK_MIN(glyph_width, label.w);
+ float y = label.y + font->height - style->underline_thickness;
+ if (x1 > x0)
+ nk_stroke_line(out, x0, y, x1, y, style->underline_thickness, color);
+ }
+}
+NK_LIB nk_bool
+nk_do_link(nk_flags *state, struct nk_command_buffer *out,
+ struct nk_rect bounds, const char *str, int len, nk_flags align,
+ const struct nk_style_link *style, const struct nk_input *in,
+ const struct nk_user_font *font, struct nk_color background)
+{
+ struct nk_rect label;
+ struct nk_rect touch;
+ float glyph_width;
+ nk_bool ret;
+
+ NK_ASSERT(state);
+ NK_ASSERT(style);
+ NK_ASSERT(out);
+ NK_ASSERT(str);
+ NK_ASSERT(font);
+ if (!out || !style || !font || !str || !state)
+ return nk_false;
+
+ nk_link_text_bounds(bounds, str, len, style->padding, align, font, &label, &glyph_width);
+ touch.x = label.x - style->touch_padding.x;
+ touch.y = label.y - style->touch_padding.y;
+ touch.w = NK_MIN(glyph_width, label.w) + 2 * style->touch_padding.x;
+ touch.h = font->height + 2 * style->touch_padding.y;
+ if (touch.x < bounds.x) {
+ touch.w -= (bounds.x - touch.x);
+ touch.x = bounds.x;
+ }
+ if (touch.y < bounds.y) {
+ touch.h -= (bounds.y - touch.y);
+ touch.y = bounds.y;
+ }
+ if (touch.x + touch.w > bounds.x + bounds.w)
+ touch.w = NK_MAX(0, bounds.x + bounds.w - touch.x);
+ if (touch.y + touch.h > bounds.y + bounds.h)
+ touch.h = NK_MAX(0, bounds.y + bounds.h - touch.y);
+
+ ret = nk_button_behavior(state, touch, in, NK_BUTTON_DEFAULT);
+ nk_draw_link(out, &bounds, *state, style, str, len, align, font, background);
+ return ret;
+}
+NK_API nk_bool
+nk_link_text_styled(struct nk_context *ctx, const struct nk_style_link *style,
+ const char *title, int len, nk_flags align)
+{
+ struct nk_window *win;
+ struct nk_panel *layout;
+ const struct nk_input *in;
+ struct nk_rect bounds;
+ enum nk_widget_layout_states state;
+
+ NK_ASSERT(ctx);
+ NK_ASSERT(style);
+ NK_ASSERT(ctx->current);
+ NK_ASSERT(ctx->current->layout);
+ if (!style || !ctx || !ctx->current || !ctx->current->layout) return 0;
+
+ win = ctx->current;
+ layout = win->layout;
+ state = nk_widget(&bounds, ctx);
+
+ if (!state) return 0;
+ in = (state == NK_WIDGET_ROM || state == NK_WIDGET_DISABLED || layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
+ return nk_do_link(&ctx->last_widget_state, &win->buffer, bounds,
+ title, len, align, style, in, ctx->style.font,
+ ctx->style.window.background);
+}
+NK_API nk_bool
+nk_link_text(struct nk_context *ctx, const char *title, int len, nk_flags align)
+{
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ return nk_link_text_styled(ctx, &ctx->style.link, title, len, align);
+}
+NK_API nk_bool
+nk_link_label_styled(struct nk_context *ctx, const struct nk_style_link *style,
+ const char *title, nk_flags align)
+{
+ return nk_link_text_styled(ctx, style, title, nk_strlen(title), align);
+}
+NK_API nk_bool
+nk_link_label(struct nk_context *ctx, const char *title, nk_flags align)
+{
+ return nk_link_text(ctx, title, nk_strlen(title), align);
+}
+NK_API nk_bool
+nk_link_text_underline(struct nk_context *ctx, const char *title, int len,
+ nk_flags align, enum nk_link_underline underline)
+{
+ struct nk_style_link style;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ style = ctx->style.link;
+ style.underline = underline;
+ return nk_link_text_styled(ctx, &style, title, len, align);
+}
+NK_API nk_bool
+nk_link_label_underline(struct nk_context *ctx, const char *title,
+ nk_flags align, enum nk_link_underline underline)
+{
+ return nk_link_text_underline(ctx, title, nk_strlen(title), align, underline);
+}
+NK_API nk_bool
+nk_link_text_hover_underline(struct nk_context *ctx, const char *title,
+ int len, nk_flags align)
+{
+ return nk_link_text_underline(ctx, title, len, align, NK_LINK_UNDERLINE_HOVER);
+}
+NK_API nk_bool
+nk_link_label_hover_underline(struct nk_context *ctx, const char *title,
+ nk_flags align)
+{
+ return nk_link_text_hover_underline(ctx, title, nk_strlen(title), align);
+}
+NK_API nk_bool
+nk_link_text_no_underline(struct nk_context *ctx, const char *title,
+ int len, nk_flags align)
+{
+ return nk_link_text_underline(ctx, title, len, align, NK_LINK_UNDERLINE_NONE);
+}
+NK_API nk_bool
+nk_link_label_no_underline(struct nk_context *ctx, const char *title,
+ nk_flags align)
+{
+ return nk_link_text_no_underline(ctx, title, nk_strlen(title), align);
+}
+NK_API nk_bool
+nk_link_text_colored(struct nk_context *ctx, const char *title, int len,
+ nk_flags align, struct nk_color color)
+{
+ struct nk_style_link style;
+ NK_ASSERT(ctx);
+ if (!ctx) return 0;
+ style = ctx->style.link;
+ style.text_normal = color;
+ style.text_hover = color;
+ style.text_active = color;
+ return nk_link_text_styled(ctx, &style, title, len, align);
+}
+NK_API nk_bool
+nk_link_label_colored(struct nk_context *ctx, const char *title,
+ nk_flags align, struct nk_color color)
+{
+ return nk_link_text_colored(ctx, title, nk_strlen(title), align, color);
+}
+
+
+
+
/* ===============================================================
*
* IMAGE
@@ -24389,20 +24865,32 @@ nk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type,
struct nk_rect content, struct nk_color background, struct nk_color foreground,
float border_width, const struct nk_user_font *font)
{
+ /* Use the border_width as the line thickness. */
+ if (border_width <= 0.0f) {
+ border_width = 1.0f;
+ }
switch (type) {
- case NK_SYMBOL_X:
+ case NK_SYMBOL_X: {
+ float pad_x = content.w * 0.2f;
+ float pad_y = content.h * 0.2f;
+ float x0 = content.x + pad_x;
+ float y0 = content.y + pad_y;
+ float x1 = content.x + content.w - pad_x;
+ float y1 = content.y + content.h - pad_y;
+ nk_stroke_line(out, x0, y0, x1, y1, border_width, foreground);
+ nk_stroke_line(out, x1, y0, x0, y1, border_width, foreground);
+ } break;
case NK_SYMBOL_UNDERSCORE:
case NK_SYMBOL_PLUS:
case NK_SYMBOL_MINUS: {
/* single character text symbol */
- const char *X = (type == NK_SYMBOL_X) ? "x":
- (type == NK_SYMBOL_UNDERSCORE) ? "_":
+ const char *character = (type == NK_SYMBOL_UNDERSCORE) ? "_":
(type == NK_SYMBOL_PLUS) ? "+": "-";
struct nk_text text;
text.padding = nk_vec2(0,0);
text.background = background;
text.text = foreground;
- nk_widget_text(out, content, X, 1, &text, NK_TEXT_CENTERED, font);
+ nk_widget_text(out, content, character, 1, &text, NK_TEXT_CENTERED, font);
} break;
case NK_SYMBOL_CIRCLE_SOLID:
case NK_SYMBOL_CIRCLE_OUTLINE:
@@ -24416,7 +24904,7 @@ nk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type,
} else {
nk_fill_circle(out, content, foreground);
if (type == NK_SYMBOL_CIRCLE_OUTLINE)
- nk_fill_circle(out, nk_shrink_rect(content, 1), background);
+ nk_fill_circle(out, nk_shrink_rect(content, border_width), background);
}
} break;
case NK_SYMBOL_TRIANGLE_UP:
@@ -24445,6 +24933,58 @@ nk_draw_symbol(struct nk_command_buffer *out, enum nk_symbol_type type,
nk_stroke_triangle(out, points[0].x, points[0].y, points[1].x, points[1].y,
points[2].x, points[2].y, border_width, foreground);
} break;
+ case NK_SYMBOL_CHEVRON_UP:
+ case NK_SYMBOL_CHEVRON_RIGHT:
+ case NK_SYMBOL_CHEVRON_DOWN:
+ case NK_SYMBOL_CHEVRON_LEFT: {
+ struct nk_vec2 points[3];
+ switch (type) {
+ case NK_SYMBOL_CHEVRON_RIGHT:
+ points[0].x = content.x;
+ points[0].y = content.y;
+ points[1].x = content.x + content.w;
+ points[1].y = content.y + content.h * 0.5f;
+ points[2].x = content.x;
+ points[2].y = content.y + content.h;
+ break;
+ case NK_SYMBOL_CHEVRON_LEFT:
+ points[0].x = content.x + content.w;
+ points[0].y = content.y;
+ points[1].x = content.x;
+ points[1].y = content.y + content.h * 0.5f;
+ points[2].x = content.x + content.w;
+ points[2].y = content.y + content.h;
+ break;
+ case NK_SYMBOL_CHEVRON_UP:
+ points[0].x = content.x;
+ points[0].y = content.y + content.h;
+ points[1].x = content.x + content.w * 0.5f;
+ points[1].y = content.y;
+ points[2].x = content.x + content.w;
+ points[2].y = content.y + content.h;
+ break;
+ case NK_SYMBOL_CHEVRON_DOWN:
+ points[0].x = content.x;
+ points[0].y = content.y;
+ points[1].x = content.x + content.w * 0.5f;
+ points[1].y = content.y + content.h;
+ points[2].x = content.x + content.w;
+ points[2].y = content.y;
+ break;
+ default:
+ break;
+ }
+ nk_stroke_line(out, points[0].x, points[0].y, points[1].x, points[1].y, border_width, foreground);
+ nk_stroke_line(out, points[1].x, points[1].y, points[2].x, points[2].y, border_width, foreground);
+ } break;
+ case NK_SYMBOL_HAMBURGER: {
+ float y2 = content.y + content.h * 0.5f;
+ float y3 = content.y + content.h - border_width;
+ float x1 = content.x + content.w;
+ nk_stroke_line(out, content.x, content.y, x1, content.y, border_width, foreground);
+ nk_stroke_line(out, content.x, y2, x1, y2, border_width, foreground);
+ nk_stroke_line(out, content.x, y3, x1, y3, border_width, foreground);
+ } break;
default:
case NK_SYMBOL_NONE:
case NK_SYMBOL_MAX: break;
@@ -24599,7 +25139,7 @@ nk_draw_button_symbol(struct nk_command_buffer *out,
else sym = style->text_normal;
sym = nk_rgb_factor(sym, style->color_factor_text);
- nk_draw_symbol(out, type, *content, bg, sym, 1, font);
+ nk_draw_symbol(out, type, *content, bg, sym, style->border, font);
}
NK_LIB nk_bool
nk_do_button_symbol(nk_flags *state,
@@ -24690,7 +25230,7 @@ nk_draw_button_text_symbol(struct nk_command_buffer *out,
sym = nk_rgb_factor(sym, style->color_factor_text);
text.text = nk_rgb_factor(text.text, style->color_factor_text);
text.padding = nk_vec2(0,0);
- nk_draw_symbol(out, type, *symbol, style->text_background, sym, 0, font);
+ nk_draw_symbol(out, type, *symbol, style->text_background, sym, style->border, font);
nk_widget_text(out, *label, str, len, &text, NK_TEXT_CENTERED, font);
}
NK_LIB nk_bool
@@ -29786,6 +30326,22 @@ nk_color_picker(struct nk_context *ctx, struct nk_colorf color,
* COMBO
*
* ===============================================================*/
+/* Outer popup height that fits `count` rows: each row is item_height plus
+ * trailing spacing, plus combo top padding and the border nk_panel_begin
+ * subtracts. Combos always get NK_WINDOW_BORDER from nk_nonblock_begin. */
+NK_INTERN float
+nk_combo_calc_max_height(const struct nk_context *ctx, int count, int item_height)
+{
+ struct nk_vec2 spacing;
+ struct nk_vec2 padding;
+
+ spacing = ctx->style.window.spacing;
+ padding = nk_panel_get_padding(&ctx->style, NK_PANEL_COMBO);
+ return (float)count * (float)item_height
+ + (float)count * spacing.y
+ + padding.y
+ + 2.0f * ctx->style.window.combo_border;
+}
NK_INTERN nk_bool
nk_combo_begin(struct nk_context *ctx, struct nk_window *win,
struct nk_vec2 size, nk_bool is_clicked, struct nk_rect header)
@@ -30112,7 +30668,7 @@ nk_combo_begin_symbol(struct nk_context *ctx, enum nk_symbol_type symbol, struct
bounds.x = header.x + style->combo.content_padding.x;
bounds.w = (button.x - style->combo.content_padding.y) - bounds.x;
nk_draw_symbol(&win->buffer, symbol, bounds, sym_background, symbol_color,
- 1.0f, style->font);
+ style->combo.border, style->font);
/* draw open/close button */
nk_draw_button_symbol(&win->buffer, &bounds, &content, ctx->last_widget_state,
@@ -30215,7 +30771,7 @@ nk_combo_begin_symbol_text(struct nk_context *ctx, const char *selected, int len
image.h = header.h - 2 * style->combo.content_padding.y;
image.w = image.h;
nk_draw_symbol(&win->buffer, symbol, image, text.background, symbol_color,
- 1.0f, style->font);
+ style->combo.border, style->font);
/* draw label */
text.padding = nk_vec2(0,0);
@@ -30486,9 +31042,7 @@ nk_combo(struct nk_context *ctx, const char *const *items, int count,
int selected, int item_height, struct nk_vec2 size)
{
int i = 0;
- int max_height;
- struct nk_vec2 item_spacing;
- struct nk_vec2 window_padding;
+ float max_height;
NK_ASSERT(ctx);
NK_ASSERT(items);
@@ -30496,11 +31050,8 @@ nk_combo(struct nk_context *ctx, const char *const *items, int count,
if (!ctx || !items ||!count)
return selected;
- item_spacing = ctx->style.window.spacing;
- window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
- max_height = count * item_height + count * (int)item_spacing.y;
- max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
- size.y = NK_MIN(size.y, (float)max_height);
+ max_height = nk_combo_calc_max_height(ctx, count, item_height);
+ size.y = NK_MIN(size.y, max_height);
if (nk_combo_begin_label(ctx, items[selected], size)) {
nk_layout_row_dynamic(ctx, (float)item_height, 1);
for (i = 0; i < count; ++i) {
@@ -30516,9 +31067,7 @@ nk_combo_separator(struct nk_context *ctx, const char *items_separated_by_separa
int separator, int selected, int count, int item_height, struct nk_vec2 size)
{
int i;
- int max_height;
- struct nk_vec2 item_spacing;
- struct nk_vec2 window_padding;
+ float max_height;
const char *current_item;
const char *iter;
int length = 0;
@@ -30528,12 +31077,8 @@ nk_combo_separator(struct nk_context *ctx, const char *items_separated_by_separa
if (!ctx || !items_separated_by_separator)
return selected;
- /* calculate popup window */
- item_spacing = ctx->style.window.spacing;
- window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
- max_height = count * item_height + count * (int)item_spacing.y;
- max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
- size.y = NK_MIN(size.y, (float)max_height);
+ max_height = nk_combo_calc_max_height(ctx, count, item_height);
+ size.y = NK_MIN(size.y, max_height);
/* find selected item */
current_item = items_separated_by_separator;
@@ -30571,9 +31116,7 @@ nk_combo_callback(struct nk_context *ctx, void(*item_getter)(void*, int, const c
void *userdata, int selected, int count, int item_height, struct nk_vec2 size)
{
int i;
- int max_height;
- struct nk_vec2 item_spacing;
- struct nk_vec2 window_padding;
+ float max_height;
const char *item;
NK_ASSERT(ctx);
@@ -30581,12 +31124,8 @@ nk_combo_callback(struct nk_context *ctx, void(*item_getter)(void*, int, const c
if (!ctx || !item_getter)
return selected;
- /* calculate popup window */
- item_spacing = ctx->style.window.spacing;
- window_padding = nk_panel_get_padding(&ctx->style, ctx->current->layout->type);
- max_height = count * item_height + count * (int)item_spacing.y;
- max_height += (int)item_spacing.y * 2 + (int)window_padding.y * 2;
- size.y = NK_MIN(size.y, (float)max_height);
+ max_height = nk_combo_calc_max_height(ctx, count, item_height);
+ size.y = NK_MIN(size.y, max_height);
item_getter(userdata, selected, &item);
if (nk_combo_begin_label(ctx, item, size)) {
@@ -30740,6 +31279,45 @@ nk_tooltip_end(struct nk_context *ctx)
nk_popup_end(ctx);
}
+/**
+ * Display a default tooltip if the mouse is hovering over the rect `bounds`
+ */
+NK_API void
+nk_do_tooltip(struct nk_context* ctx, const char* text, struct nk_rect bounds)
+{
+ NK_ASSERT(ctx);
+ if (nk_input_is_mouse_hovering_rect(&ctx->input, bounds)) {
+ nk_tooltip_offset(ctx, text, ctx->style.window.tooltip_origin, ctx->style.window.tooltip_offset);
+ }
+}
+
+/**
+ * Display a default tooltip if the mouse hovers motionless for the default delay (ctx->style.window.tooltip_delay)
+ * `timer` is used to track the time across frames.
+ */
+NK_API void
+nk_do_tooltip_delay(struct nk_context* ctx, const char* text, struct nk_rect bounds, float* timer)
+{
+ NK_ASSERT(ctx);
+ if (nk_input_is_mouse_hovering_still_delay_rect(ctx, bounds, timer, ctx->style.window.tooltip_delay)) {
+ nk_tooltip_offset(ctx, text, ctx->style.window.tooltip_origin, ctx->style.window.tooltip_offset);
+ }
+}
+
+/**
+ * Display a default tooltip if the mouse hovers motionless for the default delay (ctx->style.window.tooltip_delay) unless
+ * `clicked` is true. `clicked` will be reset to false (and `timer` to 0) when the mouse moves.
+ * `timer` is used to track the time across frames.
+ */
+NK_API void
+nk_do_tooltip_delay_clicked(struct nk_context* ctx, const char* text, struct nk_rect bounds, float* timer, nk_bool* clicked)
+{
+ NK_ASSERT(ctx);
+ if (nk_input_is_mouse_hovering_still_delay_clicked_rect(ctx, bounds, timer, ctx->style.window.tooltip_delay, clicked)) {
+ nk_tooltip_offset(ctx, text, ctx->style.window.tooltip_origin, ctx->style.window.tooltip_offset);
+ }
+}
+
NK_API void
nk_tooltip_offset(struct nk_context *ctx, const char *text, enum nk_tooltip_pos position, struct nk_vec2 offset)
{
@@ -30765,7 +31343,9 @@ nk_tooltip_offset(struct nk_context *ctx, const char *text, enum nk_tooltip_pos
text_len = nk_strlen(text);
text_width = style->font->width(style->font->userdata,
style->font->height, text, text_len);
- text_width += (4 * padding.x);
+ /* outer bounds: nk_panel_begin subtracts popup padding and border */
+ text_width += 2 * style->window.popup_padding.x;
+ text_width += 2 * style->window.popup_border;
text_height = (style->font->height + 2 * padding.y);
/* execute tooltip and fill with text */
diff --git a/third_party/sokol/sokol_nuklear.h b/third_party/sokol/sokol_nuklear.h
index a01b10c..bd3923e 100644
--- a/third_party/sokol/sokol_nuklear.h
+++ b/third_party/sokol/sokol_nuklear.h
@@ -2282,7 +2282,7 @@ SOKOL_API_IMPL void snk_setup(const snk_desc_t* desc) {
_snuklear.vbuf = sg_make_buffer(&(sg_buffer_desc){
.usage = {
.vertex_buffer = true,
- .stream_update = true,
+ .write_transient = true,
},
.size = _snuklear.vertex_buffer_size,
.label = "sokol-nuklear-vertices"
@@ -2293,7 +2293,7 @@ SOKOL_API_IMPL void snk_setup(const snk_desc_t* desc) {
_snuklear.ibuf = sg_make_buffer(&(sg_buffer_desc){
.usage = {
.index_buffer = true,
- .stream_update = true,
+ .write_transient = true,
},
.size = _snuklear.index_buffer_size,
.label = "sokol-nuklear-indices"
@@ -2681,8 +2681,20 @@ SOKOL_API_IMPL void snk_render(int width, int height) {
if (!vertex_buffer_overflow && !index_buffer_overflow) {
// Setup rendering
- sg_update_buffer(_snuklear.vbuf, &(sg_range){ nk_buffer_memory_const(&verts), nk_buffer_total(&verts) });
- sg_update_buffer(_snuklear.ibuf, &(sg_range){ nk_buffer_memory_const(&idx), nk_buffer_total(&idx) });
+ sg_write_buffer_transient(&(sg_write_buffer_desc){
+ .src.data = {
+ .ptr = nk_buffer_memory_const(&verts),
+ .size = nk_buffer_total(&verts),
+ },
+ .dst.buffer = _snuklear.vbuf,
+ });
+ sg_write_buffer_transient(&(sg_write_buffer_desc){
+ .src.data = {
+ .ptr = nk_buffer_memory_const(&idx),
+ .size = nk_buffer_total(&idx),
+ },
+ .dst.buffer = _snuklear.ibuf,
+ });
const float dpi_scale = _snuklear.desc.dpi_scale;
const int fb_width = (int)(_snuklear.vs_params.disp_size[0] * dpi_scale);
const int fb_height = (int)(_snuklear.vs_params.disp_size[1] * dpi_scale);