-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f66b90
commit 9dec35c
Showing
12 changed files
with
254 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
build/ | ||
.vscode/ | ||
LICENSE*.DAT | ||
*.frag | ||
*.vert | ||
*.lua | ||
pcsx.json | ||
*.mcd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#include <psxgte.h> | ||
#include "../src/display.h" | ||
|
||
int cube_num_faces = 6; | ||
|
||
const SVECTOR cube_verts[] = { | ||
{75,-75,75}, | ||
{75,-75,-75}, | ||
{75,75,75}, | ||
{75,75,-75}, | ||
{-75,-75,75}, | ||
{-75,-75,-75}, | ||
{-75,75,75}, | ||
{-75,75,-75} | ||
}; | ||
|
||
const SVECTOR cube_norms[] = { | ||
{0.0,-0.0,1.0}, | ||
{0.0,-1.0,0.0}, | ||
{-1.0,-0.0,0.0}, | ||
{0.0,-0.0,-1.0}, | ||
{1.0,-0.0,0.0}, | ||
{0.0,1.0,0.0} | ||
}; | ||
|
||
const INDEX cube_vertex_indices[] = { | ||
{0,4,2,6}, | ||
{3,2,7,6}, | ||
{7,6,5,4}, | ||
{5,1,7,3}, | ||
{1,0,3,2}, | ||
{5,4,1,0} | ||
}; | ||
|
||
const INDEX cube_uv_indices[] = { | ||
{0,1,3,2}, | ||
{4,5,6,2}, | ||
{7,8,10,9}, | ||
{11,12,6,13}, | ||
{14,15,17,16}, | ||
{11,1,19,18} | ||
}; | ||
|
||
const int cube_normal_indices[] = { | ||
2, | ||
7, | ||
5, | ||
7, | ||
3, | ||
1}; | ||
|
||
const SVECTOR cube_uv[] = { | ||
{0,0}, | ||
{127,0}, | ||
{127,127}, | ||
{0,127}, | ||
{0,0}, | ||
{127,0}, | ||
{0,127}, | ||
{0,0}, | ||
{127,0}, | ||
{127,127}, | ||
{0,127}, | ||
{0,0}, | ||
{127,0}, | ||
{127,127}, | ||
{0,0}, | ||
{127,0}, | ||
{127,127}, | ||
{0,127}, | ||
{127,127}, | ||
{0,127} | ||
}; | ||
|
||
void fillMesh_cube(MESH* mesh) { | ||
mesh->faces_num = cube_num_faces; | ||
|
||
mesh->normal_data = &cube_norms; | ||
mesh->normal_indices = &cube_normal_indices; | ||
mesh->uv_data = &cube_uv; | ||
mesh->uv_indices = &cube_uv_indices; | ||
mesh->vertex_data = &cube_verts; | ||
mesh->vertex_indices = &cube_vertex_indices; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "texture.h" | ||
|
||
void loadTexture(uint32_t* textureData, TEXTURE* texture) { | ||
GetTimInfo(textureData, texture->tim); | ||
|
||
LoadImage(texture->tim->prect, texture->tim->paddr); | ||
DrawSync(0); | ||
|
||
if (texture->tim->mode & 8) { | ||
LoadImage(texture->tim->crect, texture->tim->caddr); | ||
DrawSync(0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "display.h" | ||
|
||
void loadTexture(uint32_t* textureData, TEXTURE* texture); | ||
|
Binary file not shown.