New Neighbors
So, I'm just sitting here, programming, minding my own business when I hear some sirens going off and some cops talking on loud speaker. So I look outside and these people driving a burgendy colored old car are the ones the cops are talking too. So those people park in their parking space, and 6 cops come out with their guns drawn. Wanna know who those people are? My new neighbors. I think my neighbors were arrested.
Vista Programming (Language/SDK)
Well, I've found an old SDK I made originally called "Hotaru 2D". It's basically a small game creation SDK like DBP but less featured. I was originally looking for it to test out a custom GUI I was going to make (
This one here) in C++. As I was looking at it though, I figured I'd like to test out some of the vista-only features of Windows Vista. So I got a nice feature working, which is for the entire window to be Aero-Glass based instead of just the caption.
I figured I'd make an interpreted language out of it as well, kind of like DBC. Here's a screenshot. And here's a demo app (C/C++):
#include "vpsdk.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdShow)
{
vInit(256, 256, 32, "Hello!", false, false);
DWORD myFont = vLoadFont("Courier New", 16);
while(vRunning())
{
vBeginScene(0x00000000, true);
vDrawBox(32, 32, vGetScreenWidth() - 32, vGetScreenHeight() - 32, 0x77ff0000, 0x7700ff00, 0x770000ff, 0x77ff00ff);
vDrawText(2, 2, "Hello World!", 0xff000000, myFont);
vEndScene();
}
}
As for the language, it'll resemble a BASIC dialect, hopefully something like:
myFont = LoadFont("Courier New", 16)
while Running()
BeginScene 0x00000000, true
DrawBox 32, 32, GetScreenWidth() - 32, GetScreenHeight() - 32, 0x77ff0000, 0x7700ff00, 0x770000ff, 0x77ff00ff
DrawText 2, 2, "Hello World!", 0xff00000000
EndScene
EndWhile
Here's all the functions in the SDK so far
void vInit(int width=640, int height=480, int depth=32, char* title="", bool fullscreen=false, bool vsync=false);
void vInitEx(InitHotaru2DStruct param);
void vDeinit(void);
bool vRunning(void);
void vEnd(void);
void vBeginScene(DWORD dwBackground=ColorRGB(0,0,0), bool clearBackground=true);
void vEndScene(void);
void vEndSceneEx(HWND hWnd);
void vShowMouse(void);
void vHideMouse(void);
DWORD vGetScreenWidth(void);
DWORD vGetScreenHeight(void);
DWORD vGetDesktopWidth(void);
DWORD vGetDesktopHeight(void);
int vGetWindowX(void);
int vGetWindowY(void);
int vGetWindowWidth(void);
int vGetWindowHeight(void);
char* vGetWindowTitle(void);
void vSetWindowTitle(char* szTitle);
void vClearScreen(DWORD dwColor=ColorRGB(0,0,0));
void vDrawBox(int x, int y, int x2, int y2, DWORD dwColor0=ColorRGB(255,255,255), DWORD dwColor1=ColorRGB(255,255,255), DWORD dwColor2=ColorRGB(255,255,255), DWORD dwColor3=ColorRGB(255,255,255));
void vDrawLine(int x1, int y1, int x2, int y2, DWORD dwColor0=ColorRGB(255,255,255), DWORD dwColor1=ColorRGB(255,255,255));
void vDrawDot(int x, int y, DWORD dwColor);
DWORD vLoadFont(char* szFont, int size);
void vDrawText(int x, int y, char* szText, DWORD dwColor, DWORD dwFont);
DWORD vGetTextWidth(char* szText, DWORD dwFont);
DWORD vGetTextHeight(char* szText, DWORD dwFont);
DWORD vLoadTexture(char* szFilename);
void vDestroyTexture(DWORD id);
bool vValidTexture(DWORD id);
DWORD vCreateSprite(DWORD dwTexture);
void vDestroySprite(DWORD id);
bool vValidSprite(DWORD id);
void vDrawSprite(DWORD id);
void vPositionSprite(DWORD id, int x, int y);
int vGetSpriteX(DWORD id);
int vGetSpriteY(DWORD id);
void vSetSpritePriority(DWORD id, DWORD priority);
DWORD vGetSpritePriority(DWORD id);
void vSetSpriteScale(DWORD id, float x, float y);
float vGetSpriteScaleX(DWORD id);
float vGetSpriteScaleY(DWORD id);
void vSetSpriteOffset(DWORD id, int x, int y);
int vGetSpriteOffsetX(DWORD id);
int vGetSpriteOffsetY(DWORD id);
void vRotateSprite(DWORD id, float rotation);
float vGetSpriteAngle(DWORD id);
void vSetSpriteDiffuse(DWORD id, DWORD diffuse);
DWORD vGetSpriteDiffuse(DWORD id);
void vSetSpriteTexture(DWORD id, DWORD texture);
DWORD vGetSpriteTexture(DWORD id);
void vSyncInput(void);
bool vKeyState(int id);
void vSetKeyState(int id, bool state);
bool vLeftKeyState(void);
bool vUpKeyState(void);
bool vRightKeyState(void);
bool vDownKeyState(void);
bool vSpaceKeyState(void);
bool vReturnKeyState(void);
Note: I just wanted to combine what would otherwise be two threads into one to save space on the forums.
So, what do you guys think?
Cheers,
-naota
"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums