Skip to content

Commit

Permalink
renamed everything. added the new license
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Auvinen committed Mar 22, 2008
1 parent 271f1ae commit bc108df
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 69 deletions.
File renamed without changes.
14 changes: 7 additions & 7 deletions default.bam
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,21 @@ function DataCompile(datafile, scriptfile, headerfile, sourcefile, outputdatafil
end

serverdata = DataCompile(
"datasrc/teewars.ds",
"datasrc/data.ds",
"datasrc/server.dts",
"src/game/generated/gs_data.h",
"src/game/generated/gs_data.cpp",
"src/game/generated/gs_internaldata.cpp")

clientdata = DataCompile(
"datasrc/teewars.ds",
"datasrc/data.ds",
"datasrc/client.dts",
"src/game/generated/gc_data.h",
"src/game/generated/gc_data.cpp",
"src/game/generated/gc_internaldata.cpp")

networkdata = DataCompile(
"datasrc/teewars.ds",
"datasrc/data.ds",
"datasrc/network.dts",
"src/game/generated/g_protocol_ids.h",
"src/game/generated/g_protocol_ids.cpp")
Expand All @@ -178,7 +178,7 @@ nethash = CHash(

client_link_other = {}
if family == "windows" then
client_link_other = {ResCompile("other/icons/teewars.rc")}
client_link_other = {ResCompile("other/icons/teeworlds.rc")}
end


Expand Down Expand Up @@ -264,7 +264,7 @@ function build(settings)
Collect("src/engine/external/portaudio/src/os/" .. pa_platform .. "/*.c"),
Collect("src/engine/external/portaudio/src/hostapi/" .. pa_hostapi .. "/*.c"))

-- build teewars components
-- build game components
engine_settings = settings:copy()

if family == "windows" then
Expand Down Expand Up @@ -332,11 +332,11 @@ function build(settings)
end

-- build client, server and master server
client_exe = Link(client_settings, "teewars", game_shared, game_client,
client_exe = Link(client_settings, "teeworlds", game_shared, game_client,
engine, client, game_editor, glfw, portaudio, zlib, pnglite, wavpack,
client_link_other)

server_exe = Link(server_settings, "teewars_srv", engine, server,
server_exe = Link(server_settings, "teeworlds_srv", engine, server,
game_shared, game_server, zlib)

masterserver_exe = Link(server_settings, "mastersrv", masterserver,
Expand Down
38 changes: 21 additions & 17 deletions license.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
Copyright (c) 2007, Magnus Auvinen

All rights reserved.

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Redistribution and use in source and binary forms, without modification,
are permitted.
Copyright (C) 2007-2008 Magnus Auvinen

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
4. Neither this software nor any of its individual components, in original
or modified versions, may be sold by itself.

------------------------------------------------------------------------

IMPORTANT NOTE! The source under src/engine/external are stripped
libraries with their own licenses. Mostly BSD or zlib/libpng license.
libraries with their own licenses. Mostly BSD or zlib/libpng license but
check the individual libraries.

------------------------------------------------------------------------

With that being said, contact us if there is anything you want to do
that the license does not premit.

Why we have choosen this licens is because we want people to be able to
send in patches, bug-fixes and compile the game for their platform. We
don't want to have several diffrent versions floating around the net
with their own little features etc. There should only be one Teewars
and that one should be the very best it can be.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 18 additions & 14 deletions scripts/build.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import os, sys, shutil, httplib, zipfile

name = "teeworlds"
domain = "www.%s.com" % name
version = sys.argv[1]



flag_download = True
flag_clean = True

Expand All @@ -26,9 +30,9 @@

platform = name + "_" + arch

print "teewars-%s-%s" % (version, platform)
print "%s-%s-%s" % (name,version, platform)

src_package = "teewars-%s-src.zip" % version
src_package = "%s-%s-src.zip" % (name,version)

root_dir = os.getcwd() + "/work"
src_dir = ""
Expand Down Expand Up @@ -87,20 +91,20 @@ def bail(reason):
# download
if flag_download:
print "*** downloading bam source package ***"
if not fetch_file("www.teewars.com", "/files/bam.zip", "bam.zip"):
if not fetch_file("www.teewars.com", "/files/beta/bam.zip", "bam.zip"):
if not fetch_file(domain, "/files/bam.zip", "bam.zip"):
if not fetch_file(domain, "/files/beta/bam.zip", "bam.zip"):
bail("couldn't find source package and couldn't download it")

print "*** downloading teewars source package ***"
if not fetch_file("www.teewars.com", "/files/%s" % src_package, src_package):
if not fetch_file("www.teewars.com", "/files/beta/%s" % src_package, src_package):
print "*** downloading %s source package ***" % name
if not fetch_file(domain, "/files/%s" % src_package, src_package):
if not fetch_file(domain, "/files/beta/%s" % src_package, src_package):
bail("couldn't find source package and couldn't download it")

# unpack
print "*** unpacking source ***"
unzip("bam.zip", ".")
unzip(src_package, "teewars")
src_dir = "teewars/"+ os.listdir("teewars/")[0]
unzip(src_package, name)
src_dir = name+"/"+ os.listdir(name+"/")[0]

# build bam
if 1:
Expand All @@ -119,23 +123,23 @@ def bail(reason):
os.chdir(root_dir)
shutil.copy("bam/src/"+output, src_dir+"/"+output)

# build teewars
# build the game
if 1:
print "*** building teewars ***"
print "*** building %s ***" % name
os.chdir(src_dir)
if os.system("%s server_release client_release" % bam_cmd) != 0:
bail("failed to build teewars")
bail("failed to build %s" % name)
os.chdir(root_dir)

# make release
if 1:
print "*** making release ***"
os.chdir(src_dir)
if os.system("python scripts/make_release.py %s %s" % (version, platform)) != 0:
bail("failed to make a relase of teewars")
bail("failed to make a relase of %s"%name)
final_output = "FAIL"
for f in os.listdir("."):
if version in f and platform in f and "teewars" in f and (".zip" in f or ".tar.gz" in f):
if version in f and platform in f and name in f and (".zip" in f or ".tar.gz" in f):
final_output = f
os.chdir(root_dir)
shutil.copy("%s/%s" % (src_dir, final_output), "../"+final_output)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmd5.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def cstrip(lines):
for filename in sys.argv[1:]:
f += cstrip([l.strip() for l in file(filename)])

print '#define TEEWARS_NETVERSION_HASH "%s"' % md5.new(f).hexdigest().lower()[16:]
print '#define GAME_NETVERSION_HASH "%s"' % md5.new(f).hexdigest().lower()[16:]
2 changes: 1 addition & 1 deletion scripts/font_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ def save_kerning(dic):
convert(input, output)
print "done!"
else:
print "font converter! converts .fnt files to teewars .tfnt"
print "font converter! converts .fnt files to teeworlds .tfnt"
print "usage: font_converter <input>"
20 changes: 10 additions & 10 deletions scripts/make_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
print sys.argv[0], "VERSION PLATFORM"
sys.exit(-1)

name = "teewars"
name = "teeworlds"
version = sys.argv[1]
platform = sys.argv[2]
exe_ext = ""
Expand Down Expand Up @@ -68,8 +68,8 @@ def copydir(src, dst, excl=[]):
shutil.copy("other/config_directory.bat", package_dir)

if include_exe and not use_bundle:
shutil.copy("teewars"+exe_ext, package_dir)
shutil.copy("teewars_srv"+exe_ext, package_dir)
shutil.copy(name+exe_ext, package_dir)
shutil.copy(name+"_srv"+exe_ext, package_dir)

if include_src:
for p in ["src", "scripts", "datasrc", "other", "objs"]:
Expand All @@ -78,18 +78,18 @@ def copydir(src, dst, excl=[]):
shutil.copy("default.bam", package_dir)

if use_bundle:
bundle_content_dir = os.path.join(package_dir, "Teewars.app/Contents")
bundle_content_dir = os.path.join(package_dir, "Teeworlds.app/Contents")
bundle_bin_dir = os.path.join(bundle_content_dir, "MacOS")
bundle_resource_dir = os.path.join(bundle_content_dir, "Resources")
os.mkdir(os.path.join(package_dir, "Teewars.app"))
os.mkdir(os.path.join(package_dir, "Teeworlds.app"))
os.mkdir(bundle_content_dir)
os.mkdir(bundle_bin_dir)
os.mkdir(bundle_resource_dir)
os.mkdir(os.path.join(bundle_resource_dir, "data"))
copydir("data", bundle_resource_dir)
shutil.copy("other/icons/Teewars.icns", bundle_resource_dir)
shutil.copy("teewars"+exe_ext, bundle_bin_dir)
shutil.copy("teewars_srv"+exe_ext, bundle_bin_dir)
shutil.copy("other/icons/Teeworlds.icns", bundle_resource_dir)
shutil.copy(name+exe_ext, bundle_bin_dir)
shutil.copy(name+"_srv"+exe_ext, bundle_bin_dir)
shutil.copy("TeeLaunch"+exe_ext, bundle_bin_dir)
file(os.path.join(bundle_content_dir, "Info.plist"), "w").write("""
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -99,9 +99,9 @@ def copydir(src, dst, excl=[]):
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>teewars</string>
<string>teeworlds</string>
<key>CFBundleIconFile</key>
<string>Teewars</string>
<string>Teeworlds</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
10 changes: 5 additions & 5 deletions scripts/make_src.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
z.close()

if 1:
os.system("svn export svn://svn.teewars.com/teewars/%s teewars" % svn_tree)
os.chdir("teewars")
os.system("svn export svn://svn.teeworlds.com/teeworlds/%s teeworlds" % svn_tree)
os.chdir("teeworlds")
os.system("python scripts/make_release.py %s src" % version)
os.chdir(root_dir)
for f in os.listdir("teewars"):
if "teewars" in f and "src" in f and (".zip" in f or ".tar.gz" in f):
shutil.copy("teewars/"+f, "../" + f)
for f in os.listdir("teeworlds"):
if "teeworlds" in f and "src" in f and (".zip" in f or ".tar.gz" in f):
shutil.copy("teeworlds/"+f, "../" + f)
2 changes: 1 addition & 1 deletion src/engine/client/ec_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ int main(int argc, char **argv)

/* init the engine */
dbg_msg("client", "starting...");
engine_init("Teewars");
engine_init("Teeworlds");

/* test_parser();
return 0;*/
Expand Down
2 changes: 1 addition & 1 deletion src/engine/client/ec_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int gfx_init()
glGetIntegerv(GL_STENCIL_BITS, &i);
dbg_msg("gfx", "stencilbits = %d", i);

glfwSetWindowTitle("Teewars");
glfwSetWindowTitle("Teeworlds");

/* We don't want to see the window when we run the stress testing */
if(config.dbg_stress)
Expand Down
2 changes: 1 addition & 1 deletion src/engine/e_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ void mastersrv_default()
int i;
mem_zero(master_servers, sizeof(master_servers));
for(i = 0; i < MAX_MASTERSERVERS; i++)
sprintf(master_servers[i].hostname, "master%d.teewars.com", i+1);
sprintf(master_servers[i].hostname, "master%d.teeworlds.com", i+1);
}

int mastersrv_load()
Expand Down
2 changes: 1 addition & 1 deletion src/engine/server/es_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ int main(int argc, char **argv)

/* init the engine */
dbg_msg("server", "starting...");
engine_init("Teewars");
engine_init("Teeworlds");

/* register all console commands */
server_register_commands();
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/gc_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ void console_render()

// render version
char buf[128];
str_format(buf, sizeof(buf), "Teewars v%s", TEEWARS_VERSION);
str_format(buf, sizeof(buf), "v%s", GAME_VERSION);
float version_width = gfx_text_width(0, font_size, buf, -1);
gfx_text(0, screen.w-version_width-5, y, font_size, buf, -1);

Expand Down
2 changes: 1 addition & 1 deletion src/game/client/gc_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,4 +681,4 @@ extern "C" void modc_connected()
send_info(true);
}

extern "C" const char *modc_net_version() { return TEEWARS_NETVERSION; }
extern "C" const char *modc_net_version() { return GAME_NETVERSION; }
6 changes: 3 additions & 3 deletions src/game/client/gc_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ static void menu2_render_settings(RECT main_view)
{
RECT restart_warning;
ui_hsplit_b(&main_view, 40, &main_view, &restart_warning);
ui_do_label(&restart_warning, "You must restart Teewars for all settings to take effect.", 15.0f, -1, 220);
ui_do_label(&restart_warning, "You must restart the game for all settings to take effect.", 15.0f, -1, 220);
}
}

Expand Down Expand Up @@ -1941,9 +1941,9 @@ int menu2_render()
}
else if(popup == POPUP_FIRST_LAUNCH)
{
title = "Welcome to Teewars";
title = "Welcome to Teeworlds";
extra_text =
"As this is the first time you launch Teewars, please enter your nick name below. "
"As this is the first time you launch the game, please enter your nick name below. "
"It's recommended that you check the settings to adjust them to your liking "
"before joining a server.";
button_text = "Ok";
Expand Down
4 changes: 2 additions & 2 deletions src/game/g_version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */
#include "generated/nethash.c"
#define TEEWARS_VERSION "0.4.0-dev"
#define TEEWARS_NETVERSION "0.4 " TEEWARS_NETVERSION_HASH
#define GAME_VERSION "0.4.0-dev"
#define GAME_NETVERSION "0.4 " GAME_NETVERSION_HASH
4 changes: 2 additions & 2 deletions src/game/server/gs_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2313,5 +2313,5 @@ void mods_postsnap()
events.clear();
}

extern "C" const char *mods_net_version() { return TEEWARS_NETVERSION; }
extern "C" const char *mods_version() { return TEEWARS_VERSION; }
extern "C" const char *mods_net_version() { return GAME_NETVERSION; }
extern "C" const char *mods_version() { return GAME_VERSION; }
2 changes: 1 addition & 1 deletion src/tools/fake_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
123456789012345678901234567890123456789012345678
0.3 2d82e361de24cb25
my own private little server
magnus.auvinen@teewars.somehost-strage-host.com
magnus.auvinen@teeworlds.somehost-strage-host.com
*/

NETSERVER *net;
Expand Down

0 comments on commit bc108df

Please sign in to comment.