projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
63ccedc
)
fix miniswig using wrong stack numbers in functions with HSQUIRRELVM arguments
author
Matthias Braun
<matze@braunis.de>
Tue, 28 Jun 2005 12:42:08 +0000
(12:42 +0000)
committer
Matthias Braun
<matze@braunis.de>
Tue, 28 Jun 2005 12:42:08 +0000
(12:42 +0000)
SVN-Revision: 2650
src/badguy/yeti.cpp
patch
|
blob
|
history
src/game_session.cpp
patch
|
blob
|
history
src/object/level_time.cpp
patch
|
blob
|
history
src/object/player.cpp
patch
|
blob
|
history
src/scripting/wrapper.hpp
patch
|
blob
|
history
src/tile.cpp
patch
|
blob
|
history
src/timer.cpp
patch
|
blob
|
history
src/timer.hpp
patch
|
blob
|
history
src/title.cpp
patch
|
blob
|
history
src/worldmap.cpp
patch
|
blob
|
history
tools/miniswig/create_wrapper.cpp
patch
|
blob
|
history
diff --git
a/src/badguy/yeti.cpp
b/src/badguy/yeti.cpp
index
fef1be3
..
50aa888
100644
(file)
--- a/
src/badguy/yeti.cpp
+++ b/
src/badguy/yeti.cpp
@@
-64,7
+64,7
@@
void
Yeti::draw(DrawingContext& context)
{
// we blink when we are safe
Yeti::draw(DrawingContext& context)
{
// we blink when we are safe
- if(safe_timer.started() && size_t(g
lobal
_time*40)%2)
+ if(safe_timer.started() && size_t(g
ame
_time*40)%2)
return;
BadGuy::draw(context);
return;
BadGuy::draw(context);
diff --git
a/src/game_session.cpp
b/src/game_session.cpp
index
869da50
..
fbeac4e
100644
(file)
--- a/
src/game_session.cpp
+++ b/
src/game_session.cpp
@@
-528,7
+528,7
@@
GameSession::run()
static const float elapsed_time = 1.0 / LOGICAL_FPS;
// old code... float elapsed_time = float(ticks - lastticks) / 1000.;
if(!game_pause)
static const float elapsed_time = 1.0 / LOGICAL_FPS;
// old code... float elapsed_time = float(ticks - lastticks) / 1000.;
if(!game_pause)
- g
lobal
_time += elapsed_time;
+ g
ame
_time += elapsed_time;
// regulate fps
ticks = SDL_GetTicks();
// regulate fps
ticks = SDL_GetTicks();
diff --git
a/src/object/level_time.cpp
b/src/object/level_time.cpp
index
ee123aa
..
591df80
100644
(file)
--- a/
src/object/level_time.cpp
+++ b/
src/object/level_time.cpp
@@
-56,7
+56,7
@@
LevelTime::draw(DrawingContext& context)
context.draw_text(white_text, _("TIME's UP"), Vector(SCREEN_WIDTH/2, 0),
CENTER_ALLIGN, LAYER_FOREGROUND1);
} else if (time_left.get_timeleft() > TIME_WARNING
context.draw_text(white_text, _("TIME's UP"), Vector(SCREEN_WIDTH/2, 0),
CENTER_ALLIGN, LAYER_FOREGROUND1);
} else if (time_left.get_timeleft() > TIME_WARNING
- || int(g
lobal
_time * 2.5) % 2) {
+ || int(g
ame
_time * 2.5) % 2) {
snprintf(str, sizeof(str), " %d", int(time_left.get_timeleft()));
context.draw_text(white_text, _("TIME"),
Vector(SCREEN_WIDTH/2, 0), CENTER_ALLIGN, LAYER_FOREGROUND1);
snprintf(str, sizeof(str), " %d", int(time_left.get_timeleft()));
context.draw_text(white_text, _("TIME"),
Vector(SCREEN_WIDTH/2, 0), CENTER_ALLIGN, LAYER_FOREGROUND1);
diff --git
a/src/object/player.cpp
b/src/object/player.cpp
index
b036e25
..
b42c547
100644
(file)
--- a/
src/object/player.cpp
+++ b/
src/object/player.cpp
@@
-734,7
+734,7
@@
Player::draw(DrawingContext& context)
get_pos(), layer);
}
}
get_pos(), layer);
}
}
- else if (safe_timer.started() && size_t(g
lobal
_time*40)%2)
+ else if (safe_timer.started() && size_t(g
ame
_time*40)%2)
; // don't draw Tux
else
tux_body->draw(context, get_pos(), layer);
; // don't draw Tux
else
tux_body->draw(context, get_pos(), layer);
@@
-742,7
+742,7
@@
Player::draw(DrawingContext& context)
// Draw blinking star overlay
if (invincible_timer.started() &&
(invincible_timer.get_timeleft() > TUX_INVINCIBLE_TIME_WARNING
// Draw blinking star overlay
if (invincible_timer.started() &&
(invincible_timer.get_timeleft() > TUX_INVINCIBLE_TIME_WARNING
- || size_t(g
lobal
_time*20)%2)
+ || size_t(g
ame
_time*20)%2)
&& !dying)
{
if (!is_big() || duck)
&& !dying)
{
if (!is_big() || duck)
diff --git
a/src/scripting/wrapper.hpp
b/src/scripting/wrapper.hpp
index
026db18
..
322cfc8
100644
(file)
--- a/
src/scripting/wrapper.hpp
+++ b/
src/scripting/wrapper.hpp
@@
-1,6
+1,6
@@
/**
* WARNING: This file is automatically generated from:
/**
* WARNING: This file is automatically generated from:
- * 'src/scripting/wrapper.interface.h'
+ * 'src/scripting/wrapper.interface.h
pp
'
* DO NOT CHANGE
*/
#ifndef __supertux_WRAPPER_H__
* DO NOT CHANGE
*/
#ifndef __supertux_WRAPPER_H__
diff --git
a/src/tile.cpp
b/src/tile.cpp
index
118055e
..
6c75fb1
100644
(file)
--- a/
src/tile.cpp
+++ b/
src/tile.cpp
@@
-167,7
+167,7
@@
void
Tile::draw(DrawingContext& context, const Vector& pos, int layer) const
{
if(images.size() > 1) {
Tile::draw(DrawingContext& context, const Vector& pos, int layer) const
{
if(images.size() > 1) {
- size_t frame = size_t(g
lobal
_time * anim_fps) % images.size();
+ size_t frame = size_t(g
ame
_time * anim_fps) % images.size();
context.draw_surface(images[frame], pos, layer);
} else if (images.size() == 1) {
context.draw_surface(images[0], pos, layer);
context.draw_surface(images[frame], pos, layer);
} else if (images.size() == 1) {
context.draw_surface(images[0], pos, layer);
diff --git
a/src/timer.cpp
b/src/timer.cpp
index
40be503
..
0ab3a7a
100644
(file)
--- a/
src/timer.cpp
+++ b/
src/timer.cpp
@@
-22,7
+22,7
@@
#include <math.h>
#include "timer.hpp"
#include <math.h>
#include "timer.hpp"
-float g
lobal
_time = 0;
+float g
ame
_time = 0;
Timer::Timer()
: period(0), cycle_start(0), cyclic(false)
Timer::Timer()
: period(0), cycle_start(0), cyclic(false)
@@
-38,7
+38,7
@@
Timer::start(float period, bool cyclic)
{
this->period = period;
this->cyclic = cyclic;
{
this->period = period;
this->cyclic = cyclic;
- cycle_start = g
lobal
_time;
+ cycle_start = g
ame
_time;
}
bool
}
bool
@@
-47,9
+47,9
@@
Timer::check()
if(period == 0)
return false;
if(period == 0)
return false;
- if(g
lobal
_time - cycle_start >= period) {
+ if(g
ame
_time - cycle_start >= period) {
if(cyclic) {
if(cyclic) {
- cycle_start = g
lobal_time - fmodf(global
_time - cycle_start, period);
+ cycle_start = g
ame_time - fmodf(game
_time - cycle_start, period);
} else {
period = 0;
}
} else {
period = 0;
}
diff --git
a/src/timer.hpp
b/src/timer.hpp
index
42e1b8f
..
46f00f4
100644
(file)
--- a/
src/timer.hpp
+++ b/
src/timer.hpp
@@
-20,7
+20,7
@@
#ifndef __SUPERTUX_TIMER_H__
#define __SUPERTUX_TIMER_H__
#ifndef __SUPERTUX_TIMER_H__
#define __SUPERTUX_TIMER_H__
-extern float g
lobal
_time;
+extern float g
ame
_time;
/**
* new simpler timer designed to be used in the update functions of objects
/**
* new simpler timer designed to be used in the update functions of objects
@@
-48,9
+48,9
@@
public:
float get_period() const
{ return period; }
float get_timeleft() const
float get_period() const
{ return period; }
float get_timeleft() const
- { return period - (g
lobal
_time - cycle_start); }
+ { return period - (g
ame
_time - cycle_start); }
float get_timegone() const
float get_timegone() const
- { return g
lobal
_time - cycle_start; }
+ { return g
ame
_time - cycle_start; }
bool started() const
{ return period != 0 && get_timeleft() > 0; }
bool started() const
{ return period != 0 && get_timeleft() > 0; }
diff --git
a/src/title.cpp
b/src/title.cpp
index
2310741
..
537ff96
100644
(file)
--- a/
src/title.cpp
+++ b/
src/title.cpp
@@
-310,7
+310,7
@@
void title()
// Calculate the movement-factor
Uint32 ticks = SDL_GetTicks();
float elapsed_time = float(ticks - lastticks) / 1000.;
// Calculate the movement-factor
Uint32 ticks = SDL_GetTicks();
float elapsed_time = float(ticks - lastticks) / 1000.;
- g
lobal
_time += elapsed_time;
+ g
ame
_time += elapsed_time;
lastticks = ticks;
// 40fps is minimum
if(elapsed_time > .04)
lastticks = ticks;
// 40fps is minimum
if(elapsed_time > .04)
diff --git
a/src/worldmap.cpp
b/src/worldmap.cpp
index
87d1d62
..
feb5b88
100644
(file)
--- a/
src/worldmap.cpp
+++ b/
src/worldmap.cpp
@@
-1008,7
+1008,7
@@
WorldMap::display()
while(!quit) {
Uint32 ticks = SDL_GetTicks();
float elapsed_time = float(ticks - lastticks) / 1000;
while(!quit) {
Uint32 ticks = SDL_GetTicks();
float elapsed_time = float(ticks - lastticks) / 1000;
- g
lobal
_time += elapsed_time;
+ g
ame
_time += elapsed_time;
lastticks = ticks;
// 40 fps minimum // TODO use same code as in GameSession here
lastticks = ticks;
// 40 fps minimum // TODO use same code as in GameSession here
diff --git
a/tools/miniswig/create_wrapper.cpp
b/tools/miniswig/create_wrapper.cpp
index
7eae391
..
7ac2e92
100644
(file)
--- a/
tools/miniswig/create_wrapper.cpp
+++ b/
tools/miniswig/create_wrapper.cpp
@@
-148,7
+148,7
@@
WrapperCreator::create_function_wrapper(Class* _class, Function* function)
p != function->parameters.end(); ++p) {
if(i == 0 && p->type.atomic_type == HSQUIRRELVMType::instance()) {
out << ind << "HSQUIRRELVM arg0 = v;\n";
p != function->parameters.end(); ++p) {
if(i == 0 && p->type.atomic_type == HSQUIRRELVMType::instance()) {
out << ind << "HSQUIRRELVM arg0 = v;\n";
- arg_offset
++
;
+ arg_offset
--
;
} else {
char argname[64];
snprintf(argname, sizeof(argname), "arg%d", i);
} else {
char argname[64];
snprintf(argname, sizeof(argname), "arg%d", i);