shinyquagsire23 / DesktopAdventures

A recreation of the Desktop Adventures engine in C
GNU Lesser General Public License v2.1
47 stars 4 forks source link

Support for Windows/other platforms, other compilers #5

Open shinyquagsire23 opened 8 years ago

shinyquagsire23 commented 8 years ago

As of now the working status of DesktopAdventures between platforms is still in the air, I develop primarily on Linux and don't have developing environments on any Windows or OS X machines as of yet, however I have my doubts that it would work on Windows as-is.

3DS has it's own issues at the moment due to the delta-based updating using the system clock, which means it can't be run with Citra due to https://github.com/citra-emu/citra/pull/1641 still not being pulled (probably still works on actual hardware). I'm thinking about porting to Wii U, however that would bring up https://github.com/shinyquagsire23/DesktopAdventures/issues/3 since the Wii U's PPC is Big-Endian. With Wii U though it may be worth looking into a software-based framebuffer renderer, since I don't believe there is an OpenGL implementation for Wii U outside of the official SDK.

The project also has only been tested against GCC 5.3.0, and as of yet I am still uncertain if it works with other compilers or GCC 6.0.

IceReaper commented 8 years ago

Getting the stuff compiled under windows using cygwin. Besides the default packages, i installed the following packages to build:

Only problem was the cmake version 3.4, which is only available as 3.3 in cygwin. However after changing the required version string, it cmake was successfull. (anything against lowering the required cmake version in repository?)

However upon starting, the following message occurs: "Video init failed: Invalid renderer"

shinyquagsire23 commented 8 years ago

@IceReaper I have no problems with lowering the cmake version, that was just an IDE default which was set. As for video, I suspect the <GL/gl.h> imports could be an issue, might need to be replaced with some #ifdef logic for 3DS's OpenGL vs SDL. Can't really test that myself though.

shinyquagsire23 commented 8 years ago

OS X/Clang works perfectly with c339f8ef7fecaa3c63dbe43cb7d295d51d1435db, which just leaves Windows to be tested. Big endian and porting is in a pretty decent state at the moment though after porting to Wii U. I'm probably going to scrap OpenGL rendering all together since it's a bit of a pain to maintain and more trouble than it's worth.

IceReaper commented 8 years ago

OS: Elementary OS 0.3.2 Freya 64bit (based on Ubuntu 14.04) Packages: aptitude install build-essential cmake libsdl2-dev libsdl2-mixer-dev

Installed versions:

ii  cmake                    2.8.12.2-0ubuntu3             amd64        cross-platform, open-source make system
ii  make                     3.81-8.2ubuntu3               amd64        An utility for Directing compilation.
ii  gcc                      4:4.8.2-1ubuntu6              amd64        GNU C compiler

Cmake output:

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
<FindSDL2.cmake>
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
</FindSDL2.cmake>
-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread  
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andre/Downloads/DesktopAdventures/build

Make:

/usr/bin/cmake -H/home/andre/Downloads/DesktopAdventures -B/home/andre/Downloads/DesktopAdventures/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/andre/Downloads/DesktopAdventures/build/CMakeFiles /home/andre/Downloads/DesktopAdventures/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird betreten
make -f CMakeFiles/DesktopAdventures.dir/build.make CMakeFiles/DesktopAdventures.dir/depend
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird betreten
cd /home/andre/Downloads/DesktopAdventures/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/andre/Downloads/DesktopAdventures /home/andre/Downloads/DesktopAdventures /home/andre/Downloads/DesktopAdventures/build /home/andre/Downloads/DesktopAdventures/build /home/andre/Downloads/DesktopAdventures/build/CMakeFiles/DesktopAdventures.dir/DependInfo.cmake --color=
Scanning dependencies of target DesktopAdventures
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird verlassen
make -f CMakeFiles/DesktopAdventures.dir/build.make CMakeFiles/DesktopAdventures.dir/build
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird betreten
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 1
[  7%] Building C object CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o   -c /home/andre/Downloads/DesktopAdventures/src/pc/main.c
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: In function ‘buffer_render_tile’:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:266:26: warning: comparison between pointer and integer [enabled by default]
     if(!buffer || buffer == -1)
                          ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:269:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for(int i = 0; i < width*height; i++)
     ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:269:5: note: use option -std=c99 or -std=gnu99 to compile your code
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: In function ‘buffer_render_char’:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:300:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for(int i = 0; i < deskAdvInvFontDescriptors[c-deskAdvInvFontInfo.start_char].width; i++)
     ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:302:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for(int j = 0; j < deskAdvInvFontInfo.height; j++)
         ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: In function ‘buffer_render_text’:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:313:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for(int i = 0; i < strlen(text); i++)
     ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: In function ‘render_post’:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:364:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for(int i = 0; i < 7; i++)
     ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:372:13: error: redefinition of ‘i’
     for(int i = 0; i < 7; i++)
             ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:364:13: note: previous definition of ‘i’ was here
     for(int i = 0; i < 7; i++)
             ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:372:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for(int i = 0; i < 7; i++)
     ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:374:49: warning: comparison between pointer and integer [enabled by default]
         if(player_inventory[i+inventory_scroll] == NULL) break;
                                                 ^
