Skip to content

Commit 1769a9d

Browse files
committed
Fix warnings
1 parent 17dee44 commit 1769a9d

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/compilation.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ jobs:
4444
run: |
4545
git clone https://github.com/fjtrujy/openvcl.git
4646
cd openvcl
47-
git checkout ps2gl
48-
make -j $(getconf _NPROCESSORS_ONLN) clean
49-
make -j $(getconf _NPROCESSORS_ONLN)
50-
make -j $(getconf _NPROCESSORS_ONLN) install
47+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$PS2DEV" -DBUILD_TESTING=OFF
48+
cmake --build build -j $(getconf _NPROCESSORS_ONLN)
49+
cmake --install build
5150
5251
5352
- name: Configure with CMake

examples/logo/logo.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct rtHeader {
4343
* prototypes
4444
*/
4545

46-
rtHeader* LoadRTexFile(char* fileName, unsigned int texName);
46+
rtHeader* LoadRTexFile(const char* fileName, unsigned int texName);
4747
ps2glMeshHeader* LoadMesh(const char* fileName);
4848
void DrawMesh(const void* header);
4949

@@ -451,7 +451,7 @@ void special(int key, int x, int y)
451451
* mesh and textures
452452
*/
453453

454-
void* ReadFile(char* name, unsigned int& size, int pad)
454+
void* ReadFile(const char* name, unsigned int& size, int pad)
455455
{
456456
int infile = -1;
457457
void* buffer = 0;
@@ -503,7 +503,7 @@ ps2glMeshHeader*
503503
LoadMesh(const char* fileName)
504504
{
505505
unsigned int size;
506-
return (ps2glMeshHeader*)ReadFile((char*)fileName, size, 0);
506+
return (ps2glMeshHeader*)ReadFile(fileName, size, 0);
507507
}
508508

509509
void DrawMesh(const void* header)
@@ -536,12 +536,13 @@ void DrawMesh(const void* header)
536536
#define RTEX_FORMAT_RGBA8 1
537537
#define RTEX_FORMAT_INDEX8 2 // 256 colour palette
538538

539-
#include "ps2s/types.h" // for uint128_t
539+
// 128-bit QWord used only for CLUT reordering — no ps2stuff dependency needed.
540+
struct pgl_qword_t { unsigned int v[4]; };
540541

541542
void reorderClut(unsigned int* clut)
542543
{
543-
uint128_t buffer, *entries_1, *entries_2;
544-
entries_1 = (uint128_t*)clut + 2;
544+
pgl_qword_t buffer, *entries_1, *entries_2;
545+
entries_1 = (pgl_qword_t*)clut + 2;
545546
entries_2 = entries_1 + 2;
546547
unsigned int i;
547548
for (i = 0; i < 8; i++) {
@@ -562,7 +563,7 @@ void reorderClut(unsigned int* clut)
562563
}
563564

564565
rtHeader*
565-
LoadRTexFile(char* fileName, unsigned int texName)
566+
LoadRTexFile(const char* fileName, unsigned int texName)
566567
{
567568
rtHeader* ramImage = NULL;
568569

0 commit comments

Comments
 (0)