Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SDL2 port, remove useless dependencies like GLEW/GLU #86

Draft
wants to merge 56 commits into
base: sdl2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ec6b3b7
Spell check src/machine/ and src/systems/
eglaysher May 4, 2015
9007b06
Fix tense.
eglaysher May 5, 2015
b1321e4
Dont lazily parse the ExpressionElement.
eglaysher May 2, 2015
e3b7399
Replace complex type with auto.
eglaysher May 5, 2015
fe85e3f
Fix most warnings on gcc 4.9.
eglaysher May 5, 2015
691a70f
Fix audio quality in SDL.
eglaysher May 4, 2015
d3fca00
Silently ignore DLLs that start with "RealLiveSteam".
eglaysher Aug 2, 2015
cd2e540
Update and rename GPL.TXT to LICENSE.txt
eglaysher Aug 19, 2015
c1d53d7
Ignore _site folder from the gh-pages branch.
eglaysher Nov 14, 2015
a9e4eef
Update the README and remove mentions of the Clannad fan patch.
eglaysher Dec 22, 2015
a1db4d1
Remove most of SDL_image and move to XPM for embedded images.
eglaysher Dec 22, 2015
80eaa5b
Few things Clannad uses that we don't implement.
eglaysher Feb 26, 2016
83301ef
Special case integer assignments in the new expression piece system.
eglaysher May 9, 2015
5e13e9f
Revert "Fix audio quality in SDL."
eglaysher Feb 27, 2016
dca09b3
Add simple Western line breaking.
eglaysher Feb 27, 2016
39b03d5
Implement CallStackSize().
eglaysher Feb 28, 2016
d2b987c
Separate glyph placement and line breaking logic.
eglaysher Mar 12, 2016
426ceba
End TextoutLongOperation on mouse up, not mouse down.
eglaysher Mar 13, 2016
2cb01d7
Fix objTextOpts so that it works with older games and newer ones.
eglaysher Nov 14, 2015
668863d
Theoretical compile fix for gcc 4 series.
eglaysher May 22, 2016
6148fd7
Update dir locals.
eglaysher Mar 25, 2016
ebc2c5b
Extend the stacked g00 parsing code.
eglaysher Jun 13, 2016
32b8747
Parse all #NAMAE entries from the Gameexe.ini file.
eglaysher Jun 13, 2016
ab95202
Add testing script for Misae Sagara's path of CLANNAD English Edition.
eglaysher Jun 13, 2016
0b73b02
Fix crash in string parser.
eglaysher Jun 16, 2016
d57e15a
Add testing script for Tomoyo Sakagami's path of CLANNAD English Edit…
eglaysher Jun 18, 2016
180f0eb
Add testing script for Yukine Miyazawa's path of CLANNAD English Edit…
eglaysher Jun 18, 2016
fb5fde3
Add testing script for Ryou Fujibayashi's path of CLANNAD English Edi…
eglaysher Jun 18, 2016
310fa47
Add testing script for Kyou Fujibayashi's path of CLANNAD English Edi…
eglaysher Jun 18, 2016
08d9d06
Add testing script for Kappei Hiiragi's path of CLANNAD English Edition.
eglaysher Jun 19, 2016
7374e60
Add testing script for Mei Sunohara's path of CLANNAD English Edition.
eglaysher Jun 19, 2016
79d2082
Add testing script for Kotomi's path of CLANNAD English Edition.
eglaysher Jun 19, 2016
ae44036
Add testing script for Fuko Ibuki's path of CLANNAD English Edition.
eglaysher Jun 23, 2016
a043c83
Add testing script for Toshio Koumura's path of CLANNAD English Edition.
eglaysher Jun 29, 2016
1ef37fe
Add testing script for Nagisa Furukawa's path of CLANNAD English Edit…
eglaysher Jul 3, 2016
76856fc
Add testing script for the After Story.
eglaysher Jul 3, 2016
b03b83c
Add testing script for Clannad English Edition.
eglaysher Jul 3, 2016
4ff6621
Use names in the --dump-seen output.
eglaysher Jul 3, 2016
ea3aa65
Validate the components of grpMulti() commands.
eglaysher Jul 3, 2016
b21bc39
Fix uninitialized read in RLOperation.
eglaysher Jul 16, 2016
9350209
In expression parser, replace binary ops of two ints with the result.
eglaysher Jul 30, 2016
49d597e
Add libzita-resampler as a dependency and use it on ogg voice samples.
eglaysher Sep 8, 2016
dffc32c
Update bitcoin address for segwit.
eglaysher Sep 11, 2017
27e8e0e
Merge sdl2 into new_sdl2
a1batross Oct 13, 2018
391634c
Remove GtkRLVMInstance to get rid of useless Gtk dependency, introduc…
a1batross Oct 13, 2018
0766856
Various SDL2 migration fixes
a1batross Oct 13, 2018
1aa0395
Remove GLEW
a1batross Oct 13, 2018
e116bc5
scons: remove GLEW, GLU dependency
a1batross Oct 13, 2018
a53cf0e
system_sdl: remove GLEW, GLU dependency
a1batross Oct 13, 2018
15ca02a
pygame: fix SDL header include
a1batross Oct 20, 2018
af38368
SDL2_ttf, SDL2_image: fix SetError functions to make them more safe
a1batross Oct 20, 2018
a64dabb
system_sdl: fix SDL2 header includes path
a1batross Oct 20, 2018
fb627ba
Don't bootleg <iostream> via Boost.Serialization
jbeich Nov 27, 2018
fe2482c
Merge pull request #85 from jbeich/boost
eglaysher Nov 27, 2018
74ec78a
platform: sdl: fix-up SDL2 headers
a1batross May 9, 2019
14530d7
Merge remote-tracking branch 'origin/master' into new_sdl2
a1batross May 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
;; Project specific local variables for emacs23. `compile-command' is the only
;; one not set by the individual files. Hopefully this list will grow.
((nil . ((compile-command . "scons")
(tab-width . 2)
(indent-tabs-mode . nil))))
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((nil
(my-org-project-name . "rlvm")
(compile-command . "scons")
(tab-width . 2)
(indent-tabs-mode)))

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ rlvm.suo
/build
/.sconf_temp
/.sconsign.dblite
_site
1 change: 1 addition & 0 deletions AUTHORS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ luabind - http://www.rasterbar.com/products/luabind.html
guichan - http://guichan.sourceforge.net/
googletest - http://code.google.com/p/googletest/
googlemock - http://code.google.com/p/googlemock/
zita-resampler - http://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.

Libraries depended on (and are not included)
-------------------------------------------------------------------------
Expand Down
18 changes: 18 additions & 0 deletions COPYING.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ III) Libraries included unmodified in the rlvm distribution:
g) Guichan
h) SDL_image
i) SDL_mixer
j) zita-resampler

IV) Libraries linked against by rlvm (but not included in the distribution)
a) boost.org license
Expand Down Expand Up @@ -450,6 +451,23 @@ You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

------------------------------------------------------- [ zita-resampler ]

Copyright (C) 2006-2011 Fons Adriaensen <[email protected]>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

-------------------------------------------------------------------------
Part IV: Libraries linked against by rlvm
-------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions GPL.TXT → LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rlvm currently plays the following games to their completion:
| Planetarian | Works; [buy here][planetarian] |

[kanon]: http://radicalr.pestermom.com/vn.html
[clannad]: https://sekaiproject.com/blog-en/sekai-project-and-visualarts-announce-the-licensing-of-clannad-full-voice-edition/
[clannad]: http://store.steampowered.com/app/324160/
[planetarian]: http://store.steampowered.com/app/316720/

For more details, please read STATUS.TXT.
Expand All @@ -50,8 +50,7 @@ first hand or what I've been told.

rlvm has an implementation of rlBabel; English patches compiled with
Haeleth's rlBabel should line break correctly. I've successfully tested
it with the Kanon patch from NDT and the beta CLANNAD patches from
Baka-Tsuki's Assembla page.
it with the Kanon patch from NDT.

rlvm supports KOE, NWK and OVK archives for voices, along with ogg
vorbis voice patches which follow the convention
Expand Down Expand Up @@ -164,6 +163,4 @@ getting it working.

## DONATE

Have you found rlvm useful? I accept donations in bitcoin at the following address: [18LntbVY1GMZeioDYnst8yFmYQP86P4iKi][bitcoin]

[bitcoin]: https://blockchain.info/address/18LntbVY1GMZeioDYnst8yFmYQP86P4iKi
Have you found rlvm useful? I accept donations in bitcoin at the following address: 3Ee9s6BzmSZQK2yf4DU3p8vk1ttrsnFoQ2
37 changes: 11 additions & 26 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ root_env.Append(
"-Wall",
"-Wno-sign-compare",
"-Wno-narrowing",
"-Wno-write-strings", # For XPM support
"-std=c++11"
]
)
Expand All @@ -30,32 +31,8 @@ root_env.ParseConfig("sdl2-config --libs")

#########################################################################

# All the PNG files taken from The Mana World that we want to compile in
guichan_resources = [
"src/platforms/gcn/button_disabled.png",
"src/platforms/gcn/buttonhi.png",
"src/platforms/gcn/button.png",
"src/platforms/gcn/buttonpress.png",
"src/platforms/gcn/deepbox.png",
"src/platforms/gcn/hscroll_left_default.png",
"src/platforms/gcn/hscroll_left_pressed.png",
"src/platforms/gcn/hscroll_right_default.png",
"src/platforms/gcn/hscroll_right_pressed.png",
"src/platforms/gcn/vscroll_down_default.png",
"src/platforms/gcn/vscroll_down_pressed.png",
"src/platforms/gcn/vscroll_grey.png",
"src/platforms/gcn/vscroll_up_default.png",
"src/platforms/gcn/vscroll_up_pressed.png"
]

# Build the resource compiler and then use it to make the inline header file.
root_env.Program('wxInclude', ['vendor/wxInclude.cpp'])
root_env.Command('$BUILD_DIR/resource_header.h',
['$BUILD_DIR/wxInclude', guichan_resources],
["$SOURCE --silent --wxnone --output-file=$TARGET " +
" ".join(guichan_resources)])

# We'll need to be able to see the autogenerated header:
# We used to set this just for an autogenerated header, but now it's wrapped
# its tentacles everywhere.
root_env.Append(
CPPPATH = ["$BUILD_DIR"]
)
Expand Down Expand Up @@ -235,6 +212,14 @@ libsystemsdl_files = [
"src/systems/sdl/sdl_utils.cc",
"src/systems/sdl/shaders.cc",
"src/systems/sdl/texture.cc",

# Parts of zresample
"src/systems/sdl/resample.cc",
"src/systems/sdl/audiofile.cc",
"src/systems/sdl/dither.cc",
"src/systems/sdl/zresample.cc",

# Parts of pygame.
"vendor/pygame/alphablit.cc"
]

Expand Down
9 changes: 5 additions & 4 deletions SConscript.gtk
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Import('env')

root_env = env.Clone()
root_env.Append(LIBS=["GL", "GLU"])
root_env.Append(LIBS=["GL"])
root_env.ParseConfig('sdl2-config --cflags --libs')
root_env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
root_env.ParseConfig('pkg-config --cflags --libs libpng')
# root_env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')

root_env.Append(
CXXFLAGS = [
Expand All @@ -16,8 +17,8 @@ gtkrlvm_files = [
# Technically cross platform, but put here for SDL dependency.
"src/machine/rlvm_instance.cc",

"src/platforms/gtk/rlvm.cc",
"src/platforms/gtk/gtk_rlvm_instance.cc",
"src/platforms/sdl/rlvm.cc",
"src/platforms/sdl/sdl_rlvm_instance.cc",
]

root_env.RlvmProgram('rlvm', gtkrlvm_files,
Expand Down
3 changes: 2 additions & 1 deletion SConscript.luarlvm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ test_env.Append(
if test_env['PLATFORM'] == 'darwin':
test_env.Append(FRAMEWORKS=["OpenGL"])
else:
test_env.Append(LIBS=["GL", "GLU"])
test_env.Append(LIBS=["GL"])
test_env.ParseConfig("sdl2-config --libs")
test_env.ParseConfig('pkg-config --cflags --libs libpng')

test_env.Append(CPPPATH = ["#/test"])

Expand Down
20 changes: 10 additions & 10 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ env = Environment(
# We use gettext for translations.
"ENABLE_NLS",

# This prevents conflicts between SDL and GLEW. I shouldn't have to do
# this, but the SDL_opengl.h and glew.h differ in const correctness...
"NO_SDL_GLEXT"
# Use glext.h
"GL_GLEXT_PROTOTYPES"
],

# Where the final binaries should be put.
Expand Down Expand Up @@ -213,15 +212,14 @@ def CheckForSystemLibrary(config, library_dict, componentlist):
lib_name = library_dict['library']
print "(Using included version of %s)" % lib_name
componentlist.append(lib_name)
config.Define("HAVE_LIB" + lib_name, 1,
config.Define("HAVE_LIB" + lib_name.replace("-", "_"), 1,
"Define to 1 if you have the `%s' library." % lib_name)


