[Include] od_stdio.inc
#4

Well done! I really like it

But in order to be able to use the functions by default, simply by connecting include, you should hook the default public OnGameModeInit and OnGameModeExit like this:
PHP код:
public OD_STDIO_OnGameModeInit()
{
    
stdin fopen("CON"io_read);
    
stdout fopen("CON"io_write);
    
#if defined OD_STDIO_OnGameModeInit
        
return OD_STDIO_OnGameModeInit();
    
#else
        
return 1;
    
#endif
}
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit OD_STDIO_OnGameModeInit
#if defined OD_STDIO_OnGameModeInit
    
forward OD_STDIO_OnGameModeInit();
#endif
public OD_STDIO_OnGameModeExit()
{
    
fclose(stdin);
    
fclose(stdout);
    
#if defined OD_STDIO_OnGameModeExit
        
return OD_STDIO_OnGameModeExit();
    
#else
        
return 1;
    
#endif
}
#if defined _ALS_OnGameModeExit
    #undef OnGameModeExit
#else
    #define _ALS_OnGameModeExit
#endif
#define OnGameModeExit OD_STDIO_OnGameModeExit
#if defined OD_STDIO_OnGameModeExit
    
forward OD_STDIO_OnGameModeExit();
#endif 
Reply


Messages In This Thread
od_stdio.inc - Write and type in the console (even on Linux). - by OneDay - 13.12.2016, 00:16
Re: od_stdio.inc - by Swedky - 13.12.2016, 00:19
Re: od_stdio.inc - by OneDay - 13.12.2016, 00:33
Re: od_stdio.inc - by OstGot - 13.12.2016, 12:19
Re: od_stdio.inc - by OneDay - 14.12.2016, 14:25
Re: od_stdio.inc - by SyS - 14.12.2016, 15:45
Re: od_stdio.inc - by OstGot - 14.12.2016, 18:27
Re: od_stdio.inc - by OneDay - 04.04.2017, 13:04
Re: od_stdio.inc - by ZiGGi - 12.04.2017, 15:31

Forum Jump:


Users browsing this thread: 1 Guest(s)