Browse Source

Tweak documentation

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
e90301faf3
5 changed files with 8 additions and 10 deletions
  1. +1
    -1
      Makefile
  2. +1
    -0
      include/app.hpp
  3. +3
    -6
      include/asset.hpp
  4. +2
    -2
      include/engine.hpp
  5. +1
    -1
      include/util/common.hpp

+ 1
- 1
Makefile View File

@@ -195,7 +195,7 @@ endif
ifeq ($(ARCH), win)
cp libRack.a dist/Rack-SDK/
endif
cd dist && zip -5 -r Rack-SDK-$(VERSION)-$(ARCH).zip Rack-SDK
cd dist && zip -5 -r Rack-SDK-$(VERSION).zip Rack-SDK


# Obviously this will only work if you have the private keys to my server


+ 1
- 0
include/app.hpp View File

@@ -11,6 +11,7 @@ static const float MM_PER_IN = 25.4;

namespace rack {


inline float in2px(float inches) {
return inches * SVG_DPI;
}


+ 3
- 6
include/asset.hpp View File

@@ -7,14 +7,11 @@
namespace rack {


/** Returns the path of a global resource. Read-only
*/
/** Returns the path of a global resource. Should only read files from this location. */
std::string assetGlobal(std::string filename);
/** Returns the path of a local resource. Read/write
*/
/** Returns the path of a local resource. Can read and write files to this location. */
std::string assetLocal(std::string filename);
/** Returns the path of a resource in the plugin's folder. Read-only
*/
/** Returns the path of a resource in the plugin's folder. Should only read files from this location. */
std::string assetPlugin(Plugin *plugin, std::string filename);




+ 2
- 2
include/engine.hpp View File

@@ -121,8 +121,8 @@ float engineGetSampleRate();
float engineGetSampleTime();

extern bool gPaused;
/** If plugins begin using this in harmful ways, I will remove it and break your API.
To avoid spoiling the fun for everyone, make sure your plugins demonstrate good behavior by not being "surprising" to the user. Your plugin needs to have a clear purpose for manipulating other modules and wires and must be done with a good UX.
/** Plugins should not manipulate other modules or wires unless that is the entire purpose of the module.
Your plugin needs to have a clear purpose for manipulating other modules and wires and must be done with a good UX.
*/
extern std::vector<Module*> gModules;
extern std::vector<Wire*> gWires;


+ 1
- 1
include/util/common.hpp View File

@@ -101,7 +101,7 @@ DeferWrapper<F> deferWrapper(F f) {
return DeferWrapper<F>(f);
}

#define defer(code) auto CONCAT(x, __COUNTER__) = deferWrapper([&]() code)
#define defer(code) auto CONCAT(_defer_, __COUNTER__) = deferWrapper([&]() code)

////////////////////
// Random number generator


Loading…
Cancel
Save