Skip to content

Commit

Permalink
Fix folders usage
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Sep 9, 2024
1 parent 74f09d3 commit bca5cb1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 36 deletions.
23 changes: 10 additions & 13 deletions examples/logo/logo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#include "GL/gl.h"
#include "GL/glut.h"

// in 'shared_code'
#include "file_ops.h"

#include "ps2glmesh.h"

/********************************************
Expand Down Expand Up @@ -123,8 +120,8 @@ void init_models(void)
// ps2

ps2_list = glGenLists(7);
mesh = LoadMesh(FILE_PREFIX "ps2.gl");
LoadRTexFile(FILE_PREFIX "plywd_b.rtx", tex_ids[0]);
mesh = LoadMesh("ps2.gl");
LoadRTexFile("plywd_b.rtx", tex_ids[0]);
glNewList(ps2_list, GL_COMPILE);
{
glPushMatrix();
Expand All @@ -137,8 +134,8 @@ void init_models(void)
// gl

gl_list = ps2_list + 1;
mesh = LoadMesh(FILE_PREFIX "gl.gl");
LoadRTexFile(FILE_PREFIX "plywd_y.rtx", tex_ids[1]);
mesh = LoadMesh("gl.gl");
LoadRTexFile("plywd_y.rtx", tex_ids[1]);
glNewList(gl_list, GL_COMPILE);
{
glBindTexture(GL_TEXTURE_2D, tex_ids[1]);
Expand All @@ -149,8 +146,8 @@ void init_models(void)
// wet paint

wet_list = ps2_list + 2;
mesh = LoadMesh(FILE_PREFIX "note.gl");
LoadRTexFile(FILE_PREFIX "wetpaint.rtx", tex_ids[2]);
mesh = LoadMesh("note.gl");
LoadRTexFile("wetpaint.rtx", tex_ids[2]);
glNewList(wet_list, GL_COMPILE);
{
glBindTexture(GL_TEXTURE_2D, tex_ids[2]);
Expand All @@ -162,7 +159,7 @@ void init_models(void)
// circle

circle_list = ps2_list + 3;
mesh = LoadMesh(FILE_PREFIX "cir.gl");
mesh = LoadMesh("cir.gl");
glNewList(circle_list, GL_COMPILE);
{
DrawMesh(mesh);
Expand All @@ -172,7 +169,7 @@ void init_models(void)
// square

square_list = ps2_list + 4;
mesh = LoadMesh(FILE_PREFIX "sq.gl");
mesh = LoadMesh("sq.gl");
glNewList(square_list, GL_COMPILE);
{
DrawMesh(mesh);
Expand All @@ -182,7 +179,7 @@ void init_models(void)
// triangle

tri_list = ps2_list + 5;
mesh = LoadMesh(FILE_PREFIX "tri.gl");
mesh = LoadMesh("tri.gl");
glNewList(tri_list, GL_COMPILE);
{
DrawMesh(mesh);
Expand All @@ -192,7 +189,7 @@ void init_models(void)
// x

x_list = ps2_list + 6;
mesh = LoadMesh(FILE_PREFIX "x.gl");
mesh = LoadMesh("x.gl");
glNewList(x_list, GL_COMPILE);
{
DrawMesh(mesh);
Expand Down
21 changes: 0 additions & 21 deletions examples/shared_code/file_ops.h

This file was deleted.

3 changes: 1 addition & 2 deletions examples/tricked_out/tricked_out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "ps2s/eetimer.h"
#include "ps2s/math.h"

#include "file_ops.h"
#include "text_stuff.h"

#include "billboard_renderer.h"
Expand Down Expand Up @@ -189,7 +188,7 @@ void init_billboards()
void load_bb_texture()
{
// the texture file is just an rgba image with no header info
int tex_fd = open(FILE_PREFIX "car.bin", O_RDONLY);
int tex_fd = open("car.bin", O_RDONLY);
assert(tex_fd != -1);

int image_size = 128 * 128 * 4; // 128x128 32-bit image
Expand Down

0 comments on commit bca5cb1

Please sign in to comment.