mirror of https://github.com/sm64pc/sm64pc.git
[WIP] Fixed courses and started entity system
This commit is contained in:
parent
86ad2e0921
commit
e17ce2bc49
3
Makefile
3
Makefile
|
@ -272,6 +272,9 @@ SRC_DIRS += src/moon/ui src/moon/ui/interfaces src/moon/ui/screens src/moon/ui/s
|
|||
# Moon64 SRC [IO] Directories
|
||||
SRC_DIRS += src/moon/io src/moon/io/modules
|
||||
|
||||
# Moon64 SRC [Entity] Directories
|
||||
SRC_DIRS += src/moon/entity src/moon/entity/interfaces
|
||||
|
||||
# RapidJSON Library
|
||||
SRC_DIRS += src/moon/libs/rapidjson src/moon/libs/rapidjson/error src/moon/libs/rapidjson/internal src/moon/libs/rapidjson/msinttypes
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef MoonEntityInterface
|
||||
#define MoonEntityInterface
|
||||
|
||||
#endif
|
|
@ -1,6 +1,6 @@
|
|||
#include "mouse-io.h"
|
||||
|
||||
#ifdef WAPI_SDL2
|
||||
#ifndef WAPI_SDL2
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
|
||||
|
@ -29,10 +29,10 @@ void MouseIO::update(){
|
|||
state = SDL_GetMouseState(&this->xLocalPos, &this->yLocalPos);
|
||||
SDL_GetGlobalMouseState(&this->xGlobalPos, &this->yGlobalPos);
|
||||
#elif defined(WAPI_DXGI)
|
||||
|
||||
//TODO: Implement directx hook
|
||||
#endif
|
||||
}
|
||||
|
||||
bool MouseIO::isBtnPressed(MouseBtn btn){
|
||||
return (state & (btn == 0 ? SDL_BUTTON_LMASK : SDL_BUTTON_RMASK));
|
||||
return state & (int) btn;
|
||||
}
|
|
@ -183,7 +183,7 @@ static void set_state(void) {
|
|||
// when exiting a stage the act doesn't get reset
|
||||
if (gCurrActNum && gCurrCourseNum) {
|
||||
// any stage over 19 is a special stage without acts
|
||||
if (gCurrCourseNum < 19) {
|
||||
if (gCurrCourseNum < COURSE_STAGES_MAX) {
|
||||
void **actNameTbl;
|
||||
#ifndef VERSION_EU
|
||||
actNameTbl = segmented_to_virtual(seg2_act_name_table);
|
||||
|
@ -207,7 +207,7 @@ static void set_state(void) {
|
|||
act[0] = '\0';
|
||||
gCurrActNum = 0;
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
act[0] = '\0';
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ static void set_state(void) {
|
|||
void set_logo(void) {
|
||||
if (lastCourseNum)
|
||||
snprintf(largeImageKey, sizeof(largeImageKey), "%d", lastCourseNum);
|
||||
else
|
||||
else
|
||||
strcpy(largeImageKey, "0");
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue