Merge branch 'skmp/refsw-and-kos-fixes' into 'main'

refsw and kos fixes

See merge request skmp/dca3-game!100
This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis
2025-05-07 07:30:02 +00:00
4 changed files with 10 additions and 2 deletions

View File

@@ -188,6 +188,10 @@ void RenderParamTags(int tileX, int tileY) {
tagStatus[index].rendered = true; tagStatus[index].rendered = true;
} }
} }
if (rm == RM_TRANSLUCENT_PRESORT) {
tagStatus[index].valid = false;
}
} }
} }
} }

View File

@@ -24,7 +24,7 @@ void * maple_dev_status(maple_device*) {
maple_device_t * maple_enum_type(int n, uint32 func) { maple_device_t * maple_enum_type(int n, uint32 func) {
return &dev; return &dev;
} }
namespace kos {
int sem_wait_timed(semaphore_t *sem, int timeout) { int sem_wait_timed(semaphore_t *sem, int timeout) {
auto count = sem->count.load(); auto count = sem->count.load();
@@ -54,6 +54,7 @@ int sem_signal(semaphore_t *sem) {
sem->count++; sem->count++;
return 0; return 0;
} }
}
void sq_lock(void *dest) { void sq_lock(void *dest) {

View File

@@ -32,6 +32,7 @@
\headerfile kos/sem.h \headerfile kos/sem.h
*/ */
namespace kos {
typedef struct semaphore { typedef struct semaphore {
std::atomic<int> initialized; /**< \brief Are we initialized? */ std::atomic<int> initialized; /**< \brief Are we initialized? */
std::atomic<int> count; /**< \brief The semaphore count */ std::atomic<int> count; /**< \brief The semaphore count */
@@ -177,5 +178,7 @@ int sem_signal(semaphore_t *sem);
*/ */
int sem_count(semaphore_t *sem); int sem_count(semaphore_t *sem);
}
using namespace kos;
#endif /* __KOS_SEM_H */ #endif /* __KOS_SEM_H */

View File

@@ -233,7 +233,7 @@ typedef struct {
/* Wait-ready semaphore: this will be signaled whenever the pvr_wait_ready() /* Wait-ready semaphore: this will be signaled whenever the pvr_wait_ready()
call should be ready to return. */ call should be ready to return. */
semaphore_t ready_sem; kos::semaphore_t ready_sem;
// Handle for the vblank interrupt // Handle for the vblank interrupt
int vbl_handle; int vbl_handle;