merged delta and c55

Perttu Ahola 2011-08-05 11:22:13 +03:00
commit 64a6da3e45
41 changed files with 3487 additions and 1263 deletions

View File

@ -16,21 +16,6 @@ FIND_PROGRAM(GETTEXT_MSGFMT
PATHS "${CUSTOM_GETTEXT_PATH}/bin"
DOC "path to msgfmt")
FIND_PROGRAM(GETTEXT_MSGMERGE
NAMES msgmerge
PATHS "${CUSTOM_GETTEXT_PATH}/bin"
DOC "path to msgmerge")
FIND_PROGRAM(GETTEXT_MSGEN
NAMES msgen
PATHS "${CUSTOM_GETTEXT_PATH}/bin"
DOC "path to msgen")
FIND_PROGRAM(GETTEXT_EXTRACT
NAMES xgettext
PATHS "${CUSTOM_GETTEXT_PATH}/bin"
DOC "path to xgettext")
# modern Linux, as well as Mac, seem to not need require special linking
# they do not because gettext is part of glibc
# TODO check the requirements on other BSDs and older Linux
@ -71,10 +56,14 @@ ENDIF()
IF(GETTEXT_FOUND)
SET(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
SET(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
SET(GETTEXT_MO_DEST_PATH locale/<locale>/LC_MESSAGES)
SET(GETTEXT_MO_DEST_PATH ${DATADIR}/../locale/<locale>/LC_MESSAGES)
FILE(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*")
LIST(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot)
MACRO(SET_MO_PATHS _buildvar _destvar _locale)
STRING(REPLACE "<locale>" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH})
STRING(REPLACE "<locale>" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH})
ENDMACRO(SET_MO_PATHS)
ELSE()
SET(GETTEXT_INCLUDE_DIR "")
SET(GETTEXT_LIBRARY "")
ENDIF()

BIN
data/ladder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

View File

@ -1,6 +1,6 @@
#!/bin/sh
PROJECT_NAME=minetest-delta
PROJECT_NAME=minetest
PACKAGEDIR=../$PROJECT_NAME-packages
PACKAGENAME=$PROJECT_NAME-binary-`date +%y%m%d%H%M%S`
PACKAGEPATH=$PACKAGEDIR/$PACKAGENAME

BIN
minetest-icon-24x24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

View File

@ -1,25 +0,0 @@
0 128 128 128
1 107 134 51
2 39 66 106
3 255 255 0
4 86 58 31
5 48 95 8
6 102 129 38
7 178 178 0
8 101 84 36
9 39 66 106
12 104 78 42
13 210 194 156
14 117 86 41
15 128 79 0
16 118 118 118
18 123 123 123
19 199 199 199
20 183 183 222
21 103 78 42
22 219 202 178
23 78 154 6
24 204 0 0
25 211 215 207
26 138 226 52
27 104 78 42

View File

@ -1,275 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Made by j0gge, modified by celeron55
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
# Requires Python Imaging Library: http://www.pythonware.com/products/pil/
# Some speed-up: ...lol, actually it slows it down.
#import psyco ; psyco.full()
#from psyco.classes import *
import zlib
import Image, ImageDraw
import os
import string
import time
def hex_to_int(h):
i = int(h,16)
if(i > 2047):
i-=4096
return i
def hex4_to_int(h):
i = int(h,16)
if(i > 32767):
i-=65536
return i
def int_to_hex3(i):
if(i < 0):
return "%03X" % (i + 4096)
else:
return "%03X" % i
def int_to_hex4(i):
if(i < 0):
return "%04X" % (i + 65536)
else:
return "%04X" % i
def limit(i,l,h):
if(i>h):
i=h
if(i<l):
i=l
return i
# Fix these!
path="../map/"
output="map.png"
sector_xmin = -1000/16
sector_xmax = 1000/16
sector_zmin = -1000/16
sector_zmax = 1000/16
# Load color information for the blocks.
colors = {}
f = file("colors.txt")
for line in f:
values = string.split(line)
colors[int(values[0])] = (int(values[1]), int(values[2]), int(values[3]))
f.close()
xlist = []
zlist = []
# List all sectors to memory and calculate the width and heigth of the resulting picture.
if os.path.exists(path + "sectors2"):
for filename in os.listdir(path + "sectors2"):
for filename2 in os.listdir(path + "sectors2/" + filename):
x = hex_to_int(filename)
z = hex_to_int(filename2)
if x < sector_xmin or x > sector_xmax:
continue
if z < sector_zmin or z > sector_zmax:
continue
xlist.append(x)
zlist.append(z)
if os.path.exists(path + "sectors"):
for filename in os.listdir(path + "sectors"):
x = hex4_to_int(filename[:4])
z = hex4_to_int(filename[-4:])
if x < sector_xmin or x > sector_xmax:
continue
if z < sector_zmin or z > sector_zmax:
continue
xlist.append(x)
zlist.append(z)
w = (max(xlist) - min(xlist)) * 16 + 16
h = (max(zlist) - min(zlist)) * 16 + 16
print "w="+str(w)+" h="+str(h)
im = Image.new("RGB", (w, h), "white")
impix = im.load()
stuff={}
starttime = time.time()
# Go through all sectors.
for n in range(len(xlist)):
#if n > 500:
# break
if n % 200 == 0:
nowtime = time.time()
dtime = nowtime - starttime
n_per_second = 1.0 * n / dtime
if n_per_second != 0:
seconds_per_n = 1.0 / n_per_second
time_guess = seconds_per_n * len(xlist)
remaining_s = time_guess - dtime
remaining_minutes = int(remaining_s / 60)
remaining_s -= remaining_minutes * 60;
print("Processing sector "+str(n)+" of "+str(len(xlist))
+" ("+str(round(100.0*n/len(xlist), 1))+"%)"
+" (ETA: "+str(remaining_minutes)+"m "
+str(int(remaining_s))+"s)")
xpos = xlist[n]
zpos = zlist[n]
xhex = int_to_hex3(xpos)
zhex = int_to_hex3(zpos)
xhex4 = int_to_hex4(xpos)
zhex4 = int_to_hex4(zpos)
sector1 = xhex4.lower() + zhex4.lower()
sector2 = xhex.lower() + "/" + zhex.lower()
ylist=[]
sectortype = ""
try:
for filename in os.listdir(path + "sectors/" + sector1):
if(filename != "meta"):
pos = int(filename,16)
if(pos > 32767):
pos-=65536
ylist.append(pos)
sectortype = "old"
except OSError:
pass
if sectortype != "old":
try:
for filename in os.listdir(path + "sectors2/" + sector2):
if(filename != "meta"):
pos = int(filename,16)
if(pos > 32767):
pos-=65536
ylist.append(pos)
sectortype = "new"
except OSError:
pass
if sectortype == "":
continue
ylist.sort()
# Make a list of pixels of the sector that are to be looked for.
pixellist = []
for x in range(16):
for y in range(16):
pixellist.append((x,y))
# Go through the Y axis from top to bottom.
for ypos in reversed(ylist):
yhex = int_to_hex4(ypos)
filename = ""
if sectortype == "old":
filename = path + "sectors/" + sector1 + "/" + yhex.lower()
else:
filename = path + "sectors2/" + sector2 + "/" + yhex.lower()
f = file(filename, "rb")
# Let's just memorize these even though it's not really necessary.
version = f.read(1)
flags = f.read(1)
dec_o = zlib.decompressobj()
try:
mapdata = dec_o.decompress(f.read())
except:
mapdata = []
f.close()
if(len(mapdata)<4096):
print "bad: " + xhex+zhex+"/"+yhex + " " + len(mapdata)
else:
chunkxpos=xpos*16
chunkypos=ypos*16
chunkzpos=zpos*16
for (x,z) in reversed(pixellist):
for y in reversed(range(16)):
datapos=x+y*16+z*256
if(ord(mapdata[datapos])!=254):
try:
pixellist.remove((x,z))
# Memorize information on the type and height of the block and for drawing the picture.
stuff[(chunkxpos+x,chunkzpos+z)]=(chunkypos+y,ord(mapdata[datapos]))
break
except:
print "strange block: " + xhex+zhex+"/"+yhex + " x: " + str(x) + " y: " + str(y) + " z: " + str(z) + " block: " + str(ord(mapdata[datapos]))
# After finding all the pixeld in the sector, we can move on to the next sector without having to continue the Y axis.
if(len(pixellist)==0):
break
print "Drawing image"
# Drawing the picture
starttime = time.time()
n = 0
minx = min(xlist)
minz = min(zlist)
for (x,z) in stuff.iterkeys():
if n % 500000 == 0:
nowtime = time.time()
dtime = nowtime - starttime
n_per_second = 1.0 * n / dtime
if n_per_second != 0:
listlen = len(stuff)
seconds_per_n = 1.0 / n_per_second
time_guess = seconds_per_n * listlen
remaining_s = time_guess - dtime
remaining_minutes = int(remaining_s / 60)
remaining_s -= remaining_minutes * 60;
print("Drawing pixel "+str(n)+" of "+str(listlen)
+" ("+str(round(100.0*n/listlen, 1))+"%)"
+" (ETA: "+str(remaining_minutes)+"m "
+str(int(remaining_s))+"s)")
n += 1
(r,g,b)=colors[stuff[(x,z)][1]]
# Comparing heights of a couple of adjacent blocks and changing brightness accordingly.
try:
y1=stuff[(x-1,z)][0]
y2=stuff[(x,z-1)][0]
y=stuff[(x,z)][0]
d=(y-y1+y-y2)*12
if(d>36):
d=36
r=limit(r+d,0,255)
g=limit(g+d,0,255)
b=limit(b+d,0,255)
except:
pass
#impix[w-1-(x-minx*16),h-1-(z-minz*16)]=(r,g,b)
impix[x-minx*16,h-1-(z-minz*16)]=(r,g,b)
# Flip the picture to make it right and save.
#print "Transposing"
#im=im.transpose(Image.FLIP_TOP_BOTTOM)
print "Saving"
im.save(output)

102
pnoise.py Normal file
View File

@ -0,0 +1,102 @@
#
# A python perlin noise implementation, from
# http://www.fundza.com/c4serious/noise/perlin/perlin.html
#
# This is used for testing how to create maps with a python script.
#
import math
p = (
151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,
30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,
62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,
125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,
83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,
143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,
196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,
250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,
58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,
221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,
224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,
12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,
199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,
205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,
151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,
30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,
62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,
125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,
83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,
143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,
196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,
250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,
58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,
221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,
224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,
12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,
199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,
205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180)
def lerp(t, a, b):
return a + t * (b - a)
def fade(t):
return t * t * t * (t * (t * 6 - 15) + 10)
def grad(hash, x, y, z):
h = hash & 15
if h < 8:
u = x
else:
u = y
if h < 4:
v = y
elif h == 12 or h == 14:
v = x
else:
v = z
if h & 1 != 0:
u = -u
if h & 2 != 0:
v = -v
return u + v
def pnoise(x, y, z):
global p
X = int(math.floor(x)) & 255
Y = int(math.floor(y)) & 255
Z = int(math.floor(z)) & 255
x -= math.floor(x)
y -= math.floor(y)
z -= math.floor(z)
u = fade(x)
v = fade(y)
w = fade(z)
A = p[X] + Y
AA = p[A] + Z
AB = p[A + 1] + Z
B = p[X + 1] + Y
BA = p[B] + Z
BB = p[B + 1] + Z
pAA = p[AA]
pAB = p[AB]
pBA = p[BA]
pBB = p[BB]
pAA1 = p[AA + 1]
pBA1 = p[BA + 1]
pAB1 = p[AB + 1]
pBB1 = p[BB + 1]
gradAA = grad(pAA, x, y, z)
gradBA = grad(pBA, x-1, y, z)
gradAB = grad(pAB, x, y-1, z)
gradBB = grad(pBB, x-1, y-1, z)
gradAA1 = grad(pAA1,x, y, z-1)
gradBA1 = grad(pBA1,x-1, y, z-1)
gradAB1 = grad(pAB1,x, y-1, z-1)
gradBB1 = grad(pBB1,x-1, y-1, z-1)
return lerp(w,
lerp(v, lerp(u, gradAA, gradBA), lerp(u, gradAB, gradBB)),
lerp(v, lerp(u, gradAA1,gradBA1),lerp(u, gradAB1,gradBB1)))

486
po/da/minetest.po Normal file
View File

@ -0,0 +1,486 @@
# German translations for minetest-c55 package.
# Copyright (C) 2011 celeron
# This file is distributed under the same license as the minetest-c55 package.
# Frederik Helth <Guides@live.dk>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-08-02 12:36+0200\n"
"PO-Revision-Date: 2011-08-02 00:31+0100\n"
"Last-Translator: Frederik Helth <Guides@live.dk>\n"
"Language-Team: \n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiKeyChangeMenu.cpp:84
msgid "KEYBINDINGS"
msgstr ""
#: src/guiKeyChangeMenu.cpp:94
msgid "Forward"
msgstr "Frem"
#: src/guiKeyChangeMenu.cpp:111
msgid "Backward"
msgstr "Tilbage"
#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
msgid "Left"
msgstr "Venstre"
#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
msgid "Right"
msgstr "Højre"
#: src/guiKeyChangeMenu.cpp:158
msgid "Use"
msgstr "Brug"
#: src/guiKeyChangeMenu.cpp:173
msgid "Sneak"
msgstr "Snig"
#: src/guiKeyChangeMenu.cpp:189
msgid "Jump"
msgstr "Hop"
#: src/guiKeyChangeMenu.cpp:204
msgid "Inventory"
msgstr "Ting"
#: src/guiKeyChangeMenu.cpp:220
msgid "Chat"
msgstr "Chat"
#: src/guiKeyChangeMenu.cpp:236
msgid "Toggle fly"
msgstr "Flyvning"
#: src/guiKeyChangeMenu.cpp:251
msgid "Toggle fast"
msgstr "Hurtig flyvning"
#: src/guiKeyChangeMenu.cpp:266
msgid "Range select"
msgstr "Afstands load"
#: src/guiKeyChangeMenu.cpp:283
msgid "Print stacks"
msgstr "Print stykker"
#: src/guiKeyChangeMenu.cpp:298
msgid "Save"
msgstr "Gem"
#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
msgid "Cancel"
msgstr "Afslut"
#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
#: src/guiKeyChangeMenu.cpp:597
msgid "press Key"
msgstr "Tryk knap"
#: src/guiKeyChangeMenu.h:33
msgid "Left Button"
msgstr "Venstre Knap"
#: src/guiKeyChangeMenu.h:33
msgid "Middle Button"
msgstr "Midt Knap"
#: src/guiKeyChangeMenu.h:33
msgid "Right Button"
msgstr "Højre Knap"
#: src/guiKeyChangeMenu.h:33
msgid "X Button 1"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Back"
msgstr "Tilbage"
#: src/guiKeyChangeMenu.h:34
msgid "Clear"
msgstr "Rens"
#: src/guiKeyChangeMenu.h:34
msgid "Return"
msgstr "Tilbage"
#: src/guiKeyChangeMenu.h:34
msgid "Tab"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "X Button 2"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Capital"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Control"
msgstr "Kontrol"
#: src/guiKeyChangeMenu.h:35
msgid "Kana"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Pause"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Convert"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Escape"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Final"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Junja"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Kanji"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Nonconvert"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Accept"
msgstr "Accepter"
#: src/guiKeyChangeMenu.h:37
msgid "End"
msgstr "Slut"
#: src/guiKeyChangeMenu.h:37
msgid "Home"
msgstr "Hjem"
#: src/guiKeyChangeMenu.h:37
msgid "Mode Change"
msgstr "Mode skift"
#: src/guiKeyChangeMenu.h:37
msgid "Next"
msgstr "Næste"
#: src/guiKeyChangeMenu.h:37
msgid "Priot"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Space"
msgstr "Mellemrum"
#: src/guiKeyChangeMenu.h:38
msgid "Down"
msgstr "Ned"
#: src/guiKeyChangeMenu.h:38
msgid "Execute"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Print"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Select"
msgstr "Vælge"
#: src/guiKeyChangeMenu.h:38
msgid "Up"
msgstr "Op"
#: src/guiKeyChangeMenu.h:39
msgid "Delete"
msgstr "Slet"
#: src/guiKeyChangeMenu.h:39
msgid "Help"
msgstr "Hjælp"
#: src/guiKeyChangeMenu.h:39
msgid "Insert"
msgstr "Indset"
#: src/guiKeyChangeMenu.h:39
msgid "Snapshot"
msgstr "Screenshot"
#: src/guiKeyChangeMenu.h:42
msgid "Left Windows"
msgstr "Venstre windows"
#: src/guiKeyChangeMenu.h:43
msgid "Apps"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 0"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 1"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Right Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Sleep"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 2"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 3"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 4"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 5"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 6"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 7"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad *"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad +"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad -"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad /"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 8"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 9"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Num Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Scroll Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Left Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Right Shight"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Comma"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Minus"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Period"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Plus"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "Attn"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "CrSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Erase OEF"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "ExSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "OEM Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "PA1"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Play"
msgstr "Spil"
#: src/guiKeyChangeMenu.h:58
msgid "Zoom"
msgstr ""
#: src/guiMainMenu.cpp:181
msgid "Name/Password"
msgstr "Navn/kodeord"
#: src/guiMainMenu.cpp:206
msgid "Address/Port"
msgstr "Adresse/port"
#: src/guiMainMenu.cpp:228
msgid "Leave address blank to start a local server."
msgstr "Lad black for at spille localt"
#: src/guiMainMenu.cpp:235
msgid "Fancy trees"
msgstr "Fancy trær"
#: src/guiMainMenu.cpp:241
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:249
msgid "Start Game / Connect"
msgstr "Start spil"
#: src/guiMainMenu.cpp:258
msgid "Change keys"
msgstr "Indstillinger"
#: src/guiMainMenu.cpp:281
msgid "Creative Mode"
msgstr "Kreativ mode"
#: src/guiMainMenu.cpp:287
msgid "Enable Damage"
msgstr "Tag imod skade"
#: src/guiMainMenu.cpp:295
msgid "Delete map"
msgstr "Slet mappen"
#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
msgid "Proceed"
msgstr "Fortsæt"
#: src/guiPasswordChange.cpp:103
msgid "Old Password"
msgstr "Gamle kodeord"
#: src/guiPasswordChange.cpp:120
msgid "New Password"
msgstr "Nye kodeord"
#: src/guiPasswordChange.cpp:136
msgid "Confirm Password"
msgstr "Gentag kodeord"
#: src/guiPasswordChange.cpp:153
msgid "Change"
msgstr "Skift"
#: src/guiPasswordChange.cpp:162
msgid "Passwords do not match!"
msgstr "Kodeordne matcher ikke hinanden!"
#: src/guiPauseMenu.cpp:111
msgid "Continue"
msgstr "Fortsæt"
#: src/guiPauseMenu.cpp:118
msgid "Change Password"
msgstr "Skift kodeord"
#: src/guiPauseMenu.cpp:125
msgid "Disconnect"
msgstr "Logud"
#: src/guiPauseMenu.cpp:132
msgid "Exit to OS"
msgstr "Afslut til OS"
#: src/guiPauseMenu.cpp:139
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-22 11:00+0200\n"
"PO-Revision-Date: 2011-07-20 16:58+0100\n"
"POT-Creation-Date: 2011-08-02 12:36+0200\n"
"PO-Revision-Date: 2011-08-02 11:54+0100\n"
"Last-Translator: Constantin Wenger <constantin.wenger@googlemail.com>\n"
"Language-Team: Deutsch <>\n"
"Language: de\n"
@ -17,92 +17,467 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: src/guiMainMenu.cpp:180
#: src/guiKeyChangeMenu.cpp:84
msgid "KEYBINDINGS"
msgstr "TASTEN EINST."
#: src/guiKeyChangeMenu.cpp:94
msgid "Forward"
msgstr "Vorwärts"
#: src/guiKeyChangeMenu.cpp:111
msgid "Backward"
msgstr "Rückwärts"
#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
msgid "Left"
msgstr "Links"
#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
msgid "Right"
msgstr "Rechts"
#: src/guiKeyChangeMenu.cpp:158
msgid "Use"
msgstr "Benutzen"
#: src/guiKeyChangeMenu.cpp:173
msgid "Sneak"
msgstr "Kriechen"
#: src/guiKeyChangeMenu.cpp:189
msgid "Jump"
msgstr "Springen"
#: src/guiKeyChangeMenu.cpp:204
msgid "Inventory"
msgstr "Inventar"
#: src/guiKeyChangeMenu.cpp:220
msgid "Chat"
msgstr "Chat"
#: src/guiKeyChangeMenu.cpp:236
msgid "Toggle fly"
msgstr "Fliegen umsch."
#: src/guiKeyChangeMenu.cpp:251
msgid "Toggle fast"
msgstr "Speed umsch."
#: src/guiKeyChangeMenu.cpp:266
msgid "Range select"
msgstr "Entfernung wählen"
#: src/guiKeyChangeMenu.cpp:283
msgid "Print stacks"
msgstr "Stack ausgeben"
#: src/guiKeyChangeMenu.cpp:298
msgid "Save"
msgstr "Speichern"
#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
msgid "Cancel"
msgstr "Abbrechen"
#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
#: src/guiKeyChangeMenu.cpp:597
msgid "press Key"
msgstr "Taste drücken"
#: src/guiKeyChangeMenu.h:33
msgid "Left Button"
msgstr "linke Taste"
#: src/guiKeyChangeMenu.h:33
msgid "Middle Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Right Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "X Button 1"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Back"
msgstr "Rücktaste"
#: src/guiKeyChangeMenu.h:34
msgid "Clear"
msgstr "löschen"
#: src/guiKeyChangeMenu.h:34
msgid "Return"
msgstr "Return"
#: src/guiKeyChangeMenu.h:34
msgid "Tab"
msgstr "Tab"
#: src/guiKeyChangeMenu.h:34
msgid "X Button 2"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Capital"
msgstr "Feststellen"
#: src/guiKeyChangeMenu.h:35
msgid "Control"
msgstr "Strg"
#: src/guiKeyChangeMenu.h:35
msgid "Kana"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Menu"
msgstr "Menü"
#: src/guiKeyChangeMenu.h:35
msgid "Pause"
msgstr "Pause"
#: src/guiKeyChangeMenu.h:35
msgid "Shift"
msgstr "Umsch."
#: src/guiKeyChangeMenu.h:36
msgid "Convert"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Escape"
msgstr "Escape"
#: src/guiKeyChangeMenu.h:36
msgid "Final"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Junja"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Kanji"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Nonconvert"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Accept"
msgstr "Annehmen"
#: src/guiKeyChangeMenu.h:37
msgid "End"
msgstr "Ende"
#: src/guiKeyChangeMenu.h:37
msgid "Home"
msgstr "Pos1"
#: src/guiKeyChangeMenu.h:37
msgid "Mode Change"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Next"
msgstr "Bild runter"
#: src/guiKeyChangeMenu.h:37
msgid "Priot"
msgstr "Bild hoch"
#: src/guiKeyChangeMenu.h:37
msgid "Space"
msgstr "Leertaste"
#: src/guiKeyChangeMenu.h:38
msgid "Down"
msgstr "Runter"
#: src/guiKeyChangeMenu.h:38
msgid "Execute"
msgstr "Ausführen"
#: src/guiKeyChangeMenu.h:38
msgid "Print"
msgstr "Druck"
#: src/guiKeyChangeMenu.h:38
msgid "Select"
msgstr "Select"
#: src/guiKeyChangeMenu.h:38
msgid "Up"
msgstr "Hoch"
#: src/guiKeyChangeMenu.h:39
msgid "Delete"
msgstr "Entf"
#: src/guiKeyChangeMenu.h:39
msgid "Help"
msgstr "Hilfe"
#: src/guiKeyChangeMenu.h:39
msgid "Insert"
msgstr "Einfg"
#: src/guiKeyChangeMenu.h:39
msgid "Snapshot"
msgstr "Schnapschuss"
#: src/guiKeyChangeMenu.h:42
msgid "Left Windows"
msgstr "Win links"
#: src/guiKeyChangeMenu.h:43
msgid "Apps"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 0"
msgstr "Ziffernblock 0"
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 1"
msgstr "Ziffernblock 1"
#: src/guiKeyChangeMenu.h:43
msgid "Right Windows"
msgstr "Win rechts"
#: src/guiKeyChangeMenu.h:43
msgid "Sleep"
msgstr "Schlaf"
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 2"
msgstr "Ziffernblock 2"
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 3"
msgstr "Ziffernblock 3"
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 4"
msgstr "Ziffernblock 4"
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 5"
msgstr "Ziffernblock 5"
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 6"
msgstr "Ziffernblock 6"
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 7"
msgstr "Ziffernblock 7"
#: src/guiKeyChangeMenu.h:45
msgid "Numpad *"
msgstr "Ziffernblock *"
#: src/guiKeyChangeMenu.h:45
msgid "Numpad +"
msgstr "Ziffernblock +"
#: src/guiKeyChangeMenu.h:45
msgid "Numpad -"
msgstr "Ziffernblock -"
#: src/guiKeyChangeMenu.h:45
msgid "Numpad /"
msgstr "Ziffernblock /"
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 8"
msgstr "Ziffernblock 8"
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 9"
msgstr "Ziffernblock 9"
#: src/guiKeyChangeMenu.h:49
msgid "Num Lock"
msgstr "Num"
#: src/guiKeyChangeMenu.h:49
msgid "Scroll Lock"
msgstr "Rollen"
#: src/guiKeyChangeMenu.h:50
msgid "Left Shift"
msgstr "Umsch. links"
#: src/guiKeyChangeMenu.h:50
msgid "Right Shight"
msgstr "Umsch. rechts"
#: src/guiKeyChangeMenu.h:51
msgid "Left Control"
msgstr "Strg links"
#: src/guiKeyChangeMenu.h:51
msgid "Left Menu"
msgstr "Alt"
#: src/guiKeyChangeMenu.h:51
msgid "Right Control"
msgstr "Strg rechts"
#: src/guiKeyChangeMenu.h:51
msgid "Right Menu"
msgstr "Alt Gr"
#: src/guiKeyChangeMenu.h:53
msgid "Comma"
msgstr "Komma"
#: src/guiKeyChangeMenu.h:53
msgid "Minus"
msgstr "Minus"
#: src/guiKeyChangeMenu.h:53
msgid "Period"
msgstr "Punkt"
#: src/guiKeyChangeMenu.h:53
msgid "Plus"
msgstr "Plus"
#: src/guiKeyChangeMenu.h:57
msgid "Attn"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "CrSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Erase OEF"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "ExSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "OEM Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "PA1"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Play"
msgstr "Play"
#: src/guiKeyChangeMenu.h:58
msgid "Zoom"
msgstr "Zoom"
#: src/guiMainMenu.cpp:181
msgid "Name/Password"
msgstr "Name/Passwort"
#: src/guiMainMenu.cpp:203
#: src/guiMainMenu.cpp:206
msgid "Address/Port"
msgstr "Adresse / Port"
#: src/guiMainMenu.cpp:223
#: src/guiMainMenu.cpp:228
msgid "Leave address blank to start a local server."
msgstr "Lasse die Adresse frei um einen eigenen Server zu starten"
#: src/guiMainMenu.cpp:230
#: src/guiMainMenu.cpp:235
msgid "Fancy trees"
msgstr "Schöne Bäume"
#: src/guiMainMenu.cpp:236
#: src/guiMainMenu.cpp:241
msgid "Smooth Lighting"
msgstr "Besseres Licht"
#: src/guiMainMenu.cpp:244
#: src/guiMainMenu.cpp:249
msgid "Start Game / Connect"
msgstr "Spiel starten / Verbinden"
#: src/guiMainMenu.cpp:253
#: src/guiMainMenu.cpp:258
msgid "Change keys"
msgstr "Tastenbelegung ändern"
msgstr "Tasten ändern"
#: src/guiMainMenu.cpp:276
#: src/guiMainMenu.cpp:281
msgid "Creative Mode"
msgstr "Kreativitätsmodus"
#: src/guiMainMenu.cpp:282
#: src/guiMainMenu.cpp:287
msgid "Enable Damage"
msgstr "Schaden einschalten"
#: src/guiMainMenu.cpp:290
#: src/guiMainMenu.cpp:295
msgid "Delete map"
msgstr "Karte löschen"
#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111
#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
msgid "Proceed"
msgstr "Fortsetzen"
#: src/guiPasswordChange.cpp:102
#: src/guiPasswordChange.cpp:103
msgid "Old Password"
msgstr "Altes Passwort"
#: src/guiPasswordChange.cpp:117
#: src/guiPasswordChange.cpp:120
msgid "New Password"
msgstr "Neues Passwort"
#: src/guiPasswordChange.cpp:131
#: src/guiPasswordChange.cpp:136
msgid "Confirm Password"
msgstr "Passwort wiederholen"
#: src/guiPasswordChange.cpp:146
#: src/guiPasswordChange.cpp:153
msgid "Change"
msgstr "Ändern"
#: src/guiPasswordChange.cpp:155
#: src/guiPasswordChange.cpp:162
msgid "Passwords do not match!"
msgstr "Passwörter passen nicht zusammen"
#: src/guiPauseMenu.cpp:110
#: src/guiPauseMenu.cpp:111
msgid "Continue"
msgstr "Weiter"
#: src/guiPauseMenu.cpp:117
#: src/guiPauseMenu.cpp:118
msgid "Change Password"
msgstr "Passwort ändern"
#: src/guiPauseMenu.cpp:124
#: src/guiPauseMenu.cpp:125
msgid "Disconnect"
msgstr "Verbindung trennen"
#: src/guiPauseMenu.cpp:131
#: src/guiPauseMenu.cpp:132
msgid "Exit to OS"
msgstr "Programm beenden"
#: src/guiPauseMenu.cpp:138
#: src/guiPauseMenu.cpp:139
#, fuzzy
msgid ""
"Keys:\n"
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig blocks\n"
"- Mouse right: place blocks\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
@ -113,11 +488,11 @@ msgid ""
msgstr ""
"Tastenkürzel:\n"
"- WASD: Gehen\n"
"- linke Maustaste: dig blocks\n"
"- rechte Maustaste: place blocks\n"
"- linke Maustaste: Blöcke aufnehmen \n"
"- rechte Maustaste: Blöche ablegen\n"
"- Mausrad: Item auswählen\n"
"- 0...9: Item auswählen\n"
"- Shift: ducken\n"
"- R: Alle geladenen Kartenteile anzeigen, umschalten\n"
"- R: alle geladenen Blöcke anzeigen (wechseln)\n"
"- I: Inventarmenü\n"
"- T: Chat\n"

View File

@ -1,113 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-24 11:32+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiMainMenu.cpp:180
msgid "Name/Password"
msgstr ""
#: src/guiMainMenu.cpp:203
msgid "Address/Port"
msgstr ""
#: src/guiMainMenu.cpp:223
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:230
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:236
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:244
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:253
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:276
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:282
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:290
msgid "Delete map"
msgstr ""
#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111
msgid "Proceed"
msgstr ""
#: src/guiPasswordChange.cpp:102
msgid "Old Password"
msgstr ""
#: src/guiPasswordChange.cpp:117
msgid "New Password"
msgstr ""
#: src/guiPasswordChange.cpp:131
msgid "Confirm Password"
msgstr ""
#: src/guiPasswordChange.cpp:146
msgid "Change"
msgstr ""
#: src/guiPasswordChange.cpp:155
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:110
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:117
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:124
msgid "Disconnect"
msgstr ""
#: src/guiPauseMenu.cpp:131
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:138
msgid ""
"Keys:\n"
"- WASD: Walk\n"
"- Mouse left: dig blocks\n"
"- Mouse right: place blocks\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-22 11:00+0200\n"
"POT-Creation-Date: 2011-08-02 12:36+0200\n"
"PO-Revision-Date: 2011-07-21 15:48+0200\n"
"Last-Translator: Cyriaque 'Cisoun' Skrapits <cysoun@gmail.com>\n"
"Language-Team: Français <>\n"
@ -17,92 +17,469 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: src/guiMainMenu.cpp:180
#: src/guiKeyChangeMenu.cpp:84
msgid "KEYBINDINGS"
msgstr ""
#: src/guiKeyChangeMenu.cpp:94
msgid "Forward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:111
msgid "Backward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
msgid "Left"
msgstr ""
#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
msgid "Right"
msgstr ""
#: src/guiKeyChangeMenu.cpp:158
msgid "Use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:173
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:189
msgid "Jump"
msgstr ""
#: src/guiKeyChangeMenu.cpp:204
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:220
msgid "Chat"
msgstr ""
#: src/guiKeyChangeMenu.cpp:236
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:251
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:266
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:283
msgid "Print stacks"
msgstr ""
#: src/guiKeyChangeMenu.cpp:298
msgid "Save"
msgstr ""
#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
msgid "Cancel"
msgstr ""
#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
#: src/guiKeyChangeMenu.cpp:597
msgid "press Key"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Left Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Middle Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Right Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "X Button 1"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Back"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Return"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Tab"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "X Button 2"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Capital"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Control"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Kana"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Pause"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Convert"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Escape"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Final"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Junja"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Kanji"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Nonconvert"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Accept"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "End"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Home"
msgstr ""
#: src/guiKeyChangeMenu.h:37
#, fuzzy
msgid "Mode Change"
msgstr "Changer"
#: src/guiKeyChangeMenu.h:37
msgid "Next"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Priot"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Space"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Down"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Execute"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Print"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Select"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Up"
msgstr ""
#: src/guiKeyChangeMenu.h:39
#, fuzzy
msgid "Delete"
msgstr "Supprimer carte"
#: src/guiKeyChangeMenu.h:39
msgid "Help"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Insert"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Snapshot"
msgstr ""
#: src/guiKeyChangeMenu.h:42
msgid "Left Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Apps"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 0"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 1"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Right Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Sleep"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 2"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 3"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 4"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 5"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 6"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 7"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad *"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad +"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad -"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad /"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 8"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 9"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Num Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Scroll Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Left Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Right Shight"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Comma"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Minus"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Period"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Plus"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "Attn"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "CrSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Erase OEF"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "ExSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "OEM Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "PA1"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Play"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Zoom"
msgstr ""
#: src/guiMainMenu.cpp:181
msgid "Name/Password"
msgstr "Nom / MdP"
#: src/guiMainMenu.cpp:203
#: src/guiMainMenu.cpp:206
msgid "Address/Port"
msgstr "Adresse / Port"
#: src/guiMainMenu.cpp:223
#: src/guiMainMenu.cpp:228
msgid "Leave address blank to start a local server."
msgstr "Laisser l'adresse vide pour lancer un serveur local."
#: src/guiMainMenu.cpp:230
#: src/guiMainMenu.cpp:235
msgid "Fancy trees"
msgstr "Arbres spéciaux"
#: src/guiMainMenu.cpp:236
#: src/guiMainMenu.cpp:241
msgid "Smooth Lighting"
msgstr "Lumière douce"
#: src/guiMainMenu.cpp:244
#: src/guiMainMenu.cpp:249
msgid "Start Game / Connect"
msgstr "Démarrer / Connecter"
#: src/guiMainMenu.cpp:253
#: src/guiMainMenu.cpp:258
msgid "Change keys"
msgstr "Changer touches"
#: src/guiMainMenu.cpp:276
#: src/guiMainMenu.cpp:281
msgid "Creative Mode"
msgstr "Mode créatif"
#: src/guiMainMenu.cpp:282
#: src/guiMainMenu.cpp:287
msgid "Enable Damage"
msgstr "Activer blessures"
#: src/guiMainMenu.cpp:290
#: src/guiMainMenu.cpp:295
msgid "Delete map"
msgstr "Supprimer carte"
#: src/guiMessageMenu.cpp:93 src/guiTextInputMenu.cpp:111
#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
msgid "Proceed"
msgstr "OK"
#: src/guiPasswordChange.cpp:102
#: src/guiPasswordChange.cpp:103
msgid "Old Password"
msgstr "Ancien mot de passe"
#: src/guiPasswordChange.cpp:117
#: src/guiPasswordChange.cpp:120
msgid "New Password"
msgstr "Nouveau mot de passe"
#: src/guiPasswordChange.cpp:131
#: src/guiPasswordChange.cpp:136
msgid "Confirm Password"
msgstr "Confirmer mot de passe"
#: src/guiPasswordChange.cpp:146
#: src/guiPasswordChange.cpp:153
msgid "Change"
msgstr "Changer"
#: src/guiPasswordChange.cpp:155
#: src/guiPasswordChange.cpp:162
msgid "Passwords do not match!"
msgstr "Mauvaise correspondance!"
#: src/guiPauseMenu.cpp:110
#: src/guiPauseMenu.cpp:111
msgid "Continue"
msgstr "Continuer"
#: src/guiPauseMenu.cpp:117
#: src/guiPauseMenu.cpp:118
msgid "Change Password"
msgstr "Changer mot de passe"
#: src/guiPauseMenu.cpp:124
#: src/guiPauseMenu.cpp:125
msgid "Disconnect"
msgstr "Déconnection"
#: src/guiPauseMenu.cpp:131
#: src/guiPauseMenu.cpp:132
msgid "Exit to OS"
msgstr "Quitter le jeu"
#: src/guiPauseMenu.cpp:138
#: src/guiPauseMenu.cpp:139
#, fuzzy
msgid ""
"Keys:\n"
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig blocks\n"
"- Mouse right: place blocks\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"

499
po/it/minetest.po Normal file
View File

@ -0,0 +1,499 @@
# Italian translations for minetest package.
# Copyright (C) 2011 THE minetest'S COPYRIGHT HOLDER
# This file is distributed under the same license as the minetest package.
# Giuseppe Bilotta <giuseppe.bilotta@gmail.com>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-08-02 12:36+0200\n"
"PO-Revision-Date: 2011-07-24 18:56+0200\n"
"Last-Translator: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n"
"Language-Team: Italian\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/guiKeyChangeMenu.cpp:84
msgid "KEYBINDINGS"
msgstr ""
#: src/guiKeyChangeMenu.cpp:94
msgid "Forward"
msgstr "Avanti"
#: src/guiKeyChangeMenu.cpp:111
msgid "Backward"
msgstr "Indietro"
#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
msgid "Left"
msgstr "Sinistra"
#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
msgid "Right"
msgstr "Destra"
#: src/guiKeyChangeMenu.cpp:158
msgid "Use"
msgstr "Usa"
#: src/guiKeyChangeMenu.cpp:173
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:189
msgid "Jump"
msgstr "Salta"
#: src/guiKeyChangeMenu.cpp:204
msgid "Inventory"
msgstr "Invetario"
#: src/guiKeyChangeMenu.cpp:220
msgid "Chat"
msgstr "Parla"
#: src/guiKeyChangeMenu.cpp:236
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:251
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:266
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:283
msgid "Print stacks"
msgstr ""
#: src/guiKeyChangeMenu.cpp:298
msgid "Save"
msgstr "Salva"
#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
msgid "Cancel"
msgstr "Annulla"
#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
#: src/guiKeyChangeMenu.cpp:597
msgid "press Key"
msgstr "premi tasto"
#: src/guiKeyChangeMenu.h:33
msgid "Left Button"
msgstr "Tasto sinistro"
#: src/guiKeyChangeMenu.h:33
msgid "Middle Button"
msgstr "Tasto centrale"
#: src/guiKeyChangeMenu.h:33
msgid "Right Button"
msgstr "Tasto destro"
#: src/guiKeyChangeMenu.h:33
msgid "X Button 1"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Back"
msgstr "Indietro"
#: src/guiKeyChangeMenu.h:34
msgid "Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Return"
msgstr "Invio"
#: src/guiKeyChangeMenu.h:34
msgid "Tab"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "X Button 2"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Capital"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Control"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Kana"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Pause"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Convert"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Escape"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Final"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Junja"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Kanji"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Nonconvert"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Accept"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "End"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Home"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Mode Change"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Next"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Priot"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Space"
msgstr "Spazio"
#: src/guiKeyChangeMenu.h:38
msgid "Down"
msgstr "Giù"
#: src/guiKeyChangeMenu.h:38
msgid "Execute"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Print"
msgstr "Stampa"
#: src/guiKeyChangeMenu.h:38
msgid "Select"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Up"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Delete"
msgstr "Cancella"
#: src/guiKeyChangeMenu.h:39
msgid "Help"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Insert"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Snapshot"
msgstr ""
#: src/guiKeyChangeMenu.h:42
msgid "Left Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Apps"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 0"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 1"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Right Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Sleep"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 2"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 3"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 4"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 5"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 6"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 7"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad *"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad +"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad -"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad /"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 8"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 9"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Num Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Scroll Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Left Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Right Shight"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Comma"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Minus"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Period"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Plus"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "Attn"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "CrSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Erase OEF"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "ExSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "OEM Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "PA1"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Play"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Zoom"
msgstr ""
#: src/guiMainMenu.cpp:181
msgid "Name/Password"
msgstr "Nome/Password"
#: src/guiMainMenu.cpp:206
msgid "Address/Port"
msgstr "Indirizzo/Porta"
#: src/guiMainMenu.cpp:228
msgid "Leave address blank to start a local server."
msgstr "Lascia vuoto l'indirizzo per avviare un server locale"
#: src/guiMainMenu.cpp:235
msgid "Fancy trees"
msgstr "Alberi strani"
#: src/guiMainMenu.cpp:241
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:249
msgid "Start Game / Connect"
msgstr "Avvia Gioco / Connetti"
#: src/guiMainMenu.cpp:258
msgid "Change keys"
msgstr "Modifica tasti"
#: src/guiMainMenu.cpp:281
msgid "Creative Mode"
msgstr "Modalità creativa"
#: src/guiMainMenu.cpp:287
msgid "Enable Damage"
msgstr "Attiva Danno"
#: src/guiMainMenu.cpp:295
msgid "Delete map"
msgstr "Cancella mappa"
#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
msgid "Proceed"
msgstr "Procedi"
#: src/guiPasswordChange.cpp:103
msgid "Old Password"
msgstr "Vecchia password"
#: src/guiPasswordChange.cpp:120
msgid "New Password"
msgstr "Nuova password"
#: src/guiPasswordChange.cpp:136
msgid "Confirm Password"
msgstr "Conferma password"
#: src/guiPasswordChange.cpp:153
msgid "Change"
msgstr "Modifica"
#: src/guiPasswordChange.cpp:162
msgid "Passwords do not match!"
msgstr "Le password non corrispondono!"
#: src/guiPauseMenu.cpp:111
msgid "Continue"
msgstr "Continua"
#: src/guiPauseMenu.cpp:118
msgid "Change Password"
msgstr "Cambia password"
#: src/guiPauseMenu.cpp:125
msgid "Disconnect"
msgstr "Disconnetti"
#: src/guiPauseMenu.cpp:132
msgid "Exit to OS"
msgstr "Esci al S.O."
#: src/guiPauseMenu.cpp:139
#, fuzzy
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"Tasti:\n"
"- WASD: Cammina\n"
"- Mouse left: scava blocchi\n"
"- Mouse right: piazza blocchi\n"
"- Mouse wheel: seleziona oggetto\n"
"- 0...9: seleziona oggetto\n"
"- Shift: furtivo\n"
"- R: (Dis)attiva motra tutti i blocchi caricati\n"
"- I: Inventario\n"
"- ESC: Questo menu\n"
"- T: Parla\n"

487
po/minetest.pot Normal file
View File

@ -0,0 +1,487 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-08-02 12:36+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiKeyChangeMenu.cpp:84
msgid "KEYBINDINGS"
msgstr ""
#: src/guiKeyChangeMenu.cpp:94
msgid "Forward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:111
msgid "Backward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:127 src/guiKeyChangeMenu.h:38
msgid "Left"
msgstr ""
#: src/guiKeyChangeMenu.cpp:142 src/guiKeyChangeMenu.h:38
msgid "Right"
msgstr ""
#: src/guiKeyChangeMenu.cpp:158
msgid "Use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:173
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:189
msgid "Jump"
msgstr ""
#: src/guiKeyChangeMenu.cpp:204
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:220
msgid "Chat"
msgstr ""
#: src/guiKeyChangeMenu.cpp:236
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:251
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:266
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:283
msgid "Print stacks"
msgstr ""
#: src/guiKeyChangeMenu.cpp:298
msgid "Save"
msgstr ""
#: src/guiKeyChangeMenu.cpp:304 src/guiKeyChangeMenu.h:33
msgid "Cancel"
msgstr ""
#: src/guiKeyChangeMenu.cpp:537 src/guiKeyChangeMenu.cpp:542
#: src/guiKeyChangeMenu.cpp:547 src/guiKeyChangeMenu.cpp:552
#: src/guiKeyChangeMenu.cpp:557 src/guiKeyChangeMenu.cpp:562
#: src/guiKeyChangeMenu.cpp:567 src/guiKeyChangeMenu.cpp:572
#: src/guiKeyChangeMenu.cpp:577 src/guiKeyChangeMenu.cpp:582
#: src/guiKeyChangeMenu.cpp:587 src/guiKeyChangeMenu.cpp:592
#: src/guiKeyChangeMenu.cpp:597
msgid "press Key"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Left Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Middle Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "Right Button"
msgstr ""
#: src/guiKeyChangeMenu.h:33
msgid "X Button 1"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Back"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Return"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "Tab"
msgstr ""
#: src/guiKeyChangeMenu.h:34
msgid "X Button 2"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Capital"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Control"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Kana"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Pause"
msgstr ""
#: src/guiKeyChangeMenu.h:35
msgid "Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Convert"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Escape"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Final"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Junja"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Kanji"
msgstr ""
#: src/guiKeyChangeMenu.h:36
msgid "Nonconvert"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Accept"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "End"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Home"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Mode Change"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Next"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Priot"
msgstr ""
#: src/guiKeyChangeMenu.h:37
msgid "Space"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Down"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Execute"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Print"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Select"
msgstr ""
#: src/guiKeyChangeMenu.h:38
msgid "Up"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Delete"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Help"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Insert"
msgstr ""
#: src/guiKeyChangeMenu.h:39
msgid "Snapshot"
msgstr ""
#: src/guiKeyChangeMenu.h:42
msgid "Left Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Apps"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 0"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Numpad 1"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Right Windows"
msgstr ""
#: src/guiKeyChangeMenu.h:43
msgid "Sleep"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 2"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 3"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 4"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 5"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 6"
msgstr ""
#: src/guiKeyChangeMenu.h:44
msgid "Numpad 7"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad *"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad +"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad -"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad /"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 8"
msgstr ""
#: src/guiKeyChangeMenu.h:45
msgid "Numpad 9"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Num Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:49
msgid "Scroll Lock"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Left Shift"
msgstr ""
#: src/guiKeyChangeMenu.h:50
msgid "Right Shight"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Left Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Control"
msgstr ""
#: src/guiKeyChangeMenu.h:51
msgid "Right Menu"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Comma"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Minus"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Period"
msgstr ""
#: src/guiKeyChangeMenu.h:53
msgid "Plus"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "Attn"
msgstr ""
#: src/guiKeyChangeMenu.h:57
msgid "CrSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Erase OEF"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "ExSel"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "OEM Clear"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "PA1"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Play"
msgstr ""
#: src/guiKeyChangeMenu.h:58
msgid "Zoom"
msgstr ""
#: src/guiMainMenu.cpp:181
msgid "Name/Password"
msgstr ""
#: src/guiMainMenu.cpp:206
msgid "Address/Port"
msgstr ""
#: src/guiMainMenu.cpp:228
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:235
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:241
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:249
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:258
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:281
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:287
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:295
msgid "Delete map"
msgstr ""
#: src/guiMessageMenu.cpp:94 src/guiTextInputMenu.cpp:112
msgid "Proceed"
msgstr ""
#: src/guiPasswordChange.cpp:103
msgid "Old Password"
msgstr ""
#: src/guiPasswordChange.cpp:120
msgid "New Password"
msgstr ""
#: src/guiPasswordChange.cpp:136
msgid "Confirm Password"
msgstr ""
#: src/guiPasswordChange.cpp:153
msgid "Change"
msgstr ""
#: src/guiPasswordChange.cpp:162
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:111
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:118
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:125
msgid "Disconnect"
msgstr ""
#: src/guiPauseMenu.cpp:132
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:139
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""

View File

@ -1,15 +1,19 @@
cmake_minimum_required( VERSION 2.6 )
project(minetest)
cmake_minimum_required( VERSION 2.6 )
if(RUN_IN_PLACE)
add_definitions ( -DRUN_IN_PLACE )
endif(RUN_IN_PLACE)
OPTION(USE_GETTEXT "Use GetText for internationalization" OFF)
# user-visible option to enable/disable gettext usage
OPTION(ENABLE_GETTEXT "Use GetText for internationalization" ON)
if(USE_GETTEXT)
find_package(GettextLib REQUIRED)
# this is only set to 1 if gettext is enabled _and_ available
set(USE_GETTEXT 0)
find_package(GettextLib)
if(GETTEXT_FOUND AND ENABLE_GETTEXT)
message(STATUS "gettext include path: ${GETTEXT_INCLUDE_DIR}")
message(STATUS "gettext msgfmt path: ${GETTEXT_MSGFMT}")
if(WIN32)
@ -17,16 +21,13 @@ if(USE_GETTEXT)
message(STATUS "gettext dll: ${GETTEXT_DLL}")
message(STATUS "gettext iconv dll: ${GETTEXT_ICONV_DLL}")
endif()
if (GETTEXT_FOUND)
add_definitions( -DUSE_GETTEXT )
set(USE_GETTEXT 1)
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
else()
message(STATUS "ERROR: GetText enabled but not found, disabling")
set(USE_GETTEXT FALSE)
endif(GETTEXT_FOUND)
else(USE_GETTEXT)
elseif(GETTEXT_FOUND AND NOT ENABLE_GETTEXT)
MESSAGE(STATUS "GetText found but disabled;")
else(GETTEXT_FOUND AND ENABLE_GETTEXT)
message(STATUS "GetText disabled")
endif(USE_GETTEXT)
endif(GETTEXT_FOUND AND ENABLE_GETTEXT)
if(NOT MSVC)
set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++")
@ -305,39 +306,17 @@ if(BUILD_SERVER)
endif(BUILD_SERVER)
if (USE_GETTEXT)
add_custom_command(OUTPUT "${GETTEXT_PO_PATH}/en"
COMMAND ${CMAKE_COMMAND} -E make_directory "${GETTEXT_PO_PATH}/en"
COMMENT "po-update [en]: creating translation template base directory")
set(POT_FILE "${GETTEXT_PO_PATH}/en/minetest.pot")
file(GLOB GETTEXT_POT_DEPS *.cpp *.h)
file(GLOB GETTEXT_POT_DEPS_REL RELATIVE ${CMAKE_SOURCE_DIR} *.cpp *.h)
add_custom_command(OUTPUT ${POT_FILE}
COMMAND ${GETTEXT_EXTRACT} -F -n -o ${POT_FILE} ${GETTEXT_POT_DEPS_REL}
DEPENDS "${GETTEXT_PO_PATH}/en" ${GETTEXT_POT_DEPS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "po-update [en]: updating translation template")
set(PO_FILES)
set(MO_FILES)
foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
# skip the 'en' locale which is treated separately
if (NOT LOCALE STREQUAL "en")
set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/minetest.po")
add_custom_command(OUTPUT ${PO_FILE_PATH}
COMMAND ${GETTEXT_MSGMERGE} -F -U ${PO_FILE_PATH} ${POT_FILE}
DEPENDS ${POT_FILE}
WORKING_DIRECTORY "${GETTEXT_PO_PATH}/${LOCALE}"
COMMENT "po-update [${LOCALE}]: updating strings")
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
add_custom_command(OUTPUT ${MO_BUILD_PATH}
COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
COMMENT "mo-update [${LOCALE}]: Creating locale directory.")
set(MO_FILE_PATH "${MO_BUILD_PATH}/minetest.mo")
add_custom_command(
OUTPUT ${MO_FILE_PATH}
COMMAND ${GETTEXT_MSGFMT} -o ${MO_FILE_PATH} ${PO_FILE_PATH}
@ -347,12 +326,9 @@ if (USE_GETTEXT)
)
set(MO_FILES ${MO_FILES} ${MO_FILE_PATH})
set(PO_FILES ${PO_FILES} ${PO_FILE_PATH})
endif(NOT LOCALE STREQUAL "en")
endforeach(LOCALE ${GETTEXT_AVAILABLE_LOCALES})
add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES})
add_custom_target(updatepo COMMENT "po update" DEPENDS ${PO_FILES})
endif(USE_GETTEXT)
# Subdirectories

