mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 17:47:12 -04:00
Ditto; But the window SHOULD be centered, and have the correct size.
This commit is contained in:
parent
7927025ab0
commit
a0087e75fb
@ -115,6 +115,12 @@ cc_uint64 Stopwatch_ElapsedMicroseconds(cc_uint64 beg, cc_uint64 end) {
|
|||||||
return (end - beg) / 1000;
|
return (end - beg) / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Stopwatch_Init(void) {
|
||||||
|
//TODO
|
||||||
|
cc_uint64 doSomething = Stopwatch_Measure();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*-----------------------------------------------------Directory/File------------------------------------------------------*
|
*-----------------------------------------------------Directory/File------------------------------------------------------*
|
||||||
@ -414,7 +420,7 @@ cc_bool Platform_DescribeError(cc_result res, cc_string* dst) {
|
|||||||
|
|
||||||
void Platform_Init(void) {
|
void Platform_Init(void) {
|
||||||
printf("Macintosh ClassiCube has started to init.\n"); // Test, just to see if it's actually *running* at all.
|
printf("Macintosh ClassiCube has started to init.\n"); // Test, just to see if it's actually *running* at all.
|
||||||
Stopwatch_Measure();
|
Stopwatch_Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_result Platform_Encrypt(const void* data, int len, cc_string* dst) {
|
cc_result Platform_Encrypt(const void* data, int len, cc_string* dst) {
|
||||||
|
@ -31,9 +31,12 @@ void Window_Free(void) { }
|
|||||||
|
|
||||||
static void DoCreateWindow(int width, int height) {
|
static void DoCreateWindow(int width, int height) {
|
||||||
Rect r = qd.screenBits.bounds;
|
Rect r = qd.screenBits.bounds;
|
||||||
|
/* TODO: Make less-crap method of getting center. */
|
||||||
|
int centerX = r.right/2;
|
||||||
|
int centerY = r.bottom/2;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
SetRect(&r, r.left + 5, r.top + 45, r.right - 5, r.bottom - 5);
|
SetRect(&r, centerX-(width/2), centerY-(height/2), centerX+(width/2), centerY+(height/2));
|
||||||
win = NewWindow(NULL, &r, "\pClassiCube", true, 0, (WindowPtr)-1, false, 0);
|
win = NewWindow(NULL, &r, "\pClassiCube", true, 0, (WindowPtr)-1, false, 0);
|
||||||
SetPort(win);
|
SetPort(win);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user