예제 #1
0
파일: SINGLE_C.C 프로젝트: gorhill/rayoid
void S1Term()
{
	char str[64];

	int choice;

	static char *_msg[] = {
	/*  0 */	"~8You beat the hi score !!!","~8Vous battez le record !!!",
	/*  2 */	"Your name : ........","Votre nom : ........",
	/*  4 */	"~7Your personnal message","~7Votre message personnel",
	/*  6 */	"................................","",
	/*  8 */	"~cGame Over","~cGame Over",
	/* 10 */	"~3Play again - ~4Y~3es ~4N~3o ?","~3Jouer … nouveau - ~4O~3ui ~4N~3on ?",
	/* 12 */	"yYnN","oOnN" };


	(*SplOff._proc)();

	SwapReset();

	if ( Joueur[0].points > S1Stats.score ) {

		S1Stats.score = Joueur[0].points;

		ShowStr(7,-1,_msg[0 + Langue],1);
		strcpy(str,_msg[2 + Langue]);
		GetStr(8,-1,str);
		if ( str[0] != 0 )
			strcpy(S1Stats.name,str);

		ShowStr(10,-1,_msg[4 + Langue],1);
		strcpy(str,_msg[6]);
		GetStr(11,-1,str);
		if ( str[0] != 0 )
			strcpy(S1Stats.msg,str);
		}

	if ( JouteStatus == 0 ) {
		ClrScreen();
		ShowStr(9,-1,_msg[8 + Langue],1);
		ShowStr(12,-1,_msg[10 + Langue],1);
		choice = GetChoice(_msg[12 + Langue]);
		if ( choice > 1 )
			JouteStatus = 1;
		}
}
예제 #2
0
파일: cpp1.cpp 프로젝트: vim-scripts/vgdb
int main()
{
    MONEY m(3.1415);
    int i;
    for (i=0; i<5; ++i) {
        SBOString s(m);
        const wchar_t *str = s.GetBuffer();
        double d = m.ToDouble();
        AddMoney(&m, 1.14);
        printf("%.2lf, %ls\n", d, str);
        ShowStr(s);
    }
    return 0;
}
예제 #3
0
파일: type7.c 프로젝트: mingpen/OpenNT
LOCAL ushort
DumpTypRecC7 (
    ushort usIndex,
    ushort cbLen,
    uchar *pRec)
{
    ushort usOff;

    printf ("0x%04x: Length = %u, Leaf = 0x%04x ", usIndex, cbLen, *((ushort *)pRec));

    switch (*((ushort *)pRec)) {
        case LF_POINTER :
        {
            plfPointer      plf = (plfPointer)pRec;

            PrintType ("LF_POINTER");
            printf ("\t");
            if (plf->attr.isconst) {
                printf ("CONST ");
            }
            if (plf->attr.isvolatile) {
                printf ("VOLATILE ");
            }
            printf ("%s (%s)",
              XlateC7PtrMode[plf->attr.ptrmode],
              XlateC7PtrType[plf->attr.ptrtype]);
            if (plf->attr.isflat32) {
                printf (" 16:32");
            }
            printf ("\n\tElement type: %s", SzNameC7Type(plf->utype));
            switch (plf->attr.ptrmode) {
                case CV_PTR_MODE_PTR:
                    switch (plf->attr.ptrtype) {
                        case CV_PTR_BASE_SEG:
                            printf (", Segment#: 0x%04x", plf->pbase.bseg );
                            break;

                        case CV_PTR_BASE_TYPE:
                            printf (", base symbol type = %s",
                                    SzNameC7Type( plf->pbase.btype.index ));
                            ShowStr (", name = '", plf->pbase.btype.name);
                            printf ("'");

                        case CV_PTR_BASE_SELF:
                            printf (", Based on self" );
                            break;

                        case CV_PTR_BASE_VAL:
                            printf (", Based on value in symbol:\n\t" );
                            DumpOneSymC7 ((uchar *)&(plf->pbase.Sym[0]));
                            break;

                        case CV_PTR_BASE_SEGVAL:
                            printf (", Based on segment in symbol:\n\t" );
                            DumpOneSymC7 ((uchar *)&(plf->pbase.Sym[0]));
                            break;

                        case CV_PTR_BASE_ADDR:
                            printf (", Based on address of symbol:\n\t" );
                            DumpOneSymC7 ((uchar *)&(plf->pbase.Sym[0]));
                            break;

                        case CV_PTR_BASE_SEGADDR:
                            printf (", Based on segment of symbol:\n\t" );
                            DumpOneSymC7 ((uchar *)&(plf->pbase.Sym[0]));
                            break;
                    }
                    break;

                case CV_PTR_MODE_PMFUNC:
                case CV_PTR_MODE_PMEM:
                    printf (", Containing class = %s,\n", SzNameC7Type( plf->pbase.pm.pmclass ));
                    printf ("\tType of pointer to member = %s", SzNameC7Type( plf->pbase.pm.pmenum));
                    break;

            }

            printf ("\n" );
            break;
        }

        case LF_MODIFIER:
        {
            plfModifier     plf = (plfModifier)pRec;

            PrintType ("LF_MODIFIER");
            if ((plf->attr.MOD_const == TRUE) && (plf->attr.MOD_volatile)) {
                printf ("\tCONST VOLATILE, ");
            }
            else if (plf->attr.MOD_const == TRUE) {
                printf ("\tCONST, ");
            }
            else if (plf->attr.MOD_volatile) {
                printf ("\tVOLATILE, ");
            }
            else {
                printf ("\tNONE, ");
            }
            printf ("\tmodifies type %s\n", SzNameC7Type(plf->type));
            break;
        }

        case LF_CLASS:
        case LF_STRUCTURE:
        {
            plfStructure     plf = (plfStructure)pRec;
            ushort                   cbNumeric;
            uchar                    *pName;

            if (*((ushort *)pRec) == LF_CLASS ) {
                PrintType ("LF_CLASS");
            }
            else {
                PrintType ("LF_STRUCTURE");
            }
            printf ("\t# members = %d, ", plf->count);
            printf (" field list type 0x%04x, ", plf->field);
            PrintProp( plf->property );
            printf ("\n");
            printf ("\tDerivation list type 0x%04x, ", plf->derived);
            printf ("VT shape type 0x%04x\n", plf->vshape);
            printf ("\tSize = ");
            cbNumeric = PrintNumeric (plf->data);
            pName = plf->data + cbNumeric;
            ShowStr (", class name = ", pName);
            printf("\n");
            break;
        }

        case LF_UNION:
        {
            plfUnion                plf = (plfUnion)pRec;
            ushort                  cbNumeric;
            uchar                   *pName;

            PrintType ("LF_UNION");
            printf ("\t# members = %d, ", plf->count);
            printf (" field list type 0x%04x, ", plf->field);
            PrintProp( plf->property );
            printf ("Size = ");
            cbNumeric = PrintNumeric (plf->data);
            pName = plf->data + cbNumeric;
            ShowStr ("\t,class name = ", pName);
            printf("\n");
            break;
        }

        case LF_ENUM:
        {
            plfEnum         plf = (plfEnum)pRec;

            PrintType ("LF_ENUM");
            printf ("\t# members = %d, ", plf->count);
            printf (" type = %s", SzNameC7Type(plf->utype));
            printf (" field list type 0x%04x\n", plf->field);
            PrintProp (plf->property);
            ShowStr ("\tenum name = ", plf->Name);
            printf("\n");
            break;
        }


        case LF_VTSHAPE:
        {
            plfVTShape              plf = (plfVTShape)pRec;
            ushort                  j;
            uchar *                 pDesc;
            uchar                   ch;
            ushort                  usCount;

            PrintType ("LF_VTSHAPE");
            printf("\tNumber of entries: %u\n", usCount = plf->count);

            pDesc = plf->desc;
            for( j = 0; j < usCount; j++) {
                if (j & 1) {
                    ch = (*pDesc++) >> 4;
                }
                else {
                    ch = *pDesc;
                }
                printf("\t\t[%u]: %s\n", j, C7VtsStrings[ch & 0xf]);
            }
            break;
        }