Make Makefile more standard and update copyright year

This commit is contained in:
UnknownShadow200 2022-10-20 19:15:35 +11:00
parent c32ce5761f
commit ba6d8fd738
35 changed files with 46 additions and 49 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2014 - 2021, UnknownShadow200 Copyright (c) 2014 - 2022, UnknownShadow200
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,

View File

@ -2,7 +2,7 @@
#define CC_AUDIO_H #define CC_AUDIO_H
#include "Core.h" #include "Core.h"
/* Manages playing sound and music. /* Manages playing sound and music.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;
extern struct IGameComponent Audio_Component; extern struct IGameComponent Audio_Component;

View File

@ -2,7 +2,7 @@
#define CC_AXISLINESRENDERER_H #define CC_AXISLINESRENDERER_H
#include "Core.h" #include "Core.h"
/* Renders 3 lines showing direction of each axis. /* Renders 3 lines showing direction of each axis.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;

View File

@ -2,7 +2,7 @@
#define CC_BITMAP_H #define CC_BITMAP_H
#include "Core.h" #include "Core.h"
/* Represents a 2D array of pixels. /* Represents a 2D array of pixels.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Stream; struct Stream;

View File

@ -6,7 +6,7 @@
#include "BlockID.h" #include "BlockID.h"
/* Stores properties and data for blocks. /* Stores properties and data for blocks.
Also performs automatic rotation of directional blocks. Also performs automatic rotation of directional blocks.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;
extern struct IGameComponent Blocks_Component; extern struct IGameComponent Blocks_Component;

View File

@ -2,7 +2,7 @@
#define CC_BLOCKID_H #define CC_BLOCKID_H
#include "Core.h" /* TODO: Remove this include when we move to external defines */ #include "Core.h" /* TODO: Remove this include when we move to external defines */
/* List of all core/standard block IDs /* List of all core/standard block IDs
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
enum BLOCKID { enum BLOCKID {

View File

@ -2,7 +2,7 @@
#define CC_BLOCKPHYSICS_H #define CC_BLOCKPHYSICS_H
#include "Core.h" #include "Core.h"
/* Implements simple block physics. /* Implements simple block physics.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
typedef void (*PhysicsHandler)(int index, BlockID block); typedef void (*PhysicsHandler)(int index, BlockID block);

View File

@ -2,7 +2,7 @@
#define CC_CHAT_H #define CC_CHAT_H
#include "Core.h" #include "Core.h"
/* Manages sending, adding, logging and handling chat. /* Manages sending, adding, logging and handling chat.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;
struct StringsBuffer; struct StringsBuffer;

View File

@ -8,7 +8,7 @@
https://www.ietf.org/rfc/rfc1951.txt https://www.ietf.org/rfc/rfc1951.txt
https://github.com/nothings/stb/blob/master/stb_image.h https://github.com/nothings/stb/blob/master/stb_image.h
https://www.hanshq.net/zip.html https://www.hanshq.net/zip.html
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Stream; struct Stream;

View File

@ -3,7 +3,7 @@
#include "Bitmap.h" #include "Bitmap.h"
#include "Constants.h" #include "Constants.h"
/* Performs a variety of drawing operations on bitmaps, and converts bitmaps into textures. /* Performs a variety of drawing operations on bitmaps, and converts bitmaps into textures.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
enum FONT_FLAGS { FONT_FLAGS_NONE = 0x00, FONT_FLAGS_BOLD = 0x01, FONT_FLAGS_UNDERLINE = 0x02, FONT_FLAGS_PADDING = 0x04 }; enum FONT_FLAGS { FONT_FLAGS_NONE = 0x00, FONT_FLAGS_BOLD = 0x01, FONT_FLAGS_UNDERLINE = 0x02, FONT_FLAGS_PADDING = 0x04 };

View File

@ -6,7 +6,7 @@
#include "PackedCol.h" #include "PackedCol.h"
#include "String.h" #include "String.h"
/* Represents an in-game entity. /* Represents an in-game entity.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Model; struct Model;
struct IGameComponent; struct IGameComponent;

View File

@ -3,7 +3,7 @@
#include "Vectors.h" #include "Vectors.h"
#include "Constants.h" #include "Constants.h"
/* Various components for entities. /* Various components for entities.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Entity; struct Entity;

View File

@ -2,7 +2,7 @@
#define CC_EVENT_H #define CC_EVENT_H
#include "Vectors.h" #include "Vectors.h"
/* Helper methods for using events, and contains all events. /* Helper methods for using events, and contains all events.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
/* Max callbacks that can be registered for an event. */ /* Max callbacks that can be registered for an event. */

View File

@ -3,7 +3,7 @@
#include "Core.h" #include "Core.h"
/* Simple math functions and constants. Also implements a RNG algorithm, based on /* Simple math functions and constants. Also implements a RNG algorithm, based on
Java's implementation from https://docs.oracle.com/javase/7/docs/api/java/util/Random.html Java's implementation from https://docs.oracle.com/javase/7/docs/api/java/util/Random.html
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
#define MATH_PI 3.1415926535897931f #define MATH_PI 3.1415926535897931f

View File

@ -2,7 +2,7 @@
#define CC_MAPFORMATS_H #define CC_MAPFORMATS_H
#include "Core.h" #include "Core.h"
/* Imports/exports a world and associated metadata from/to a particular map file format. /* Imports/exports a world and associated metadata from/to a particular map file format.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Stream; struct Stream;

View File

@ -2,7 +2,7 @@
#define CC_GAME_H #define CC_GAME_H
#include "Core.h" #include "Core.h"
/* Represents the game and related structures. /* Represents the game and related structures.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Bitmap; struct Bitmap;

View File

@ -5,7 +5,7 @@
/* Implements flatgrass map generator, and original classic vanilla map generation (with perlin noise) /* Implements flatgrass map generator, and original classic vanilla map generation (with perlin noise)
Based on: https://github.com/UnknownShadow200/ClassiCube/wiki/Minecraft-Classic-map-generation-algorithm Based on: https://github.com/UnknownShadow200/ClassiCube/wiki/Minecraft-Classic-map-generation-algorithm
Thanks to Jerralish for originally reverse engineering classic's algorithm, then preparing a high level overview of the algorithm. Thanks to Jerralish for originally reverse engineering classic's algorithm, then preparing a high level overview of the algorithm.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
/* Progress between 0 and 1 for the current step */ /* Progress between 0 and 1 for the current step */

View File

@ -4,7 +4,7 @@
#include "PackedCol.h" #include "PackedCol.h"
/* /*
Abstracts a 3D graphics rendering API Abstracts a 3D graphics rendering API
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Bitmap; struct Bitmap;
struct Stream; struct Stream;

View File

@ -2,7 +2,7 @@
#define CC_GUI_H #define CC_GUI_H
#include "Core.h" #include "Core.h"
/* Describes and manages 2D GUI elements on screen. /* Describes and manages 2D GUI elements on screen.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
enum GuiAnchor { enum GuiAnchor {

View File

@ -4,7 +4,7 @@
#include "BlockID.h" #include "BlockID.h"
/* Manages inventory hotbar, and ordering of blocks in the inventory menu. /* Manages inventory hotbar, and ordering of blocks in the inventory menu.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;
extern struct IGameComponent Inventory_Component; extern struct IGameComponent Inventory_Component;

View File

@ -2,7 +2,7 @@
#define CC_ISOMETRICDRAWER_H #define CC_ISOMETRICDRAWER_H
#include "Core.h" #include "Core.h"
/* Draws 2D isometric blocks for the hotbar and inventory UIs. /* Draws 2D isometric blocks for the hotbar and inventory UIs.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct VertexTextured; struct VertexTextured;

View File

@ -3,7 +3,7 @@
#include "Bitmap.h" #include "Bitmap.h"
#include "Constants.h" #include "Constants.h"
/* Implements asynchronous web tasks for the launcher. /* Implements asynchronous web tasks for the launcher.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct JsonContext; struct JsonContext;

View File

@ -3,7 +3,7 @@
#include "Bitmap.h" #include "Bitmap.h"
#include "Constants.h" #include "Constants.h"
/* Describes and manages individual 2D GUI elements in the launcher. /* Describes and manages individual 2D GUI elements in the launcher.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct FontDesc; struct FontDesc;
struct Context2D; struct Context2D;

View File

@ -2,7 +2,7 @@
#define CC_LAUNCHER_H #define CC_LAUNCHER_H
#include "Bitmap.h" #include "Bitmap.h"
/* Implements the launcher part of the game. /* Implements the launcher part of the game.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct LScreen; struct LScreen;
struct FontDesc; struct FontDesc;

View File

@ -3,8 +3,6 @@ C_OBJECTS:=$(patsubst %.c, %.o, $(C_SOURCES))
OBJECTS:=$(C_OBJECTS) OBJECTS:=$(C_OBJECTS)
ENAME=ClassiCube ENAME=ClassiCube
DEL=rm DEL=rm
JOBS=1
CC=cc
CFLAGS=-g -pipe -fno-math-errno CFLAGS=-g -pipe -fno-math-errno
LDFLAGS=-g -rdynamic LDFLAGS=-g -rdynamic
@ -44,7 +42,6 @@ LIBS=-lX11 -lXi -lpthread -lGL -lm -ldl
endif endif
ifeq ($(PLAT),sunos) ifeq ($(PLAT),sunos)
CC=gcc
CFLAGS=-g -pipe -fno-math-errno CFLAGS=-g -pipe -fno-math-errno
LIBS=-lm -lsocket -lX11 -lXi -lGL LIBS=-lm -lsocket -lX11 -lXi -lGL
endif endif
@ -103,29 +100,29 @@ endif
default: $(PLAT) default: $(PLAT)
web: web:
$(MAKE) $(ENAME) PLAT=web -j$(JOBS) $(MAKE) $(ENAME) PLAT=web
linux: linux:
$(MAKE) $(ENAME) PLAT=linux -j$(JOBS) $(MAKE) $(ENAME) PLAT=linux
mingw: mingw:
$(MAKE) $(ENAME) PLAT=mingw -j$(JOBS) $(MAKE) $(ENAME) PLAT=mingw
sunos: sunos:
$(MAKE) $(ENAME) PLAT=sunos -j$(JOBS) $(MAKE) $(ENAME) PLAT=sunos
mac_x32: mac_x32:
$(MAKE) $(ENAME) PLAT=mac_x32 -j$(JOBS) $(MAKE) $(ENAME) PLAT=mac_x32
mac_x64: mac_x64:
$(MAKE) $(ENAME) PLAT=mac_x64 -j$(JOBS) $(MAKE) $(ENAME) PLAT=mac_x64
freebsd: freebsd:
$(MAKE) $(ENAME) PLAT=freebsd -j$(JOBS) $(MAKE) $(ENAME) PLAT=freebsd
openbsd: openbsd:
$(MAKE) $(ENAME) PLAT=openbsd -j$(JOBS) $(MAKE) $(ENAME) PLAT=openbsd
netbsd: netbsd:
$(MAKE) $(ENAME) PLAT=netbsd -j$(JOBS) $(MAKE) $(ENAME) PLAT=netbsd
dragonfly: dragonfly:
$(MAKE) $(ENAME) PLAT=dragonfly -j$(JOBS) $(MAKE) $(ENAME) PLAT=dragonfly
haiku: haiku:
$(MAKE) $(ENAME) PLAT=haiku -j$(JOBS) $(MAKE) $(ENAME) PLAT=haiku
serenityos: serenityos:
$(MAKE) $(ENAME) PLAT=serenityos -j$(JOBS) $(MAKE) $(ENAME) PLAT=serenityos
clean: clean:
$(DEL) $(OBJECTS) $(DEL) $(OBJECTS)

View File

@ -5,7 +5,7 @@
/* Renders the blocks of the world by subdividing it into chunks. /* Renders the blocks of the world by subdividing it into chunks.
Also manages the process of building/deleting chunk meshes. Also manages the process of building/deleting chunk meshes.
Also sorts chunks so nearest chunks are rendered first, and calculates chunk visibility. Also sorts chunks so nearest chunks are rendered first, and calculates chunk visibility.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;
extern struct IGameComponent MapRenderer_Component; extern struct IGameComponent MapRenderer_Component;

View File

@ -3,7 +3,7 @@
#include "Core.h" #include "Core.h"
/* Contains all 2D menu screen implementations. /* Contains all 2D menu screen implementations.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Screen; struct Screen;
int Menu_PointerDown(void* screen, int id, int x, int y); int Menu_PointerDown(void* screen, int id, int x, int y);

View File

@ -6,7 +6,7 @@
#include "Physics.h" #include "Physics.h"
/* Contains various structs and methods for an entity model. /* Contains various structs and methods for an entity model.
Also contains a list of models and default textures for those models. Also contains a list of models and default textures for those models.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Entity; struct Entity;
struct AABB; struct AABB;

View File

@ -2,7 +2,7 @@
#define CC_PACKEDCOL_H #define CC_PACKEDCOL_H
#include "Core.h" #include "Core.h"
/* Manipulates a packed 32 bit RGBA colour, in a format suitable for the native 3D graphics API. /* Manipulates a packed 32 bit RGBA colour, in a format suitable for the native 3D graphics API.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
typedef cc_uint32 PackedCol; typedef cc_uint32 PackedCol;

View File

@ -2,7 +2,7 @@
#define CC_PICKEDPOSRENDERER_H #define CC_PICKEDPOSRENDERER_H
#include "Core.h" #include "Core.h"
/* Renders an outline around the block the player is looking at. /* Renders an outline around the block the player is looking at.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct RayTracer; struct RayTracer;
struct IGameComponent; struct IGameComponent;

View File

@ -2,7 +2,7 @@
#define CC_RESOURCES_H #define CC_RESOURCES_H
#include "Core.h" #include "Core.h"
/* Implements checking, fetching, and patching the default game assets. /* Implements checking, fetching, and patching the default game assets.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
/* Number of resources that need to be downloaded. */ /* Number of resources that need to be downloaded. */

View File

@ -2,7 +2,7 @@
#define CC_SCREENS_H #define CC_SCREENS_H
#include "Core.h" #include "Core.h"
/* Contains all 2D non-menu screen implementations. /* Contains all 2D non-menu screen implementations.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Screen; struct Screen;

View File

@ -3,7 +3,7 @@
#include "Vectors.h" #include "Vectors.h"
#include "PackedCol.h" #include "PackedCol.h"
/* Describes a selection box, and contains methods related to the selection box. /* Describes a selection box, and contains methods related to the selection box.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct IGameComponent; struct IGameComponent;
extern struct IGameComponent Selections_Component; extern struct IGameComponent Selections_Component;

View File

@ -4,7 +4,7 @@
#include "Platform.h" #include "Platform.h"
/* Defines an abstract way of reading and writing data in a streaming manner. /* Defines an abstract way of reading and writing data in a streaming manner.
Also provides common helper methods for reading/writing data to/from streams. Also provides common helper methods for reading/writing data to/from streams.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct Stream; struct Stream;

View File

@ -6,7 +6,7 @@
#include "Entity.h" #include "Entity.h"
#include "Inventory.h" #include "Inventory.h"
/* Contains all 2D widget implementations. /* Contains all 2D widget implementations.
Copyright 2014-2021 ClassiCube | Licensed under BSD-3 Copyright 2014-2022 ClassiCube | Licensed under BSD-3
*/ */
struct FontDesc; struct FontDesc;