git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/AxWin3 - Debugging IPC
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin3_src
/
WM
/
video.c
diff --git
a/Usermode/Applications/axwin3_src/WM/video.c
b/Usermode/Applications/axwin3_src/WM/video.c
index
4121fbe
..
d0476d0
100644
(file)
--- a/
Usermode/Applications/axwin3_src/WM/video.c
+++ b/
Usermode/Applications/axwin3_src/WM/video.c
@@
-1,12
+1,16
@@
/*
/*
- * Acess GUI (AxWin) Version 2
- * By John Hodge (thePowersGang)
+ * Acess2 GUI (AxWin) Version 3
+ * - By John Hodge (thePowersGang)
+ *
+ * video.c
+ * - Video methods
*/
*/
-#include
"common.h"
+#include
<common.h>
#include <acess/sys.h>
#include <acess/devices/terminal.h>
#include <image.h>
#include "resources/cursor.h"
#include <acess/sys.h>
#include <acess/devices/terminal.h>
#include <image.h>
#include "resources/cursor.h"
+#include <stdio.h>
// === PROTOTYPES ===
void Video_Setup(void);
// === PROTOTYPES ===
void Video_Setup(void);
@@
-18,6
+22,7
@@
void Video_DrawRect(short X, short Y, short W, short H, uint32_t Color);
// === GLOBALS ===
int giVideo_CursorX;
int giVideo_CursorY;
// === GLOBALS ===
int giVideo_CursorX;
int giVideo_CursorY;
+uint32_t *gpScreenBuffer;
// === CODE ===
void Video_Setup(void)
// === CODE ===
void Video_Setup(void)
@@
-61,7
+66,7
@@
void Video_Setup(void)
// Create local framebuffer (back buffer)
gpScreenBuffer = malloc( giScreenWidth*giScreenHeight*4 );
// Create local framebuffer (back buffer)
gpScreenBuffer = malloc( giScreenWidth*giScreenHeight*4 );
-
memset32( gpScreenBuffer, 0x8888FF, giScreenWidth*giScreenHeight
);
+
Video_FillRect(0, 0, giScreenWidth, giScreenHeight, 0x8080FF
);
// Set cursor position and bitmap
ioctl(giTerminalFD, TERM_IOCTL_SETCURSORBITMAP, &cCursorBitmap);
// Set cursor position and bitmap
ioctl(giTerminalFD, TERM_IOCTL_SETCURSORBITMAP, &cCursorBitmap);
@@
-90,6
+95,7
@@
void Video_SetCursorPos(short X, short Y)
void Video_FillRect(short X, short Y, short W, short H, uint32_t Color)
{
void Video_FillRect(short X, short Y, short W, short H, uint32_t Color)
{
+ int i;
uint32_t *buf = gpScreenBuffer + Y*giScreenWidth + X;
_SysDebug("Video_FillRect: (X=%i, Y=%i, W=%i, H=%i, Color=%08x)",
uint32_t *buf = gpScreenBuffer + Y*giScreenWidth + X;
_SysDebug("Video_FillRect: (X=%i, Y=%i, W=%i, H=%i, Color=%08x)",
@@
-103,8
+109,9
@@
void Video_FillRect(short X, short Y, short W, short H, uint32_t Color)
while( H -- )
{
while( H -- )
{
- memset32( buf, Color, W );
- buf += giScreenWidth;
+ for( i = W; i --; )
+ *buf++ = Color;
+ buf += giScreenWidth - W;
}
}
}
}
UCC
git Repository :: git.ucc.asn.au