Platform library for RETRO

Dependents:   RETRO_RickGame

Committer:
Architect
Date:
Sun Mar 01 05:29:45 2015 +0000
Revision:
0:6f26c31d8573
RetroPlatform Library for RETRO gaming system

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Architect 0:6f26c31d8573 1 /*
Architect 0:6f26c31d8573 2 * (C) Copyright 2015 Valentin Ivanov. All rights reserved.
Architect 0:6f26c31d8573 3 *
Architect 0:6f26c31d8573 4 * This file is part of the RetroPlatform Library
Architect 0:6f26c31d8573 5 *
Architect 0:6f26c31d8573 6 * The RetroPlatform Library is free software: you can redistribute it and/or modify
Architect 0:6f26c31d8573 7 * it under the terms of the GNU Lesser General Public License as published by
Architect 0:6f26c31d8573 8 * the Free Software Foundation, either version 3 of the License, or
Architect 0:6f26c31d8573 9 * (at your option) any later version.
Architect 0:6f26c31d8573 10 *
Architect 0:6f26c31d8573 11 * This program is distributed in the hope that it will be useful,
Architect 0:6f26c31d8573 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Architect 0:6f26c31d8573 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Architect 0:6f26c31d8573 14 * GNU Lesser General Public License for more details.
Architect 0:6f26c31d8573 15 *
Architect 0:6f26c31d8573 16 * You should have received a copy of the GNU Lesser General Public License
Architect 0:6f26c31d8573 17 * along with this program. If not, see <http://www.gnu.org/licenses/>
Architect 0:6f26c31d8573 18 *
Architect 0:6f26c31d8573 19 * This library is inspired by Gamebuino Library (http://gamebuino.com)
Architect 0:6f26c31d8573 20 * from Aurélien Rodot.
Architect 0:6f26c31d8573 21 */
Architect 0:6f26c31d8573 22 #ifndef DISPLAY_H
Architect 0:6f26c31d8573 23 #define DISPLAY_H
Architect 0:6f26c31d8573 24
Architect 0:6f26c31d8573 25 #include "LCD_ST7735.h"
Architect 0:6f26c31d8573 26
Architect 0:6f26c31d8573 27
Architect 0:6f26c31d8573 28 class Display : public LCD_ST7735
Architect 0:6f26c31d8573 29 {
Architect 0:6f26c31d8573 30
Architect 0:6f26c31d8573 31 public:
Architect 0:6f26c31d8573 32 Display(
Architect 0:6f26c31d8573 33 PinName backlightPin,
Architect 0:6f26c31d8573 34 PinName resetPin,
Architect 0:6f26c31d8573 35 PinName dsPin,
Architect 0:6f26c31d8573 36 PinName mosiPin,
Architect 0:6f26c31d8573 37 PinName misoPin,
Architect 0:6f26c31d8573 38 PinName clkPin,
Architect 0:6f26c31d8573 39 PinName csPin,
Architect 0:6f26c31d8573 40 PanelColorFilter colorFilter = BGR
Architect 0:6f26c31d8573 41 );
Architect 0:6f26c31d8573 42
Architect 0:6f26c31d8573 43 void drawBitmapIndexed(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *pbmp);
Architect 0:6f26c31d8573 44 void drawBitmapIndexed(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *pbmp, const uint16_t *palette, bool mirrored = false);
Architect 0:6f26c31d8573 45 //void drawBitmapTransparent(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *pbmp, const uint16_t *palette, uint8_t color, bool mirrored = false);
Architect 0:6f26c31d8573 46 void drawBitmapIndexed(uint8_t x, uint8_t y, int w, int h, int src_x, int src_y, int srcWidth, int srcHeight, const uint8_t *pbmp, const uint16_t *palette);
Architect 0:6f26c31d8573 47
Architect 0:6f26c31d8573 48 void drawBitmapIndexed(uint8_t x, uint8_t y, const uint8_t *pbmp);
Architect 0:6f26c31d8573 49 void eraseBitmapIndexed(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *pbmp);
Architect 0:6f26c31d8573 50 void eraseBitmapIndexed(uint8_t x, uint8_t y, const uint8_t *pbmp);
Architect 0:6f26c31d8573 51 };
Architect 0:6f26c31d8573 52
Architect 0:6f26c31d8573 53
Architect 0:6f26c31d8573 54 #endif //DISPLAY_H