added license info

This commit is contained in:
Magnus Auvinen 2007-11-25 19:42:40 +00:00
parent e5629675a3
commit a0e5181e42
75 changed files with 100 additions and 0 deletions

26
scripts/copyright.py Executable file
View file

@ -0,0 +1,26 @@
import sys, os
notice = "/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */\n"
def fix_copyright_notice(filename):
f = open(filename, "rb")
lines = f.readlines()
f.close()
if "/*" in lines[0] and "copyright" in lines[0]:
lines[0] = notice
else:
lines = [notice] + lines
file(filename, "wb").writelines(lines)
for root, dirs, files in os.walk("src"):
for name in files:
filename = os.path.join(root, name)
process = 0
if ".h" == filename[-2:] or ".c" == filename[-2:] or ".cpp" == filename[-4:]:
process = 1
if os.sep + "external" + os.sep in filename:
process = 0
if process:
fix_copyright_notice(filename)

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdio.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
#include <stdarg.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/external/glfw/include/GL/glfw.h>
#include <engine/external/pnglite/pnglite.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
#include <engine/external/glfw/include/GL/glfw.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <engine/interface.h>
#include <engine/config.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <engine/network.h>
#include <engine/interface.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <engine/interface.h>
#include <engine/config.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef _UI_H
#define _UI_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "system.h"
#include <string.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
/* variable int packing */
unsigned char *vint_pack(unsigned char *dst, int i);

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
#include <stdio.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef _CONFIG_H
#define _CONFIG_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "../game/game_variables.h"
MACRO_CONFIG_INT(volume, 200, 0, 255)

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "system.h"
#include "datafile.h"
#include "external/zlib/zlib.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
/* raw datafile access */
typedef struct DATAFILE_t DATAFILE;

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef BASELIB_FILE_CONFIG_H
#define BASELIB_FILE_CONFIG_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
#include <stdio.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
const char *engine_savepath(const char *filename, char *buffer, int max);
void engine_init(const char *appname, int argc, char **argv);

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef ENGINE_INTERFACE_H
#define ENGINE_INTERFACE_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
/* AUTO GENERATED! DO NOT EDIT MANUALLY! */
#include <string.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef ENGINE_KEYS_H
#define ENGINE_KEYS_H
/* AUTO GENERATED! DO NOT EDIT MANUALLY! */

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdio.h>
#include "datafile.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "system.h"
typedef struct CHUNK_t

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
typedef struct HEAP_t HEAP;
HEAP *memheap_create();

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "interface.h"
#include "packer.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
#include <stdio.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
typedef struct
{

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "packer.h"
#include "compression.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
enum
{

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "system.h"
/*

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "snapshot.h"
#include "compression.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef ENGINE_SNAPSHOT_H
#define ENGINE_SNAPSHOT_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef BASE_SYSTEM_H
#define BASE_SYSTEM_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
struct animstate
{
keyframe body;

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
#include <stdio.h>
#include <engine/system.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "../vmath.h"
// do this better and nicer

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <game/math.h>
#include <stdlib.h>
#include <stdio.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <engine/interface.h>
#include "mapres_image.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
// loads images from the map to textures
int img_init();

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/interface.h>
#include <engine/config.h>
#include "mapres_tilemap.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
// dependencies: image

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdio.h>
#include <math.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef __MENU_H
#define __MENU_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdio.h>
#include <math.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "game.h"
// TODO: OPT: rewrite this smarter!

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <game/math.h>
#include <math.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
// NOTE: Be very careful when editing this file as it will change the network version
// --------- PHYSICS TWEAK! --------

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
MACRO_CONFIG_INT(key_move_left, 'A', 32, 512)
MACRO_CONFIG_INT(key_move_right, 'D', 32, 512)
MACRO_CONFIG_INT(key_jump, 32, 32, 512)

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
enum
{
MAPRES_REGISTERED=0x8000,

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <game/vmath.h>
#include <game/math.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <game/vmath.h>
struct mapres_collision

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef BASE_MATH_H
#define BASE_MATH_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

View file

@ -1 +1,2 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/config.h>
#include "srv_common.h"
#include <string.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "../game.h"
#include "data.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "srv_common.h"
#include "srv_ctf.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
// game object
class gameobject_ctf : public gameobject

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/config.h>
#include "srv_common.h"
#include "srv_dm.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
// game object
class gameobject_dm : public gameobject
{

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/config.h>
#include "srv_common.h"
#include "srv_tdm.h"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
// game object
class gameobject_tdm : public gameobject
{

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "nethash.c"
#define TEEWARS_VERSION "0.3.0-dev"
#define TEEWARS_NETVERSION "0.3 " TEEWARS_NETVERSION_HASH

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#ifndef BASE_VMATH_H
#define BASE_VMATH_H

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <string.h>
extern "C" {

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
static const int MASTERSERVER_PORT = 8383;
enum {

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/system.h>
#include <cstdlib>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "../engine/external/pnglite/pnglite.c"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/config.h>
#include <engine/system.h>
#include <engine/network.h>

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <engine/datafile.h>
int main(int argc, char **argv)

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "../engine/external/pnglite/pnglite.c"

View file

@ -1,3 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include <iostream>
#include <fstream>