Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ PARAM.SFO
EBOOT.PBP
.vscode/*
Saves/*
*.DS_Store
*.DS_Store
pc/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OBJECTS := $(addprefix $(BUILD)/,$(SOURCES:%.c=%.o))
#-------------------------------------------------

CFLAGS += -Wall -g
LDFLAGS := -llua -lm -lc
LDFLAGS := -llua -lm

# PLATFORM: PC
ifeq ($(DESKTOP),1)
Expand Down
2 changes: 0 additions & 2 deletions src/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ gamedata_t Loaded_Game;
//
void Game_Initialize(gamedata_t game) {
char* main_script;
u8_t hour;

hour = 0;
Game_Running = TRUE;
Loaded_Game = game;

Expand Down
3 changes: 1 addition & 2 deletions src/lua_virtual_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ static int Lua_PSPDebugPrintf(lua_State* State)
// Assert Param
assert(lua_isstring(State, 1));

#ifdef PSP
// Define it
const char* parm0;
parm0 = lua_tostring(State, 1);

#ifdef PSP
pspDebugScreenPrintf("%s", parm0);
#endif

Expand Down
16 changes: 15 additions & 1 deletion src/pc/pc_ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
//

#include "../defs.h"
#include <sys/stat.h>
#include <string.h>

gamedata_t INI_Games[8];
int INI_GameCount;
Expand Down Expand Up @@ -123,8 +125,20 @@ void INI_Initialize() {
// Loop through all directories found by opendir()
while ((cwdirent = readdir(cwd)) != NULL) {
// If we found a directory, and it is not backwards from our root
if (cwdirent->d_type == DT_DIR && strcmp(".", cwdirent->d_name) != 0 && strcmp("..", cwdirent->d_name) != 0)
char fullpath[1024];
struct stat st;

snprintf(fullpath, sizeof(fullpath), "games/%s", cwdirent->d_name);

if (stat(fullpath, &st) == 0 &&
S_ISDIR(st.st_mode) &&
strcmp(".", cwdirent->d_name) != 0 &&
strcmp("..", cwdirent->d_name) != 0)
{
// Try to fetch game information
INI_FetchGameInformation(cwdirent->d_name);
}
}

closedir(cwd);
}