⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 txt_display.c

📁 智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder
💻 C
字号:
/************************
 *   mp3_display.c
 ************************/

#include <string.h>
#include "api.h"
#include "lcd.h"
#include "common.h"
#include "display.h"
#include "file_brower.h"
//#include "mp3_main.h"
//#include "lrc_parse.h"
#include "txt_display.h"
#include "txt_utile.h"
#include "res.h"
#include "res_show.h"
#include "ap_common.h"
#include "ui_main.h"
#include "prefer.h"

#define PROGRESS_Y  24
#define PROGRESS_X  4
#define FILE_NAME_X 2
#define FILE_NAME_Y 95

extern UINT8    Outputdata[512];
extern UINT8    decoderdata1[720];
//extern void lcd_clear1(void);

void lcd_puts1(UINT8 x, UINT8 y, UINT8 *str, UINT8 fontsize)
{
	INT8S data r1;
	UINT8 data n;

	n = 0;
	r1 = 0;
	
	api_s8GetFont16x16BMP(0, TRUE);
	
	while(*str != '\0') {
		if(*str == '\n')
		{
			y-=16;
			x = 0;
			str++;
			continue;
		}	
		if(fontsize == FONTSIZE_8x8) {
			if(lcd_putc_8x8(x, y, *str++)) {
				x += 8;
				n++;
			}
		}
		else {
			if((fontsize == FONTSIZE_8x16) || 
			   (fontsize == FONTSIZE_HYPER && r1 != 1 && *str <= 0x80)) {
				if(lcd_putc_8x16(x, y, *str++)) {
					x += 8;
					n++;
				}			
				continue;
			}
			r1 = api_s8GetFont16x16BMP(*str++, FALSE);
			if(r1 == 0) {
				if(lcd_putc_16x16(x, y, 0)) {
					x += 16;
					n += 2;
				}			
			}
		}
		
			
	}	
}


UINT8 show_one_page()
{
	bg_color = 0x0;
	gfx_set_bg(COLOR_UNSELECT);
	fg_color = COLOR_WHITE;
	lcd_clear();
	if(tUserPreference.u8LanguageId==0 ||(tUserPreference.u8LanguageId>0 && tUserPreference.u8LanguageId<=4))
		lcd_puts1(0, 144, decoderdata1, FONTSIZE_HYPER);	
	else
		lcd_puts1(0, 144, decoderdata1, FONTSIZE_8x16);	
			
	return 1;	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -