C C C C C

//加载系统头文件base.h
#include <base.h>
#include <graphics.h>

//______________________________



 void helloworld()
{
    //用指定颜色清除屏幕
    cls(0,0,0);
    //画文字
    dtext ( "从assets加载文件", 0, 0, 255, 0, 0, 0, 1);
    //刷新屏幕
    ref(0,0,SCRW,SCRH);
}

//______________________________

 void fuiop()
{
    //用指定颜色清除屏幕
    cls(0,0,0);
    //画文字
    dtext ( "加载文件成功", 0, 35, 0, 255, 0, 0, 1);
    //刷新屏幕
    ref(0,0,SCRW,SCRH);
}

//______________________________    

void hello()
{
    int32 bitmap = readBitmapFromAssets ("1.png");
    
    
    //绘制bitmap
    drawBitmap(bitmap, 0, 500);
    //刷新屏幕
    ref(0,0,SCRW,SCRH);
}

//______________________________

//入口函数,程序启动时开始执行
int init()
{
    //调用函数helloworld
    helloworld();
    
    //fuiop();
    
    hello();
    return 0;
}

//______________________________


//event函数,接收消息事件
int event(int type, int p1, int p2)
{
    if(KY_UP == type)
    {
        switch(p1)
        {
        case _BACK
:
            exit();
            break;
        case _MENU:
            break;
        }
    }

    return 0;
}

//______________________________

//应用暂停,当程序进入后台或变为不可见时会调用此函数
int pause()
{
    return 0;
}

//应用恢复,程序变为可见时调用此函数
int resume()
{
    return 0;
}
 
回复列表(3|隐藏机器人聊天)
添加新回复
回复需要登录