Skip to content

Commit

Permalink
Update docs to new syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbuttner authored and lerno committed Jan 10, 2025
1 parent 306589a commit 58be33c
Show file tree
Hide file tree
Showing 4 changed files with 817 additions and 817 deletions.
64 changes: 32 additions & 32 deletions libraries/raylib5.c3l/raylib.c3i
Original file line number Diff line number Diff line change
Expand Up @@ -1827,43 +1827,43 @@ fn void detachAudioMixedProcessor(AudioCallback processor) @extern("DetachAudioM
// Additional Raylib.c3 Mode helper macros
//----------------------------------------------------------------------------------

/**
* Setup canvas (framebuffer) to start drawing, then calls [block].
* Drawing will end after [block] has finished.
*/
<*
Setup canvas (framebuffer) to start drawing, then calls [block].
Drawing will end after [block] has finished.
*>
macro void @drawing(;@body)
{
beginDrawing();
defer endDrawing();
@body();
}

/**
* Setup 2D mode with custom camera to start 2D Mode, then calls [block].
* Mode2D will end after [block] has finished.
*/
<*
Setup 2D mode with custom camera to start 2D Mode, then calls [block].
Mode2D will end after [block] has finished.
*>
macro void @mode2D(Camera2D camera ;@body)
{
beginMode2D(camera);
defer endMode2D();
@body();
}

/**
* Setup 3D mode with custom camera to start 2D Mode, then calls [block].
* Mode2D will end after [block] has finished.
*/
<*
Setup 3D mode with custom camera to start 2D Mode, then calls [block].
Mode2D will end after [block] has finished.
*>
macro void @mode3D(Camera3D camera ;@body)
{
beginMode3D(camera);
defer endMode3D();
@body();
}

/**
* Setup texture mode to draw to render texture, then calls [block].
* texture mode will end after [block] has finished.
*/
<*
Setup texture mode to draw to render texture, then calls [block].
texture mode will end after [block] has finished.
*>
macro void @textureMode(RenderTexture2D texture ;@body)
{
beginTextureMode(texture);
Expand All @@ -1872,43 +1872,43 @@ macro void @textureMode(RenderTexture2D texture ;@body)
}


/**
* Setup custom shqder mode then calls [block].
* shader mode will end after [block] has finished.
*/
<*
Setup custom shqder mode then calls [block].
shader mode will end after [block] has finished.
*>
macro void @shaderMode(Shader shader ;@body)
{
beginShaderMode(shader);
defer endShaderMode();
@body();
}

/**
* Setup blending mode, then calls [block].
* blend mode will end after [block] has finished.
*/
<*
Setup blending mode, then calls [block].
blend mode will end after [block] has finished.
*>
macro void @blendMode(BlendMode mode ;@body)
{
beginShaderMode(mode);
defer endShaderMode();
@body();
}

/**
* Setup scissor mode then calls [block].
* scissor mode will end after [block] has finished.
*/
<*
Setup scissor mode then calls [block].
scissor mode will end after [block] has finished.
*>
macro void @scissorMode(int x, int y, int width, int height ;@body)
{
beginScissorMode(x, y, width, height);
defer endScissorMode();
@body();
}

/**
* Setup stereo rendering mode, then calls [block].
* stereo rendering mode will end after [block] has finished.
*/
<*
Setup stereo rendering mode, then calls [block].
stereo rendering mode will end after [block] has finished.
*>
macro void @vrMode(VrStereoConfig config ;@body)
{
beginVrStereoMode(config);
Expand Down
64 changes: 32 additions & 32 deletions libraries/raylib55.c3l/raylib.c3i
Original file line number Diff line number Diff line change
Expand Up @@ -1894,43 +1894,43 @@ fn void detachAudioMixedProcessor(AudioCallback processor) @extern("DetachAudioM
// Additional Raylib.c3 Mode helper macros
//----------------------------------------------------------------------------------

/**
* Setup canvas (framebuffer) to start drawing, then calls [block].
* Drawing will end after [block] has finished.
*/
<*
Setup canvas (framebuffer) to start drawing, then calls [block].
Drawing will end after [block] has finished.
*>
macro void @drawing(;@body)
{
beginDrawing();
defer endDrawing();
@body();
}

/**
* Setup 2D mode with custom camera to start 2D Mode, then calls [block].
* Mode2D will end after [block] has finished.
*/
<*
Setup 2D mode with custom camera to start 2D Mode, then calls [block].
Mode2D will end after [block] has finished.
*>
macro void @mode2D(Camera2D camera ;@body)
{
beginMode2D(camera);
defer endMode2D();
@body();
}

/**
* Setup 3D mode with custom camera to start 2D Mode, then calls [block].
* Mode2D will end after [block] has finished.
*/
<*
Setup 3D mode with custom camera to start 2D Mode, then calls [block].
Mode2D will end after [block] has finished.
*>
macro void @mode3D(Camera3D camera ;@body)
{
beginMode3D(camera);
defer endMode3D();
@body();
}

/**
* Setup texture mode to draw to render texture, then calls [block].
* texture mode will end after [block] has finished.
*/
<*
Setup texture mode to draw to render texture, then calls [block].
texture mode will end after [block] has finished.
*>
macro void @textureMode(RenderTexture2D texture ;@body)
{
beginTextureMode(texture);
Expand All @@ -1939,43 +1939,43 @@ macro void @textureMode(RenderTexture2D texture ;@body)
}


/**
* Setup custom shqder mode then calls [block].
* shader mode will end after [block] has finished.
*/
<*
Setup custom shqder mode then calls [block].
shader mode will end after [block] has finished.
*>
macro void @shaderMode(Shader shader ;@body)
{
beginShaderMode(shader);
defer endShaderMode();
@body();
}

/**
* Setup blending mode, then calls [block].
* blend mode will end after [block] has finished.
*/
<*
Setup blending mode, then calls [block].
blend mode will end after [block] has finished.
*>
macro void @blendMode(BlendMode mode ;@body)
{
beginShaderMode(mode);
defer endShaderMode();
@body();
}

/**
* Setup scissor mode then calls [block].
* scissor mode will end after [block] has finished.
*/
<*
Setup scissor mode then calls [block].
scissor mode will end after [block] has finished.
*>
macro void @scissorMode(int x, int y, int width, int height ;@body)
{
beginScissorMode(x, y, width, height);
defer endScissorMode();
@body();
}

/**
* Setup stereo rendering mode, then calls [block].
* stereo rendering mode will end after [block] has finished.
*/
<*
Setup stereo rendering mode, then calls [block].
stereo rendering mode will end after [block] has finished.
*>
macro void @vrMode(VrStereoConfig config ;@body)
{
beginVrStereoMode(config);
Expand Down
Loading

0 comments on commit 58be33c

Please sign in to comment.