Permalink
Browse files

General revision of comments.

  • Loading branch information...
1 parent 5e37a3f commit 6297c996bcc8c7d24db8a0dd92eb94ff7be4d7ac @agustincordes agustincordes committed Feb 13, 2013
Showing with 245 additions and 240 deletions.
  1. +2 −2 Dagon/DGAction.h
  2. +1 −1 Dagon/DGAppDelegate.h
  3. +1 −1 Dagon/DGAppDelegate.mm
  4. +8 −10 Dagon/DGAudio.cpp
  5. +1 −1 Dagon/DGAudio.h
  6. +4 −4 Dagon/DGAudioManager.cpp
  7. +1 −4 Dagon/DGAudioManager.h
  8. +2 −4 Dagon/DGAudioProxy.h
  9. +5 −5 Dagon/DGButton.cpp
  10. +1 −1 Dagon/DGButton.h
  11. +1 −1 Dagon/DGButtonProxy.h
  12. +1 −1 Dagon/DGCamLib.h
  13. +6 −6 Dagon/DGCameraManager.cpp
  14. +2 −1 Dagon/DGCameraManager.h
  15. +1 −1 Dagon/DGColors.h
  16. +2 −2 Dagon/DGConfig.cpp
  17. +3 −3 Dagon/DGConfig.h
  18. +2 −2 Dagon/DGConfigLib.h
  19. +3 −3 Dagon/DGConsole.cpp
  20. +1 −1 Dagon/DGConsole.h
  21. +14 −9 Dagon/DGControl.cpp
  22. +1 −2 Dagon/DGControl.h
  23. +1 −1 Dagon/DGCursorLib.h
  24. +3 −1 Dagon/DGCursorManager.cpp
  25. +2 −2 Dagon/DGCursorManager.h
  26. +4 −4 Dagon/DGDefines.h
  27. +1 −1 Dagon/DGDustData.c
  28. +1 −1 Dagon/DGEffectsLib.h
  29. +2 −3 Dagon/DGEffectsManager.cpp
  30. +1 −1 Dagon/DGEffectsManager.h
  31. +2 −2 Dagon/DGFeedManager.cpp
  32. +2 −2 Dagon/DGFeedManager.h
  33. +4 −4 Dagon/DGFont.cpp
  34. +1 −1 Dagon/DGFont.h
  35. +1 −1 Dagon/DGFontData.c
  36. +1 −1 Dagon/DGFontManager.cpp
  37. +1 −1 Dagon/DGFontManager.h
  38. +1 −1 Dagon/DGGeometry.h
  39. +2 −2 Dagon/DGImage.cpp
  40. +1 −1 Dagon/DGImage.h
  41. +1 −1 Dagon/DGImageProxy.h
  42. +2 −2 Dagon/DGInterface.cpp
  43. +1 −1 Dagon/DGInterface.h
  44. +1 −1 Dagon/DGLanguage.h
  45. +2 −2 Dagon/DGLog.cpp
  46. +2 −2 Dagon/DGLog.h
  47. +4 −4 Dagon/DGNode.cpp
  48. +2 −4 Dagon/DGNode.h
  49. +1 −1 Dagon/DGNodeProxy.h
  50. +3 −3 Dagon/DGObject.cpp
  51. +2 −4 Dagon/DGObject.h
  52. +2 −2 Dagon/DGObjectProxy.h
  53. +1 −1 Dagon/DGOverlay.cpp
  54. +1 −1 Dagon/DGOverlay.h
  55. +1 −1 Dagon/DGOverlayProxy.h
  56. +3 −3 Dagon/DGPlatform.h
  57. +4 −2 Dagon/DGProxy.h
  58. +14 −9 Dagon/DGRenderManager.cpp
  59. +1 −1 Dagon/DGRenderManager.h
  60. +1 −1 Dagon/DGRoom.cpp
  61. +1 −1 Dagon/DGRoom.h
  62. +2 −2 Dagon/DGRoomProxy.h
  63. +1 −1 Dagon/DGScene.cpp
  64. +1 −1 Dagon/DGScene.h
  65. +13 −10 Dagon/DGScript.cpp
  66. +1 −1 Dagon/DGScript.h
  67. +1 −1 Dagon/DGShaderData.c
  68. +2 −3 Dagon/DGSlideProxy.h
  69. +1 −1 Dagon/DGSplashData.c
  70. +3 −3 Dagon/DGSpot.cpp
  71. +1 −1 Dagon/DGSpot.h
  72. +2 −2 Dagon/DGSpotProxy.h
  73. +4 −1 Dagon/DGState.cpp
  74. +1 −1 Dagon/DGState.h
  75. +2 −2 Dagon/DGSystem.h
  76. +3 −3 Dagon/DGSystemLib.h
  77. +6 −6 Dagon/DGSystemMac.mm
  78. +15 −15 Dagon/DGSystemUnix.cpp
  79. +2 −1 Dagon/DGSystemWin.cpp
  80. +4 −7 Dagon/DGTexture.cpp
  81. +3 −3 Dagon/DGTexture.h
  82. +2 −5 Dagon/DGTextureManager.cpp
  83. +1 −1 Dagon/DGTextureManager.h
  84. +2 −4 Dagon/DGTimerManager.cpp
  85. +2 −2 Dagon/DGTimerManager.h
  86. +1 −1 Dagon/DGVersion.h
  87. +8 −7 Dagon/DGVideo.cpp
  88. +1 −1 Dagon/DGVideo.h
  89. +2 −2 Dagon/DGVideoManager.cpp
  90. +1 −1 Dagon/DGVideoManager.h
  91. +1 −1 Dagon/DGViewDelegate.h
  92. +3 −2 Dagon/DGViewDelegate.mm
  93. +1 −1 Dagon/DGWindowDelegate.h
  94. +1 −1 Dagon/DGWindowDelegate.mm
  95. +1 −1 Dagon/main.cpp
  96. +1 −1 Dagon/main.m
  97. +5 −2 Documents/Credits.rtf
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -25,7 +25,7 @@
class DGObject;
-// Enum begins at 100 to avoid conflicts with objects
+// Enum here begins at 100 to avoid conflicts with objects IDs
enum DGActionTypes {
DGActionFunction = 100,
DGActionFeed,
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -126,7 +126,7 @@ void DGAudio::load() {
if (!_isLoaded) {
FILE* fh;
- // FIXME: This object shouldn't reference DGConfig, let the manager do it
+ // FIXME: This object shouldn't reference DGConfig, let the Audio Manager do this
const char* fileToLoad = _randomizeFile(_resource.name);
fh = fopen(config->path(DGPathRes, fileToLoad, DGObjectAudio), "rb");
@@ -263,10 +263,10 @@ void DGAudio::update() {
}
// Run fade operations
- // TODO: Better change the name of the DGObject function
+ // TODO: Better change the name of the DGObject "updateFade" function, it's somewhat confusing
this->updateFade();
- // FIXME: Not very elegant as we're doing this every time
+ // FIXME: Not very elegant as we're doing this check every time
if (config->mute) {
alSourcef(_alSource, AL_GAIN, 0.0f);
}
@@ -304,11 +304,11 @@ void DGAudio::_emptyBuffers() {
const char* DGAudio::_randomizeFile(const char* fileName) {
if (strstr(fileName, ".ogg")) { // Was extension specified?
- return fileName; // Return as-is
+ return fileName; // Then return as-is
}
else { // Randomize
static char fileToLoad[DGMaxFileLength];
- int index = (rand() % 6); // Allow to configure
+ int index = (rand() % 6); // TODO: Allow to configure this value
snprintf(fileToLoad, DGMaxFileLength, "%s%0" in_between(DGFileSeqDigits) "d.%s", fileName,
index + DGFileSeqStart, "ogg");
@@ -318,8 +318,7 @@ const char* DGAudio::_randomizeFile(const char* fileName) {
}
bool DGAudio::_stream(ALuint* buffer) {
- // This is a failsafe; if this is true, we won't attempt
- // to stream anymore
+ // This is a failsafe; if this is true, we won't attempt to stream anymore
static bool _hasStreamingError = false;
if (!_hasStreamingError) {
@@ -344,8 +343,7 @@ bool DGAudio::_stream(ALuint* buffer) {
return false;
}
else if (result == OV_HOLE) {
- // May return OV_HOLE after we rewind the stream,
- // so we just re-loop
+ // May return OV_HOLE after we rewind the stream, so we just re-loop
continue;
}
else if (result < 0) {
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -21,7 +21,7 @@
using namespace std;
-// TODO: Watch out with the context here!
+// TODO: Watch out with the OpenAL context here!
////////////////////////////////////////////////////////////
// Implementation - Constructor
@@ -44,7 +44,7 @@ DGAudioManager::~DGAudioManager() {
// audio was created by Lua or by another class
// Each audio object should unregister itself if
- // destructed
+ // destroyed
if (!_arrayOfAudios.empty()) {
vector<DGAudio*>::iterator it;
@@ -131,7 +131,7 @@ void DGAudioManager::init() {
log->trace(DGModAudio, "%s", DGMsg070000);
system = &DGSystem::getInstance();
- // OpenAl sucks in Windows, so let's support forcing the audio device
+// OpenAl sucks on Windows, so let's support forcing the audio device on this platform
#ifdef DGPlatformWindows
char deviceName[256];
char *defaultDevice;
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -13,9 +13,6 @@
#ifndef DG_AUDIOMANAGER_H
#define DG_AUDIOMANAGER_H
-// TODO: Obviously, it makes sense to have all these managers
-// inherit from a base, singleton manager
-
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -43,9 +43,7 @@ class DGAudioProxy : public DGObjectProxy {
lua_pushnil(L);
while (lua_next(L, 2) != 0) {
const char* key = lua_tostring(L, -2);
-
- // We can only read the key as a string, so we have no choice but
- // do an ugly nesting of strcmps()
+
if (strcmp(key, "loop") == 0) a->setLoopable(lua_toboolean(L, -1));
if (strcmp(key, "volume") == 0) a->setDefaultFadeLevel((float)(lua_tonumber(L, -1) / 100));
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -105,13 +105,13 @@ void DGButton::setAction(DGAction* anAction) {
}
void DGButton::setFont(const char* fromFileName, unsigned int heightOfFont) {
- // FIXME: Wrong, this will load many repeated fonts!
+ // FIXME: Wrong, this can load many repeated fonts!
_font = fontManager->load(fromFileName, heightOfFont);
}
void DGButton::setOnHoverTexture(const char* fromFileName) {
- // TODO: Important! Should determine first if the texture already exists,
- // to avoid repeating resources. Eventually, this would be done with the
+ // TODO: Important! We should determine first if the texture already exists,
+ // to avoid repeating resources. Eventually, this would be done via the
// resource manager.
DGTexture* texture;
@@ -129,6 +129,6 @@ void DGButton::setText(const char* text){
}
void DGButton::setTextColor(int aColor) {
- // Note this expects one of the pre-generated colors
+ // Note this expects one of our pre-generated colors
_textColor = aColor;
}
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -221,15 +221,15 @@ void DGCameraManager::setTargetAngle(float horizontal, float vertical) {
_angleHTarget = _toRadians(horizontal, _angleHLimit);
// Treat special case when angle is NORTH
- // NOTE: Certain cases aren't supported in this code; ie:
+ // TODO: Certain cases aren't supported in this code; ie:
// slightly rotated left of North, then setting target angle
- // to East. This would be rarely required by the user though.
+ // to East. Needs improving.
if (_angleHTarget == 0.0f) {
if (_angleH > M_PI)
_angleHTarget = (float)(M_PI*2);
}
- // FIXME: This division is related to the amount of configured inertia. Must fix later.
+ // FIXME: This division is related to the amount of configured inertia. Not right.
_targetHError = fabs(_angleHTarget - _angleH) / 5.0f;
if (_targetHError < 0.02f)
@@ -243,7 +243,7 @@ void DGCameraManager::setTargetAngle(float horizontal, float vertical) {
// Extrapolate the coordinates
_angleVTarget = _toRadians(vertical, _angleVLimit);;
- // FIXME: This division is related to the amount of configured inertia. Must fix later.
+ // FIXME: This division is related to the amount of configured inertia. Not right.
_targetVError = fabs(_angleVTarget - _angleV) / 5.0f;
//if (_targetVError < 0.001f)
@@ -762,7 +762,7 @@ void DGCameraManager::_calculateBob() {
if (_bob.state != DGCamBreathing)
_bob.nextPause = 0;
else
- _bob.nextPause = (float)((rand() % 3) + 1); // Make the breathing more irregular
+ _bob.nextPause = (float)((rand() % 3) + 1); // For making the breathing more irregular
}
_bob.displace = sin(_bob.position) * cos(_bob.position) / _bob.currentFactor;
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -79,6 +79,7 @@ class DGConfig;
// TODO: This got fairly messy... Need to separate most of this into another class,
// DGCameraState. Or even merge the camera state with the general State Manager.
+// I don't know... every time I rewrote this file, it always got messy. Bloody cameras.
class DGCameraManager {
DGConfig* config;
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -55,7 +55,7 @@ DGConfig::DGConfig() {
_fps = 0;
- //TODO: If vertical sync is enabled this should not be necessary!
+ // FIXME: This "global speed" setting is sometimes broken on Windows, must implement a frame limiter
// This is a readonly setting
_globalSpeed = 60.0f / (float)framerate;
}
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -64,12 +64,12 @@ enum DGPaths {
};
////////////////////////////////////////////////////////////
-// Interface
+// Interface - Singleton class
////////////////////////////////////////////////////////////
class DGConfig {
char _appPath[DGMaxPathLength];
- char _resPath[DGMaxPathLength]; // Not to be confused with catalog
+ char _resPath[DGMaxPathLength];
char _scriptName[DGMaxFileLength];
char _userPath[DGMaxPathLength];
char _texExtension[4];
View
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
-// Copyright (c) 2011 Senscape s.r.l.
+// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
@@ -195,7 +195,7 @@ static int DGConfigLibSet(lua_State *L) {
if (strcmp(key, "controlMode") == 0) {
DGConfig::getInstance().controlMode = (int)luaL_checknumber(L, 3);
- // Must refresh the viewport
+ // Must refresh the viewport with this change
DGCameraManager::getInstance().setViewport(DGConfig::getInstance().displayWidth, DGConfig::getInstance().displayHeight);
}
Oops, something went wrong.

0 comments on commit 6297c99

Please sign in to comment.