#########################################################################
## Configuration
#########################################################################
subcomponents = [ ]
static_sdl_libs = [ ]

config = env.Configure(custom_tests = {'CheckBoost' : CheckBoost,
# 'CheckGuichan' : CheckGuichan
Expand All @@ -236,6 +234,8 @@ VerifyLibrary(config, 'ogg', 'ogg/ogg.h')
VerifyLibrary(config, 'vorbis', 'vorbis/codec.h')
VerifyLibrary(config, 'vorbisfile', 'vorbis/vorbisfile.h')

VerifyLibrary(config, 'sndfile', 'sndfile.h')

# In short, we do this because the SCons configuration system doesn't give me
# enough control over the test program. Even if the libraries are installed,
# they won't compile because SCons outputs "int main()" instead of "int
Expand All @@ -250,9 +250,9 @@ else:
# Libraries we need, but will use a local copy if not installed.
local_sdl_libraries = [
{
"include" : 'GL/glew.h',
"library" : 'GLEW',
"function" : 'glewInit();'
'include' : 'zita-resampler/resampler.h',
'library' : 'zita-resampler',
'function' : '',
},
{
'include' : 'SDL2/SDL_ttf.h',
Expand All @@ -279,7 +279,7 @@ for library_dict in local_sdl_libraries:
# subcomponents.append("guichan")

# Get the configuration from sdl and freetype
env.ParseConfig("sdl-config --cflags")
env.ParseConfig("sdl2-config --cflags")
env.ParseConfig("freetype-config --cflags --libs")

env = config.Finish()
Expand Down Expand Up @@ -326,7 +326,7 @@ if GetOption('release'):
"-ffunction-sections",
"-fdata-sections",
],

LINKFLAGS = [
"-Wl,--gc-sections"
],
Expand Down
8 changes: 7 additions & 1 deletion STATUS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ CLANNAD FULL VOICE
------------------
- All routes playable to the end.
- Voices work.
- Partially playable with the Baka-Tsuki English patch (currently beta)

CLANNAD English Edition
-----------------------
- Currently busted.
- Problems while drawing the text boxes.
- Dangopedia is completely broken due to the database subsystem being
unimplemented.

Tomoyo After Memorial Edition
-----------------------------
Expand Down
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Build-Depends: debhelper (>= 7.0.50~), libsdl1.2-dev, libfreetype6-dev,
libboost-serialization-dev, libboost-date-time-dev,
libboost-iostreams-dev, libboost-program-options-dev,
libboost-thread-dev, libguichan-dev,
zlib1g-dev, libsdl-ttf2.0-dev, libgtk2.0-dev
zlib1g-dev, libsdl-ttf2.0-dev, libgtk2.0-dev,
libzita-resampler-dev
Homepage: http://rlvm.net

Package: rlvm
Expand Down
2 changes: 0 additions & 2 deletions debian/rlvm.6
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ AIR
.IP \[bu]
CLANNAD / CLANNAD Full Voice Edition
.IP \[bu]
CLANNAD Full Voice Edition (With Baka-Tsuki's English patch)
.IP \[bu]
Planetarian
.IP \[bu]
Planetarian (US Edition)
Expand Down
Loading