Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 27 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
defaultPackage = packages.game;
packages = {
game = import ./nix { inherit nixpkgs system; };
darwin-app = import ./darwin-app.nix { inherit nixpkgs system; };
windows = import ./windows.nix { inherit nixpkgs system; };
flatpak = import ./flatpak.nix { inherit nixpkgs system; };
darwin-app = import ./nix/darwin-app.nix { inherit nixpkgs system; };
windows = import ./nix/windows.nix { inherit nixpkgs system; };
flatpak = import ./nix/flatpak.nix { inherit nixpkgs system; };
appimage = nix-bundle.bundlers.appimage {
inherit system;
target = (oldGlibcPkgs.callPackage ./package.nix { }).overrideAttrs (old: {
Expand Down
12 changes: 8 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
# subdirectories here, and trying to avoid putting any concerns about what the.
# host machine is in the subdirectories.

project('MAR1D', 'c')

# make sure we're nice and clean
add_project_arguments('-Werror', language: 'c')
project('MAR1D', 'c', default_options: 'werror=true')

# this project makes extensive use of char subscripts, and i'm proud of it.
add_project_arguments( '-Wno-char-subscripts', language: 'c')
Expand All @@ -22,7 +20,13 @@ cc = meson.get_compiler('c')
# find dependencies (depending on host)
math_lib = cc.find_library('m', required : false)
opengl_dep = is_windows ? cc.find_library('opengl32', required : true) : dependency('opengl', static : static_deps)
glu_dep = is_windows ? cc.find_library('glu32', required : true) : dependency('glu', static : static_deps)
if is_windows
glu_dep = cc.find_library('glu32', required : true)
elif is_darwin
glu_dep = opengl_dep
else
glu_dep = dependency('glu', static : static_deps)
endif
sdl2_dep = dependency('sdl2', static : static_deps)
sdl2_mixer_dep = dependency('SDL2_mixer', static : static_deps)
libconfig_dep = dependency('libconfig', static : static_deps)
Expand Down
3 changes: 2 additions & 1 deletion nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ stdenv.mkDerivation rec {

meta = with lib; {
description = "First person Super Mario Bros";
mainProgram = "MAR1D";
longDescription = ''
The original Super Mario Bros as you've never seen it. Step into Mario's
shoes in this first person clone of the classic Mario game. True to the
original, however, the game still takes place in a two dimensional world.
You must view the world as mario does, as a one dimensional line.
'';
homepage = "https://mar1d.com";
license = licenses.agpl3;
license = licenses.agpl3Only;
maintainers = with maintainers; [ taeer ];
platforms = platforms.unix;
};
Expand Down
6 changes: 5 additions & 1 deletion src/graphics.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#ifndef _GRAPHICS_H
#define _GRAPHICS_H
#include <SDL_opengl.h>
#include <GL/glu.h>
#ifdef __APPLE__
#include <OpenGL/glu.h>
#else
#include <GL/glu.h>
#endif
#include <SDL.h>
#include "helpers.h"
#include "objects.h"
Expand Down
6 changes: 5 additions & 1 deletion src/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
#define _MENU_H

#include <SDL_opengl.h>
#include <GL/glu.h>
#if __APPLE__
#include <OpenGL/glu.h>
#else
#include <GL/glu.h>
#endif
#include <SDL.h>
#include "helpers.h"
#include "graphics.h"
Expand Down