ADD FLASH(flash.h flash.cpp flash_def.h flash_cfg.h flash_sfdp.cpp)

ADD RunTimer(log.h ticks.h ticks.cpp)
ADD sim_key form sdl
This commit is contained in:
JiXieShi
2024-11-27 13:49:34 +08:00
parent 8f7f72712c
commit a1176112ce
29 changed files with 3993 additions and 179 deletions

View File

@@ -170,11 +170,14 @@ bool SIM_Display_Init(char *name, int width, int height, uint32_t pixcolor, uint
void SIM_Color_DrawPiexl(SIM_Display_t *display, SIM_Color_t color, uint16_t x, uint16_t y) {
SDL_SetRenderDrawColor(display->renderer, color.ch.red, color.ch.green, color.ch.blue, color.ch.alpha);
for (int y_ = y * display->scale; y_ < (y * display->scale) + display->scale; ++y_) {
for (int x_ = x * display->scale; x_ < (x * display->scale) + display->scale; ++x_) {
SDL_RenderPoint(display->renderer, x_, y_);
}
}
SDL_FRect rect1 = {(x * display->scale) * 1.0f, (y * display->scale) * 1.0f, display->scale * 1.0f,
display->scale * 1.0f};
SDL_RenderFillRect(display->renderer, &rect1);
// for (int y_ = y * display->scale; y_ < (y * display->scale) + display->scale; ++y_) {
// for (int x_ = x * display->scale; x_ < (x * display->scale) + display->scale; ++x_) {
// SDL_RenderPoint(display->renderer, x_, y_);
// }
// }
}
void SIM_OneColor_DrawFromBuffer(SIM_Display_t *display, uint8_t *buf, uint16_t width, uint16_t height) {