mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
add some more comments
This commit is contained in:
parent
45b389442c
commit
118465330f
@ -415,7 +415,8 @@ void Drawer2D_ReducePadding_Height(int* height, int point, int scale) {
|
||||
*height -= padding * 2;
|
||||
}
|
||||
|
||||
void Drawer2D_Underline(Bitmap* bmp, int x, int y, int width, int height, BitmapCol col) {
|
||||
/* Quickly fills the given box region */
|
||||
static void Drawer2D_Underline(Bitmap* bmp, int x, int y, int width, int height, BitmapCol col) {
|
||||
BitmapCol* row;
|
||||
int xx, yy;
|
||||
|
||||
|
@ -55,7 +55,6 @@ CC_API void Drawer2D_BmpCopy(Bitmap* dst, int x, int y, Bitmap* src);
|
||||
/* Fills the area with the given colour. */
|
||||
CC_API void Drawer2D_Clear(Bitmap* bmp, BitmapCol col, int x, int y, int width, int height);
|
||||
|
||||
void Drawer2D_Underline(Bitmap* bmp, int x, int y, int width, int height, BitmapCol col);
|
||||
/* Draws text using the given font at the given coordinates. */
|
||||
CC_API void Drawer2D_DrawText(Bitmap* bmp, struct DrawTextArgs* args, int x, int y);
|
||||
/* Returns how wide the given text would be when drawn. */
|
||||
|
20
src/Logger.h
20
src/Logger.h
@ -1,5 +1,5 @@
|
||||
#ifndef CC_ERRORHANDLER_H
|
||||
#define CC_ERRORHANDLER_H
|
||||
#ifndef CC_LOGGER_H
|
||||
#define CC_LOGGER_H
|
||||
#include "String.h"
|
||||
/* Support methods for logging errors.
|
||||
Copyright 2014-2019 ClassiCube | Licensed under BSD-3
|
||||
@ -12,20 +12,24 @@ typedef void (*Logger_DoWarn)(const String* msg);
|
||||
extern Logger_DoWarn Logger_WarnFunc;
|
||||
/* The title shown for warning dialogs. */
|
||||
extern const char* Logger_DialogTitle;
|
||||
/* Shows a warning message box with the given message. */
|
||||
void Logger_DialogWarn(const String* msg);
|
||||
|
||||
/* Informs the user about a non-fatal error, with a message of form: "Error [result] when [place] */
|
||||
/* Informs the user about a non-fatal error. */
|
||||
/* Format: "Error [result] when [place]" */
|
||||
void Logger_SimpleWarn(cc_result res, const char* place);
|
||||
/* Informs the user about a non-fatal error, with a message of form: "Error [result] when [place] '[path]' */
|
||||
/* Informs the user about a non-fatal error. */
|
||||
/* Format: "Error [result] when [place] '[path]'" */
|
||||
void Logger_SimpleWarn2(cc_result res, const char* place, const String* path);
|
||||
/* Informs the user about a non-fatal error, with a message of either:
|
||||
"Error [error desc] ([result]) when [place] or "Error [result] when [place] */
|
||||
/* Informs the user about a non-fatal error, with an optional meaning message. */
|
||||
/* Format: "Error [result] when [place] \n Error meaning: [desc]" */
|
||||
void Logger_SysWarn(cc_result res, const char* place, Logger_DescribeError describeErr);
|
||||
/* Informs the user about a non-fatal error, with a message of either:
|
||||
"Error [error desc] ([result]) when [place] 'path' or "Error [result] when [place] 'path' */
|
||||
/* Informs the user about a non-fatal error, with an optional meaning message. */
|
||||
/* Format: "Error [result] when [place] '[path]' \n Error meaning: [desc]" */
|
||||
void Logger_SysWarn2(cc_result res, const char* place, const String* path, Logger_DescribeError describeErr);
|
||||
|
||||
/* Shows a warning for a failed DynamicLib_Load2/Get2 call. */
|
||||
/* Format: "Error [place] '[path]' \n Error meaning: [desc]" */
|
||||
void Logger_DynamicLibWarn(const char* place, const String* path);
|
||||
/* Shortcut for Logger_SysWarn with Platform_DescribeError */
|
||||
void Logger_Warn(cc_result res, const char* place);
|
||||
|
@ -29,8 +29,11 @@ struct RayTracer {
|
||||
Face Closest; /* Face of the intersected block that is closet to the player */
|
||||
};
|
||||
|
||||
/* Marks the given ray tracer as having no result. */
|
||||
void RayTracer_SetInvalid(struct RayTracer* t);
|
||||
/* Initialises the given ray tracer with the given origin and direction. */
|
||||
void RayTracer_Init(struct RayTracer* t, const Vec3* origin, const Vec3* dir);
|
||||
/* Moves to next grid cell position on the ray. */
|
||||
void RayTracer_Step(struct RayTracer* t);
|
||||
|
||||
/* Determines the picked block based on the given origin and direction vector.
|
||||
|
Loading…
x
Reference in New Issue
Block a user