Register

Download! No deductions from user account.


Are you familiar with the C language program written on a PC CUI? You reluctantly printf function? I to try wotof1996 the iHacker yesterday, found the command line interface is a little egg pain ... reminds me of the Console to write the game script was also written with RGSS, so he put it into practice, transplanted to the 9860.
I use a simple linked list to achieve a pseudo-standard output (output to the screen terminal), nothing new, the main output wrap (this line is not enough to jump to the next line), and scrolling.

The input has two functions, one by an edit box. Function prototype
int dGetLineBox (char * s,int max,int width,int x,int y);
The user can specify the input maximum character length, enter the box number of characters (width) and its location

Another input function dependent pseudo standard output dStdOut the
int dGetLine (int max,char * s);
It will automatically input in dStdOut the last cursor position, the input can not wrap, but you can scroll (of course, the input will not be added to dStdOut require the user to manually add)

Output is recommended that only dPrintf with printf to use exactly the same
See the following code, a simple console

Code: Select all
int dConsole ()

{

    char buf[128];



    *buf = '\0';



    dPrintf ("Welcome to Console\n");



    while (1)

    {

        dPrintf("\nC:\\>");

        dStreamRedrawScreen (dStdOut);// in fact , you may also use dStdOutRefresh

        dGetLine(128,buf);

        dPrintf(buf);

        buf = '\0';

    }

}



As to clear the screen, use the the function dStreamDestory dStream in the dStdOut content empty the can.

Attention! If you want to use dStdOut optical add the source files into your project may be not enough, we must initialize AddIn_Main inside dStdOut (the call dStandardOutputInitialize function can be)
In addition you want to dStdOut the contents to the screen, need to call dStdOutRefresh function.



  • [Lib fx9860] dOutput Analog console
This download was added Mon Sep 03, 2012 4:05 pm by diameter  • Last download Thu Mar 28, 2024 11:40 pm


Jump to:  

Legend

Not enough traffic or posts (0 posts required).Not enough posts
(0 posts required).
  Download! No deductions from user account.Download!  Download! External source. No deductions from user account.Download! External source.  Free download without traffic count for registered usersFree download for registered users  New downloadNew download  Updated downloadUpdated download 
There are overall 179 downloads with a size of 66.41 MiB / 10 GiB. This includes 10 external downloads. Download MOD © by Hotschi, Demolition Fabi, OXPUS •  Download MOD English language © by OXPUS • RSS Feed