View File

@ -936,7 +936,6 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
*/
//m_env.getClientMap().updateMeshes(block->getPos(), getDayNightRatio());
/*
Add it to mesh update queue and set it to be acknowledged after update.
*/

View File

@ -3,14 +3,16 @@
#ifndef CMAKE_CONFIG_H
#define CMAKE_CONFIG_H
#define PROJECT_NAME "@PROJECT_NAME@"
#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define VERSION_STRING "@VERSION_STRING@"
#define USE_GETTEXT @USE_GETTEXT@
#ifdef NDEBUG
#define BUILD_TYPE "Release"
#else
#define BUILD_TYPE "Debug"
#endif
#define BUILD_INFO "VER="VERSION_STRING" RUN_IN_PLACE=@RUN_IN_PLACE@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
#define BUILD_INFO "VER="VERSION_STRING" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
#endif

View File

@ -9,6 +9,8 @@
#ifdef USE_CMAKE_CONFIG_H
#include "cmake_config.h"
#else
#define PROJECT_NAME "minetest"
//#define INSTALL_PREFIX ""
#define VERSION_STRING "unknown"
#ifdef NDEBUG
@ -21,8 +23,13 @@
#else
#define RUN_IN_PLACE_BOOLSTRING "0"
#endif
#define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
#if USE_GETTEXT
#define USE_GETTEXT_BOOLSTRING "1"
#else
#define USE_GETTEXT_BOOLSTRING "0"
#endif
#define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" USE_GETTEXT="USE_GETTEXT_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
#endif
#endif

