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
Added basic 2D video accelleration
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin2_src
/
WM
/
video.c
diff --git
a/Usermode/Applications/axwin2_src/WM/video.c
b/Usermode/Applications/axwin2_src/WM/video.c
index
00dbe16
..
fb08208
100644
(file)
--- a/
Usermode/Applications/axwin2_src/WM/video.c
+++ b/
Usermode/Applications/axwin2_src/WM/video.c
@@
-7,13
+7,14
@@
#include <acess/devices/terminal.h>
// === PROTOTYPES ===
#include <acess/devices/terminal.h>
// === PROTOTYPES ===
-void Video_Setup();
-void Video_Update();
+void Video_Setup(void);
+void Video_Update(void);
+void Video_FillRect(short X, short Y, short W, short H, uint32_t Color);
// === GLOBALS ===
// === CODE ===
// === GLOBALS ===
// === CODE ===
-void Video_Setup()
+void Video_Setup(
void
)
{
int tmpInt;
{
int tmpInt;
@@
-58,8
+59,20
@@
void Video_Setup()
Video_Update();
}
Video_Update();
}
-void Video_Update()
+void Video_Update(
void
)
{
{
- seek(giTerminalFD, 0, SEEK_SET);
+ //seek(giTerminalFD, 0, SEEK_SET);
+ seek(giTerminalFD, 0, 1);
write(giTerminalFD, giScreenWidth*giScreenHeight*4, gpScreenBuffer);
}
write(giTerminalFD, giScreenWidth*giScreenHeight*4, gpScreenBuffer);
}
+
+void Video_FillRect(short X, short Y, short W, short H, uint32_t Color)
+{
+ uint32_t *buf = gpScreenBuffer + Y*giScreenWidth + X;
+
+ while( H -- )
+ {
+ memset32( buf, Color, W );
+ buf += giScreenWidth;
+ }
+}
UCC
git Repository :: git.ucc.asn.au