1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

Utiliza csharp::TimeSpan

This commit is contained in:
Danilo Borges Santos 2024-12-14 17:24:36 -03:00
parent 51e359f980
commit 1802828c58
15 changed files with 35 additions and 376 deletions

View File

@ -153,15 +153,15 @@ namespace csharp {
return FromUnits(hours, TicksPerHour, MinHours, MaxHours);
}
static constexpr TimeSpan FromMinutes(int32_t minutes) {
static constexpr TimeSpan FromMinutes(int64_t minutes) {
return FromUnits(minutes, TicksPerMinute, MinMinutes, MaxMinutes);
}
static constexpr TimeSpan FromSeconds(int32_t seconds) {
static constexpr TimeSpan FromSeconds(int64_t seconds) {
return FromUnits(seconds, TicksPerSecond, MinSeconds, MaxSeconds);
}
static constexpr TimeSpan FromMicroseconds(int32_t microseconds) {
static constexpr TimeSpan FromMicroseconds(int64_t microseconds) {
return FromUnits(microseconds, TicksPerMicrosecond, MinMicroseconds, MaxMicroseconds);
}

View File

@ -2,6 +2,7 @@
#define XNA_SOUND_SOUNDEFFECT_HPP
#include "../default.hpp"
#include "csharp/time.hpp"
namespace xna {
struct SoundEffectInstance {
@ -31,7 +32,7 @@ namespace xna {
std::vector<Byte> const& data,
Int loopStart,
Int loopLength,
TimeSpan const& duration);
csharp::TimeSpan const& duration);
~SoundEffect();
void Play();
void Play(float volume, float pitch, float pan);

View File

@ -2,7 +2,7 @@
#define XNA_CONTENT_READERS_AUDIO_HPP
#include "../../audio/soundeffect.hpp"
#include "../../csharp/timespan.hpp"
#include "csharp/time.hpp"
#include "../../csharp/type.hpp"
#include "../manager.hpp"
#include "../reader.hpp"
@ -23,7 +23,7 @@ namespace xna {
const auto loopLength = input.ReadInt32();
const auto num = input.ReadInt32();
auto sf = snew<SoundEffect>(format, data, loopStart, loopLength, TimeSpan::FromMilliseconds((double)num));
auto sf = snew<SoundEffect>(format, data, loopStart, loopLength, csharp::TimeSpan::FromMilliseconds((double)num));
return sf;
}
};

View File

@ -3,7 +3,7 @@
#include "../../common/color.hpp"
#include "../../common/numerics.hpp"
#include "../../csharp/timespan.hpp"
#include "csharp/time.hpp"
#include "../../default.hpp"
#include "../reader.hpp"
@ -156,12 +156,12 @@ namespace xna {
}
};
class TimeSpanReader : public ContentTypeReaderT<TimeSpan> {
class TimeSpanReader : public ContentTypeReaderT<csharp::TimeSpan> {
public:
TimeSpanReader() : ContentTypeReaderT(typeof<TimeSpan>()) {}
TimeSpanReader() : ContentTypeReaderT(typeof<csharp::TimeSpan>()) {}
TimeSpan Read(ContentReader& input, TimeSpan& existingInstance) override {
return TimeSpan::FromTicks(input.ReadInt64());
csharp::TimeSpan Read(ContentReader& input, csharp::TimeSpan& existingInstance) override {
return csharp::TimeSpan::FromTicks(input.ReadInt64());
}
};

View File

@ -2,7 +2,6 @@
#define XNA_CONTENT_READERS_GRAPHICS_HPP
#include "../../common/numerics.hpp"
#include "../../csharp/timespan.hpp"
#include "../../csharp/type.hpp"
#include "../../graphics/sprite.hpp"
#include "../../graphics/texture.hpp"

View File

@ -1,341 +0,0 @@
#ifndef XNA_CSHARP_TIMESPAN_HPP
#define XNA_CSHARP_TIMESPAN_HPP
#include <limits>
#include <cstdint>
#include <cmath>
namespace xna {
//A port of the System.TimeSpan
//TimeSpan represents a duration of time.A TimeSpan can be negative or positive.
struct TimeSpan {
static constexpr int64_t NanosecondsPerTick = 100;
static constexpr int64_t TicksPerMicrosecond = 10;
static constexpr int64_t TicksPerMillisecond = TicksPerMicrosecond * 1000;
static constexpr int64_t TicksPerSecond = TicksPerMillisecond * 1000;
static constexpr int64_t TicksPerMinute = TicksPerSecond * 60;
static constexpr int64_t TicksPerHour = TicksPerMinute * 60;
static constexpr int64_t TicksPerDay = TicksPerHour * 24;
static constexpr int64_t MicrosecondsPerMillisecond = TicksPerMillisecond / TicksPerMicrosecond;
static constexpr int64_t MicrosecondsPerSecond = TicksPerSecond / TicksPerMicrosecond;
static constexpr int64_t MicrosecondsPerMinute = TicksPerMinute / TicksPerMicrosecond;
static constexpr int64_t MicrosecondsPerHour = TicksPerHour / TicksPerMicrosecond;
static constexpr int64_t MicrosecondsPerDay = TicksPerDay / TicksPerMicrosecond;
static constexpr int64_t MillisecondsPerSecond = TicksPerSecond / TicksPerMillisecond;
static constexpr int64_t MillisecondsPerMinute = TicksPerMinute / TicksPerMillisecond;
static constexpr int64_t MillisecondsPerHour = TicksPerHour / TicksPerMillisecond;
static constexpr int64_t MillisecondsPerDay = TicksPerDay / TicksPerMillisecond;
static constexpr int64_t SecondsPerMinute = TicksPerMinute / TicksPerSecond;
static constexpr int64_t SecondsPerHour = TicksPerHour / TicksPerSecond;
static constexpr int64_t SecondsPerDay = TicksPerDay / TicksPerSecond;
static constexpr int64_t MinutesPerHour = TicksPerHour / TicksPerMinute;
static constexpr int64_t MinutesPerDay = TicksPerDay / TicksPerMinute;
static constexpr int64_t HoursPerDay = TicksPerDay / TicksPerHour;
static constexpr int64_t MinTicks = (std::numeric_limits<int64_t>::min)();
static constexpr int64_t MaxTicks = (std::numeric_limits<int64_t>::max)();
static constexpr int64_t MinMicroseconds = MinTicks / TicksPerMicrosecond;
static constexpr int64_t MaxMicroseconds = MaxTicks / TicksPerMicrosecond;
static constexpr int64_t MinMilliseconds = MinTicks / TicksPerMillisecond;
static constexpr int64_t MaxMilliseconds = MaxTicks / TicksPerMillisecond;
static constexpr int64_t MinSeconds = MinTicks / TicksPerSecond;
static constexpr int64_t MaxSeconds = MaxTicks / TicksPerSecond;
static constexpr int64_t MinMinutes = MinTicks / TicksPerMinute;
static constexpr int64_t MaxMinutes = MaxTicks / TicksPerMinute;
static constexpr int64_t MinHours = MinTicks / TicksPerHour;
static constexpr int64_t MaxHours = MaxTicks / TicksPerHour;
static constexpr int64_t MinDays = MinTicks / TicksPerDay;
static constexpr int64_t MaxDays = MaxTicks / TicksPerDay;
static constexpr int64_t TicksPerTenthSecond = TicksPerMillisecond * 100;
static constexpr TimeSpan Zero() { return TimeSpan(); }
static constexpr TimeSpan MaxValue() { return TimeSpan(MaxTicks); }
static constexpr TimeSpan MinValue() { return TimeSpan(MinTicks); }
constexpr TimeSpan() = default;
constexpr TimeSpan(int64_t ticks) : _ticks(ticks) {}
constexpr TimeSpan(int32_t hours, int32_t minutes, int32_t seconds) {
_ticks = TimeToTicks(hours, minutes, seconds);
}
constexpr TimeSpan(int32_t days, int32_t hours, int32_t minutes, int32_t seconds, int32_t milliseconds, int32_t microseconds = 0) {
_ticks = TimeToTicks(days, hours, minutes, seconds, milliseconds, microseconds);
}
constexpr int64_t Ticks() const { return _ticks; }
constexpr int32_t Days() const { return static_cast<int32_t>(_ticks / TicksPerDay); }
constexpr int32_t Hours() const { return static_cast<int32_t>(_ticks / TicksPerHour % HoursPerDay); }
constexpr int32_t Milliseconds() const { return static_cast<int32_t>(_ticks / TicksPerMillisecond % MillisecondsPerSecond); }
constexpr int32_t Microseconds() const { return static_cast<int32_t>(_ticks / TicksPerMicrosecond % MicrosecondsPerMillisecond); }
constexpr int32_t Nanoseconds() const { return static_cast<int32_t>(_ticks % TicksPerMicrosecond * NanosecondsPerTick); }
constexpr int32_t Minutes() const { return static_cast<int32_t>(_ticks / TicksPerMinute % MinutesPerHour); }
constexpr int32_t Seconds() const { return static_cast<int32_t>(_ticks / TicksPerSecond % SecondsPerMinute); }
constexpr double TotalDays() const { return static_cast<double>(_ticks) / TicksPerDay; }
constexpr double TotalHours() const { return static_cast<double>(_ticks) / TicksPerHour; }
constexpr double TotalMilliseconds() const {
double temp = static_cast<double>(_ticks) / TicksPerMillisecond;
if (temp > MaxMilliseconds) {
return MaxMilliseconds;
}
if (temp < MinMilliseconds) {
return MinMilliseconds;
}
return temp;
}
constexpr double TotalMicroseconds() const { return static_cast<double>(_ticks) / TicksPerMicrosecond; }
constexpr double TotalNanoseconds() const { return static_cast<double>(_ticks) * NanosecondsPerTick; }
constexpr double TotalMinutes() const { return static_cast<double>(_ticks) / TicksPerMinute; }
constexpr double TotalSeconds() const { return static_cast<double>(_ticks) / TicksPerSecond; }
constexpr TimeSpan Add(TimeSpan const& ts) const {
int64_t result = _ticks + ts._ticks;
int64_t t1Sign = _ticks >> 63;
if ((t1Sign == (ts._ticks >> 63)) && (t1Sign != (result >> 63))) {
return TimeSpan::Zero();
//exception
}
return result;
}
static TimeSpan FromDays(double value) {
return Interval(value, TicksPerDay);
}
constexpr TimeSpan Duration() const {
if (_ticks == MinTicks) {
return TimeSpan::Zero();
}
return TimeSpan(_ticks >= 0 ? _ticks : -_ticks);
}
static constexpr TimeSpan FromUnits(int64_t units, int64_t ticksPerUnit, int64_t minUnits, int64_t maxUnits) {
if (units > maxUnits || units < minUnits) {
return TimeSpan::Zero();
}
return TimeSpan::FromTicks(units * ticksPerUnit);
}
static constexpr TimeSpan FromDays(int32_t days) {
return FromUnits(days, TicksPerDay, MinDays, MaxDays);
}
//TODO: Not implemented.
//static constexpr TimeSpan FromDays(int32_t days, int32_t hours = 0, int64_t minutes = 0, int64_t seconds = 0, int64_t milliseconds = 0, int64_t microseconds = 0);
static constexpr TimeSpan FromHours(int32_t hours) {
return FromUnits(hours, TicksPerHour, MinHours, MaxHours);
}
//TODO: Not implemented.
//static constexpr TimeSpan FromHours(int32_t hours, int64_t minutes = 0, int64_t seconds = 0, int64_t milliseconds = 0, int64_t microseconds = 0);
static constexpr TimeSpan FromMinutes(int64_t minutes) {
return FromUnits(minutes, TicksPerMinute, MinMinutes, MaxMinutes);
}
//TODO: Not implemented.
//static constexpr TimeSpan FromMinutes(int64_t minutes, int64_t seconds = 0, int64_t milliseconds = 0, int64_t microseconds = 0);
static constexpr TimeSpan FromSeconds(int seconds) {
return FromSeconds(static_cast<int64_t>(seconds));
}
static constexpr TimeSpan FromSeconds(int64_t seconds) {
return FromUnits(seconds, TicksPerSecond, MinSeconds, MaxSeconds);
}
//TODO: Not implemented.
//static constexpr TimeSpan FromSeconds(int64_t seconds, int64_t milliseconds = 0, int64_t microseconds = 0);
//TODO: Not implemented.
//static constexpr TimeSpan FromMilliseconds(int64_t milliseconds, int64_t microseconds = 0);
static constexpr TimeSpan FromMicroseconds(int64_t microseconds) {
return FromUnits(microseconds, TicksPerMicrosecond, MinMicroseconds, MaxMicroseconds);
}
static TimeSpan FromHours(double value) {
return Interval(value, TicksPerHour);
}
static constexpr int64_t TimeToTicks(int32_t hour, int32_t minute, int32_t second) {
int64_t totalSeconds =
(hour * SecondsPerHour)
+ (minute * SecondsPerMinute)
+ second;
//exception
if (totalSeconds > MaxSeconds) {
return MaxValue()._ticks;
}
else if (totalSeconds < MinSeconds) {
return MinValue()._ticks;
}
return totalSeconds * TicksPerSecond;
}
static TimeSpan FromMilliseconds(double value) {
return Interval(value, TicksPerMillisecond);
}
static TimeSpan FromMicroseconds(double value) {
return Interval(value, TicksPerMicrosecond);
}
static TimeSpan FromMinutes(double value) {
return Interval(value, TicksPerMinute);
}
constexpr TimeSpan Negate() const {
if (_ticks == MinTicks) {
return MinTicks;
}
return -_ticks;
}
static TimeSpan FromSeconds(double value) {
return Interval(value, TicksPerSecond);
}
constexpr TimeSpan Subtract(TimeSpan const& ts) const {
int64_t result = _ticks - ts._ticks;
int64_t t1Sign = _ticks >> 63;
if ((t1Sign != (ts._ticks >> 63)) && (t1Sign != (result >> 63))) {
return TimeSpan::Zero();
//exception
}
return result;
}
TimeSpan Multiply(double factor) const {
if (isnan(factor)) {
return TimeSpan::Zero();
//exception
}
const auto ticks = std::round(_ticks * factor);
return IntervalFromDoubleTicks(ticks);
}
TimeSpan Divide(double divisor) const {
if (isnan(divisor)) {
return TimeSpan::Zero();
//exception
}
const auto ticks = std::round(_ticks / divisor);
return IntervalFromDoubleTicks(ticks);
}
constexpr double Divide(TimeSpan const& ts) const {
return _ticks / static_cast<double>(ts._ticks);
}
static constexpr TimeSpan FromTicks(int64_t value) {
return TimeSpan(value);
}
static constexpr int64_t TimeToTicks(int32_t days, int32_t hours, int32_t minutes, int32_t seconds, int32_t milliseconds, int32_t microseconds) {
int64_t totalMicroseconds =
(days * MicrosecondsPerDay)
+ (hours * MicrosecondsPerHour)
+ (minutes * MicrosecondsPerMinute)
+ (seconds * MicrosecondsPerSecond)
+ (milliseconds * MicrosecondsPerMillisecond)
+ microseconds;
//exception
if (totalMicroseconds > MaxMicroseconds) {
return MaxValue()._ticks;
}
else if (totalMicroseconds < MinMicroseconds) {
return MinValue()._ticks;
}
return totalMicroseconds * TicksPerMicrosecond;
}
constexpr bool operator==(TimeSpan const& other) const {
return _ticks == other._ticks;
}
constexpr TimeSpan operator-() const {
return Negate();
}
friend constexpr TimeSpan operator-(TimeSpan const& a, TimeSpan const& b) {
return a.Subtract(b);
}
friend constexpr TimeSpan operator+(TimeSpan const& a, TimeSpan const& b) {
return a.Add(b);
}
friend TimeSpan operator*(TimeSpan const& a, double factor) {
return a.Multiply(factor);
}
friend TimeSpan operator*(double factor, TimeSpan const& b) {
return b.Multiply(factor);
}
friend double operator/(TimeSpan const& a, TimeSpan const& b) {
return a.Divide(b);
}
friend bool operator<(TimeSpan const& a, TimeSpan const& b) {
return a._ticks < b._ticks;
}
friend bool operator<=(TimeSpan const& a, TimeSpan const& b) {
return a._ticks <= b._ticks;
}
friend bool operator>(TimeSpan const& a, TimeSpan const& b) {
return a._ticks > b._ticks;
}
friend bool operator>=(TimeSpan const& a, TimeSpan const& b) {
return a._ticks >= b._ticks;
}
private:
int64_t _ticks{ 0 };
static TimeSpan Interval(double value, double scale) {
if (isnan(value)) {
//exception
return TimeSpan::Zero();
}
return IntervalFromDoubleTicks(value * scale);
}
static constexpr TimeSpan IntervalFromDoubleTicks(double ticks) {
if ((ticks > MaxTicks) || (ticks < MinTicks) || isnan(ticks)) {
//exception
return TimeSpan::Zero();
}
if (ticks == MaxTicks) {
return MaxValue();
}
return TimeSpan(static_cast<int64_t>(ticks));
}
//TODO: Not implemented.
//static TimeSpan FromMicroseconds(__int128 microseconds);
};
}
#endif

View File

@ -19,7 +19,6 @@
#include "content/typereadermanager.hpp"
#include "csharp/buffer.hpp"
#include "csharp/service.hpp"
#include "csharp/timespan.hpp"
#include "csharp/type.hpp"
#include "csharp/screen.hpp"
#include "csharp/eventhandler.hpp"

View File

@ -31,9 +31,9 @@ namespace xna {
//Gets the GameServiceContainer holding all the service providers attached to the Game.
sptr<GameServiceContainer> Services();
//Gets or sets the target time between calls to Update when IsFixedTimeStep is true.
constexpr TimeSpan TargetElapsedTime() const { return targetElapsedTime; }
constexpr csharp::TimeSpan TargetElapsedTime() const { return targetElapsedTime; }
//Gets or sets the target time between calls to Update when IsFixedTimeStep is true.
void TargetElapsedTime(TimeSpan const& value);
void TargetElapsedTime(csharp::TimeSpan const& value);
//Gets the underlying operating system window.
sptr<GameWindow> Window();
@ -85,7 +85,7 @@ namespace xna {
bool enabledGameComponents{ false };
GameTime currentGameTime{};
bool isFixedTimeStep{ true };
TimeSpan targetElapsedTime{ TimeSpan::FromTicks(166667L) };
csharp::TimeSpan targetElapsedTime{ csharp::TimeSpan::FromTicks(166667L) };
bool isRunning{ false };
sptr<GameServiceContainer> services = nullptr;
sptr<GraphicsDevice> graphicsDevice = nullptr;

View File

@ -2,7 +2,7 @@
#define XNA_GAME_TIME_HPP
#include "../default.hpp"
#include "../csharp/timespan.hpp"
#include "csharp/time.hpp"
namespace xna {
//Snapshot of the game timing state expressed in values that can be used by variable-step (real time) or fixed-step (game time) games.
@ -10,17 +10,17 @@ namespace xna {
public:
constexpr GameTime() = default;
constexpr GameTime(const TimeSpan& elapsedGameTime, const TimeSpan& totalGameTime, bool isRunningSlowly) :
constexpr GameTime(const csharp::TimeSpan& elapsedGameTime, const csharp::TimeSpan& totalGameTime, bool isRunningSlowly) :
ElapsedGameTime(elapsedGameTime),
IsRunningSlowly(isRunningSlowly),
TotalGameTime(totalGameTime) { }
//The amount of elapsed game time since the last update.
TimeSpan ElapsedGameTime{ 0 };
csharp::TimeSpan ElapsedGameTime{ 0 };
//Gets a value indicating that the game loop is taking longer than its TargetElapsedTime. In this case, the game loop can be considered to be running too slowly and should do something to "catch up."
bool IsRunningSlowly{ false };
//The amount of game time since the start of the game.
TimeSpan TotalGameTime{ 0 };
csharp::TimeSpan TotalGameTime{ 0 };
};
}

View File

@ -65,7 +65,7 @@ namespace PlatformerStarterKit {
{
if (!level->Player()->IsAlive() ||
level->ReachedExit() ||
level->TimeRemaining() == xna::TimeSpan::Zero() ||
level->TimeRemaining() == csharp::TimeSpan::Zero() ||
waitTime > 0) {
sprite.PlayAnimation(idleAnimation);
}

View File

@ -84,7 +84,7 @@ namespace PlatformerStarterKit {
if (!level->Player()->IsAlive()) {
level->StartNewLife();
}
else if (level->TimeRemaining() == TimeSpan::Zero()) {
else if (level->TimeRemaining() == csharp::TimeSpan::Zero()) {
if (level->ReachedExit())
LoadNextLevel();
else
@ -144,7 +144,7 @@ namespace PlatformerStarterKit {
DrawShadowedString(*hudFont, "SCORE: " + to_string(level->Score()), hudLocation + Vector2(0.0f, timeHeight * 1.2f), Colors::Yellow);
PTexture2D status = nullptr;
if (level->TimeRemaining() == TimeSpan::Zero())
if (level->TimeRemaining() == csharp::TimeSpan::Zero())
{
if (level->ReachedExit()) {
status = winOverlay;
@ -179,7 +179,7 @@ namespace PlatformerStarterKit {
int levelIndex = -1;
sptr<Level> level = nullptr;
bool wasContinuePressed = false;
TimeSpan WarningTime = TimeSpan::FromSeconds(30);
csharp::TimeSpan WarningTime = csharp::TimeSpan::FromSeconds(30.0);
static constexpr int TargetFrameRate = 60;
static constexpr Buttons ContinueButton = Buttons::A;
};

View File

@ -11,7 +11,7 @@ namespace PlatformerStarterKit {
Level::Level(xna::sptr<xna::IServiceProvider> const& serviceProvider, xna::String const& path) : path(path)
{
content = xna::snew<xna::ContentManager>(serviceProvider, "Content");
timeRemaining = xna::TimeSpan::FromMinutes(2.0);
timeRemaining = csharp::TimeSpan::FromMinutes(2.0);
layers = std::vector<xna::PTexture2D>(3);
@ -207,13 +207,13 @@ namespace PlatformerStarterKit {
}
void Level::Update(xna::GameTime const& gameTime) {
if (!player->IsAlive() || timeRemaining == xna::TimeSpan::Zero()) {
if (!player->IsAlive() || timeRemaining == csharp::TimeSpan::Zero()) {
player->ApplyPhysics(gameTime);
}
else if (reachedExit) {
auto seconds = static_cast<int64_t>(std::round(gameTime.ElapsedGameTime.TotalSeconds() * 100.0f));
seconds = std::min(seconds, static_cast<int64_t>(std::ceil(timeRemaining.TotalSeconds())));
timeRemaining = timeRemaining - xna::TimeSpan::FromSeconds(seconds);
timeRemaining = timeRemaining - csharp::TimeSpan::FromSeconds(seconds);
score += seconds * PointsPerSecond;
}
else {
@ -238,8 +238,8 @@ namespace PlatformerStarterKit {
}
}
if (timeRemaining < xna::TimeSpan::Zero())
timeRemaining = xna::TimeSpan::Zero();
if (timeRemaining < csharp::TimeSpan::Zero())
timeRemaining = csharp::TimeSpan::Zero();
}
void Level::Draw(xna::GameTime const& gameTime, xna::SpriteBatch& spriteBatch)

View File

@ -3,6 +3,7 @@
#include "headers.hpp"
#include "tile.hpp"
#include "csharp/time.hpp"
namespace PlatformerStarterKit {
@ -30,7 +31,7 @@ namespace PlatformerStarterKit {
return reachedExit;
}
constexpr xna::TimeSpan TimeRemaining() const {
constexpr csharp::TimeSpan TimeRemaining() const {
return timeRemaining;
}
@ -79,7 +80,7 @@ namespace PlatformerStarterKit {
xna::Point exit = InvalidPosition;
int score = 0;
bool reachedExit = false;
xna::TimeSpan timeRemaining{};
csharp::TimeSpan timeRemaining{};
xna::sptr<xna::ContentManager> content = nullptr;
xna::sptr<xna::SoundEffect> exitReachedSound = nullptr;
xna::String path;

View File

@ -52,8 +52,8 @@ namespace xna {
{
const auto elapsed = impl->_stepTimer.GetElapsedSeconds();
const auto total = impl->_stepTimer.GetTotalSeconds();
const auto elapsedTimeSpan = TimeSpan::FromSeconds(elapsed);
const auto totalTimeSpan = TimeSpan::FromSeconds(total);
const auto elapsedTimeSpan = csharp::TimeSpan::FromSeconds(elapsed);
const auto totalTimeSpan = csharp::TimeSpan::FromSeconds(total);
currentGameTime.ElapsedGameTime = elapsedTimeSpan;
currentGameTime.TotalGameTime = totalTimeSpan;
Update(currentGameTime);
@ -209,7 +209,7 @@ namespace xna {
Mouse::impl->_dxMouse->SetVisible(value);
}
void Game::TargetElapsedTime(TimeSpan const& value) {
void Game::TargetElapsedTime(csharp::TimeSpan const& value) {
if (!isFixedTimeStep)
return;

View File

@ -30,7 +30,7 @@ namespace xna {
Int loopStart,
Int loopLength,
//We must evaluate how to use the time duration
TimeSpan const& duration) {
csharp::TimeSpan const& duration) {
if (!AudioEngine::impl || !AudioEngine::impl->_dxAudioEngine)
return;