View File

@ -413,6 +413,22 @@ InventoryItem *craft_get_result(InventoryItem **items)
}
}
// Ladder
{
ItemSpec specs[9];
specs[0] = ItemSpec(ITEM_CRAFT, "Stick");
specs[2] = ItemSpec(ITEM_CRAFT, "Stick");
specs[3] = ItemSpec(ITEM_CRAFT, "Stick");
specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
specs[5] = ItemSpec(ITEM_CRAFT, "Stick");
specs[6] = ItemSpec(ITEM_CRAFT, "Stick");
specs[8] = ItemSpec(ITEM_CRAFT, "Stick");
if(checkItemCombination(items, specs))
{
return new MaterialItem(CONTENT_LADDER, 1);
}
}
return NULL;
}

View File

@ -1134,6 +1134,53 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
u16 indices[] = {0,1,2,2,3,0};
collector.append(material_rail, vertices, 4, indices, 6);
}
else if (n.getContent() == CONTENT_LADDER) {
u8 l = decode_light(n.getLightBlend(data->m_daynight_ratio));
video::SColor c(255,l,l,l);
float d = (float)BS/16;
// Assume wall is at X+
video::S3DVertex vertices[4] =
{
video::S3DVertex(BS/2-d,-BS/2,-BS/2, 0,0,0, c, 0,1),
video::S3DVertex(BS/2-d,-BS/2,BS/2, 0,0,0, c, 1,1),
video::S3DVertex(BS/2-d,BS/2,BS/2, 0,0,0, c, 1,0),
video::S3DVertex(BS/2-d,BS/2,-BS/2, 0,0,0, c, 0,0),
};
v3s16 dir = unpackDir(n.param2);
for(s32 i=0; i<4; i++)
{
if(dir == v3s16(1,0,0))
vertices[i].Pos.rotateXZBy(0);
if(dir == v3s16(-1,0,0))
vertices[i].Pos.rotateXZBy(180);
if(dir == v3s16(0,0,1))
vertices[i].Pos.rotateXZBy(90);
if(dir == v3s16(0,0,-1))
vertices[i].Pos.rotateXZBy(-90);
if(dir == v3s16(0,-1,0))
vertices[i].Pos.rotateXYBy(-90);
if(dir == v3s16(0,1,0))
vertices[i].Pos.rotateXYBy(90);
vertices[i].Pos += intToFloat(p + blockpos_nodes, BS);
}
video::SMaterial material_ladder;
material_ladder.setFlag(video::EMF_LIGHTING, false);
material_ladder.setFlag(video::EMF_BACK_FACE_CULLING, false);
material_ladder.setFlag(video::EMF_BILINEAR_FILTER, false);
material_ladder.setFlag(video::EMF_FOG_ENABLE, true);
material_ladder.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
material_ladder.setTexture(0, g_texturesource->getTextureRaw("ladder.png"));
u16 indices[] = {0,1,2,2,3,0};
// Add to mesh collector
collector.append(material_ladder, vertices, 4, indices, 6);
}
}
}
#endif

