mirror of
https://github.com/AntonioND/nitro-engine.git
synced 2025-06-18 16:45:33 -04:00
examples: library: docs: Fix "properties" typo everywhere
Function names have also been changed, but this patch adds defines to preserve compatibility with old names for the time being.
This commit is contained in:
parent
4d0066465e
commit
83dd805fe8
@ -1,6 +1,12 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
Version 0.DEV (XXXX-XX-XX)
|
||||
--------------------------
|
||||
|
||||
- Fix "properties" typo. This involves renaming some functions, but compatibilty
|
||||
definitions have been added.
|
||||
|
||||
Version 0.10.0 (2024-01-28)
|
||||
---------------------------
|
||||
|
||||
@ -196,9 +202,9 @@ Version 0.6.0 (2009-6-30)
|
||||
- The functions used to modify textures and palettes now return a pointer to the
|
||||
data so that you can modify them easily.
|
||||
|
||||
- Each material can have different propierties (amient, diffuse...). You can set
|
||||
the default ones, the propierties each new material will have, and then you
|
||||
can set each material's propierties individually.
|
||||
- Each material can have different properties (amient, diffuse...). You can set
|
||||
the default ones, the properties each new material will have, and then you
|
||||
can set each material's properties individually.
|
||||
|
||||
- New texture and palette allocation system, it is faster and better.
|
||||
Defragmenting functions don't work now, but I'll fix them for the next
|
||||
|
@ -63,8 +63,8 @@ int main(void)
|
||||
// Assign material to the model
|
||||
NE_ModelSetMaterial(Model, Material);
|
||||
|
||||
// Set some propierties to the material
|
||||
NE_MaterialSetPropierties(Material,
|
||||
// Set some properties to the material
|
||||
NE_MaterialSetProperties(Material,
|
||||
RGB15(24, 24, 24), // Diffuse
|
||||
RGB15(8, 8, 8), // Ambient
|
||||
RGB15(0, 0, 0), // Specular
|
||||
|
@ -76,21 +76,21 @@ int main(void)
|
||||
NE_ModelSetMaterial(ModelSpecular, MaterialSpecular);
|
||||
NE_ModelSetMaterial(ModelDiffuse, MaterialDiffuse);
|
||||
|
||||
// Set some propierties to the materials
|
||||
// Set some properties to the materials
|
||||
|
||||
NE_MaterialSetPropierties(MaterialSpecular,
|
||||
RGB15(0, 0, 0), // Diffuse
|
||||
RGB15(0, 0, 0), // Ambient
|
||||
RGB15(31, 31, 31), // Specular
|
||||
RGB15(0, 0, 0), // Emission
|
||||
false, true); // Vtx color, use shininess table
|
||||
NE_MaterialSetProperties(MaterialSpecular,
|
||||
RGB15(0, 0, 0), // Diffuse
|
||||
RGB15(0, 0, 0), // Ambient
|
||||
RGB15(31, 31, 31), // Specular
|
||||
RGB15(0, 0, 0), // Emission
|
||||
false, true); // Vtx color, use shininess table
|
||||
|
||||
NE_MaterialSetPropierties(MaterialDiffuse,
|
||||
RGB15(31, 31, 31), // Diffuse
|
||||
RGB15(0, 0, 0), // Ambient
|
||||
RGB15(0, 0, 0), // Specular
|
||||
RGB15(0, 0, 0), // Emission
|
||||
false, false); // Vtx color, use shininess table
|
||||
NE_MaterialSetProperties(MaterialDiffuse,
|
||||
RGB15(31, 31, 31), // Diffuse
|
||||
RGB15(0, 0, 0), // Ambient
|
||||
RGB15(0, 0, 0), // Specular
|
||||
RGB15(0, 0, 0), // Emission
|
||||
false, false); // Vtx color, use shininess table
|
||||
|
||||
// Set light color and direction
|
||||
NE_LightSet(0, NE_White, 0, 1, 0);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
/// @defgroup other_functions Other functions
|
||||
///
|
||||
/// Some functions to set lights and its propierties, to draw polygons, configure
|
||||
/// Some functions to set lights and its properties, to draw polygons, configure
|
||||
/// the rear plane, etc...
|
||||
///
|
||||
/// @{
|
||||
@ -265,7 +265,7 @@ void NE_OutliningSetColor(u32 index, u32 color);
|
||||
|
||||
/// Setup shading tables for toon shading.
|
||||
///
|
||||
/// For the shading to look nice, change the propierties of materials affecte
|
||||
/// For the shading to look nice, change the properties of materials affecte
|
||||
/// by this to, for example:
|
||||
///
|
||||
/// - AMBIENT = RGB15(8, 8, 8)
|
||||
|
@ -307,7 +307,7 @@ int NE_TextureGetRealSizeX(const NE_Material *tex);
|
||||
/// @return Returns the size in pixels.
|
||||
int NE_TextureGetRealSizeY(const NE_Material *tex);
|
||||
|
||||
/// Sets lighting propierties of this material.
|
||||
/// Sets lighting properties of this material.
|
||||
///
|
||||
/// @param tex Material to modify.
|
||||
/// @param diffuse Set diffuse color: lights that directly hits the polygon.
|
||||
@ -319,11 +319,17 @@ int NE_TextureGetRealSizeY(const NE_Material *tex);
|
||||
/// @param vtxcolor If true, diffuse reflection will work as a color command.
|
||||
/// @param useshininess If true, specular reflection will use the shininess
|
||||
/// table.
|
||||
void NE_MaterialSetPropierties(NE_Material *tex, u32 diffuse, u32 ambient,
|
||||
u32 specular, u32 emission, bool vtxcolor,
|
||||
bool useshininess);
|
||||
void NE_MaterialSetProperties(NE_Material *tex, u32 diffuse, u32 ambient,
|
||||
u32 specular, u32 emission, bool vtxcolor,
|
||||
bool useshininess);
|
||||
|
||||
/// Sets default lighting propierties of materials when they are created.
|
||||
/// Alias of NE_MaterialSetProperties
|
||||
///
|
||||
/// @deprecated This definition is only present for backwards compatibility and
|
||||
/// it will be removed.
|
||||
#define NE_MaterialSetPropierties NE_MaterialSetProperties
|
||||
|
||||
/// Sets default lighting properties of materials when they are created.
|
||||
///
|
||||
/// @param diffuse Set diffuse color: lights that directly hits the polygon.
|
||||
/// @param ambient Set ambient color: lights that indirectly hit the polygon
|
||||
@ -334,9 +340,15 @@ void NE_MaterialSetPropierties(NE_Material *tex, u32 diffuse, u32 ambient,
|
||||
/// @param vtxcolor If true, diffuse reflection will work as a color command.
|
||||
/// @param useshininess If true, specular reflection will use the shininess
|
||||
/// table.
|
||||
void NE_MaterialSetDefaultPropierties(u32 diffuse, u32 ambient, u32 specular,
|
||||
u32 emission, bool vtxcolor,
|
||||
bool useshininess);
|
||||
void NE_MaterialSetDefaultProperties(u32 diffuse, u32 ambient, u32 specular,
|
||||
u32 emission, bool vtxcolor,
|
||||
bool useshininess);
|
||||
|
||||
/// Alias of NE_MaterialSetDefaultProperties
|
||||
///
|
||||
/// @deprecated This definition is only present for backwards compatibility and
|
||||
/// it will be removed.
|
||||
#define NE_MaterialSetDefaultPropierties NE_MaterialSetDefaultProperties
|
||||
|
||||
/// Enables modification of the specified texture.
|
||||
///
|
||||
|
@ -273,9 +273,9 @@ static void ne_init_registers(void)
|
||||
NE_ShininessTableGenerate(NE_SHININESS_CUBIC);
|
||||
|
||||
// setup default material properties
|
||||
NE_MaterialSetDefaultPropierties(RGB15(20, 20, 20), RGB15(16, 16, 16),
|
||||
RGB15(8, 8, 8), RGB15(5, 5, 5),
|
||||
false, true);
|
||||
NE_MaterialSetDefaultProperties(RGB15(20, 20, 20), RGB15(16, 16, 16),
|
||||
RGB15(8, 8, 8), RGB15(5, 5, 5),
|
||||
false, true);
|
||||
|
||||
// Turn off some things...
|
||||
for (int i = 0; i < 4; i++)
|
||||
|
@ -28,7 +28,7 @@ static bool ne_texture_system_inited = false;
|
||||
|
||||
static int NE_MAX_TEXTURES;
|
||||
|
||||
// Default material propierties
|
||||
// Default material properties
|
||||
static u32 ne_default_diffuse_ambient;
|
||||
static u32 ne_default_specular_emission;
|
||||
|
||||
@ -914,18 +914,18 @@ int NE_TextureGetSizeY(const NE_Material *tex)
|
||||
return NE_Texture[tex->texindex].sizey;
|
||||
}
|
||||
|
||||
void NE_MaterialSetPropierties(NE_Material *tex, u32 diffuse,
|
||||
u32 ambient, u32 specular, u32 emission,
|
||||
bool vtxcolor, bool useshininess)
|
||||
void NE_MaterialSetProperties(NE_Material *tex, u32 diffuse,
|
||||
u32 ambient, u32 specular, u32 emission,
|
||||
bool vtxcolor, bool useshininess)
|
||||
{
|
||||
NE_AssertPointer(tex, "NULL pointer");
|
||||
tex->diffuse_ambient = diffuse | (ambient << 16) | (vtxcolor << 15);
|
||||
tex->specular_emission = specular | (emission << 16) | (useshininess << 15);
|
||||
}
|
||||
|
||||
void NE_MaterialSetDefaultPropierties(u32 diffuse, u32 ambient,
|
||||
u32 specular, u32 emission,
|
||||
bool vtxcolor, bool useshininess)
|
||||
void NE_MaterialSetDefaultProperties(u32 diffuse, u32 ambient,
|
||||
u32 specular, u32 emission,
|
||||
bool vtxcolor, bool useshininess)
|
||||
{
|
||||
ne_default_diffuse_ambient = diffuse | (ambient << 16) | (vtxcolor << 15);
|
||||
ne_default_specular_emission = specular | (emission << 16)
|
||||
|
Loading…
Reference in New Issue
Block a user