Change precedence of casts
This commit is contained in:
2
main.cpp
2
main.cpp
@@ -44,8 +44,10 @@ want to export all the symbols, we can namespace them optionally.
|
|||||||
[ ] - #test construct that would gather all tests and run them on start of program or something
|
[ ] - #test construct that would gather all tests and run them on start of program or something
|
||||||
[ ] - Error message when file not found
|
[ ] - Error message when file not found
|
||||||
[ ] - Foreign import that would link library
|
[ ] - Foreign import that would link library
|
||||||
|
[ ] - Builtin dynamic arrays
|
||||||
[ ] - Better error messages when type difference
|
[ ] - Better error messages when type difference
|
||||||
[ ] - Kilobyte, Megabyte, Gigabyte
|
[ ] - Kilobyte, Megabyte, Gigabyte
|
||||||
|
[ ] - Cast from array to pointer?
|
||||||
[ ] - Mixing loads and imports leads to code duplication, is that what we want???
|
[ ] - Mixing loads and imports leads to code duplication, is that what we want???
|
||||||
[ ] - Fix field access, cant cast, cant index
|
[ ] - Fix field access, cant cast, cant index
|
||||||
[ ] - Add parent_scope to Ast_Type, Add name to Ast_Type?
|
[ ] - Add parent_scope to Ast_Type, Add name to Ast_Type?
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ binding_power(Binding binding, Token_Kind kind){
|
|||||||
case TK_Dot:
|
case TK_Dot:
|
||||||
return {31,30};
|
return {31,30};
|
||||||
case TK_Arrow:
|
case TK_Arrow:
|
||||||
return {29,28};
|
return {20,19};
|
||||||
default: return {};
|
default: return {};
|
||||||
}
|
}
|
||||||
Postfix: switch(kind){
|
Postfix: switch(kind){
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ window_procedure :: (hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM): LRE
|
|||||||
else;; return DefWindowProcW(hwnd, msg, wparam, lparam)
|
else;; return DefWindowProcW(hwnd, msg, wparam, lparam)
|
||||||
|
|
||||||
_gcvt :: #foreign (value: F64, digits: int, buffer: *char): *char
|
_gcvt :: #foreign (value: F64, digits: int, buffer: *char): *char
|
||||||
|
print_float :: (value: F64)
|
||||||
|
buff: [100]char
|
||||||
|
_gcvt(value, 10, &buff[0])
|
||||||
|
OutputDebugStringA("\n")
|
||||||
|
OutputDebugStringA(&buff[0])
|
||||||
|
|
||||||
WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nShowCmd: int): int
|
WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nShowCmd: int): int
|
||||||
if good_scheduling := false, timeBeginPeriod(1) == TIMERR_NOERROR
|
if good_scheduling := false, timeBeginPeriod(1) == TIMERR_NOERROR
|
||||||
good_scheduling = true
|
good_scheduling = true
|
||||||
@@ -99,9 +105,7 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
|
|||||||
|
|
||||||
|
|
||||||
frame_time := time() - frame_start_time
|
frame_time := time() - frame_start_time
|
||||||
_gcvt(frame_time, 10, buff)
|
print_float(frame_time)
|
||||||
OutputDebugStringA("\n")
|
|
||||||
OutputDebugStringA(buff)
|
|
||||||
if frame_time < requested_time_per_frame
|
if frame_time < requested_time_per_frame
|
||||||
if good_scheduling
|
if good_scheduling
|
||||||
time_to_sleep := (requested_time_per_frame - frame_time) * 1000
|
time_to_sleep := (requested_time_per_frame - frame_time) * 1000
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ release :: (m: *Memory)
|
|||||||
|
|
||||||
print :: (string: String16)
|
print :: (string: String16)
|
||||||
handle := GetStdHandle(STD_OUTPUT_HANDLE)
|
handle := GetStdHandle(STD_OUTPUT_HANDLE)
|
||||||
WriteConsoleW(handle, (string.str)->*void, string.len->DWORD, 0, 0)
|
WriteConsoleW(handle, string.str->*void, string.len->DWORD, 0, 0)
|
||||||
|
|
||||||
performance_frequency: F64
|
performance_frequency: F64
|
||||||
time :: (): F64
|
time :: (): F64
|
||||||
|
|||||||
Reference in New Issue
Block a user