Skip to content

Commit 0772ab7

Browse files
authored
Merge pull request #89 from carstene1ns/feature/lmu-gui
lmu2png: Add wxWidgets GUI
2 parents ca0c240 + 44ad95e commit 0772ab7

13 files changed

+1177
-402
lines changed

lmu2png/AUTHORS

Lines changed: 0 additions & 18 deletions
This file was deleted.

lmu2png/AUTHORS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# LMU2PNG Authors:
2+
3+
* Zegeri
4+
* 20kdc
5+
* carstene1ns
6+
7+
LMU2PNG is based on LMU2BMP.
8+
9+
## LMU2BMP Author:
10+
11+
* Gustavo Valiente "Chano" (chano)
12+
13+
LMU2BMP Includes EasyRPG project code from the following authors:
14+
15+
* Héctor Barreiro "Damizean" (damizean)
16+
* Francisco de la Peña "delaPipol" (fdelapena)

lmu2png/CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(lmu2png VERSION 1.2 LANGUAGES CXX
2+
project(lmu2png VERSION 2.0 LANGUAGES CXX
33
HOMEPAGE_URL "https://easyrpg.org/")
44

55
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
@@ -9,6 +9,14 @@ find_package(ZLIB REQUIRED)
99
find_package(liblcf REQUIRED)
1010
find_package(FreeImage REQUIRED)
1111

12+
set(WITH_GUI "Automatic" CACHE STRING "Build a GUI frontend (ON/OFF/Automatic), Default: Automatic")
13+
set_property(CACHE WITH_GUI PROPERTY STRINGS ON OFF Automatic)
14+
if(WITH_GUI STREQUAL "Automatic")
15+
find_package(wxWidgets CONFIG)
16+
elseif(WITH_GUI STREQUAL "ON")
17+
find_package(wxWidgets CONFIG REQUIRED)
18+
endif()
19+
1220
set(argparse_dir src/external/argparse)
1321
add_executable(lmu2png
1422
src/main.h
@@ -17,6 +25,8 @@ add_executable(lmu2png
1725
src/chipset.cpp
1826
src/xyzplugin.h
1927
src/xyzplugin.cpp
28+
src/utils.h
29+
src/utils.cpp
2030
${argparse_dir}/argparse.hpp)
2131
target_compile_features(lmu2png PRIVATE cxx_std_17)
2232
target_include_directories(lmu2png PRIVATE ${argparse_dir})
@@ -26,5 +36,17 @@ target_compile_definitions(lmu2png PRIVATE
2636
PACKAGE_URL="${PROJECT_HOMEPAGE_URL}")
2737
target_link_libraries(lmu2png ZLIB::ZLIB freeimage::FreeImage liblcf::liblcf)
2838

39+
if(wxWidgets_FOUND)
40+
target_compile_definitions(lmu2png PRIVATE WITH_GUI)
41+
target_sources(lmu2png PRIVATE
42+
src/gui.h
43+
src/gui.cpp)
44+
target_link_libraries(lmu2png wx::base wx::core)
45+
set(GUI_STATUS "Enabled (wxWidgets ${wxWidgets_VERSION})")
46+
else()
47+
set(GUI_STATUS "Disabled")
48+
endif()
49+
message(STATUS "GUI is ${GUI_STATUS}")
50+
2951
include(GNUInstallDirs)
3052
install(TARGETS lmu2png RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

lmu2png/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
argparsedir = src/external/argparse
22

3-
EXTRA_DIST = README.md \
3+
EXTRA_DIST = README.md AUTHORS.md \
44
CMakeLists.txt \
55
CMakeModules/ConfigureWindows.cmake \
66
CMakeModules/FindFreeImage.cmake \
@@ -15,6 +15,8 @@ lmu2png_SOURCES = \
1515
src/chipset.cpp \
1616
src/xyzplugin.h \
1717
src/xyzplugin.cpp \
18+
src/utils.h \
19+
src/utils.cpp \
1820
$(argparsedir)/argparse.hpp
1921
lmu2png_CXXFLAGS = \
2022
-std=c++17 \

lmu2png/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# LMU2PNG
22

3-
LMU2PNG is a small tool to render RPG Maker 2000 and 2003 map data into PNG
4-
images.
3+
LMU2PNG is a tool to render RPG Maker 2000 and 2003 map data into PNG images.
54

65
LMU2PNG is part of the EasyRPG Project.
76
More information is available at the project website:
@@ -21,6 +20,7 @@ https://wiki.easyrpg.org/
2120
* liblcf - https://github.com/EasyRPG/liblcf
2221
* zlib
2322
* SDL2_image (enable support for at least png images)
23+
* wxWidgets (optional, GUI version)
2424

2525

2626
## Daily builds

lmu2png/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([lmu2png],[1.2],
1+
AC_INIT([lmu2png],[2.0],
22
[https://github.com/EasyRPG/Tools/issues],[lmu2png],[https://easyrpg.org/])
33

44
AC_CONFIG_AUX_DIR([.])

lmu2png/src/chipset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <stdlib.h>
2222
#include <stdio.h>
2323
#include <FreeImage.h>
24-
#include "main.h"
24+
#include "utils.h"
2525

2626
constexpr int TILE_SIZE=16;
2727
constexpr int HALF_TILE=TILE_SIZE/2;

0 commit comments

Comments
 (0)