View File

@ -303,6 +303,20 @@ void content_mapnode_init()
f->walkable = false;
setDirtLikeDiggingProperties(f->digging_properties, 0.75);
i = CONTENT_LADDER;
f = &content_features(i);
f->setInventoryTexture("ladder.png");
f->light_propagates = true;
f->param_type = CPT_LIGHT;
f->is_ground_content = true;
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
f->wall_mounted = true;
f->solidness = 0;
f->air_equivalent = true;
f->walkable = false;
f->climbable = true;
setWoodLikeDiggingProperties(f->digging_properties, 0.5);
// Deprecated
i = CONTENT_COALSTONE;
f = &content_features(i);

View File

@ -46,6 +46,7 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
#define CONTENT_FURNACE 16
#define CONTENT_FENCE 21
#define CONTENT_RAIL 30
#define CONTENT_LADDER 31
// 0x800...0xfff (2048...4095): higher 4 bytes of param2 are not usable
#define CONTENT_GRASS 0x800 //1
@ -75,6 +76,5 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
#define CONTENT_NC 0x817
#define CONTENT_NC_RB 0x818
#endif

View File

@ -1511,6 +1511,8 @@ void ClientEnvironment::step(float dtime)
/*
Get the speed the player is going
*/
bool is_climbing = lplayer->is_climbing;
f32 player_speed = 0.001; // just some small value
player_speed = lplayer->getSpeed().getLength();
@ -1568,7 +1570,7 @@ void ClientEnvironment::step(float dtime)
v3f lplayerpos = lplayer->getPosition();
// Apply physics
if(free_move == false)
if(free_move == false && is_climbing == false)
{
// Gravity
v3f speed = lplayer->getSpeed();

View File

@ -538,6 +538,56 @@ void getPointedNode(Client *client, v3f player_position,
}
}
}
else if(n.getContent() == CONTENT_LADDER)
{
v3s16 dir = unpackDir(n.param2);
v3f dir_f = v3f(dir.X, dir.Y, dir.Z);
dir_f *= BS/2 - BS/6 - BS/20;
v3f cpf = npf + dir_f;
f32 distance = (cpf - camera_position).getLength();
v3f vertices[4] =
{
v3f(BS*0.42,-BS/2,-BS/2),
v3f(BS*0.49, BS/2, BS/2),
};
for(s32 i=0; i<2; i++)
{
if(dir == v3s16(1,0,0))
vertices[i].rotateXZBy(0);
if(dir == v3s16(-1,0,0))
vertices[i].rotateXZBy(180);
if(dir == v3s16(0,0,1))
vertices[i].rotateXZBy(90);
if(dir == v3s16(0,0,-1))
vertices[i].rotateXZBy(-90);
if(dir == v3s16(0,-1,0))
vertices[i].rotateXYBy(-90);
if(dir == v3s16(0,1,0))
vertices[i].rotateXYBy(90);
vertices[i] += npf;
}
core::aabbox3d<f32> box;
box = core::aabbox3d<f32>(vertices[0]);
box.addInternalPoint(vertices[1]);
if(distance < mindistance)
{
if(box.intersectsWithLine(shootline))
{
nodefound = true;
nodepos = np;
neighbourpos = np;
mindistance = distance;
nodehilightbox = box;
}
}
}
else if(n.getContent() == CONTENT_RAIL)
{
v3s16 dir = unpackDir(n.param0);

View File

@ -1,4 +1,8 @@
#ifdef USE_GETTEXT
#ifndef GETTEXT_HEADER
#include "config.h" // for USE_GETTEXT
#include <iostream>
#if USE_GETTEXT
#include <libintl.h>
#else
#define gettext(String) String
@ -8,6 +12,17 @@
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
inline void init_gettext(const char *path) {
#if USE_GETTEXT
// don't do this if MSVC compiler is used, it gives an assertion fail
#ifndef _MSC_VER
setlocale(LC_MESSAGES, "");
#endif
bindtextdomain(PROJECT_NAME, path);
textdomain(PROJECT_NAME);
#endif
}
inline wchar_t* chartowchar_t(const char *str)
{
size_t l = strlen(str)+1;
@ -15,3 +30,20 @@ inline wchar_t* chartowchar_t(const char *str)
mbstowcs(nstr, str, l);
return nstr;
}
inline wchar_t* wgettext(const char *str)
{
return chartowchar_t(gettext(str));
}
inline void changeCtype(const char *l)
{
char *ret = NULL;
ret = setlocale(LC_CTYPE, l);
if(ret == NULL)
std::cout<<"locale could not be set"<<std::endl;
else
std::cout<<"locale has been set to:"<<ret<<std::endl;
}
#define GETTEXT_HEADER
#endif

View File

@ -76,13 +76,13 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
recalculateAbsolutePosition(false);
v2s32 topleft(0, 0);
changeCtype("");
{
core::rect < s32 > rect(0, 0, 125, 20);
rect += topleft + v2s32(25, 3);
const wchar_t *text = L"KEYBINDINGS";
//gui::IGUIStaticText *t =
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("KEYBINDINGS"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
v2s32 offset(25, 40);
@ -91,8 +91,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Forward";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Forward"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -101,15 +101,15 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->forward = Environment->addButton(rect, this,
GUI_ID_KEY_FORWARD_BUTTON,
narrow_to_wide(KeyNames[key_forward]).c_str());
wgettext(KeyNames[key_forward]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Backward";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Backward"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -118,14 +118,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->backward = Environment->addButton(rect, this,
GUI_ID_KEY_BACKWARD_BUTTON,
narrow_to_wide(KeyNames[key_backward]).c_str());
wgettext(KeyNames[key_backward]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Left";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Left"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -133,14 +133,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->left = Environment->addButton(rect, this, GUI_ID_KEY_LEFT_BUTTON,
narrow_to_wide(KeyNames[key_left]).c_str());
wgettext(KeyNames[key_left]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Right";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Right"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -149,14 +149,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->right = Environment->addButton(rect, this,
GUI_ID_KEY_RIGHT_BUTTON,
narrow_to_wide(KeyNames[key_right]).c_str());
wgettext(KeyNames[key_right]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Use";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Use"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -164,14 +164,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->use = Environment->addButton(rect, this, GUI_ID_KEY_USE_BUTTON,
narrow_to_wide(KeyNames[key_use]).c_str());
wgettext(KeyNames[key_use]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Sneak";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Sneak"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -180,14 +180,13 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->sneak = Environment->addButton(rect, this,
GUI_ID_KEY_SNEAK_BUTTON,
narrow_to_wide(KeyNames[key_sneak]).c_str());
wgettext(KeyNames[key_sneak]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Jump";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Jump"), rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -195,15 +194,15 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->jump = Environment->addButton(rect, this, GUI_ID_KEY_JUMP_BUTTON,
narrow_to_wide(KeyNames[key_jump]).c_str());
wgettext(KeyNames[key_jump]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Inventory";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Inventory"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -212,14 +211,13 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->inventory = Environment->addButton(rect, this,
GUI_ID_KEY_INVENTORY_BUTTON,
narrow_to_wide(KeyNames[key_inventory]).c_str());
wgettext(KeyNames[key_inventory]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Chat";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Chat"), rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -227,7 +225,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->chat = Environment->addButton(rect, this, GUI_ID_KEY_CHAT_BUTTON,
narrow_to_wide(KeyNames[key_chat]).c_str());
wgettext(KeyNames[key_chat]));
}
//next col
@ -235,8 +233,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Toggle fly";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Toggle fly"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -244,14 +242,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->fly = Environment->addButton(rect, this, GUI_ID_KEY_FLY_BUTTON,
narrow_to_wide(KeyNames[key_fly]).c_str());
wgettext(KeyNames[key_fly]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Toggle fast";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Toggle fast"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -259,14 +257,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->fast = Environment->addButton(rect, this, GUI_ID_KEY_FAST_BUTTON,
narrow_to_wide(KeyNames[key_fast]).c_str());
wgettext(KeyNames[key_fast]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Range select";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Range select"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -275,15 +273,15 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->range = Environment->addButton(rect, this,
GUI_ID_KEY_RANGE_BUTTON,
narrow_to_wide(KeyNames[key_range]).c_str());
wgettext(KeyNames[key_range]));
}
offset += v2s32(0, 25);
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Print stacks";
Environment->addStaticText(text, rect, false, true, this, -1);
Environment->addStaticText(wgettext("Print stacks"),
rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@ -291,18 +289,21 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->dump = Environment->addButton(rect, this, GUI_ID_KEY_DUMP_BUTTON,
narrow_to_wide(KeyNames[key_dump]).c_str());
wgettext(KeyNames[key_dump]));
}
{
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(size.X - 100 - 20, size.Y - 40);
Environment->addButton(rect, this, GUI_ID_BACK_BUTTON, L"Save");
Environment->addButton(rect, this, GUI_ID_BACK_BUTTON,
wgettext("Save"));
}
{
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(size.X - 100 - 20 - 100 - 20, size.Y - 40);
Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON, L"Cancel");
Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON,
wgettext("Cancel"));
}
changeCtype("C");
}
void GUIKeyChangeMenu::drawMenu()
@ -366,45 +367,45 @@ bool GUIKeyChangeMenu::resetMenu()
{
case GUI_ID_KEY_FORWARD_BUTTON:
this->forward->setText(
narrow_to_wide(KeyNames[key_forward]).c_str());
wgettext(KeyNames[key_forward]));
break;
case GUI_ID_KEY_BACKWARD_BUTTON:
this->backward->setText(
narrow_to_wide(KeyNames[key_backward]).c_str());
wgettext(KeyNames[key_backward]));
break;
case GUI_ID_KEY_LEFT_BUTTON:
this->left->setText(narrow_to_wide(KeyNames[key_left]).c_str());
this->left->setText(wgettext(KeyNames[key_left]));
break;
case GUI_ID_KEY_RIGHT_BUTTON:
this->right->setText(narrow_to_wide(KeyNames[key_right]).c_str());
this->right->setText(wgettext(KeyNames[key_right]));
break;
case GUI_ID_KEY_JUMP_BUTTON:
this->jump->setText(narrow_to_wide(KeyNames[key_jump]).c_str());
this->jump->setText(wgettext(KeyNames[key_jump]));
break;
case GUI_ID_KEY_SNEAK_BUTTON:
this->sneak->setText(narrow_to_wide(KeyNames[key_sneak]).c_str());
this->sneak->setText(wgettext(KeyNames[key_sneak]));
break;
case GUI_ID_KEY_INVENTORY_BUTTON:
this->inventory->setText(
narrow_to_wide(KeyNames[key_inventory]).c_str());
wgettext(KeyNames[key_inventory]));
break;
case GUI_ID_KEY_CHAT_BUTTON:
this->chat->setText(narrow_to_wide(KeyNames[key_chat]).c_str());
this->chat->setText(wgettext(KeyNames[key_chat]));
break;
case GUI_ID_KEY_RANGE_BUTTON:
this->range->setText(narrow_to_wide(KeyNames[key_range]).c_str());
this->range->setText(wgettext(KeyNames[key_range]));
break;
case GUI_ID_KEY_FLY_BUTTON:
this->fly->setText(narrow_to_wide(KeyNames[key_fly]).c_str());
this->fly->setText(wgettext(KeyNames[key_fly]));
break;
case GUI_ID_KEY_FAST_BUTTON:
this->fast->setText(narrow_to_wide(KeyNames[key_fast]).c_str());
this->fast->setText(wgettext(KeyNames[key_fast]));
break;
case GUI_ID_KEY_USE_BUTTON:
this->use->setText(narrow_to_wide(KeyNames[key_use]).c_str());
this->use->setText(wgettext(KeyNames[key_use]));
break;
case GUI_ID_KEY_DUMP_BUTTON:
this->dump->setText(narrow_to_wide(KeyNames[key_dump]).c_str());
this->dump->setText(wgettext(KeyNames[key_dump]));
break;
}
activeKey = -1;
@ -417,85 +418,86 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event)
if (event.EventType == EET_KEY_INPUT_EVENT && activeKey >= 0
&& event.KeyInput.PressedDown)
{
changeCtype("");
if (activeKey == GUI_ID_KEY_FORWARD_BUTTON)
{
this->forward->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_forward = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_BACKWARD_BUTTON)
{
this->backward->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_backward = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_LEFT_BUTTON)
{
this->left->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_left = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_RIGHT_BUTTON)
{
this->right->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_right = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_JUMP_BUTTON)
{
this->jump->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_jump = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_SNEAK_BUTTON)
{
this->sneak->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_sneak = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_INVENTORY_BUTTON)
{
this->inventory->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_inventory = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_CHAT_BUTTON)
{
this->chat->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_chat = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_RANGE_BUTTON)
{
this->range->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_range = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_FLY_BUTTON)
{
this->fly->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_fly = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_FAST_BUTTON)
{
this->fast->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_fast = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_USE_BUTTON)
{
this->use->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_use = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_DUMP_BUTTON)
{
this->dump->setText(
narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
wgettext(KeyNames[event.KeyInput.Key]));
this->key_dump = event.KeyInput.Key;
}
changeCtype("C");
activeKey = -1;
return true;
}
@ -514,6 +516,12 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event)
}
if (event.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED)
{
if(event.GUIEvent.Caller->getID() != GUI_ID_BACK_BUTTON &&
event.GUIEvent.Caller->getID() != GUI_ID_ABORT_BUTTON)
{
changeCtype("");
}
switch (event.GUIEvent.Caller->getID())
{
case GUI_ID_BACK_BUTTON: //back
@ -526,70 +534,71 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event)
case GUI_ID_KEY_FORWARD_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->forward->setText(L"press Key");
this->forward->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_BACKWARD_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->backward->setText(L"press Key");
this->backward->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_LEFT_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->left->setText(L"press Key");
this->left->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_RIGHT_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->right->setText(L"press Key");
this->right->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_USE_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->use->setText(L"press Key");
this->use->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_FLY_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->fly->setText(L"press Key");
this->fly->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_FAST_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->fast->setText(L"press Key");
this->fast->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_JUMP_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->jump->setText(L"press Key");
this->jump->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_CHAT_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->chat->setText(L"press Key");
this->chat->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_SNEAK_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->sneak->setText(L"press Key");
this->sneak->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_INVENTORY_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->inventory->setText(L"press Key");
this->inventory->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_DUMP_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->dump->setText(L"press Key");
this->dump->setText(wgettext("press Key"));
break;
case GUI_ID_KEY_RANGE_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
this->range->setText(L"press Key");
this->range->setText(wgettext("press Key"));
break;
}
//Buttons
changeCtype("C");
}
}

View File

@ -26,35 +26,36 @@
#include "utility.h"
#include "modalMenu.h"
#include "client.h"
#include "gettext.h"
#include <string>
static const char *KeyNames[] =
{ "-", "Left Button", "Right Button", "Cancel", "Middle Button", "X Button 1",
"X Button 2", "-", "Back", "Tab", "-", "-", "Clear", "Return", "-",
"-", "Shift", "Control", "Menu", "Pause", "Capital", "Kana", "-",
"Junja", "Final", "Kanji", "-", "Escape", "Convert", "Nonconvert",
"Accept", "Mode Change", "Space", "Priot", "Next", "End", "Home",
"Left", "Up", "Right", "Down", "Select", "Print", "Execute",
"Snapshot", "Insert", "Delete", "Help", "0", "1", "2", "3", "4", "5",
{ "-", N_("Left Button"), N_("Right Button"), N_("Cancel"), N_("Middle Button"), N_("X Button 1"),
N_("X Button 2"), "-", N_("Back"), N_("Tab"), "-", "-", N_("Clear"), N_("Return"), "-",
"-", N_("Shift"), N_("Control"), N_("Menu"), N_("Pause"), N_("Capital"), N_("Kana"), "-",
N_("Junja"), N_("Final"), N_("Kanji"), "-", N_("Escape"), N_("Convert"), N_("Nonconvert"),
N_("Accept"), N_("Mode Change"), N_("Space"), N_("Priot"), N_("Next"), N_("End"), N_("Home"),
N_("Left"), N_("Up"), N_("Right"), N_("Down"), N_("Select"), N_("Print"), N_("Execute"),
N_("Snapshot"), N_("Insert"), N_("Delete"), N_("Help"), "0", "1", "2", "3", "4", "5",
"6", "7", "8", "9", "-", "-", "-", "-", "-", "-", "-", "A", "B", "C",
"D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q",
"R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Left Windows",
"Right Windows", "Apps", "-", "Sleep", "Numpad 0", "Numpad 1",
"Numpad 2", "Numpad 3", "Numpad 4", "Numpad 5", "Numpad 6", "Numpad 7",
"Numpad 8", "Numpad 9", "Numpad *", "Numpad +", "Numpad /", "Numpad -",
"R", "S", "T", "U", "V", "W", "X", "Y", "Z", N_("Left Windows"),
N_("Right Windows"), N_("Apps"), "-", N_("Sleep"), N_("Numpad 0"), N_("Numpad 1"),
N_("Numpad 2"), N_("Numpad 3"), N_("Numpad 4"), N_("Numpad 5"), N_("Numpad 6"), N_("Numpad 7"),
N_("Numpad 8"), N_("Numpad 9"), N_("Numpad *"), N_("Numpad +"), N_("Numpad /"), N_("Numpad -"),
"Numpad .", "Numpad /", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
"F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18",
"F19", "F20", "F21", "F22", "F23", "F24", "-", "-", "-", "-", "-", "-",
"-", "-", "Num Lock", "Scroll Lock", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", "Left Shift", "Right Shight",
"Left Control", "Right Control", "Left Menu", "Right Menu", "-", "-",
"-", "-", N_("Num Lock"), N_("Scroll Lock"), "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", N_("Left Shift"), N_("Right Shight"),
N_("Left Control"), N_("Right Control"), N_("Left Menu"), N_("Right Menu"), "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "Plus", "Comma", "Minus", "Period", "-", "-",
"-", "-", "-", "-", "-", N_("Plus"), N_("Comma"), N_("Minus"), N_("Period"), "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "Attn", "CrSel",
"ExSel", "Erase OEF", "Play", "Zoom", "PA1", "OEM Clear", "-" };
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", N_("Attn"), N_("CrSel"),
N_("ExSel"), N_("Erase OEF"), N_("Play"), N_("Zoom"), N_("PA1"), N_("OEM Clear"), "-" };
enum
{
GUI_ID_BACK_BUTTON = 101, GUI_ID_ABORT_BUTTON, GUI_ID_SCROLL_BAR,

View File

@ -164,6 +164,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
v2s32 topleft_client(40, 0);
v2s32 size_client = size - v2s32(40, 0);
changeCtype("");
{
core::rect<s32> rect(0, 0, 20, 125);
rect += topleft_client + v2s32(-15, 60);
@ -177,9 +178,10 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, 50+6);
Environment->addStaticText(chartowchar_t(gettext("Name/Password")),
Environment->addStaticText(wgettext("Name/Password"),
rect, false, true, this, -1);
}
changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, 50);
@ -196,13 +198,15 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
e->setPasswordBox(true);
}
changeCtype("");
// Address + port
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, 100+6);
Environment->addStaticText(chartowchar_t(gettext("Address/Port")),
Environment->addStaticText(wgettext("Address/Port"),
rect, false, true, this, -1);
}
changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, 100);
@ -217,23 +221,24 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
rect += topleft_client + v2s32(size_client.X-60-100, 100);
Environment->addEditBox(text_port.c_str(), rect, true, this, GUI_ID_PORT_INPUT);
}
changeCtype("");
{
core::rect<s32> rect(0, 0, 400, 20);
rect += topleft_client + v2s32(160, 100+35);
Environment->addStaticText(chartowchar_t(gettext("Leave address blank to start a local server.")),
Environment->addStaticText(wgettext("Leave address blank to start a local server."),
rect, false, true, this, -1);
}
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_client + v2s32(35, 150);
Environment->addCheckBox(fancy_trees, rect, this, GUI_ID_FANCYTREE_CB,
chartowchar_t(gettext("Fancy trees")));
wgettext("Fancy trees"));
}
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_client + v2s32(35, 150+30);
Environment->addCheckBox(smooth_lighting, rect, this, GUI_ID_SMOOTH_LIGHTING_CB,
chartowchar_t(gettext("Smooth Lighting")));
wgettext("Smooth Lighting"));
}
// Start game button
{
@ -241,7 +246,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
//rect += topleft_client + v2s32(size_client.X/2-180/2, 225-30/2);
rect += topleft_client + v2s32(size_client.X-180-40, 150+25);
Environment->addButton(rect, this, GUI_ID_JOIN_GAME_BUTTON,
chartowchar_t(gettext("Start Game / Connect")));
wgettext("Start Game / Connect"));
}
// Key change button
@ -250,7 +255,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
//rect += topleft_client + v2s32(size_client.X/2-180/2, 225-30/2);
rect += topleft_client + v2s32(size_client.X-180-40-100-20, 150+25);
Environment->addButton(rect, this, GUI_ID_CHANGE_KEYS_BUTTON,
chartowchar_t(gettext("Change keys")));
wgettext("Change keys"));
}
/*
Server section
@ -273,13 +278,13 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_server + v2s32(35, 30);
Environment->addCheckBox(creative_mode, rect, this, GUI_ID_CREATIVE_CB,
chartowchar_t(gettext("Creative Mode")));
wgettext("Creative Mode"));
}
{
core::rect<s32> rect(0, 0, 250, 30);
rect += topleft_server + v2s32(35, 60);
Environment->addCheckBox(enable_damage, rect, this, GUI_ID_DAMAGE_CB,
chartowchar_t(gettext("Enable Damage")));
wgettext("Enable Damage"));
}
// Map delete button
{
@ -287,8 +292,9 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
//rect += topleft_server + v2s32(size_server.X-40-130, 100+25);
rect += topleft_server + v2s32(40, 100+25);
Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON,
chartowchar_t(gettext("Delete map")));
wgettext("Delete map"));
}
changeCtype("C");
}
void GUIMainMenu::drawMenu()

View File

@ -85,14 +85,16 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize)
Environment->addStaticText(m_message_text.c_str(), rect, false,
true, this, 256);
}
changeCtype("");
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
gui::IGUIElement *e =
Environment->addButton(rect, this, 257,
chartowchar_t(gettext("Proceed")));
wgettext("Proceed"));
Environment->setFocus(e);
}
changeCtype("C");
}
void GUIMessageMenu::drawMenu()

View File

@ -96,12 +96,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
Add stuff
*/
s32 ypos = 50;
changeCtype("");
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
Environment->addStaticText(chartowchar_t(gettext("Old Password")),
Environment->addStaticText(wgettext("Old Password"),
rect, false, true, this, -1);
}
changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, ypos);
@ -111,12 +113,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
e->setPasswordBox(true);
}
ypos += 50;
changeCtype("");
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
Environment->addStaticText(chartowchar_t(gettext("New Password")),
Environment->addStaticText(wgettext("New Password"),
rect, false, true, this, -1);
}
changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, ypos);
@ -125,12 +129,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
e->setPasswordBox(true);
}
ypos += 50;
changeCtype("");
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
Environment->addStaticText(chartowchar_t(gettext("Confirm Password")),
Environment->addStaticText(wgettext("Confirm Password"),
rect, false, true, this, -1);
}
changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, ypos);
@ -140,10 +146,11 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
}
ypos += 50;
changeCtype("");
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, ypos);
Environment->addButton(rect, this, ID_change, chartowchar_t(gettext("Change")));
Environment->addButton(rect, this, ID_change, wgettext("Change"));
}
ypos += 50;
@ -152,10 +159,11 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
rect += topleft_client + v2s32(35, ypos);
IGUIElement *e =
Environment->addStaticText(
chartowchar_t(gettext("Passwords do not match!")),
wgettext("Passwords do not match!"),
rect, false, true, this, ID_message);
e->setVisible(false);
}
changeCtype("C");
}

View File

@ -103,32 +103,33 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
const s32 btn_gap = 20;
const s32 btn_num = 4;
s32 btn_y = size.Y/2-((btn_num*btn_height+(btn_num-1)*btn_gap))/2;
changeCtype("");
{
core::rect<s32> rect(0, 0, 140, btn_height);
rect = rect + v2s32(size.X/2-140/2, btn_y);
Environment->addButton(rect, this, 256,
chartowchar_t(gettext("Continue")));
wgettext("Continue"));
}
btn_y += btn_height + btn_gap;
{
core::rect<s32> rect(0, 0, 140, btn_height);
rect = rect + v2s32(size.X/2-140/2, btn_y);
Environment->addButton(rect, this, 261,
chartowchar_t(gettext("Change Password")));
wgettext("Change Password"));
}
btn_y += btn_height + btn_gap;
{
core::rect<s32> rect(0, 0, 140, btn_height);
rect = rect + v2s32(size.X/2-140/2, btn_y);
Environment->addButton(rect, this, 260,
chartowchar_t(gettext("Disconnect")));
wgettext("Disconnect"));
}
btn_y += btn_height + btn_gap;
{
core::rect<s32> rect(0, 0, 140, btn_height);
rect = rect + v2s32(size.X/2-140/2, btn_y);
Environment->addButton(rect, this, 257,
chartowchar_t(gettext("Exit to OS")));
wgettext("Exit to OS"));
}
{
@ -172,7 +173,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
);*/
std::ostringstream os;
os<<"Minetest-c55\n";
os<<"Minetest\n";
os<<"by Perttu Ahola and contributors\n";
os<<"celeron55@gmail.com\n";
os<<BUILD_INFO<<"\n";
@ -180,6 +181,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
Environment->addStaticText(narrow_to_wide(os.str()).c_str(), rect, false, true, this, 259);
}
changeCtype("C");
}
void GUIPauseMenu::drawMenu()

View File

@ -104,12 +104,14 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
Environment->addEditBox(text.c_str(), rect, true, this, 256);
Environment->setFocus(e);
}
changeCtype("");
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
Environment->addButton(rect, this, 257,
chartowchar_t(gettext("Proceed")));
wgettext("Proceed"));
}
changeCtype("C");
}
void GUITextInputMenu::drawMenu()

View File

@ -233,4 +233,3 @@ void clearKeyCache()
{
g_key_setting_cache.clear();
}

View File

@ -1164,11 +1164,7 @@ int main(int argc, char *argv[])
// Create user data directory
fs::CreateDir(porting::path_userdata);
#ifdef USE_GETTEXT
setlocale(LC_MESSAGES, "");
bindtextdomain("minetest", (porting::path_userdata+"/locale").c_str());
textdomain("minetest");
#endif
init_gettext((porting::path_data+"/../locale").c_str());
// Initialize debug streams
#ifdef RUN_IN_PLACE
@ -1189,7 +1185,7 @@ int main(int argc, char *argv[])
BEGIN_DEBUG_EXCEPTION_HANDLER
// Print startup message
dstream<<DTIME<<"minetest-c55"
dstream<<DTIME<<PROJECT_NAME
" with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
<<", "<<BUILD_INFO
<<std::endl;

View File

@ -1086,7 +1086,7 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
v3s16 p2 = p + dirs[i];
MapNode n2 = getNode(p2);
if(content_liquid(n2.getContent()))
if(content_liquid(n2.getContent()) || n2.getContent() == CONTENT_AIR)
{
m_transforming_liquid.push_back(p2);
}
@ -1260,7 +1260,7 @@ void Map::removeNodeAndUpdate(v3s16 p,
v3s16 p2 = p + dirs[i];
MapNode n2 = getNode(p2);
if(content_liquid(n2.getContent()))
if(content_liquid(n2.getContent()) || n2.getContent() == CONTENT_AIR)
{
m_transforming_liquid.push_back(p2);
}
@ -1540,6 +1540,17 @@ void Map::PrintInfo(std::ostream &out)
#define WATER_DROP_BOOST 4
enum NeighborType {
NEIGHBOR_UPPER,
NEIGHBOR_SAME_LEVEL,
NEIGHBOR_LOWER
};
struct NodeNeighbor {
MapNode n;
NeighborType t;
v3s16 p;
};
void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
{
DSTACK(__FUNCTION_NAME);
@ -1560,240 +1571,221 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
MapNode n0 = getNodeNoEx(p0);
// Don't deal with non-liquids
if(content_liquid(n0.getContent()) == false)
/*
Collect information about current node
*/
s8 liquid_level = -1;
u8 liquid_kind = CONTENT_IGNORE;
LiquidType liquid_type = content_features(n0.getContent()).liquid_type;
switch (liquid_type) {
case LIQUID_SOURCE:
liquid_level = 8;
liquid_kind = content_features(n0.getContent()).liquid_alternative_flowing;
break;
case LIQUID_FLOWING:
liquid_level = (n0.param2 & LIQUID_LEVEL_MASK);
liquid_kind = n0.getContent();
break;
case LIQUID_NONE:
// if this is an air node, it *could* be transformed into a liquid. otherwise,
// continue with the next node.
if (n0.getContent() != CONTENT_AIR)
continue;
bool is_source = !content_flowing_liquid(n0.getContent());
u8 liquid_level = 8;
if(is_source == false)
liquid_level = n0.param2 & 0x0f;
// Turn possible source into non-source
u8 nonsource_c = make_liquid_flowing(n0.getContent());
liquid_kind = CONTENT_AIR;
break;
}
/*
If not source, check that some node flows into this one
and what is the level of liquid in this one
Collect information about the environment
*/
if(is_source == false)
{
s8 new_liquid_level_max = -1;
v3s16 dirs_from[5] = {
v3s16 dirs[6] = {
v3s16( 0, 1, 0), // top
v3s16(0,0,1), // back
v3s16( 0,-1, 0), // bottom
v3s16( 1, 0, 0), // right
v3s16(0,0,-1), // front
v3s16(-1, 0, 0), // left
v3s16( 0, 0, 1), // back
v3s16( 0, 0,-1), // front
};
for(u16 i=0; i<5; i++)
{
bool from_top = (i==0);
v3s16 p2 = p0 + dirs_from[i];
MapNode n2 = getNodeNoEx(p2);
if(content_liquid(n2.getContent()))
{
u8 n2_nonsource_c = make_liquid_flowing(n2.getContent());
// Check that the liquids are the same type
if(n2_nonsource_c != nonsource_c)
{
dstream<<"WARNING: Not handling: different liquids"
" collide"<<std::endl;
continue;
NodeNeighbor sources[6]; // surrounding sources
int num_sources = 0;
NodeNeighbor flows[6]; // surrounding flowing liquid nodes
int num_flows = 0;
NodeNeighbor airs[6]; // surrounding air
int num_airs = 0;
NodeNeighbor neutrals[6]; // nodes that are solid or another kind of liquid
int num_neutrals = 0;
bool flowing_down = false;
for (u16 i = 0; i < 6; i++) {
NeighborType nt = NEIGHBOR_SAME_LEVEL;
switch (i) {
case 0:
nt = NEIGHBOR_UPPER;
break;
case 1:
nt = NEIGHBOR_LOWER;
break;
}
bool n2_is_source = !content_flowing_liquid(n2.getContent());
s8 n2_liquid_level = 8;
if(n2_is_source == false)
n2_liquid_level = n2.param2 & 0x07;
s8 new_liquid_level = -1;
if(from_top)
{
//new_liquid_level = 7;
if(n2_liquid_level >= 7 - WATER_DROP_BOOST)
new_liquid_level = 7;
else
new_liquid_level = n2_liquid_level + WATER_DROP_BOOST;
v3s16 npos = p0 + dirs[i];
NodeNeighbor nb = {getNodeNoEx(npos), nt, npos};
switch (content_features(nb.n.getContent()).liquid_type) {
case LIQUID_NONE:
if (nb.n.getContent() == CONTENT_AIR) {
airs[num_airs++] = nb;
// if the current node happens to be a flowing node, it will start to flow down here.
if (nb.t == NEIGHBOR_LOWER)
flowing_down = true;
} else {
neutrals[num_neutrals++] = nb;
}
else if(n2_liquid_level > 0)
{
new_liquid_level = n2_liquid_level - 1;
break;
case LIQUID_SOURCE:
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
if (liquid_kind == CONTENT_AIR)
liquid_kind = content_features(nb.n.getContent()).liquid_alternative_flowing;
if (content_features(nb.n.getContent()).liquid_alternative_flowing !=liquid_kind) {
neutrals[num_neutrals++] = nb;
} else {
sources[num_sources++] = nb;
}
break;
case LIQUID_FLOWING:
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
if (liquid_kind == CONTENT_AIR)
liquid_kind = content_features(nb.n.getContent()).liquid_alternative_flowing;
if (content_features(nb.n.getContent()).liquid_alternative_flowing != liquid_kind) {
neutrals[num_neutrals++] = nb;
} else {
flows[num_flows++] = nb;
if (nb.t == NEIGHBOR_LOWER)
flowing_down = true;
}
break;
}
if(new_liquid_level > new_liquid_level_max)
new_liquid_level_max = new_liquid_level;
}
} //for
/*
If liquid level should be something else, update it and
add all the neighboring water nodes to the transform queue.
decide on the type (and possibly level) of the current node
*/
if(new_liquid_level_max != liquid_level)
{
if(new_liquid_level_max == -1)
{
// Remove water alltoghether
n0.setContent(CONTENT_AIR);
n0.param2 = 0;
setNode(p0, n0);
content_t new_node_content;
s8 new_node_level = -1;
if (num_sources >= 2 || liquid_type == LIQUID_SOURCE) {
// liquid_kind will be set to either the flowing alternative of the node (if it's a liquid)
// or the flowing alternative of the first of the surrounding sources (if it's air), so
// it's perfectly safe to use liquid_kind here to determine the new node content.
new_node_content = content_features(liquid_kind).liquid_alternative_source;
} else if (num_sources == 1 && sources[0].t != NEIGHBOR_LOWER) {
// liquid_kind is set properly, see above
new_node_content = liquid_kind;
new_node_level = 7;
} else {
// no surrounding sources, so get the maximum level that can flow into this node
for (u16 i = 0; i < num_flows; i++) {
u8 nb_liquid_level = (flows[i].n.param2 & LIQUID_LEVEL_MASK);
switch (flows[i].t) {
case NEIGHBOR_UPPER:
if (nb_liquid_level + WATER_DROP_BOOST > new_node_level) {
new_node_level = 7;
if (nb_liquid_level + WATER_DROP_BOOST < 7)
new_node_level = nb_liquid_level + WATER_DROP_BOOST;
}
else
{
n0.param2 = new_liquid_level_max;
setNode(p0, n0);
break;
case NEIGHBOR_LOWER:
break;
case NEIGHBOR_SAME_LEVEL:
if ((flows[i].n.param2 & LIQUID_FLOW_DOWN_MASK) != LIQUID_FLOW_DOWN_MASK &&
nb_liquid_level > 0 && nb_liquid_level - 1 > new_node_level) {
new_node_level = nb_liquid_level - 1;
}
break;
}
}
// don't flow as far in open terrain - if there isn't at least one adjacent solid block,
// substract another unit from the resulting water level.
if (!flowing_down && new_node_level >= 1) {
bool at_wall = false;
for (u16 i = 0; i < num_neutrals; i++) {
if (neutrals[i].t == NEIGHBOR_SAME_LEVEL) {
at_wall = true;
break;
}
}
if (!at_wall)
new_node_level -= 1;
}
// Block has been modified
{
if (new_node_level >= 0)
new_node_content = liquid_kind;
else
new_node_content = CONTENT_AIR;
}
/*
check if anything has changed. if not, just continue with the next node.
*/
if (new_node_content == n0.getContent() && (content_features(n0.getContent()).liquid_type != LIQUID_FLOWING ||
((n0.param2 & LIQUID_LEVEL_MASK) == (u8)new_node_level &&
((n0.param2 & LIQUID_FLOW_DOWN_MASK) == LIQUID_FLOW_DOWN_MASK)
== flowing_down)))
continue;
/*
update the current node
*/
bool flow_down_enabled = (flowing_down && ((n0.param2 & LIQUID_FLOW_DOWN_MASK) != LIQUID_FLOW_DOWN_MASK));
n0.setContent(new_node_content);
if (content_features(n0.getContent()).liquid_type == LIQUID_FLOWING) {
// set level to last 3 bits, flowing down bit to 4th bit
n0.param2 |= (flowing_down ? LIQUID_FLOW_DOWN_MASK : 0x00) | (new_node_level & LIQUID_LEVEL_MASK);
} else {
// set the liquid level and flow bit to 0
n0.param2 &= ~(LIQUID_LEVEL_MASK | LIQUID_FLOW_DOWN_MASK);
}
setNode(p0, n0);
v3s16 blockpos = getNodeBlockPos(p0);
MapBlock *block = getBlockNoCreateNoEx(blockpos);
if(block != NULL)
modified_blocks.insert(blockpos, block);
}
/*
Add neighboring non-source liquid nodes to transform queue.
enqueue neighbors for update if neccessary
*/
v3s16 dirs[6] = {
v3s16(0,0,1), // back
v3s16(0,1,0), // top
v3s16(1,0,0), // right
v3s16(0,0,-1), // front
v3s16(0,-1,0), // bottom
v3s16(-1,0,0), // left
};
for(u16 i=0; i<6; i++)
{
v3s16 p2 = p0 + dirs[i];
MapNode n2 = getNodeNoEx(p2);
if(content_flowing_liquid(n2.getContent()))
{
m_transforming_liquid.push_back(p2);
switch (content_features(n0.getContent()).liquid_type) {
case LIQUID_SOURCE:
// make sure source flows into all neighboring nodes
for (u16 i = 0; i < num_flows; i++)
if (flows[i].t != NEIGHBOR_UPPER)
m_transforming_liquid.push_back(flows[i].p);
for (u16 i = 0; i < num_airs; i++)
if (airs[i].t != NEIGHBOR_UPPER)
m_transforming_liquid.push_back(airs[i].p);
break;
case LIQUID_NONE:
// this flow has turned to air; neighboring flows might need to do the same
for (u16 i = 0; i < num_flows; i++)
m_transforming_liquid.push_back(flows[i].p);
break;
case LIQUID_FLOWING:
for (u16 i = 0; i < num_flows; i++) {
u8 flow_level = (flows[i].n.param2 & LIQUID_LEVEL_MASK);
// liquid_level is still the ORIGINAL level of this node.
if (flows[i].t != NEIGHBOR_UPPER && ((flow_level < liquid_level || flow_level < new_node_level) ||
flow_down_enabled))
m_transforming_liquid.push_back(flows[i].p);
}
for (u16 i = 0; i < num_airs; i++) {
if (airs[i].t != NEIGHBOR_UPPER && (airs[i].t == NEIGHBOR_LOWER || new_node_level > 0))
m_transforming_liquid.push_back(airs[i].p);
}
}
}
// Get a new one from queue if the node has turned into non-water
if(content_liquid(n0.getContent()) == false)
continue;
/*
Flow water from this node
*/
v3s16 dirs_to[5] = {
v3s16(0,-1,0), // bottom
v3s16(0,0,1), // back
v3s16(1,0,0), // right
v3s16(0,0,-1), // front
v3s16(-1,0,0), // left
};
for(u16 i=0; i<5; i++)
{
bool to_bottom = (i == 0);
// If liquid is at lowest possible height, it's not going
// anywhere except down
if(liquid_level == 0 && to_bottom == false)
continue;
u8 liquid_next_level = 0;
// If going to bottom
if(to_bottom)
{
//liquid_next_level = 7;
if(liquid_level >= 7 - WATER_DROP_BOOST)
liquid_next_level = 7;
else
liquid_next_level = liquid_level + WATER_DROP_BOOST;
}
else
liquid_next_level = liquid_level - 1;
bool n2_changed = false;
bool flowed = false;
v3s16 p2 = p0 + dirs_to[i];
MapNode n2 = getNodeNoEx(p2);
//dstream<<"[1] n2.param="<<(int)n2.param<<std::endl;
if(content_liquid(n2.getContent()))
{
u8 n2_nonsource_c = make_liquid_flowing(n2.getContent());
// Check that the liquids are the same type
if(n2_nonsource_c != nonsource_c)
{
dstream<<"WARNING: Not handling: different liquids"
" collide"<<std::endl;
continue;
}
bool n2_is_source = !content_flowing_liquid(n2.getContent());
u8 n2_liquid_level = 8;
if(n2_is_source == false)
n2_liquid_level = n2.param2 & 0x07;
if(to_bottom)
{
flowed = true;
}
if(n2_is_source)
{
// Just flow into the source, nothing changes.
// n2_changed is not set because destination didn't change
flowed = true;
}
else
{
if(liquid_next_level > liquid_level)
{
n2.param2 = liquid_next_level;
setNode(p2, n2);
n2_changed = true;
flowed = true;
}
}
}
else if(n2.getContent() == CONTENT_AIR)
{
n2.setContent(nonsource_c);
n2.param2 = liquid_next_level;
setNode(p2, n2);
n2_changed = true;
flowed = true;
}
//dstream<<"[2] n2.param="<<(int)n2.param<<std::endl;
if(n2_changed)
{
m_transforming_liquid.push_back(p2);
v3s16 blockpos = getNodeBlockPos(p2);
MapBlock *block = getBlockNoCreateNoEx(blockpos);
if(block != NULL)
modified_blocks.insert(blockpos, block);
}
// If n2_changed to bottom, don't flow anywhere else
if(to_bottom && flowed && !is_source)
break;
}
loopcount++;
//if(loopcount >= 100000)
if(loopcount >= initial_size * 1)
if(loopcount >= initial_size * 10) {
break;
}
}
//dstream<<"Map::transformLiquids(): loopcount="<<loopcount<<std::endl;
}

View File

@ -96,7 +96,7 @@ enum LiquidType
LIQUID_SOURCE
};
class MapNode;
struct MapNode;
class NodeMetadata;
struct ContentFeatures
@ -128,6 +128,8 @@ struct ContentFeatures
bool pointable;
// Player can dig these
bool diggable;
// Player can climb these
bool climbable;
// Player can build on these
bool buildable_to;
// Whether the node has no liquid, source liquid or flowing liquid
@ -171,6 +173,7 @@ struct ContentFeatures
walkable = true;
pointable = true;
diggable = true;
climbable = false;
buildable_to = false;
liquid_type = LIQUID_NONE;
wall_mounted = false;
@ -403,10 +406,17 @@ enum LightBank
LIGHTBANK_NIGHT
};
/*
Masks for MapNode.param2 of flowing liquids
*/
#define LIQUID_LEVEL_MASK 0x07
#define LIQUID_FLOW_DOWN_MASK 0x08
/*
This is the stuff what the whole world consists of.
*/
struct MapNode
{
/*

View File

@ -375,6 +375,21 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
in_water_stable = false;
}
/*
Check if player is climbing
*/
try {
v3s16 pp = floatToInt(position + v3f(0,0.5*BS,0), BS);
v3s16 pp2 = floatToInt(position + v3f(0,-0.2*BS,0), BS);
is_climbing = ((content_features(map.getNode(pp).getContent()).climbable ||
content_features(map.getNode(pp2).getContent()).climbable) && !free_move);
}
catch(InvalidPositionException &e)
{
is_climbing = false;
}
/*
Collision uncertainty radius
Make it a bit larger than the maximum distance of movement
@ -723,7 +738,7 @@ void LocalPlayer::applyControl(float dtime)
bool fast_move = g_settings.getBool("fast_move");
bool continuous_forward = g_settings.getBool("continuous_forward");
if(free_move)
if(free_move || is_climbing)
{
v3f speed = getSpeed();
speed.Y = 0;
@ -750,6 +765,12 @@ void LocalPlayer::applyControl(float dtime)
speed.Y = -walkspeed_max;
setSpeed(speed);
}
else if(is_climbing)
{
v3f speed = getSpeed();
speed.Y = -3*BS;
setSpeed(speed);
}
else
{
// If not free movement but fast is allowed, aux1 is
@ -812,6 +833,12 @@ void LocalPlayer::applyControl(float dtime)
setSpeed(speed);
swimming_up = true;
}
else if(is_climbing)
{
v3f speed = getSpeed();
speed.Y = 3*BS;
setSpeed(speed);
}
}
// The speed of the player (Y is ignored)

View File

@ -118,6 +118,7 @@ public:
bool in_water;
// This is more stable and defines the maximum speed of the player
bool in_water_stable;
bool is_climbing;
bool swimming_up;
Inventory inventory;

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[])
BEGIN_DEBUG_EXCEPTION_HANDLER
// Print startup message
dstream<<DTIME<<"minetest-c55"
dstream<<DTIME<<PROJECT_NAME <<
" with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
<<", "<<BUILD_INFO
<<std::endl;

View File

@ -1,21 +1,26 @@
0 128 128 128
1 107 134 51
2 39 66 106
3 255 255 0
4 86 58 31
5 48 95 8
6 102 129 38
7 178 178 0
8 101 84 36
9 39 66 106
12 104 78 42
13 210 194 156
14 117 86 41
15 128 79 0
16 118 118 118
18 123 123 123
19 199 199 199
20 183 183 222
21 103 78 42
22 108 138 108
23 90 90 90
0 128 128 128 # CONTENT_STONE
800 107 134 51 # CONTENT_GRASS
2 39 66 106 # CONTENT_WATER
3 255 255 0 # CONTENT_TORCH
801 86 58 31 # CONTENT_TREE
802 48 95 8 # CONTENT_LEAVES
803 102 129 38 # CONTENT_GRASS_FOOTSTEPS
804 178 178 0 # CONTENT_MESE
805 101 84 36 # CONTENT_MUD
9 39 66 106 # CONTENT_WATERSOURCE
808 104 78 42 # CONTENT_WOOD
809 210 194 156 # CONTENT_SAND
e 117 86 41 # CONTENT_SIGN_WALL
f 128 79 0 # CONTENT_CHEST
10 118 118 118 # CONTENT_FURNACE
80a 123 123 123 # CONTENT_COBBLE
80b 199 199 199 # CONTENT_STEEL
80c 183 183 222 # CONENT_GLASS
15 103 78 42 # CONTENT_FENCE
80d 219 202 178 # CONTENT_MOSSYCOBBLE
80e 78 154 6 # CONTENT_GRAVEL
80f 204 0 0 # CONTENT_SANDSTONE
810 211 215 207 # CONTENT_CACTUS
811 170 50 25 # CONTENT_BRICK
812 104 78 42 # CONTENT_CLAY
813 58 105 18 # CONTENT_PAPYRUS

View File

@ -1,5 +1,5 @@
#!/usr/bin/python2
# -*- coding: windows-1252 -*-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
@ -13,6 +13,8 @@
# 2011-06-02: j0gge: command line parameters, coordinates, players, ...
# 2011-06-04: celeron55: added #!/usr/bin/python2 and converted \r\n to \n
# to make it easily executable on Linux
# 2011-07-30: WF: Support for content types extension, refactoring
# 2011-07-30: erlehmann: PEP 8 compliance.
# Requires Python Imaging Library: http://www.pythonware.com/products/pil/
@ -21,12 +23,39 @@
#from psyco.classes import *
import zlib
import Image, ImageDraw, ImageFont, ImageColor
import os
import string
import time
import getopt
import sys
import array
from PIL import Image, ImageDraw, ImageFont, ImageColor
CONTENT_WATER = [2, 9]
TRANSLATION_TABLE = {
1: 0x800, # CONTENT_GRASS
4: 0x801, # CONTENT_TREE
5: 0x802, # CONTENT_LEAVES
6: 0x803, # CONTENT_GRASS_FOOTSTEPS
7: 0x804, # CONTENT_MESE
8: 0x805, # CONTENT_MUD
10: 0x806, # CONTENT_CLOUD
11: 0x807, # CONTENT_COALSTONE
12: 0x808, # CONTENT_WOOD
13: 0x809, # CONTENT_SAND
18: 0x80a, # CONTENT_COBBLE
19: 0x80b, # CONTENT_STEEL
20: 0x80c, # CONTENT_GLASS
22: 0x80d, # CONTENT_MOSSYCOBBLE
23: 0x80e, # CONTENT_GRAVEL
24: 0x80f, # CONTENT_SANDSTONE
25: 0x810, # CONTENT_CACTUS
26: 0x811, # CONTENT_BRICK
27: 0x812, # CONTENT_CLAY
28: 0x813, # CONTENT_PAPYRUS
29: 0x814} # CONTENT_BOOKSHELF
def hex_to_int(h):
i = int(h, 16)
@ -34,24 +63,28 @@ def hex_to_int(h):
i -= 4096
return i
def hex4_to_int(h):
i = int(h, 16)
if(i > 32767):
i -= 65536
return i
def int_to_hex3(i):
if(i < 0):
return "%03X" % (i + 4096)
else:
return "%03X" % i
def int_to_hex4(i):
if(i < 0):
return "%04X" % (i + 65536)
else:
return "%04X" % i
def limit(i, l, h):
if(i > h):
i = h
@ -59,10 +92,13 @@ def limit(i, l, h):
i = l
return i
def usage():
print "TODO: Help"
try:
opts, args = getopt.getopt(sys.argv[1:], "hi:o:", ["help", "input=", "output=", "bgcolor=", "scalecolor=", "origincolor=", "playercolor=", "draworigin", "drawplayers", "drawscale"])
opts, args = getopt.getopt(sys.argv[1:], "hi:o:", ["help", "input=",
"output=", "bgcolor=", "scalecolor=", "origincolor=",
"playercolor=", "draworigin", "drawplayers", "drawscale"])
except getopt.GetoptError, err:
# print help information and exit:
print str(err) # will print something like "option -a not recognized"
@ -70,7 +106,7 @@ except getopt.GetoptError, err:
sys.exit(2)
path = "../world/"
output = "uloste.png"
output = "map.png"
border = 0
scalecolor = "black"
bgcolor = "white"
@ -116,17 +152,24 @@ if path[-1:]!="/" and path[-1:]!="\\":
# Load color information for the blocks.
colors = {}
try:
f = file("colors.txt")
except IOError:
f = file(os.path.join(os.path.dirname(__file__), "colors.txt"))
for line in f:
values = string.split(line)
colors[int(values[0])] = (int(values[1]), int(values[2]), int(values[3]))
colors[int(values[0], 16)] = (
int(values[1]),
int(values[2]),
int(values[3]))
f.close()
xlist = []
zlist = []
# List all sectors to memory and calculate the width and heigth of the resulting picture.
try:
# List all sectors to memory and calculate the width and heigth of the
# resulting picture.
if os.path.exists(path + "sectors2"):
for filename in os.listdir(path + "sectors2"):
for filename2 in os.listdir(path + "sectors2/" + filename):
x = hex_to_int(filename)
@ -137,9 +180,8 @@ try:
continue
xlist.append(x)
zlist.append(z)
except OSError:
pass
try:
if os.path.exists(path + "sectors"):
for filename in os.listdir(path + "sectors"):
x = hex4_to_int(filename[:4])
z = hex4_to_int(filename[-4:])
@ -149,8 +191,6 @@ try:
continue
xlist.append(x)
zlist.append(z)
except OSError:
pass
minx = min(xlist)
minz = min(zlist)
@ -170,8 +210,63 @@ stuff = {}
starttime = time.time()
def data_is_air(d):
return (d == 254 or d == 126)
return d in [126, 127, 254]
def read_blocknum(mapdata, version, datapos):
if version == 20:
if mapdata[datapos] < 0x80:
return mapdata[datapos]
else:
return (mapdata[datapos] << 4) | (mapdata[datapos + 0x2000] >> 4)
elif 16 <= version < 20:
return TRANSLATION_TABLE.get(mapdata[datapos], mapdata[datapos])
else:
raise Exception("Unsupported map format: " + str(version))
def read_mapdata(f, version, pixellist, water):
global stuff # oh my :-)
dec_o = zlib.decompressobj()
try:
mapdata = array.array("B", dec_o.decompress(f.read()))
except:
mapdata = []
f.close()
if(len(mapdata) < 4096):
print "bad: " + xhex + "/" + zhex + "/" + yhex + " " + \
str(len(mapdata))
else:
chunkxpos = xpos * 16
chunkypos = ypos * 16
chunkzpos = zpos * 16
blocknum = 0
datapos = 0
for (x, z) in reversed(pixellist):
for y in reversed(range(16)):
datapos = x + y * 16 + z * 256
blocknum = read_blocknum(mapdata, version, datapos)
if not data_is_air(blocknum) and blocknum in colors:
if blocknum in CONTENT_WATER:
water[(x, z)] += 1
# Add dummy stuff for drawing sea without seabed
stuff[(chunkxpos + x, chunkzpos + z)] = (
chunkypos + y, blocknum, water[(x, z)])
else:
pixellist.remove((x, z))
# Memorize information on the type and height of
# the block and for drawing the picture.
stuff[(chunkxpos + x, chunkzpos + z)] = (
chunkypos + y, blocknum, water[(x, z)])
break
elif not data_is_air(blocknum) and blocknum not in colors:
print "strange block: %s/%s/%s x: %d y: %d z: %d \
block id: %x" % (xhex, zhex, yhex, x, y, z, blocknum)
# Go through all sectors.
for n in range(len(xlist)):
@ -189,7 +284,7 @@ for n in range(len(xlist)):
time_guess = seconds_per_n * len(xlist)
remaining_s = time_guess - dtime
remaining_minutes = int(remaining_s / 60)
remaining_s -= remaining_minutes * 60;
remaining_s -= remaining_minutes * 60
print("Processing sector " + str(n) + " of " + str(len(xlist))
+ " (" + str(round(100.0 * n / len(xlist), 1)) + "%)"
+ " (ETA: " + str(remaining_minutes) + "m "
@ -260,7 +355,8 @@ for n in range(len(xlist)):
f = file(filename, "rb")
version = f.read(1)
# Let's just memorize these even though it's not really necessary.
version = ord(f.read(1))
flags = f.read(1)
# Checking day and night differs -flag
@ -269,37 +365,10 @@ for n in range(len(xlist)):
f.close()
continue
dec_o = zlib.decompressobj()
try:
mapdata = dec_o.decompress(f.read())
except:
mapdata = []
read_mapdata(f, version, pixellist, water)
f.close()
if(len(mapdata) < 4096):
print "bad: " + xhex + "/" + zhex + "/" + yhex + " " + str(len(mapdata))
else:
chunkxpos = xpos * 16
chunkypos = ypos * 16
chunkzpos = zpos * 16
for (x, z) in reversed(pixellist):
for y in reversed(range(16)):
datapos = x + y * 16 + z * 256
if(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) in colors):
if(ord(mapdata[datapos]) == 2 or ord(mapdata[datapos]) == 9):
water[(x, z)] += 1
# Add dummy stuff for drawing sea without seabed
stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
else:
pixellist.remove((x, z))
# Memorize information on the type and height of the block and for drawing the picture.
stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
break
elif(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) not in colors):
print "strange block: " + xhex + "/" + zhex + "/" + yhex + " x: " + str(x) + " y: " + str(y) + " z: " + str(z) + " palikka: " + str(ord(mapdata[datapos]))
# After finding all the pixels in the sector, we can move on to the next sector without having to continue the Y axis.
# After finding all the pixels in the sector, we can move on to
# the next sector without having to continue the Y axis.
if(len(pixellist) == 0):
break
@ -307,40 +376,13 @@ for n in range(len(xlist)):
for (ypos, filename) in ylist2:
f = file(filename, "rb")
version = f.read(1)
version = ord(f.read(1))
flags = f.read(1)
dec_o = zlib.decompressobj()
try:
mapdata = dec_o.decompress(f.read())
except:
mapdata = []
read_mapdata(f, version, pixellist, water)
f.close()
if(len(mapdata) < 4096):
print "bad: " + xhex + "/" + zhex + "/" + yhex + " " + str(len(mapdata))
else:
chunkxpos = xpos * 16
chunkypos = ypos * 16
chunkzpos = zpos * 16
for (x, z) in reversed(pixellist):
for y in reversed(range(16)):
datapos = x + y * 16 + z * 256
if(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) in colors):
if(ord(mapdata[datapos]) == 2 or ord(mapdata[datapos]) == 9):
water[(x, z)] += 1
# Add dummy stuff for drawing sea without seabed
stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
else:
pixellist.remove((x, z))
# Memorize information on the type and height of the block and for drawing the picture.
stuff[(chunkxpos + x, chunkzpos + z)] = (chunkypos + y, ord(mapdata[datapos]), water[(x, z)])
break
elif(not data_is_air(ord(mapdata[datapos])) and ord(mapdata[datapos]) not in colors):
print "outo palikka: " + xhex + "/" + zhex + "/" + yhex + " x: " + str(x) + " y: " + str(y) + " z: " + str(z) + " palikka: " + str(ord(mapdata[datapos]))
# After finding all the pixels in the sector, we can move on to the next sector without having to continue the Y axis.
# After finding all the pixels in the sector, we can move on
# to the next sector without having to continue the Y axis.
if(len(pixellist) == 0):
break
@ -362,7 +404,7 @@ for (x, z) in stuff.iterkeys():
time_guess = seconds_per_n * listlen
remaining_s = time_guess - dtime
remaining_minutes = int(remaining_s / 60)
remaining_s -= remaining_minutes * 60;
remaining_s -= remaining_minutes * 60
print("Drawing pixel " + str(n) + " of " + str(listlen)
+ " (" + str(round(100.0 * n / listlen, 1)) + "%)"
+ " (ETA: " + str(remaining_minutes) + "m "
@ -370,12 +412,14 @@ for (x, z) in stuff.iterkeys():
n += 1
(r, g, b) = colors[stuff[(x, z)][1]]
# Comparing heights of a couple of adjacent blocks and changing brightness accordingly.
# Comparing heights of a couple of adjacent blocks and changing
# brightness accordingly.
try:
c1 = stuff[(x - 1, z)][1]
c2 = stuff[(x, z + 1)][1]
c = stuff[(x, z)][1]
if c1 != 2 and c1 != 9 and c2 != 2 and c2 != 9 and c != 2 and c != 9:
if c1 not in CONTENT_WATER and c2 not in CONTENT_WATER and \
c not in CONTENT_WATER:
y1 = stuff[(x - 1, z)][0]
y2 = stuff[(x, z + 1)][0]
y = stuff[(x, z)][0]
@ -403,7 +447,9 @@ for (x, z) in stuff.iterkeys():
if draworigin:
draw.ellipse((minx * -16 - 5 + border, h - minz * -16 - 6 + border, minx * -16 + 5 + border, h - minz * -16 + 4 + border), outline = origincolor)
draw.ellipse((minx * -16 - 5 + border, h - minz * -16 - 6 + border,
minx * -16 + 5 + border, h - minz * -16 + 4 + border),
outline=origincolor)
font = ImageFont.load_default()
@ -412,12 +458,16 @@ if drawscale:
draw.text((2, 24), "Z", font=font, fill=scalecolor)
for n in range(int(minx / -4) * -4, maxx, 4):
draw.text((minx * -16 + n * 16 + 2 + border, 0), str(n * 16), font = font, fill = scalecolor)
draw.line((minx * -16 + n * 16 + border, 0, minx * -16 + n * 16 + border, border - 1), fill = scalecolor)
draw.text((minx * -16 + n * 16 + 2 + border, 0), str(n * 16),
font=font, fill=scalecolor)
draw.line((minx * -16 + n * 16 + border, 0,
minx * -16 + n * 16 + border, border - 1), fill=scalecolor)
for n in range(int(maxz / 4) * 4, minz, -4):
draw.text((2, h - 1 - (n * 16 - minz * 16) + border), str(n * 16), font = font, fill = scalecolor)
draw.line((0, h - 1 - (n * 16 - minz * 16) + border, border - 1, h - 1 - (n * 16 - minz * 16) + border), fill = scalecolor)
draw.text((2, h - 1 - (n * 16 - minz * 16) + border), str(n * 16),
font=font, fill=scalecolor)
draw.line((0, h - 1 - (n * 16 - minz * 16) + border, border - 1,
h - 1 - (n * 16 - minz * 16) + border), fill=scalecolor)
if drawplayers:
try:
@ -437,8 +487,10 @@ if drawplayers:
if len(name) > 0 and len(position) == 3:
x = (int(float(position[0]) / 10 - minx * 16))
z = int(h - (float(position[2]) / 10 - minz * 16))
draw.ellipse((x - 2 + border, z - 2 + border, x + 2 + border, z + 2 + border), outline = playercolor)
draw.text((x + 2 + border, z + 2 + border), name, font = font, fill = playercolor)
draw.ellipse((x - 2 + border, z - 2 + border,
x + 2 + border, z + 2 + border), outline=playercolor)
draw.text((x + 2 + border, z + 2 + border), name,
font=font, fill=playercolor)
f.close()
except OSError:
pass

65
util/updatepo.sh Executable file
View File

@ -0,0 +1,65 @@
#!/bin/sh
# Update/create minetest po files
# an auxiliary function to abort processing with an optional error
# message
abort() {
test -n "$1" && echo >&2 "$1"
exit 1
}
# The po/ directory is assumed to be parallel to the directory where
# this script is. Relative paths are fine for us so we can just
# use the following trick (works both for manual invocations and for
# script found from PATH)
scriptisin="$(dirname "$(which "$0")")"
# The script is executed from the parent of po/, which is also the
# parent of the script directory and of the src/ directory.
# We go through $scriptisin so that it can be executed from whatever
# directory and still work correctly
cd "$scriptisin/.."
test -e po || abort "po/ directory not found"
test -d po || abort "po/ is not a directory!"
# Get a list of the languages we have to update/create
cd po || abort "couldn't change directory to po!"
# This assumes that we won't have dirnames with space, which is
# the case for language codes, which are the only subdirs we expect to
# find in po/ anyway. If you put anything else there, you need to suffer
# the consequences of your actions, so we don't do sanity checks
langs=""
for lang in * ; do
if test ! -d $lang; then
continue
fi
langs="$langs $lang"
done
# go back
cd ..
# First thing first, update the .pot template. We place it in the po/
# directory at the top level. You a recent enough xgettext that supports
# --package-name
potfile=po/minetest.pot
xgettext --package-name=minetest -kN_ -kwgettext -F -n -o $potfile src/*.cpp src/*.h
# Now iterate on all languages and create the po file if missing, or update it
# if it exists already
for lang in $langs ; do # note the missing quotes around $langs
pofile=po/$lang/minetest.po
if test -e $pofile; then
echo "[$lang]: updating strings"
msgmerge -F -U $pofile $potfile
else
# This will ask for the translator identity
echo "[$lang]: NEW strings"
msginit -l $lang -o $pofile -i $potfile
fi
done