Cleanup of comments.
This commit is contained in:
@@ -3,26 +3,26 @@ package simulator
|
|||||||
import emu "../machine"
|
import emu "../machine"
|
||||||
import rl "vendor:raylib"
|
import rl "vendor:raylib"
|
||||||
|
|
||||||
// @ Window
|
// Window
|
||||||
WINDOW_WIDTH :: 1920
|
WINDOW_WIDTH :: 1920
|
||||||
WINDOW_HEIGHT :: 1080
|
WINDOW_HEIGHT :: 1080
|
||||||
|
|
||||||
// @ Layout proportions
|
// Layout proportions
|
||||||
// Sidebar takes 20% of screen width on each side; display takes the rest.
|
// Sidebar takes 20% of screen width on each side; display takes the rest.
|
||||||
// The center column splits vertically: 40% display, 60% debug panel.
|
// The center column splits vertically: 40% display, 60% debug panel.
|
||||||
SIDEBAR_PERCENT :: f32(0.20)
|
SIDEBAR_PERCENT :: f32(0.20)
|
||||||
DISPLAY_V_RATIO :: f32(0.40)
|
DISPLAY_V_RATIO :: f32(0.40)
|
||||||
// @ Fixed heights
|
// Fixed heights
|
||||||
CONTROL_BAR_H :: f32(50)
|
CONTROL_BAR_H :: f32(50)
|
||||||
STATUS_BAR_H :: f32(30)
|
STATUS_BAR_H :: f32(30)
|
||||||
// @ Layout constants
|
// Layout constants
|
||||||
PADDING_X :: f32(10)
|
PADDING_X :: f32(10)
|
||||||
PADDING_Y :: f32(8)
|
PADDING_Y :: f32(8)
|
||||||
PANEL_HEADER :: f32(24)
|
PANEL_HEADER :: f32(24)
|
||||||
// @ Buttons
|
// Buttons
|
||||||
BUTTON_HEIGHT :: 30
|
BUTTON_HEIGHT :: 30
|
||||||
BUTTON_WIDTH :: 120
|
BUTTON_WIDTH :: 120
|
||||||
// @ Fonts
|
// Fonts
|
||||||
BIG_FONT_SIZE :: 20
|
BIG_FONT_SIZE :: 20
|
||||||
KEYPAD_FONT_SIZE :: 18
|
KEYPAD_FONT_SIZE :: 18
|
||||||
|
|
||||||
@@ -120,7 +120,6 @@ run_gui :: proc(sim: ^Simulator) {
|
|||||||
delete(sim.disasm)
|
delete(sim.disasm)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TODO: If this grows lets move it into its own file
|
|
||||||
calc_layout :: proc(screen_width: f32, screen_height: f32) -> Layout {
|
calc_layout :: proc(screen_width: f32, screen_height: f32) -> Layout {
|
||||||
// Control bar is a fixed height frozen at top of gui, all items start below it.
|
// Control bar is a fixed height frozen at top of gui, all items start below it.
|
||||||
y_pos := CONTROL_BAR_H
|
y_pos := CONTROL_BAR_H
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ gui_file_loader :: proc(rect: rl.Rectangle, sim: ^Simulator) {
|
|||||||
rom_path := string(ret)
|
rom_path := string(ret)
|
||||||
if rom_path == "" do return
|
if rom_path == "" do return
|
||||||
|
|
||||||
// reset machine state
|
// Reset machine state
|
||||||
emu.reset_machine(sim.machine)
|
emu.reset_machine(sim.machine)
|
||||||
|
|
||||||
// load new rom
|
// load new rom
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import rl "vendor:raylib"
|
|||||||
|
|
||||||
StatusIconShape :: enum { CIRCLE, SQUARE }
|
StatusIconShape :: enum { CIRCLE, SQUARE }
|
||||||
|
|
||||||
// @TODO: render status bar text
|
|
||||||
gui_status_bar :: proc(rect: rl.Rectangle, sim: ^Simulator) {
|
gui_status_bar :: proc(rect: rl.Rectangle, sim: ^Simulator) {
|
||||||
// Left to right text draws
|
// Left to right text draws
|
||||||
rl.DrawRectangleLinesEx(rect, 1, rl.DARKGRAY)
|
rl.DrawRectangleLinesEx(rect, 1, rl.DARKGRAY)
|
||||||
|
|||||||
Reference in New Issue
Block a user