File: rsp_window.cpp

package info (click to toggle)
cen64 0.3%2Bgit20200723-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 4,504 kB
  • sloc: ansic: 24,277; cpp: 793; asm: 772; makefile: 14
file content (72 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// rsp_window.cpp: RSP view window.
//
// CEN64D: Cycle-Accurate Nintendo 64 Debugger
// Copyright (C) 2015, Tyler J. Stachecki.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//

#include "rsp_window.h"

static const char *regs[] = {
  "$r0",
  "$r1",
  "$r2",
  "$r3",
  "$r4",
  "$r5",
  "$r6",
  "$r7",
  "$r8",
  "$r9",
  "$r10",
  "$r11",
  "$r12",
  "$r13",
  "$r14",
  "$r15",
  "$r16",
  "$r17",
  "$r18",
  "$r19",
  "$r20",
  "$r21",
  "$r22",
  "$r23",
  "$r24",
  "$r25",
  "$r26",
  "$r27",
  "$r28",
  "$r29",
  "$r30",
  "$r31"
};

RSPWindow::RSPWindow(QAction *toggleAction, bool initiallyVisible)
  : ToggleWindow(tr("CEN64D: RSP"), toggleAction, initiallyVisible),
    memoryView(4), registerView(regs, sizeof(regs) / sizeof(*regs), 8) {
  setLayout(&layout);

  addressLabel.setText("Address: ");

  addressWidget.setLayout(&addressLayout);
  addressLayout.addWidget(&memoryView, 0, 1, 1, 2);
  addressLayout.addWidget(&addressLabel, 1, 1);
  addressLayout.addWidget(&addressLine, 1, 2);

  layout.addWidget(&disassemblyView, 0, 1);
  layout.addWidget(&registerView, 0, 2);
  layout.addWidget(&addressWidget, 1, 1, 1, 2);

  layout.setColumnStretch(1, 25);
  layout.setColumnStretch(2, 10);
  layout.setRowStretch(0, 20);
  layout.setRowStretch(1, 10);
}

RSPWindow::~RSPWindow() {
}