- [NEW] ui::placetext() i ui::placechar, pa ficar text en qualsevol pixel
- [NEW] [Z80Analize] backspace esborra tots els tags - [NEW] [zx-128bankviewer] Es mostra quina pàgina de memòria està asignada a cada bank - [FIX] [zx_128mem] es filtra el port al que escolta la memòria - [NEW] [zx_screen] Es mostra en quina pantalla estem (normal o shadow) - [FIX] [zx_screen] tots els tipos per al calcul de adreces passats a uint32_t - [NEW] [zx_ula] afegides combinacions de cursors per a major comoditat
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
#include "zx_128bankviewer.h"
|
||||
#include "z80.h"
|
||||
#include "z80mem.h"
|
||||
#include "zx_128mem.h"
|
||||
#include "ui.h"
|
||||
//#include "ui_window.h"
|
||||
|
||||
void zx_128bankviewer::show()
|
||||
{
|
||||
if (!win)
|
||||
{
|
||||
win = SDL_CreateWindow("Z80 Analyzer", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 128, 512, SDL_WINDOW_SHOWN);
|
||||
win = SDL_CreateWindow("Z80 Bank Viewer", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 128, 512, SDL_WINDOW_SHOWN);
|
||||
ren = SDL_CreateRenderer(win, -1, 0);
|
||||
tex = SDL_CreateTexture(ren, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 128, 512);
|
||||
uitex = ui::createtexture(ren);
|
||||
|
||||
//ui::window::registerWindow(SDL_GetWindowID(win), handleEvent);
|
||||
}
|
||||
@@ -20,6 +24,8 @@ void zx_128bankviewer::refresh()
|
||||
{
|
||||
if (!win) return;
|
||||
|
||||
ui::setrenderer(ren, uitex);
|
||||
|
||||
Uint32 *pixels;
|
||||
int pitch;
|
||||
SDL_LockTexture(tex, NULL, (void**)&pixels, &pitch);
|
||||
@@ -35,6 +41,18 @@ void zx_128bankviewer::refresh()
|
||||
|
||||
SDL_UnlockTexture(tex);
|
||||
SDL_RenderCopy(ren, tex, NULL, NULL);
|
||||
|
||||
char temp[256];
|
||||
zx_128mem* mem = ((zx_128mem*)z80mem::get());
|
||||
sprintf(temp, "%u", mem->getPage(0));
|
||||
ui::placetxt(1,1,temp, COLOR_WHITE);
|
||||
sprintf(temp, "%u", mem->getPage(1));
|
||||
ui::placetxt(1,129,temp, COLOR_WHITE);
|
||||
sprintf(temp, "%u", mem->getPage(2));
|
||||
ui::placetxt(1,257,temp, COLOR_WHITE);
|
||||
sprintf(temp, "%u", mem->getPage(3));
|
||||
ui::placetxt(1,385,temp, COLOR_WHITE);
|
||||
|
||||
SDL_RenderPresent(ren);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user