mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-22 09:30:19 +00:00
Help is uppercase when lowercase is not supported
This commit is contained in:
parent
21f15171d8
commit
10f6c05e6d
@ -19,6 +19,7 @@ type Apple2 struct {
|
||||
softVideoSwitch *SoftVideoSwitch
|
||||
board string
|
||||
isApple2e bool
|
||||
hasLowerCase bool
|
||||
isFourColors bool // An Apple II without the 6 color mod
|
||||
commandChannel chan command
|
||||
|
||||
|
@ -162,6 +162,9 @@ func SnapshotCharacterGenerator(vs VideoSource, isAltText bool) *image.RGBA {
|
||||
|
||||
// SnapshotMessageGenerator shows a message on the screen
|
||||
func SnapshotMessageGenerator(vs VideoSource, message string) *image.RGBA {
|
||||
if !vs.SupportsLowercase() {
|
||||
message = strings.ToUpper(message)
|
||||
}
|
||||
lines := strings.Split(message, "\n")
|
||||
text := make([]uint8, textLines*text40Columns)
|
||||
for i := range text {
|
||||
|
@ -134,6 +134,11 @@ func (ts *TestScenario) GetCardImage(light color.Color) *image.RGBA {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SupportsLowercase returns true if the video source supports lowercase
|
||||
func (ts *TestScenario) SupportsLowercase() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func buildImageName(name string, screenMode int, altSet bool) string {
|
||||
var screenName string
|
||||
switch screenMode {
|
||||
|
@ -53,4 +53,6 @@ type VideoSource interface {
|
||||
GetSuperVideoMemory() []uint8
|
||||
// GetCardImage returns an image provided by a card, like the videx card
|
||||
GetCardImage(light color.Color) *image.RGBA
|
||||
// SupportsLowercase returns true if the video source supports lowercase
|
||||
SupportsLowercase() bool
|
||||
}
|
||||
|
2
setup.go
2
setup.go
@ -19,10 +19,12 @@ func configure(configuration *configuration) (*Apple2, error) {
|
||||
|
||||
addApple2SoftSwitches(a.io)
|
||||
if a.isApple2e {
|
||||
a.hasLowerCase = true
|
||||
a.mmu.initExtendedRAM(1)
|
||||
addApple2ESoftSwitches(a.io)
|
||||
}
|
||||
if board == "base64a" {
|
||||
a.hasLowerCase = true
|
||||
addBase64aSoftSwitches(a.io)
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,11 @@ func (a *Apple2) GetCardImage(light color.Color) *image.RGBA {
|
||||
return a.softVideoSwitch.BuildAlternateImage(light)
|
||||
}
|
||||
|
||||
// SupportsLowercase returns true if the video source supports lowercase
|
||||
func (a *Apple2) SupportsLowercase() bool {
|
||||
return a.hasLowerCase
|
||||
}
|
||||
|
||||
// DumpTextModeAnsi returns the text mode contents using ANSI escape codes for reverse and flash
|
||||
func DumpTextModeAnsi(a *Apple2) string {
|
||||
is80Columns := a.io.isSoftSwitchActive(ioFlag80Col)
|
||||
|
Loading…
Reference in New Issue
Block a user