Clean up build.zig and examples
This commit affects the build.zig and examples files. It reformats the code to meet a 120 column limit. It also adjusts comments so that there is a space after the comment symbol '//' and the grammar in the comments has been fixed.
This commit is contained in:
parent
4dbbea186e
commit
a378960088
9 changed files with 219 additions and 71 deletions
|
|
@ -28,7 +28,7 @@ pub fn main() anyerror!void {
|
|||
|
||||
var model = LoadModel(resourceDir ++ "models/castle.obj"); // Load model
|
||||
var texture = LoadTexture(resourceDir ++ "models/castle_diffuse.png"); // Load model texture
|
||||
model.materials[0].maps[@enumToInt(MAP_DIFFUSE)].texture = texture; // Set map diffuse texture
|
||||
model.materials[0].maps[@intFromEnum(MAP_DIFFUSE)].texture = texture; // Set map diffuse texture
|
||||
|
||||
var position = Vector3{ .x = 0.0, .y = 0.0, .z = 0.0 }; // Set model position
|
||||
|
||||
|
|
@ -64,7 +64,8 @@ pub fn main() anyerror!void {
|
|||
{
|
||||
UnloadModel(model); // Unload previous model
|
||||
model = LoadModel(droppedFiles[0]); // Load new model
|
||||
model.materials[0].maps[@enumToInt(MAP_DIFFUSE)].texture = texture; // Set current map diffuse texture
|
||||
// Set current map diffuse texture
|
||||
model.materials[0].maps[@intFromEnum(MAP_DIFFUSE)].texture = texture;
|
||||
|
||||
bounds = MeshBoundingBox(model.meshes[0]);
|
||||
|
||||
|
|
@ -74,7 +75,7 @@ pub fn main() anyerror!void {
|
|||
// Unload current model texture and load new one
|
||||
UnloadTexture(texture);
|
||||
texture = LoadTexture(droppedFiles[0]);
|
||||
model.materials[0].maps[@enumToInt(MAP_DIFFUSE)].texture = texture;
|
||||
model.materials[0].maps[@intFromEnum(MAP_DIFFUSE)].texture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue