From 2ef80983d5d11aec60c4a4fbe0958a261e42fb6b Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 21 Nov 2017 19:07:43 -0800 Subject: Initial work on Nuklear-based UI --HG-- branch : nuklear_ui --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b44fb88..b0e5171 100644 --- a/Makefile +++ b/Makefile @@ -126,8 +126,11 @@ endif Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o CONFIGOBJS=config.o tern.o util.o +NUKLEAROBJS=nuklear_ui/font.o nuklear_ui/blastem_nuklear.o -MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) $(TRANSOBJS) $(AUDIOOBJS) +MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o \ + realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) \ + $(TRANSOBJS) $(AUDIOOBJS) $(NUKLEAROBJS) paths.o ifeq ($(CPU),x86_64) CFLAGS+=-DX86_64 -m64 -- cgit v1.2.3 From 27b829ffc447758832cbd7ab2f9b7e427928d687 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 24 Nov 2017 12:04:02 -0800 Subject: Refactored save slot related logic to reduce duplication and allow reuse in new UI. Get state loading/saving mostly working in new UI --HG-- branch : nuklear_ui --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b0e5171..61b8203 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ NUKLEAROBJS=nuklear_ui/font.o nuklear_ui/blastem_nuklear.o MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o \ realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) \ - $(TRANSOBJS) $(AUDIOOBJS) $(NUKLEAROBJS) paths.o + $(TRANSOBJS) $(AUDIOOBJS) $(NUKLEAROBJS) paths.o saves.o ifeq ($(CPU),x86_64) CFLAGS+=-DX86_64 -m64 -- cgit v1.2.3 From f4767bb05392fa4a04d72969fa35aa91b688c8cb Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 25 Nov 2017 20:43:20 -0800 Subject: Skip loading menu ROM if Nuklear UI is enabled. Allow disabling Nuklear UI in favor of old menu ROM both at compile time and in config. Fall back to ROM UI if GL is unavailable --HG-- branch : nuklear_ui --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 61b8203..103d073 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,7 @@ LDFLAGS+= -Wl,--no-as-needed -lprofiler -Wl,--as-needed endif ifdef NOGL CFLAGS+= -DDISABLE_OPENGL +NONUKLEAR:=1 endif ifdef M68030 @@ -130,7 +131,13 @@ NUKLEAROBJS=nuklear_ui/font.o nuklear_ui/blastem_nuklear.o MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o \ realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) \ - $(TRANSOBJS) $(AUDIOOBJS) $(NUKLEAROBJS) paths.o saves.o + $(TRANSOBJS) $(AUDIOOBJS) paths.o saves.o + +ifdef NONUKLEAR +CFLAGS+= -DDISABLE_NUKLEAR +else +MAINOBJS+= $(NUKLEAROBJS) +endif ifeq ($(CPU),x86_64) CFLAGS+=-DX86_64 -m64 -- cgit v1.2.3 From eec0f93a7227f8c9a1de3335a06084f5aa4349c7 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 7 Dec 2017 18:57:18 -0800 Subject: Move paths.o to CONFIGOBJS since config.c uses path_append now --HG-- branch : nuklear_ui --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 103d073..4ee8848 100644 --- a/Makefile +++ b/Makefile @@ -126,12 +126,12 @@ endif Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o -CONFIGOBJS=config.o tern.o util.o +CONFIGOBJS=config.o tern.o util.o paths.o NUKLEAROBJS=nuklear_ui/font.o nuklear_ui/blastem_nuklear.o MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o \ realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) \ - $(TRANSOBJS) $(AUDIOOBJS) paths.o saves.o + $(TRANSOBJS) $(AUDIOOBJS) saves.o ifdef NONUKLEAR CFLAGS+= -DDISABLE_NUKLEAR -- cgit v1.2.3 From 1a5cf08e054aa965b58aed143a2e37b6f89af2d6 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 7 Dec 2017 18:59:36 -0800 Subject: Update clean target to remove UI object files --HG-- branch : nuklear_ui --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4ee8848..65b2da0 100644 --- a/Makefile +++ b/Makefile @@ -262,4 +262,4 @@ font.tiles : font.png menu.bin : font_interlace_variable.tiles arrow.tiles cursor.tiles button.tiles font.tiles clean : - rm -rf $(ALL) trans ztestrun ztestgen *.o + rm -rf $(ALL) trans ztestrun ztestgen *.o nuklear_ui/*.o -- cgit v1.2.3 From d728432b713702b6a564e3532930e380dd5d3f28 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 6 Feb 2018 22:42:16 -0800 Subject: Key binding menu is now functional --HG-- branch : nuklear_ui --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 65b2da0..667ad84 100644 --- a/Makefile +++ b/Makefile @@ -65,8 +65,8 @@ endif #PORTABLE endif #Windows ifdef DEBUG -CFLAGS:=-ggdb $(CFLAGS) -LDFLAGS:=-ggdb $(LDFLAGS) +CFLAGS:=-g3 $(CFLAGS) +LDFLAGS:=-g3 $(LDFLAGS) else ifdef NOLTO CFLAGS:=-O2 $(CFLAGS) -- cgit v1.2.3 From a956d5e1f82e98097602e289ac8f02374ea3b5e7 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 7 Feb 2018 00:07:12 -0800 Subject: Fix Windows build, added Windows default_font_path implementation --HG-- branch : nuklear_ui --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 667ad84..7755165 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ endif MEM:=mem_win.o TERMINAL:=terminal_win.o +FONT:=nuklear_ui/font_win.o EXE:=.exe CC:=i686-w64-mingw32-gcc-win32 CFLAGS:=-std=gnu99 -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -I"$(SDL2_PREFIX)/include/SDL2" -I"$(GLEW_PREFIX)/include" -DGLEW_STATIC @@ -26,6 +27,7 @@ else MEM:=mem.o TERMINAL:=terminal.o +FONT:=nuklear_ui/font.o EXE:= ifeq ($(OS),Darwin) @@ -127,7 +129,7 @@ endif Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o CONFIGOBJS=config.o tern.o util.o paths.o -NUKLEAROBJS=nuklear_ui/font.o nuklear_ui/blastem_nuklear.o +NUKLEAROBJS=$(FONT) nuklear_ui/blastem_nuklear.o MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o \ realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) \ -- cgit v1.2.3 From d738c30dec8a7c9f351094851c00a4623f339084 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 6 Mar 2018 21:27:12 -0800 Subject: Added support for TTC and dfont format true type fonts. More robust font selection on Windows --HG-- branch : nuklear_ui --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7755165..a7532e4 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ endif Z80OBJS=z80inst.o z80_to_x86.o AUDIOOBJS=ym2612.o psg.o wave.o CONFIGOBJS=config.o tern.o util.o paths.o -NUKLEAROBJS=$(FONT) nuklear_ui/blastem_nuklear.o +NUKLEAROBJS=$(FONT) nuklear_ui/blastem_nuklear.o nuklear_ui/sfnt.o MAINOBJS=blastem.o system.o genesis.o debug.o gdb_remote.o vdp.o render_sdl.o ppm.o io.o romdb.o hash.o menu.o xband.o \ realtec.o i2c.o nor.o sega_mapper.o multi_game.o serialize.o $(TERMINAL) $(CONFIGOBJS) gst.o $(M68KOBJS) \ -- cgit v1.2.3 From 6b875d84af9974cc92f7b0631207c31273381c47 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 25 Mar 2018 10:30:40 -0700 Subject: Added OSX implementation of default_font --HG-- branch : nuklear_ui --- Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0671aff..63defcb 100644 --- a/Makefile +++ b/Makefile @@ -27,13 +27,14 @@ else MEM:=mem.o TERMINAL:=terminal.o -FONT:=nuklear_ui/font.o EXE:= ifeq ($(OS),Darwin) LIBS=sdl2 glew +FONT:=nuklear_ui/font_mac.o else LIBS=sdl2 glew gl +FONT:=nuklear_ui/font.o endif #Darwin HAS_PROC:=$(shell if [ -d /proc ]; then /bin/echo -e -DHAS_PROC; fi) @@ -48,7 +49,7 @@ LDFLAGS:=-lm glew/lib/libGLEW.a ifeq ($(OS),Darwin) CFLAGS+= -IFrameworks/SDL2.framework/Headers -LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL +LDFLAGS+= -FFrameworks -framework SDL2 -framework OpenGL -framework AppKit FIXUP:=install_name_tool -change @rpath/SDL2.framework/Versions/A/SDL2 @executable_path/Frameworks/SDL2.framework/Versions/A/SDL2 else CFLAGS+= -Isdl/include @@ -60,14 +61,18 @@ CFLAGS:=$(shell pkg-config --cflags-only-I $(LIBS)) $(CFLAGS) LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS)) ifeq ($(OS),Darwin) -LDFLAGS+= -framework OpenGL +LDFLAGS+= -framework OpenGL -framework AppKit endif endif #PORTABLE endif #Windows ifdef DEBUG +ifeq ($(OS),Darwin) +OPT:=-g3 -O0 +else OPT:=-g3 -Og +endif #Darwin else ifdef NOLTO OPT:=-O2 @@ -249,6 +254,10 @@ vos_prog_info : vos_prog_info.o vos_program_module.o %.o : %.c $(CC) $(CFLAGS) -c -o $@ $< + +%.o : %.m + $(CC) $(CFLAGS) -c -o $@ $< + %.png : %.xcf xcf2png $< > $@ -- cgit v1.2.3