Fix ugly formatted arrays

Found via: `rg --multiline "=\n\t*\{\n"`
This commit is contained in:
Desour
2024-03-21 15:22:20 +01:00
committed by sfan5
parent 7cf801244c
commit adc96072cd
24 changed files with 589 additions and 596 deletions

View File

@ -22,14 +22,14 @@ enum E_CULLING_TYPE
};
//! Names for culling type
const c8 *const AutomaticCullingNames[] =
{
"false",
"box", // camera box against node box
"frustum_box", // camera frustum against node box
"frustum_sphere", // camera frustum against node sphere
"occ_query", // occlusion query
0};
const c8 *const AutomaticCullingNames[] = {
"false",
"box", // camera box against node box
"frustum_box", // camera frustum against node box
"frustum_sphere", // camera frustum against node sphere
"occ_query", // occlusion query
0,
};
} // end namespace scene
} // end namespace irr

View File

@ -23,13 +23,13 @@ enum EGUI_ALIGNMENT
};
//! Names for alignments
const c8 *const GUIAlignmentNames[] =
{
"upperLeft",
"lowerRight",
"center",
"scale",
0};
const c8 *const GUIAlignmentNames[] = {
"upperLeft",
"lowerRight",
"center",
"scale",
0,
};
} // namespace gui
} // namespace irr

View File

@ -99,35 +99,35 @@ enum EGUI_ELEMENT_TYPE
};
//! Names for built-in element types
const c8 *const GUIElementTypeNames[] =
{
"button",
"checkBox",
"comboBox",
"contextMenu",
"menu",
"editBox",
"fileOpenDialog",
"colorSelectDialog",
"inOutFader",
"image",
"listBox",
"meshViewer",
"messageBox",
"modalScreen",
"scrollBar",
"spinBox",
"staticText",
"tab",
"tabControl",
"table",
"toolBar",
"treeview",
"window",
"element",
"root",
"profiler",
0};
const c8 *const GUIElementTypeNames[] = {
"button",
"checkBox",
"comboBox",
"contextMenu",
"menu",
"editBox",
"fileOpenDialog",
"colorSelectDialog",
"inOutFader",
"image",
"listBox",
"meshViewer",
"messageBox",
"modalScreen",
"scrollBar",
"spinBox",
"staticText",
"tab",
"tabControl",
"table",
"toolBar",
"treeview",
"window",
"element",
"root",
"profiler",
0,
};
} // end namespace gui
} // end namespace irr

View File

@ -58,14 +58,14 @@ enum E_MATERIAL_TYPE
};
//! Array holding the built in material type names
const char *const sBuiltInMaterialTypeNames[] =
{
"solid",
"trans_alphach",
"trans_alphach_ref",
"trans_vertex_alpha",
"onetexture_blend",
0};
const char *const sBuiltInMaterialTypeNames[] = {
"solid",
"trans_alphach",
"trans_alphach_ref",
"trans_vertex_alpha",
"onetexture_blend",
0,
};
constexpr u32 numBuiltInMaterials =
sizeof(sBuiltInMaterialTypeNames) / sizeof(char *) - 1;

View File

@ -19,16 +19,16 @@ enum E_VERTEX_ATTRIBUTES
};
//! Array holding the built in vertex attribute names
const char *const sBuiltInVertexAttributeNames[] =
{
"inVertexPosition",
"inVertexNormal",
"inVertexColor",
"inTexCoord0",
"inTexCoord1",
"inVertexTangent",
"inVertexBinormal",
0};
const char *const sBuiltInVertexAttributeNames[] = {
"inVertexPosition",
"inVertexNormal",
"inVertexColor",
"inTexCoord0",
"inTexCoord1",
"inVertexTangent",
"inVertexBinormal",
0,
};
} // end namespace video
} // end namespace irr

View File

@ -40,13 +40,12 @@ enum E_BONE_SKINNING_SPACE
};
//! Names for bone animation modes
const c8 *const BoneAnimationModeNames[] =
{
"automatic",
"animated",
"unanimated",
0,
};
const c8 *const BoneAnimationModeNames[] = {
"automatic",
"animated",
"unanimated",
0,
};
//! Interface for bones used for skeletal animation.
/** Used with ISkinnedMesh and IAnimatedMeshSceneNode. */

View File

@ -41,22 +41,22 @@ enum ECURSOR_ICON
};
//! Names for ECURSOR_ICON
const c8 *const GUICursorIconNames[ECI_COUNT + 1] =
{
"normal",
"cross",
"hand",
"help",
"ibeam",
"no",
"wait",
"sizeall",
"sizenesw",
"sizenwse",
"sizens",
"sizewe",
"sizeup",
0};
const c8 *const GUICursorIconNames[ECI_COUNT + 1] = {
"normal",
"cross",
"hand",
"help",
"ibeam",
"no",
"wait",
"sizeall",
"sizenesw",
"sizenwse",
"sizens",
"sizewe",
"sizeup",
0,
};
//! structure used to set sprites as cursors.
struct SCursorSprite

View File

@ -45,17 +45,16 @@ enum EGUI_BUTTON_STATE
};
//! Names for gui button state icons
const c8 *const GUIButtonStateNames[EGBS_COUNT + 1] =
{
"buttonUp",
"buttonDown",
"buttonMouseOver",
"buttonMouseOff",
"buttonFocused",
"buttonNotFocused",
"buttonDisabled",
0 // count
};
const c8 *const GUIButtonStateNames[EGBS_COUNT + 1] = {
"buttonUp",
"buttonDown",
"buttonMouseOver",
"buttonMouseOff",
"buttonFocused",
"buttonNotFocused",
"buttonDisabled",
0, // count
};
//! State of buttons used for drawing texture images.
//! Note that only a single state is active at a time
@ -87,19 +86,18 @@ enum EGUI_BUTTON_IMAGE_STATE
};
//! Names for gui button image states
const c8 *const GUIButtonImageStateNames[EGBIS_COUNT + 1] =
{
"Image", // not "ImageUp" as it otherwise breaks serialization of old files
"ImageUpOver",
"ImageUpFocused",
"ImageUpFocusedOver",
"PressedImage", // not "ImageDown" as it otherwise breaks serialization of old files
"ImageDownOver",
"ImageDownFocused",
"ImageDownFocusedOver",
"ImageDisabled",
0 // count
};
const c8 *const GUIButtonImageStateNames[EGBIS_COUNT + 1] = {
"Image", // not "ImageUp" as it otherwise breaks serialization of old files
"ImageUpOver",
"ImageUpFocused",
"ImageUpFocusedOver",
"PressedImage", // not "ImageDown" as it otherwise breaks serialization of old files
"ImageDownOver",
"ImageDownFocused",
"ImageDownFocusedOver",
"ImageDisabled",
0, // count
};
//! GUI Button interface.
/** \par This element can create the following events of type EGUI_EVENT_TYPE:

View File

@ -45,14 +45,13 @@ enum EGUI_SKIN_TYPE
};
//! Names for gui element types
const c8 *const GUISkinTypeNames[EGST_COUNT + 1] =
{
"windowsClassic",
"windowsMetallic",
"burning",
"unknown",
0,
};
const c8 *const GUISkinTypeNames[EGST_COUNT + 1] = {
"windowsClassic",
"windowsMetallic",
"burning",
"unknown",
0,
};
//! Enumeration for skin colors
enum EGUI_DEFAULT_COLOR
@ -114,35 +113,34 @@ enum EGUI_DEFAULT_COLOR
};
//! Names for default skin colors
const c8 *const GUISkinColorNames[EGDC_COUNT + 1] =
{
"3DDarkShadow",
"3DShadow",
"3DFace",
"3DHighlight",
"3DLight",
"ActiveBorder",
"ActiveCaption",
"AppWorkspace",
"ButtonText",
"GrayText",
"Highlight",
"HighlightText",
"InactiveBorder",
"InactiveCaption",
"ToolTip",
"ToolTipBackground",
"ScrollBar",
"Window",
"WindowSymbol",
"Icon",
"IconHighlight",
"GrayWindowSymbol",
"Editable",
"GrayEditable",
"FocusedEditable",
0,
};
const c8 *const GUISkinColorNames[EGDC_COUNT + 1] = {
"3DDarkShadow",
"3DShadow",
"3DFace",
"3DHighlight",
"3DLight",
"ActiveBorder",
"ActiveCaption",
"AppWorkspace",
"ButtonText",
"GrayText",
"Highlight",
"HighlightText",
"InactiveBorder",
"InactiveCaption",
"ToolTip",
"ToolTipBackground",
"ScrollBar",
"Window",
"WindowSymbol",
"Icon",
"IconHighlight",
"GrayWindowSymbol",
"Editable",
"GrayEditable",
"FocusedEditable",
0,
};
//! Enumeration for default sizes.
enum EGUI_DEFAULT_SIZE
@ -200,32 +198,32 @@ enum EGUI_DEFAULT_SIZE
};
//! Names for default skin sizes
const c8 *const GUISkinSizeNames[EGDS_COUNT + 1] =
{
"ScrollBarSize",
"MenuHeight",
"WindowButtonWidth",
"CheckBoxWidth",
"MessageBoxWidth",
"MessageBoxHeight",
"ButtonWidth",
"ButtonHeight",
"TextDistanceX",
"TextDistanceY",
"TitleBarTextX",
"TitleBarTextY",
"MessageBoxGapSpace",
"MessageBoxMinTextWidth",
"MessageBoxMaxTextWidth",
"MessageBoxMinTextHeight",
"MessageBoxMaxTextHeight",
"ButtonPressedImageOffsetX",
"ButtonPressedImageOffsetY",
"ButtonPressedTextOffsetX",
"ButtonPressedTextOffsetY",
"ButtonPressedSpriteOffsetX",
"ButtonPressedSpriteOffsetY",
0};
const c8 *const GUISkinSizeNames[EGDS_COUNT + 1] = {
"ScrollBarSize",
"MenuHeight",
"WindowButtonWidth",
"CheckBoxWidth",
"MessageBoxWidth",
"MessageBoxHeight",
"ButtonWidth",
"ButtonHeight",
"TextDistanceX",
"TextDistanceY",
"TitleBarTextX",
"TitleBarTextY",
"MessageBoxGapSpace",
"MessageBoxMinTextWidth",
"MessageBoxMaxTextWidth",
"MessageBoxMinTextHeight",
"MessageBoxMaxTextHeight",
"ButtonPressedImageOffsetX",
"ButtonPressedImageOffsetY",
"ButtonPressedTextOffsetX",
"ButtonPressedTextOffsetY",
"ButtonPressedSpriteOffsetX",
"ButtonPressedSpriteOffsetY",
0,
};
enum EGUI_DEFAULT_TEXT
{
@ -251,17 +249,17 @@ enum EGUI_DEFAULT_TEXT
};
//! Names for default skin sizes
const c8 *const GUISkinTextNames[EGDT_COUNT + 1] =
{
"MessageBoxOkay",
"MessageBoxCancel",
"MessageBoxYes",
"MessageBoxNo",
"WindowButtonClose",
"WindowButtonMaximize",
"WindowButtonMinimize",
"WindowButtonRestore",
0};
const c8 *const GUISkinTextNames[EGDT_COUNT + 1] = {
"MessageBoxOkay",
"MessageBoxCancel",
"MessageBoxYes",
"MessageBoxNo",
"WindowButtonClose",
"WindowButtonMaximize",
"WindowButtonMinimize",
"WindowButtonRestore",
0,
};
//! Customizable symbols for GUI
enum EGUI_DEFAULT_ICON
@ -318,32 +316,32 @@ enum EGUI_DEFAULT_ICON
EGDI_COUNT
};
const c8 *const GUISkinIconNames[EGDI_COUNT + 1] =
{
"windowMaximize",
"windowRestore",
"windowClose",
"windowMinimize",
"windowResize",
"cursorUp",
"cursorDown",
"cursorLeft",
"cursorRight",
"menuMore",
"checkBoxChecked",
"dropDown",
"smallCursorUp",
"smallCursorDown",
"radioButtonChecked",
"moreLeft",
"moreRight",
"moreUp",
"moreDown",
"expand",
"collapse",
"file",
"directory",
0};
const c8 *const GUISkinIconNames[EGDI_COUNT + 1] = {
"windowMaximize",
"windowRestore",
"windowClose",
"windowMinimize",
"windowResize",
"cursorUp",
"cursorDown",
"cursorLeft",
"cursorRight",
"menuMore",
"checkBoxChecked",
"dropDown",
"smallCursorUp",
"smallCursorDown",
"radioButtonChecked",
"moreLeft",
"moreRight",
"moreUp",
"moreDown",
"expand",
"collapse",
"file",
"directory",
0,
};
// Customizable fonts
enum EGUI_DEFAULT_FONT
@ -363,14 +361,14 @@ enum EGUI_DEFAULT_FONT
EGDF_COUNT
};
const c8 *const GUISkinFontNames[EGDF_COUNT + 1] =
{
"defaultFont",
"buttonFont",
"windowFont",
"menuFont",
"tooltipFont",
0};
const c8 *const GUISkinFontNames[EGDF_COUNT + 1] = {
"defaultFont",
"buttonFont",
"windowFont",
"menuFont",
"tooltipFont",
0,
};
//! A skin modifies the look of the GUI elements.
class IGUISkin : virtual public IReferenceCounted

View File

@ -107,12 +107,12 @@ enum E_FOG_TYPE
EFT_FOG_EXP2
};
const c8 *const FogTypeNames[] =
{
"FogExp",
"FogLinear",
"FogExp2",
0};
const c8 *const FogTypeNames[] = {
"FogExp",
"FogLinear",
"FogExp2",
0,
};
//! Interface to driver which is able to perform 2d and 3d graphics functions.
/** This interface is one of the most important interfaces of

View File

@ -31,12 +31,12 @@ enum E_VERTEX_TYPE
};
//! Array holding the built in vertex type names
const char *const sBuiltInVertexTypeNames[] =
{
"standard",
"2tcoords",
"tangents",
0};
const char *const sBuiltInVertexTypeNames[] = {
"standard",
"2tcoords",
"tangents",
0,
};
//! standard vertex used by the Irrlicht engine.
struct S3DVertex

View File

@ -88,27 +88,27 @@ enum ECOLOR_FORMAT
};
//! Names for ECOLOR_FORMAT types
const c8 *const ColorFormatNames[ECF_UNKNOWN + 2] =
{
"A1R5G5B5",
"R5G6B5",
"R8G8B8",
"A8R8G8B8",
"R16F",
"G16R16F",
"A16B16G16R16F",
"R32F",
"G32R32F",
"A32B32G32R32F",
"R8",
"R8G8",
"R16",
"R16G16",
"D16",
"D32",
"D24S8",
"UNKNOWN",
0};
const c8 *const ColorFormatNames[ECF_UNKNOWN + 2] = {
"A1R5G5B5",
"R5G6B5",
"R8G8B8",
"A8R8G8B8",
"R16F",
"G16R16F",
"A16B16G16R16F",
"R32F",
"G32R32F",
"A32B32G32R32F",
"R8",
"R8G8",
"R16",
"R16G16",
"D16",
"D32",
"D24S8",
"UNKNOWN",
0,
};
//! Creates a 16 bit A1R5G5B5 color
inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a = 0xFF)

View File

@ -219,11 +219,11 @@ enum E_COLOR_MATERIAL
};
//! Names for polygon offset direction
const c8 *const PolygonOffsetDirectionNames[] =
{
"Back",
"Front",
0};
const c8 *const PolygonOffsetDirectionNames[] = {
"Back",
"Front",
0,
};
//! For SMaterial.ZWriteEnable
enum E_ZWRITE
@ -243,12 +243,12 @@ enum E_ZWRITE
};
//! Names for E_ZWRITE
const c8 *const ZWriteNames[] =
{
"Off",
"Auto",
"On",
0};
const c8 *const ZWriteNames[] = {
"Off",
"Auto",
"On",
0,
};
//! Maximum number of texture an SMaterial can have.
/** SMaterial might ignore some textures in most function, like assignment and comparison,