Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8654 → Rev 8655

/contrib/games/wolf3d/joystick_stub.cpp
1,5 → 1,5
/// JOYSTICK STUB FOR Wolfenstein 3D port to KolibriOS
/// Ported by maxcodehack
/// Ported by maxcodehack and turbocat2001
 
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
147,9 → 147,6
*/
void SDL_JoystickClose(SDL_Joystick *joystick){};
 
 
bool mkdir(const char* dir){};
 
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
/contrib/games/wolf3d/kolibri.cpp
1,15 → 1,21
#include <SDL.h>
#include <kos32sys.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "../../kolibri-libc/source/include/ksys.h"
void kolibri_set_win_center()
{
struct proc_info *info = (struct proc_info*)malloc(sizeof(struct proc_info));
get_proc_info((char*)info);
ksys_proc_table_t *info = (ksys_proc_table_t*)malloc(sizeof(ksys_proc_table_t));
_ksys_process_info(info, -1);
pos_t screen_size= max_screen_size();
int new_x = screen_size.x/2-info->width/2;
int new_y = screen_size.y/2-info->height/2;
sys_change_window(new_x,new_y, -1, -1);
ksys_pos_t screen_size= _ksys_screen_size();
int new_x = screen_size.x/2-info->winx_size/2;
int new_y = screen_size.y/2-info->winy_size/2;
_ksys_change_window(new_x, new_y, -1, -1);
free(info);
}
 
int mkdir(const char * path, unsigned)
{
return _ksys_mkdir(path);
}
 
/contrib/games/wolf3d/wl_main.cpp
1887,7 → 1887,7
{
if(hasError) printf("\n");
printf(
"Wolf4SDL v1.7 ($Revision$)\n"
"Wolf4SDL v1.7\n"
"Ported by Chaos-Software (http://www.chaos-software.de.vu)\n"
#ifdef _KOLIBRI
"Ported for KolibriOS by 'turbocat2001' and 'maxcodehack'\n"
1928,6 → 1928,10
" --configdir <dir> Directory where config file and save games are stored\n"
#if defined(_arch_dreamcast) || defined(_WIN32)
" (default: current directory)\n"
#endif
 
#ifdef _KOLIBRI
" (default: /tmp0/1/wolf4sdl)\n"
#else
" (default: $HOME/.wolf4sdl)\n"
#endif
/contrib/games/wolf3d/wl_menu.cpp
3989,11 → 3989,14
CheckForEpisodes (void)
{
struct stat statbuf;
/*
 
// On Linux like systems, the configdir defaults to $HOME/.wolf4sdl
#if !defined(_WIN32) && !defined(_arch_dreamcast)
if(configdir[0] == 0)
{
#ifdef _KOLIBRI
strcpy(configdir, "/tmp0/1/wolf4sdl");
#else
// Set config location to home directory for multi-user support
char *homedir = getenv("HOME");
if(homedir == NULL)
4006,8 → 4009,9
Quit("Your $HOME directory path is too long. It cannot be used for saving games.");
}
snprintf(configdir, sizeof(configdir), "%s" WOLFDIR, homedir);
#endif
}
#endif*/
#endif
 
if(configdir[0] != 0)
{