SET(CPACK_PACKAGE_CONTACT "SuperTux Devel Team <supertux-devel@lists.lethargik.org>")
SET(CPACK_DEBIAN_PACKAGE_NAME "supertux2")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.5), libgcc1 (>= 1:4.1), libgl1-mesa-glx | libgl1, libogg0 (>= 1.1.3), libopenal0a, libphysfs-1.0-0, libsdl-image1.2 (>= 1.2.5), libsdl1.2debian (>= 1.2.10-1), libstdc++6 (>= 4.1.2), libvorbis0a (>= 1.1.2), libvorbisfile3 (>= 1.1.2), libcurl3 (>= 7.16)")
-SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Classic 2D jump 'n run sidescroller with Tux\n SuperTux is a classic 2D jump 'n run sidescroller game in a similar\n style like the original SuperMario games. This release of SuperTux\n features 9 enemies, 26 playable levels, software and OpenGL rendering\n modes, configurable joystick and keyboard input, new music and\n completly redone graphics.\n .\n This is a development snapshot of SuperTux. It may suffer from\n critical bugs and has not been fully tested. \n .\n Homepage: http://supertux.lethargik.org/")
+SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Classic 2D jump 'n run sidescroller with Tux\n SuperTux is a classic 2D jump 'n run sidescroller game in a similar\n style like the original SuperMario games. This release of SuperTux\n features 9 enemies, 26 playable levels, software and OpenGL rendering\n modes, configurable joystick and keyboard input, new music and\n completely redone graphics.\n .\n This is a development snapshot of SuperTux. It may suffer from\n critical bugs and has not been fully tested. \n .\n Homepage: http://supertux.lethargik.org/")
SET(CPACK_DEBIAN_PACKAGE_SECTION "games")
SET(CPACK_RPM_PACKAGE_NAME "supertux2")
-SET(CPACK_RPM_PACKAGE_DESCRIPTION "Classic 2D jump 'n run sidescroller with Tux\n SuperTux is a classic 2D jump 'n run sidescroller game in a similar\n style like the original SuperMario games. This release of SuperTux\n features 9 enemies, 26 playable levels, software and OpenGL rendering\n modes, configurable joystick and keyboard input, new music and\n completly redone graphics.\n .\n This is a development snapshot of SuperTux. It may suffer from\n critical bugs and has not been fully tested. \n .\n Homepage: http://supertux.lethargik.org/")
+SET(CPACK_RPM_PACKAGE_DESCRIPTION "Classic 2D jump 'n run sidescroller with Tux\n SuperTux is a classic 2D jump 'n run sidescroller game in a similar\n style like the original SuperMario games. This release of SuperTux\n features 9 enemies, 26 playable levels, software and OpenGL rendering\n modes, configurable joystick and keyboard input, new music and\n completely redone graphics.\n .\n This is a development snapshot of SuperTux. It may suffer from\n critical bugs and has not been fully tested. \n .\n Homepage: http://supertux.lethargik.org/")
SET(CPACK_RPM_PACKAGE_LICENSE "GNU General Public License (GPL)")
SET(CPACK_RPM_PACKAGE_GROUP "Amusements/Games/Action/Arcade")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
--- configure.ac (revision 5071)
+++ configure.ac (working copy)
@@ -154,9 +154,15 @@
- [AC_MSG_ERROR([Please intall OpenAL])],
+ [AC_MSG_ERROR([Please install OpenAL])],
[], [])
-AX_CHECK_GL
-(supertux-sprite
- (action
- (name "default")
- (images "pedestral.png")
- )
-)
;; as the tile properties (unisolid, solid, ice, water, etc.). Since
;; it is important that the tile-ids don't change once created and
;; used in a level some care has to be taken when editing this file,
-;; else the levels would be rendered unusable.
+;; otherwise the levels would be rendered unusable.
;;
;; Some notes on editing this file:
-;; - tile-ids must be uniq
+;; - tile-ids must be unique
;; - the tile definition with the largest id should always be at the
;; bottom of the file
;; - when creating a new tile definition take the greatest current id
)
(image "tiles/blocks/block_horiz.png")
)
- ; Yes the numbering is extremly odd, backward compatiblity...
+ ; Yes, the numbering is extremely odd, backwards compatibility...
(tiles
(width 3)
(height 4)
(tile
(id 2019)
(images
- (region "tiles/water/antartic-1.png" 0 0 32 32)
- (region "tiles/water/antartic-2.png" 0 0 32 32)
- (region "tiles/water/antartic-3.png" 0 0 32 32)
- (region "tiles/water/antartic-4.png" 0 0 32 32)
- (region "tiles/water/antartic-5.png" 0 0 32 32)
- (region "tiles/water/antartic-6.png" 0 0 32 32)
- (region "tiles/water/antartic-7.png" 0 0 32 32)
- (region "tiles/water/antartic-8.png" 0 0 32 32)
+ (region "tiles/water/antarctic-1.png" 0 0 32 32)
+ (region "tiles/water/antarctic-2.png" 0 0 32 32)
+ (region "tiles/water/antarctic-3.png" 0 0 32 32)
+ (region "tiles/water/antarctic-4.png" 0 0 32 32)
+ (region "tiles/water/antarctic-5.png" 0 0 32 32)
+ (region "tiles/water/antarctic-6.png" 0 0 32 32)
+ (region "tiles/water/antarctic-7.png" 0 0 32 32)
+ (region "tiles/water/antarctic-8.png" 0 0 32 32)
)
(water #t)
(anim-fps 16)
(tile
(id 2140)
(images
- (region "tiles/water/antartic-1.png" 32 0 32 32)
- (region "tiles/water/antartic-2.png" 32 0 32 32)
- (region "tiles/water/antartic-3.png" 32 0 32 32)
- (region "tiles/water/antartic-4.png" 32 0 32 32)
- (region "tiles/water/antartic-5.png" 32 0 32 32)
- (region "tiles/water/antartic-6.png" 32 0 32 32)
- (region "tiles/water/antartic-7.png" 32 0 32 32)
- (region "tiles/water/antartic-8.png" 32 0 32 32)
+ (region "tiles/water/antarctic-1.png" 32 0 32 32)
+ (region "tiles/water/antarctic-2.png" 32 0 32 32)
+ (region "tiles/water/antarctic-3.png" 32 0 32 32)
+ (region "tiles/water/antarctic-4.png" 32 0 32 32)
+ (region "tiles/water/antarctic-5.png" 32 0 32 32)
+ (region "tiles/water/antarctic-6.png" 32 0 32 32)
+ (region "tiles/water/antarctic-7.png" 32 0 32 32)
+ (region "tiles/water/antarctic-8.png" 32 0 32 32)
)
(water #t)
(anim-fps 16)
(tile
(id 2141)
(images
- (region "tiles/water/antartic-1.png" 64 0 32 32)
- (region "tiles/water/antartic-2.png" 64 0 32 32)
- (region "tiles/water/antartic-3.png" 64 0 32 32)
- (region "tiles/water/antartic-4.png" 64 0 32 32)
- (region "tiles/water/antartic-5.png" 64 0 32 32)
- (region "tiles/water/antartic-6.png" 64 0 32 32)
- (region "tiles/water/antartic-7.png" 64 0 32 32)
- (region "tiles/water/antartic-8.png" 64 0 32 32)
+ (region "tiles/water/antarctic-1.png" 64 0 32 32)
+ (region "tiles/water/antarctic-2.png" 64 0 32 32)
+ (region "tiles/water/antarctic-3.png" 64 0 32 32)
+ (region "tiles/water/antarctic-4.png" 64 0 32 32)
+ (region "tiles/water/antarctic-5.png" 64 0 32 32)
+ (region "tiles/water/antarctic-6.png" 64 0 32 32)
+ (region "tiles/water/antarctic-7.png" 64 0 32 32)
+ (region "tiles/water/antarctic-8.png" 64 0 32 32)
)
(water #t)
(anim-fps 16)
(tile
(id 2142)
(images
- (region "tiles/water/antartic-1.png" 96 0 32 32)
- (region "tiles/water/antartic-2.png" 96 0 32 32)
- (region "tiles/water/antartic-3.png" 96 0 32 32)
- (region "tiles/water/antartic-4.png" 96 0 32 32)
- (region "tiles/water/antartic-5.png" 96 0 32 32)
- (region "tiles/water/antartic-6.png" 96 0 32 32)
- (region "tiles/water/antartic-7.png" 96 0 32 32)
- (region "tiles/water/antartic-8.png" 96 0 32 32)
+ (region "tiles/water/antarctic-1.png" 96 0 32 32)
+ (region "tiles/water/antarctic-2.png" 96 0 32 32)
+ (region "tiles/water/antarctic-3.png" 96 0 32 32)
+ (region "tiles/water/antarctic-4.png" 96 0 32 32)
+ (region "tiles/water/antarctic-5.png" 96 0 32 32)
+ (region "tiles/water/antarctic-6.png" 96 0 32 32)
+ (region "tiles/water/antarctic-7.png" 96 0 32 32)
+ (region "tiles/water/antarctic-8.png" 96 0 32 32)
)
(water #t)
(anim-fps 16)
(tile
(id 2020)
(images
- "tiles/water/antartic.png")
+ "tiles/water/antarctic.png")
(water #t)
)
(platform
(name "door2b")
(running #f)
- (sprite "images/objects/platforms/pedestral.sprite")
+ (sprite "images/objects/platforms/pedestal.sprite")
(path
(node
(x 5344.797)
(platform
(name "door2a")
(running #f)
- (sprite "images/objects/platforms/pedestral.sprite")
+ (sprite "images/objects/platforms/pedestal.sprite")
(path
(node
(x 4831.806)
(platform
(name "door2c")
(running #f)
- (sprite "images/objects/platforms/pedestral.sprite")
+ (sprite "images/objects/platforms/pedestal.sprite")
(path
(node
(x 3712.48)
/**
* This script is loaded into the console script interpreter.
- * You should define shortcuts and helper functions that are usefull for the
+ * You should define shortcuts and helper functions that are useful for the
* console here
*/
; Each level has one or more sectors. Sectors can be seen as levels inside this
; level. Their use is for swapping.
(sector
-; Naming sectors is usefull to for swapping
+; Naming sectors is useful for swapping
; "main" sectors are the ones that the player will start in
(name "main")
; Setup an end sequence animation (blank for nothing).
(bottom_blue 0)
)
; Now let's go for tilemaps. Tilemaps are the tiles field. We can have more
-; than one. Each one has the following properites:
+; than one. Each one has the following properties:
; layer - can be foreground (drawn above player), interactive (interacts with player,
; (solid #t) has to be set, as well), background (drawn below the player).
; speed - this can be used for parallax effects. Better use a level editor (though
; scroll or not (just go to the front).
(backscrolling #t)
)
-; We could also setup other objects, like trampolins, doors (to swap),
+; We could also setup other objects, like trampolines, doors (to swap),
; and moving platform. Please check another level (ie. in test/) that
; uses them to learn more about them.
)
After selecting the subset, have a look at the level editor.
The button bar in the right is the place where you can control
the actions related with editing. You can select levels and add
-throught there.
+through there.
To select tiles (foreground or background) and enemies, the button
bar is the right place. There you can also save, test and setup
them.<br>
Levels in the transition area between light and ghost forest, however,
follow a different design: Those levels will have a light sector and a
-very similar looking ghost forest sector. Troughout the level, Tux will
+very similar looking ghost forest sector. Throughout the level, Tux will
need to travel between the sectors to solve puzzles and find his way
through the level. Transition between the worlds can happen by either<br>
a) actively walking through a portal,<br>
</small><small><br>
<br>
</small><small>Powerups:<br>
-In Milestone 2 in general, the favourite way of enhancing Tux'
+In Milestone 2 in general, the favored way of enhancing Tux'
abilities will be through level objects that temporarily grant Tux
special abilities (see Level Objects section for more details), rather
than permanent powerups like fire and ice shots. Those will still be
there, but they'll remain relatively weak, so they don't get in the way
of level design. An ice shot will be implemented, the fire shot's
-behaviour will be improved [need more detail here]. The fire shot gets
+behavior will be improved [need more detail here]. The fire shot gets
a new ability to burn through specific tiles to reveal paths. These
paths, however, should contain only bonus items like coins; it must be
possible to finish a level without needing the fire powerup.<br>
if (OggVorbis_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find OggVorbis libraries")
endif (OggVorbis_FIND_REQUIRED)
- if (NOT OggVorbis_FIND_QUITELY)
+ if (NOT OggVorbis_FIND_QUIETLY)
message(STATUS "Could NOT find OggVorbis libraries")
- endif (NOT OggVorbis_FIND_QUITELY)
+ endif (NOT OggVorbis_FIND_QUIETLY)
endif (OGGVORBIS_FOUND)
#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
if(chunklen > 16) {
if(PHYSFS_seek(file, PHYSFS_tell(file) + (chunklen-16)) == 0)
- throw std::runtime_error("EOF while reading reast of format chunk");
+ throw std::runtime_error("EOF while reading rest of format chunk");
}
// set file offset to DATA chunk data
for(ALint i = 0; i < processed; ++i) {
ALuint buffer;
alSourceUnqueueBuffers(source, 1, &buffer);
- SoundManager::check_al_error("Couldn't unqueu audio buffer: ");
+ SoundManager::check_al_error("Couldn't unqueue audio buffer: ");
if(fillBufferAndQueue(buffer) == false)
break;
* calls active_update and inactive_update
*/
virtual void update(float elapsed_time);
- /** Called when a collision with another object occured. The default
- * implemetnation calls collision_player, collision_solid, collision_badguy
+ /** Called when a collision with another object occurred. The default
+ * implementation calls collision_player, collision_solid, collision_badguy
* and collision_squished
*/
virtual HitResponse collision(GameObject& other, const CollisionHit& hit);
- /** Called when a collision with tile with special attributes occured */
+ /** Called when a collision with tile with special attributes occurred */
virtual void collision_tile(uint32_t tile_attributes);
/** Set the badguy to kill/falling state, which makes him falling of the
sprite = sprite_manager->create( sprite_name );
}
-/* MrBomb created by a despencer always gets default sprite atm.*/
+/* MrBomb created by a dispenser always gets default sprite atm.*/
MrBomb::MrBomb(const Vector& pos, Direction d)
: WalkingBadguy(pos, d, "images/creatures/mr_bomb/mr_bomb.sprite", "left", "right")
{
/** @internal
* Find the canonical filename of the executable. Returns the filename
* (which must be freed) or NULL on error. If the parameter 'error' is
- * not NULL, the error code will be stored there, if an error occured.
+ * not NULL, the error code will be stored there, if an error occurred.
*/
static char *
_br_find_exe (BrInitError *error)
#include "controller.hpp"
/**
- * This is a dummy controler that doesn't react to any user input but should
+ * This is a dummy controller that doesn't react to any user input but should
* be controlled by code
*/
class CodeController : public Controller
else
{
// Split the axis into left and right, so that both can be
- // mapped seperatly (needed for jump/down vs up/down)
+ // mapped separately (needed for jump/down vs up/down)
int axis = jaxis.axis + 1;
AxisMap::iterator left = joy_axis_map.find(-axis);
add_toggle(Controller::CONTROLCOUNT, _("Jump with Up"), controller->jump_with_up_joy);
} else {
- add_deactive(-1, _("No Joysticks found"));
+ add_inactive(-1, _("No Joysticks found"));
}
- add_deactive(-1,"");
+ add_inactive(-1,"");
add_entry(SCAN_JOYSTICKS, _("Scan for Joysticks"));
//Show Joysticks currently activated:
for(std::vector<SDL_Joystick*>::iterator i = controller->joysticks.begin();
i != controller->joysticks.end(); ++i) {
if(*i != 0)
- add_deactive(-1, SDL_JoystickName(SDL_JoystickIndex(*i)) );
+ add_inactive(-1, SDL_JoystickName(SDL_JoystickIndex(*i)) );
}
add_hl();
if(path_stack.empty()) {
log_warning << "Invalid '..' in path '" << filename << "'" << std::endl;
- // push it into the result path so that the users sees his error...
+ // push it into the result path so that the user sees his error...
path_stack.push_back(pathelem);
} else {
path_stack.pop_back();
Menu* Menu::previous = 0;
Font* Menu::default_font;
Font* Menu::active_font;
-Font* Menu::deactive_font;
+Font* Menu::inactive_font;
Font* Menu::label_font;
Font* Menu::field_font;
{
//Surface* cap_screen = Surface::CaptureScreen();
Menu* dialog = new Menu;
- dialog->add_deactive(-1, text);
+ dialog->add_inactive(-1, text);
dialog->add_hl();
dialog->add_entry(true, _("Yes"));
dialog->add_entry(false, _("No"));
items.push_back(item);
/* If a new menu is being built, the active item shouldn't be set to
- * something that isnt selectable. Set the active_item to the first
- * selectable item added
+ * something that isn't selectable. Set the active_item to the first
+ * selectable item added.
*/
if (active_item == -1
&& item->kind != MN_HL
&& item->kind != MN_LABEL
- && item->kind != MN_DEACTIVE) {
+ && item->kind != MN_INACTIVE) {
active_item = items.size() - 1;
}
}
}
MenuItem*
-Menu::add_deactive(int id, const std::string& text)
+Menu::add_inactive(int id, const std::string& text)
{
- MenuItem* item = new MenuItem(MN_DEACTIVE, id);
+ MenuItem* item = new MenuItem(MN_INACTIVE, id);
item->text = text;
additem(item);
return item;
active_item = int(items.size())-1;
} while ((items[active_item]->kind == MN_HL
|| items[active_item]->kind == MN_LABEL
- || items[active_item]->kind == MN_DEACTIVE)
+ || items[active_item]->kind == MN_INACTIVE)
&& (active_item != last_active_item));
break;
active_item = 0;
} while ((items[active_item]->kind == MN_HL
|| items[active_item]->kind == MN_LABEL
- || items[active_item]->kind == MN_DEACTIVE)
+ || items[active_item]->kind == MN_INACTIVE)
&& (active_item != last_active_item));
break;
{
int i = items[active_item]->input.size();
- while(delete_character > 0) /* remove charactes */
+ while(delete_character > 0) /* remove characters */
{
items[active_item]->input.resize(i-1);
delete_character--;
switch (pitem.kind)
{
- case MN_DEACTIVE:
+ case MN_INACTIVE:
{
- context.draw_text(deactive_font, pitem.text,
- Vector(pos_x, y_pos - int(deactive_font->get_height()/2)),
+ context.draw_text(inactive_font, pitem.text,
+ Vector(pos_x, y_pos - int(inactive_font->get_height()/2)),
ALIGN_CENTER, LAYER_GUI);
break;
}
/* only change the mouse focus to a selectable item */
if ((items[new_active_item]->kind != MN_HL)
&& (items[new_active_item]->kind != MN_LABEL)
- && (items[new_active_item]->kind != MN_DEACTIVE))
+ && (items[new_active_item]->kind != MN_INACTIVE))
active_item = new_active_item;
if(MouseCursor::current())
MN_GOTO,
MN_TOGGLE,
MN_BACK,
- MN_DEACTIVE,
+ MN_INACTIVE,
MN_TEXTFIELD,
MN_NUMFIELD,
MN_CONTROLFIELD,
public:
static Font* default_font;
static Font* active_font;
- static Font* deactive_font;
+ static Font* inactive_font;
static Font* label_font;
static Font* field_font;
MenuItem* add_label(const std::string& text);
MenuItem* add_entry(int id, const std::string& text);
MenuItem* add_toggle(int id, const std::string& text, bool toggled = false);
- MenuItem* add_deactive(int id, const std::string& text);
+ MenuItem* add_inactive(int id, const std::string& text);
MenuItem* add_back(const std::string& text);
MenuItem* add_submenu(const std::string& text, Menu* submenu, int id = -1);
MenuItem* add_controlfield(int id, const std::string& text,
return v.boolean;
}
- /** conveniance functions which traverse the list until a child with a
+ /** convenience functions which traverse the list until a child with a
* specified name is found. The value part is then interpreted in a specific
* way. The functions return true, if a child was found and could be
* interpreted correctly, otherwise false is returned and the variable value
* is not changed.
* (Please note that searching the lisp structure is O(n) so these functions
- * are no good idea for performance critical areas)
+ * are not a good idea for performance critical areas)
*/
template<class T>
bool get(const char* name, T& val) const
if (elapsed_ticks > ticks_per_frame*4) {
// when the game loads up or levels are switched the
- // elapsed_ticks grows extremly large, so we just ignore those
+ // elapsed_ticks grows extremely large, so we just ignore those
// large time jumps
elapsed_ticks = 0;
}
/** This class represents a rectangle.
* (Implementation Note) We're using upper left and lower right point instead of
- * upper left and width/height here, because that makes the collision dectection
+ * upper left and width/height here, because that makes the collision detection
* a little bit more efficient.
*/
class Rect
/** TODO write docu :-/ */
COLGROUP_MOVING_STATIC,
/**
- * Doesn't move and isn't explicitely checked for collisions with other
+ * Doesn't move and isn't explicitly checked for collisions with other
* objects (but other objects might check with this)
* The difference to COLGROUP_TOUCHABLE is that we can do multiple
* collision response tests in a row which is needed for static object
*/
COLGROUP_STATIC,
/**
- * Isn't explicitely checked for collisions with other objects. But other
+ * Isn't explicitly checked for collisions with other objects. But other
* objects might check with this object.
* Difference to COLGROUP_STATIC is that collisions with this object are
* only tested once and collision response is typically not handled
return movement;
}
- /** places the moving object at a specific position. Be carefull when
+ /** places the moving object at a specific position. Be careful when
* using this function. There are no collision detection checks performed
* here so bad things could happen.
*/
/**
* Ambient Sound Source, gamma version. Features:
*
- * - "rounded rectancle" geometry with position, dimension and
+ * - "rounded rectangle" geometry with position, dimension and
* "rounding radius" (extending in all directions) of a 100%
* volume area, adjustable maximum volume, inverse square
* falloff outside area.
*
* x, y position
* width, height dimension
- * distance_factor high = steep fallofff
+ * distance_factor high = steep falloff
* distance_bias high = big "100% disc"
* silence_distance defaults reasonably.
* sample sample to be played back in loop mode
/// write camera mode to a lisp file
virtual void write(lisp::Writer& writer);
- /// reset camera postion
+ /// reset camera position
void reset(const Vector& tuxpos);
/** return camera position */
void shake();
/**
- * The camera basically provides lookeahead on the left or right side
+ * The camera basically provides lookahead on the left or right side
* or is undecided.
*/
enum LookaheadMode {
void
FloatingText::draw(DrawingContext& context)
{
- // make an alpha animation when disapearing
+ // make an alpha animation when disappearing
int alpha;
if(timer.get_timeleft() < FADING_TIME)
alpha = int(timer.get_timeleft() * 255 / FADING_TIME);
virtual ~PathWalker();
/**
- * advanves the path walker on the path and returns the position delta
+ * advances the path walker on the path and returns the position delta
* to the last position
*/
virtual Vector advance(float elapsed_time);
static const float IDLE_TIME = 2.5f;
/** acceleration in horizontal direction when walking
- * (all acceleratiosn are in pixel/s^2) */
+ * (all accelerations are in pixel/s^2) */
static const float WALK_ACCELERATION_X = 300;
/** acceleration in horizontal direction when running */
static const float RUN_ACCELERATION_X = 400;
void do_jump(float yspeed);
/**
- * Adds velocity to the player (be carefull when using this)
+ * Adds velocity to the player (be careful when using this)
*/
void add_velocity(const Vector& velocity);
SkullTile::draw(DrawingContext& context)
{
Vector pos = get_pos();
- // shacking
+ // shaking
if(timer.get_timegone() > CRACKTIME) {
pos.x += systemRandom.rand(-3, 3);
}
class TileSet;
/**
- * This class is reponsible for drawing the level tiles
+ * This class is responsible for drawing the level tiles
*/
class TileMap : public GameObject, public Serializable, public ScriptInterface
{
// $Id$
//
-// SuperTux - Trampolin
+// SuperTux - Trampoline
// Copyright (C) 2006 Wolfgang Becker <uafr@gmx.de>
//
// This program is free software; you can redistribute it and/or
#include "object/rock.hpp"
/**
- * Jumping on a trampolin makes tux jump higher.
+ * Jumping on a trampoline makes tux jump higher.
*/
class Trampoline : public Rock
{
#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
-/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+/* Similar to _BPTR_ALIGN (B, P, A), except optimize the common case
where pointers can be converted to integers, aligned as integers,
and converted back again. If PTR_INT_TYPE is narrower than a
pointer (e.g., the AS/400), play it safe and compute the alignment
add_toggle(MNID_MUSIC, _("Music"), config->music_enabled)
->set_help(_("Disable all music"));
} else {
- add_deactive(MNID_SOUND, _("Sound (disabled)"));
- add_deactive(MNID_MUSIC, _("Music (disabled)"));
+ add_inactive(MNID_SOUND, _("Sound (disabled)"));
+ add_inactive(MNID_MUSIC, _("Music (disabled)"));
}
add_submenu(_("Setup Keyboard"), main_controller->get_key_options_menu())
void set_velocity_x(float vx);
void set_velocity_y(float vy);
- /// Velocities inversion.
+ /// Velocity inversion.
void inverse_velocity_x();
void inverse_velocity_y();
}
int RandomGenerator::rand() {
- int rv; // a posative int
+ int rv; // a positive int
while ((rv = RandomGenerator::random()) <= 0) // neg or zero causes probs
;
if (debug > 0)
// then initialized to contain information for random number generation with
// that much state information. Good sizes for the amount of state
// information are 32, 64, 128, and 256 bytes. The state can be switched by
-// calling the setstate() routine with the same array as was initiallized
+// calling the setstate() routine with the same array as was initialized
// with initstate(). By default, the package runs with 128 bytes of state
// information and generates far better random numbers than a linear
// congruential generator. If the amount of state information is less than
//
// Compute x = (7^5 * x) mod (2^31 - 1)
-// wihout overflowing 31 bits:
+// without overflowing 31 bits:
// (2^31 - 1) = 127773 * (7^5) + 2836
// From "Random number generators: good ones are hard to find",
// Park and Miller, Communications of the ACM, vol. 31, no. 10,
/** This class behaves like a pointer to a refcounted object, but increments the
* reference count when new objects are assigned and decrements the refcounter
- * when it's lifetime has experied. (similar to std::auto_ptr)
+ * when its lifetime has expired. (similar to std::auto_ptr)
*/
template<typename T>
class Ref
Menu::default_font = white_text;
Menu::active_font = blue_text;
- Menu::deactive_font = gray_text;
+ Menu::inactive_font = gray_text;
Menu::label_font = white_big_text;
Menu::field_font = gold_text;
{
/**
- * Display the value of the argument. This is usefull for inspecting tables.
+ * Display the value of the argument. This is useful for inspecting tables.
*/
SQInteger display(HSQUIRRELVM vm) __custom;
*/
virtual void add_coins(int count) = 0;
/**
- * Make tux invicible for a short amount of time
+ * Make tux invincible for a short amount of time
*/
virtual void make_invincible() = 0;
/**
- * Deactivate user input for Tux
+ * Deactivate user/scripting input for Tux
*/
virtual void deactivate() = 0;
/**
- * Give control back to user
+ * Give control back to user/scripting
*/
virtual void activate() = 0;
/**
*/
virtual void walk(float speed) = 0;
/**
- * Set player visible or not visible
+ * Set player visible or invisible
*/
virtual void set_visible(bool visible) = 0;
/**
* returns true if the player is currently visible (that is he was not set
- * inivisible by the set_visible method)
+ * invisible by the set_visible method)
*/
virtual bool get_visible() = 0;
/** Exception class for squirrel errors, it takes a squirrelvm and uses
* sq_geterror() to retrieve additional information about the last error that
- * occured and creates a readable message from that.
+ * occurred and creates a readable message from that.
*/
class SquirrelError : public std::exception
{
// register supertux API
register_supertux_wrapper(global_vm);
- // TODO remove this at some point... it shoud just be functions not an object
+ // TODO remove this at some point... it should just be functions not an object
expose_object(global_vm, -1, new Scripting::Level(), "Level", true);
sq_pop(global_vm, 1);
/** Move willowisp to given node */
virtual void goto_node(int node_no) = 0;
- /** set willowisp state can be:
+ /** set willowisp state; can be:
* -stopped willowisp doesn't move
* -move_path willowisp moves along the path (call goto_node)
- * -move_path_track willowisp moves along path but catchs tux when he is near
+ * -move_path_track willowisp moves along path but catches tux when he is near
* -normal "normal" mode starts tracking tux when he is near enough
* -vanish vanish
*/
/// write sector to lisp file
void write(lisp::Writer& writer);
- /// activates this sector (change music, intialize player class, ...)
+ /// activates this sector (change music, initialize player class, ...)
void activate(const std::string& spawnpoint);
void activate(const Vector& player_pos);
void deactivate();
}
}
if(actions.empty())
- throw std::runtime_error("Error: Sprite wihtout actions.");
+ throw std::runtime_error("Error: Sprite without actions.");
}
SpriteData::~SpriteData()
void declare_invalid(); /**< marks statistics as invalid for their entire lifetime (e.g. after cheating). Invalid statistics will not be merged or drawn. */
private:
- bool valid; /**< stores whether this statistics can be trusted */
+ bool valid; /**< stores whether these statistics can be trusted */
std::string coins_to_string(int coins, int total_coins) const;
std::string frags_to_string(int badguys, int total_badguys) const;
public:
/// bitset for tile attributes
enum {
- /** solid tile that is indestructable by Tux */
+ /** solid tile that is indestructible by Tux */
SOLID = 0x0001,
/** uni-directional solid tile */
UNISOLID = 0x0002,
if (ids.size() != attributes.size()) {
std::ostringstream err;
err << "Number of ids (" << ids.size() << ") and attributes (" << attributes.size()
- << ") missmatch for image '" << image << "', but must be equal";
+ << ") mismatch for image '" << image << "', but must be equal";
throw std::runtime_error(err.str());
}
~Timer();
/** start the timer with the given period (in seconds).
- * If cyclic=true then the timer willl be reset after each period.
+ * If cyclic=true then the timer will be reset after each period.
* Set period to zero if you want to disable the timer.
*/
void start(float period, bool cyclic = false);
/** returns true if a period (or more) passed since start call or last
- * successfull check
+ * successful check
*/
bool check();
/** stop the timer */
#endif
static void
-canonise_fl(FL_Locale *l) {
+canonize_fl(FL_Locale *l) {
/* this function fixes some common locale-specifying mistakes */
/* en_UK -> en_GB */
if (l->lang && 0 == strcmp(l->lang, "en")) {
#endif
if (success != FL_FAILED) {
- canonise_fl(rtn);
+ canonize_fl(rtn);
}
*locale = rtn;
}
else
{
-#ifdef TRANSLATION_DBEUG
+#ifdef TRANSLATION_DEBUG
log_warning << "Couldn't translate: " << msgid << std::endl;
#endif
return msgid;
}
else
{
-#ifdef TRANSLATION_DBEUG
+#ifdef TRANSLATION_DEBUG
log_warning << "Couldn't translate: " << msgid << std::endl;
#endif
return msgid;
void parse_header(const std::string& header)
{
- // Seperate the header in lines
+ // Separate the header in lines
typedef std::vector<std::string> Lines;
Lines lines;
#ifdef HAVE_LIBCURL
addons_menu->add_entry(0, std::string(_("Check Online")));
#else
- addons_menu->add_deactive(0, std::string(_("Check Online (disabled)")));
+ addons_menu->add_inactive(0, std::string(_("Check Online (disabled)")));
#endif
//addons_menu->add_hl();
jumpWasReleased = true;
}
- // Wrap around at the end of the level back to the beginnig
+ // Wrap around at the end of the level back to the beginning
if(sector->get_width() - 320 < tux->get_pos().x) {
sector->activate("main");
sector->camera->reset(tux->get_pos());
/// Draws text on screen center (feed Vector.x with a 0).
/// This is the same as draw_text() with a SCREEN_WIDTH/2 position and
- /// alignment set to LEFT_ALLIGN
+ /// alignment set to LEFT_ALIGN
void draw_center_text(const Font* font, const std::string& text,
const Vector& position, int layer);
/// Draws a color gradient onto the whole screen */
if (left <= right)
glyph.rect = Rect(left, y, right+1, y + char_height);
- else // glyph is completly transparent
+ else // glyph is completely transparent
glyph.rect = Rect(x, y, x + char_width, y + char_height);
- glyph.advance = glyph.rect.get_width() + 1; // FIXME: might be usefull to make spacing configurable
+ glyph.advance = glyph.rect.get_width() + 1; // FIXME: might be useful to make spacing configurable
glyphs.push_back(glyph);
shadow_glyphs.push_back(glyph);
pos.x -= get_text_width(temp);
// Cast font position to integer to get a clean drawing result and
- // no bluring as we would get with subpixel positions
+ // no blurring as we would get with subpixel positions
pos.x = static_cast<int>(pos.x);
draw_text(renderer, temp, pos, drawing_effect, alpha);
{
// FIXME: shadow_glyph_surface and glyph_surface do currently
// share the same glyph array, this is incorrect and should be
- // fixed, it is however hardly noticable
+ // fixed, it is however hardly noticeable
draw_chars(renderer, shadow_glyph_surface, text,
pos + Vector(shadowsize, shadowsize), drawing_effect, alpha);
}
float get_height() const;
/**
- * returns the given string, truncated (preferrably at whitespace) to be at most max_chars characters long
+ * returns the given string, truncated (preferably at whitespace) to be at most max_chars characters long
*/
static std::string wrap_to_chars(const std::string& text, int max_chars, std::string* overflow);
/**
- * returns the given string, truncated (preferrably at whitespace) to be at most "width" pixels wide
+ * returns the given string, truncated (preferably at whitespace) to be at most "width" pixels wide
*/
std::string wrap_to_width(const std::string& text, float width, std::string* overflow);
/** Draws the given text to the screen. Also needs the position.
* Type of alignment, drawing effect and alpha are optional. */
void draw(Renderer *renderer, const std::string& text, const Vector& pos,
- FontAlignment allignment = ALIGN_LEFT,
+ FontAlignment alignment = ALIGN_LEFT,
DrawingEffect drawing_effect = NO_EFFECT,
float alpha = 1.0f) const;
current_ = this;
- // create new squirrel table for persisten game state
+ // create new squirrel table for persistent game state
HSQUIRRELVM vm = Scripting::global_vm;
sq_pushroottable(vm);
const lisp::Lisp* sector = level->get_lisp("sector");
if(!sector)
- throw std::runtime_error("No sector sepcified in worldmap file.");
+ throw std::runtime_error("No sector specified in worldmap file.");
const lisp::Lisp* tilesets_lisp = level->get_lisp("tilesets");
if(tilesets_lisp != NULL) {
inputfile = argv[++i];
} else if(strcmp(argv[i], "--output-cpp") == 0) {
if(i+1 >= argc) {
- std::cerr << "Need to specifiy output cpp name.\n";
+ std::cerr << "Need to specify output cpp name.\n";
usage();
return 1;
}
static Function* current_function = 0;
static Type* current_type = 0;
static Field* current_field = 0;
-static ClassMember::Visbility current_visibility;
+static ClassMember::Visibility current_visibility;
class ParseError : public std::exception
{
virtual ~ClassMember()
{ }
- enum Visbility {
+ enum Visibility {
PUBLIC,
PROTECTED,
PRIVATE
};
- Visbility visibility;
+ Visibility visibility;
};
class Function : public ClassMember {
const std::string& lastsection = sections.back();
if (lastsection != name) {
std::ostringstream msg;
- msg << "mismtach in open/closeSection. Expected '"
+ msg << "mismatch in open/closeSection. Expected '"
<< lastsection << "' got '" << name << "'";
throw std::runtime_error(msg.str());
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# This script recompressess .png files using optipng and
+# This script recompresses .png files using optipng and
# advpng to get the smallest images. All recompression is
-# looseless.
+# lossless.
#
# This script needs at least bash3, bash2 will not work
#
# TODO:
-# * Make it work recursivly on a directory.
+# * Make it work recursively on a directory.
# Check for new enough bash version
fail_old_bash() {
gxml.Autoconnect(this);
if(MainWindow == null || DrawingArea == null || AppBar == null)
- throw new Exception("soem widgets not found");
+ throw new Exception("some widgets not found");
DrawingArea.AddEvents((int) Gdk.EventMask.ButtonPressMask);
DrawingArea.AddEvents((int) Gdk.EventMask.ButtonReleaseMask);