In file included from /home/andre/Downloads/DesktopAdventures/src/pc/main.c:39:0:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: At top level:
/home/andre/Downloads/DesktopAdventures/src/include/font.h:22:4: warning: array ‘deskAdvFontBitmaps’ assumed to have one element [enabled by default]
 u8 deskAdvFontBitmaps[];
    ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:24:16: warning: array ‘deskAdvFontDescriptors’ assumed to have one element [enabled by default]
 FONT_CHAR_INFO deskAdvFontDescriptors[];
                ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:26:4: warning: array ‘deskAdvInvFontBitmaps’ assumed to have one element [enabled by default]
 u8 deskAdvInvFontBitmaps[];
    ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:28:16: warning: array ‘deskAdvInvFontDescriptors’ assumed to have one element [enabled by default]
 FONT_CHAR_INFO deskAdvInvFontDescriptors[];
                ^
make[2]: *** [CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o] Fehler 1
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird verlassen
make[1]: *** [CMakeFiles/DesktopAdventures.dir/all] Fehler 2
make[1]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird verlassen
make: *** [all] Fehler 2
shinyquagsire23 commented 8 years ago

@IceReaper Ah, your version of GCC is pretty old (I'm on 5.3.0 at the moment). Newer versions of GCC default to C99 so I never actually ended up setting that in the CMakeList. Try pulling c350ec28ddf983fdedba1c725dc054c05f7d4b4f and see if that fixes it.

IceReaper commented 8 years ago

Yup, that fixed compiling, however linking afterwards fails. Also Compiling and Linking generated some warnings - expected? Oh, and to notice, i edited the CMake file to lower the version to 2.8, as its the one from the packages repository.

/usr/bin/cmake -H/home/andre/Downloads/DesktopAdventures -B/home/andre/Downloads/DesktopAdventures/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/andre/Downloads/DesktopAdventures/build/CMakeFiles /home/andre/Downloads/DesktopAdventures/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird betreten
make -f CMakeFiles/DesktopAdventures.dir/build.make CMakeFiles/DesktopAdventures.dir/depend
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird betreten
cd /home/andre/Downloads/DesktopAdventures/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/andre/Downloads/DesktopAdventures /home/andre/Downloads/DesktopAdventures /home/andre/Downloads/DesktopAdventures/build /home/andre/Downloads/DesktopAdventures/build /home/andre/Downloads/DesktopAdventures/build/CMakeFiles/DesktopAdventures.dir/DependInfo.cmake --color=
Scanning dependencies of target DesktopAdventures
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird verlassen
make -f CMakeFiles/DesktopAdventures.dir/build.make CMakeFiles/DesktopAdventures.dir/build
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird betreten
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 1
[  7%] Building C object CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o   -c /home/andre/Downloads/DesktopAdventures/src/pc/main.c
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: In function ‘buffer_render_tile’:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:337:26: warning: comparison between pointer and integer [enabled by default]
     if(!buffer || buffer == -1)
                          ^
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: In function ‘render_post’:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c:445:49: warning: comparison between pointer and integer [enabled by default]
         if(player_inventory[i+inventory_scroll] == NULL) break;
                                                 ^
In file included from /home/andre/Downloads/DesktopAdventures/src/pc/main.c:39:0:
/home/andre/Downloads/DesktopAdventures/src/pc/main.c: At top level:
/home/andre/Downloads/DesktopAdventures/src/include/font.h:22:4: warning: array ‘deskAdvFontBitmaps’ assumed to have one element [enabled by default]
 u8 deskAdvFontBitmaps[];
    ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:24:16: warning: array ‘deskAdvFontDescriptors’ assumed to have one element [enabled by default]
 FONT_CHAR_INFO deskAdvFontDescriptors[];
                ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:26:4: warning: array ‘deskAdvInvFontBitmaps’ assumed to have one element [enabled by default]
 u8 deskAdvInvFontBitmaps[];
    ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:28:16: warning: array ‘deskAdvInvFontDescriptors’ assumed to have one element [enabled by default]
 FONT_CHAR_INFO deskAdvInvFontDescriptors[];
                ^
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 2
[ 15%] Building C object CMakeFiles/DesktopAdventures.dir/src/assets.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/assets.c.o   -c /home/andre/Downloads/DesktopAdventures/src/assets.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 3
[ 23%] Building C object CMakeFiles/DesktopAdventures.dir/src/character.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/character.c.o   -c /home/andre/Downloads/DesktopAdventures/src/character.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 4
[ 30%] Building C object CMakeFiles/DesktopAdventures.dir/src/map.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/map.c.o   -c /home/andre/Downloads/DesktopAdventures/src/map.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 5
[ 38%] Building C object CMakeFiles/DesktopAdventures.dir/src/player.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/player.c.o   -c /home/andre/Downloads/DesktopAdventures/src/player.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 6
[ 46%] Building C object CMakeFiles/DesktopAdventures.dir/src/puzzle.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/puzzle.c.o   -c /home/andre/Downloads/DesktopAdventures/src/puzzle.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 7
[ 53%] Building C object CMakeFiles/DesktopAdventures.dir/src/screen.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/screen.c.o   -c /home/andre/Downloads/DesktopAdventures/src/screen.c
/home/andre/Downloads/DesktopAdventures/src/screen.c: In function ‘screen_transition_out’:
/home/andre/Downloads/DesktopAdventures/src/screen.c:83:9: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
         usleep(1000*(1000/TARGET_TICK_FPS));
         ^
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 8
[ 61%] Building C object CMakeFiles/DesktopAdventures.dir/src/input.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/input.c.o   -c /home/andre/Downloads/DesktopAdventures/src/input.c
/home/andre/Downloads/DesktopAdventures/src/input.c: In function ‘drop_item’:
/home/andre/Downloads/DesktopAdventures/src/input.c:90:5: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
     printf("dropped item on %u,%u\n", item_actual_tile_x, item_actual_tile_y);
     ^
/home/andre/Downloads/DesktopAdventures/src/input.c:90:5: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 9
[ 69%] Building C object CMakeFiles/DesktopAdventures.dir/src/iact.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/iact.c.o   -c /home/andre/Downloads/DesktopAdventures/src/iact.c
/home/andre/Downloads/DesktopAdventures/src/iact.c: In function ‘item_select_prompt’:
/home/andre/Downloads/DesktopAdventures/src/iact.c:80:9: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
         usleep(1000*(1000/(TARGET_TICK_FPS/2)));
         ^
/home/andre/Downloads/DesktopAdventures/src/iact.c: In function ‘run_iact’:
/home/andre/Downloads/DesktopAdventures/src/iact.c:242:17: warning: implicit declaration of function ‘random’ [-Wimplicit-function-declaration]
                 IACT_RANDVAR = (random() % args[0]) + 1;
                 ^
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 10
[ 76%] Building C object CMakeFiles/DesktopAdventures.dir/src/pc/sound.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/pc/sound.c.o   -c /home/andre/Downloads/DesktopAdventures/src/pc/sound.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 11
[ 84%] Building C object CMakeFiles/DesktopAdventures.dir/src/render_gl.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/render_gl.c.o   -c /home/andre/Downloads/DesktopAdventures/src/render_gl.c
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 12
[ 92%] Building C object CMakeFiles/DesktopAdventures.dir/src/render_buffer.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/render_buffer.c.o   -c /home/andre/Downloads/DesktopAdventures/src/render_buffer.c
/home/andre/Downloads/DesktopAdventures/src/render_buffer.c: In function ‘render_texture’:
/home/andre/Downloads/DesktopAdventures/src/render_buffer.c:36:26: warning: comparison between pointer and integer [enabled by default]
     if(!buffer || buffer == -1)
                          ^
In file included from /home/andre/Downloads/DesktopAdventures/src/render_buffer.c:28:0:
/home/andre/Downloads/DesktopAdventures/src/render_buffer.c: At top level:
/home/andre/Downloads/DesktopAdventures/src/include/font.h:22:4: warning: array ‘deskAdvFontBitmaps’ assumed to have one element [enabled by default]
 u8 deskAdvFontBitmaps[];
    ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:24:16: warning: array ‘deskAdvFontDescriptors’ assumed to have one element [enabled by default]
 FONT_CHAR_INFO deskAdvFontDescriptors[];
                ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:26:4: warning: array ‘deskAdvInvFontBitmaps’ assumed to have one element [enabled by default]
 u8 deskAdvInvFontBitmaps[];
    ^
/home/andre/Downloads/DesktopAdventures/src/include/font.h:28:16: warning: array ‘deskAdvInvFontDescriptors’ assumed to have one element [enabled by default]
 FONT_CHAR_INFO deskAdvInvFontDescriptors[];
                ^
/usr/bin/cmake -E cmake_progress_report /home/andre/Downloads/DesktopAdventures/build/CMakeFiles 13
[100%] Building C object CMakeFiles/DesktopAdventures.dir/src/font.c.o
/usr/bin/cc  -DDAT_IN_RAM -DLITTLE_ENDIAN -DPC_BUILD -DRENDER_BUFFER -std=c99 -Wall -g -I/usr/include/SDL2 -I/home/andre/Downloads/DesktopAdventures/src/include -I/home/andre/Downloads/DesktopAdventures/src/pc    -o CMakeFiles/DesktopAdventures.dir/src/font.c.o   -c /home/andre/Downloads/DesktopAdventures/src/font.c
Linking C executable ../bin/DesktopAdventures
/usr/bin/cmake -E cmake_link_script CMakeFiles/DesktopAdventures.dir/link.txt --verbose=1
/usr/bin/cc   -std=c99 -Wall -g    CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o CMakeFiles/DesktopAdventures.dir/src/assets.c.o CMakeFiles/DesktopAdventures.dir/src/character.c.o CMakeFiles/DesktopAdventures.dir/src/map.c.o CMakeFiles/DesktopAdventures.dir/src/player.c.o CMakeFiles/DesktopAdventures.dir/src/puzzle.c.o CMakeFiles/DesktopAdventures.dir/src/screen.c.o CMakeFiles/DesktopAdventures.dir/src/input.c.o CMakeFiles/DesktopAdventures.dir/src/iact.c.o CMakeFiles/DesktopAdventures.dir/src/pc/sound.c.o CMakeFiles/DesktopAdventures.dir/src/render_gl.c.o CMakeFiles/DesktopAdventures.dir/src/render_buffer.c.o CMakeFiles/DesktopAdventures.dir/src/font.c.o  -o ../bin/DesktopAdventures -rdynamic -Wl,-Bstatic -lSDL2main -Wl,-Bdynamic -lSDL2 -lpthread -lSDL2_mixer -lGLU -lGL -lSM -lICE -lX11 -lXext 
/usr/bin/ld: Warnung: Größe des Symboles »deskAdvFontBitmaps« änderte sich von 1 in CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o zu 846 in CMakeFiles/DesktopAdventures.dir/src/font.c.o
/usr/bin/ld: Warnung: Größe des Symboles »deskAdvFontDescriptors« änderte sich von 8 in CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o zu 752 in CMakeFiles/DesktopAdventures.dir/src/font.c.o
/usr/bin/ld: Warnung: Größe des Symboles »deskAdvInvFontBitmaps« änderte sich von 1 in CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o zu 980 in CMakeFiles/DesktopAdventures.dir/src/font.c.o
/usr/bin/ld: Warnung: Größe des Symboles »deskAdvInvFontDescriptors« änderte sich von 8 in CMakeFiles/DesktopAdventures.dir/src/pc/main.c.o zu 752 in CMakeFiles/DesktopAdventures.dir/src/font.c.o
/usr/bin/ld: Warning: alignment 1 of symbol `unknown' in //lib/x86_64-linux-gnu/libwrap.so.0 is smaller than 4 in CMakeFiles/DesktopAdventures.dir/src/map.c.o
/usr/bin/ld: Warnung: Größe des Symboles »unknown« änderte sich von 4 in CMakeFiles/DesktopAdventures.dir/src/map.c.o zu 8 in //lib/x86_64-linux-gnu/libwrap.so.0
/usr/bin/ld: CMakeFiles/DesktopAdventures.dir/src/map.c.o: undefined reference to symbol 'unknown'
//lib/x86_64-linux-gnu/libwrap.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/DesktopAdventures] Fehler 1
make[2]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird verlassen
make[1]: *** [CMakeFiles/DesktopAdventures.dir/all] Fehler 2
make[1]: Verzeichnis »/home/andre/Downloads/DesktopAdventures/build« wird verlassen
make: *** [all] Fehler 2
shinyquagsire23 commented 8 years ago

Hm, it's getting confused with my u32 unknown at https://github.com/shinyquagsire23/DesktopAdventures/blob/master/src/map.c#L62? Maybe try renaming it to "unknown_" or something? Not 100% sure what's going on...

The error itself is "/lib/x86_64-linux-gnu/libwrap.so.0: error adding symbols: DSO missing from command line", but I'm not 100% sure what that means.

IceReaper commented 8 years ago

Yup, renaming the variable works :)

shinyquagsire23 commented 8 years ago

@IceReaper Should be fixed as of dbb55cf553a5b90c7a2a034ebb66458820b5da04, that unknown was just a length :/

shinyquagsire23 commented 8 years ago

Hm, unless 3DS really can't handle software rendering I'm thinking I'll kill of OpenGL rendering purely based on palette animation. Unless I did some shader magic to let me use paletted textures, it really just wouldn't work well.

IceReaper commented 8 years ago

Works flawless under Windows 10 when using the WSL feature. CMake minimum version however still needs to be lowered to 2.8 to get it compiled.

shinyquagsire23 commented 8 years ago

@IceReaper Hm, good to know I suppose. If it works on 2.8 just feel free to submit a PR to lower that version, I don't particularly use any advanced CMake features (nor do I care to, half the other build methods are just Makefiles anyhow...)