Skip to content

Instantly share code, notes, and snippets.

ActRaiser (USA).sfc
Axelay (USA).sfc
Castlevania - Dracula X (USA).sfc
Chrono Trigger (USA).sfc
Donkey Kong Country (USA).sfc
Donkey Kong Country 2 - Diddy's Kong Quest (USA) (En,Fr).sfc
Donkey Kong Country 3 - Dixie Kong's Double Trouble! (USA) (En,Fr).sfc
EarthBound (USA).sfc
F-Zero (USA).sfc
Final Fantasy III (USA).sfc
Wii Games to Get
Created Wednesday 26 December 2012
In alphabetical order:
[ ] Blast Works: Build, Trade, Destroy [I played Tumiki Fighters; does that count?]
[ ] Castle of Shikigami III
[ ] de Blob [I played the original PC one; does that count?]
[ ] de Blob 2
[ ] Illvelo Wii
[ ] Kirby's Epic Yarn
type MemoryMap interface {
Physical(logical uint32) (physical uint32, inROM bool)
BankComment(bank byte) (bankComment string)
BankSize() uint32
}
// ...
func (lowrom) BankSize() uint32 {
return 0x8000

ui library implementation information

All platform-specific functionality is isolated in a mega-type sysData that stores OS toolkit handles and provides methods that do the work for the frontend API. The file sysdata.go defines a type cSysData that contains everything all platforms have in common and dummy definitions of the sysData functions that panic.

The key sysData function is sysData.make(). It takes two arguments: the initial text of the control (if any), and a pointer to a sysData that represents the window that holds the control. If this pointer is nil, we are creating a window instead, so any window-specific actions are taken here.

cSysData contains the control type as a number, an event channel where the object's standard event (close button for Window, click for Button, etc.) is stored, and a resize() function variable that is called to resize child controls on window resize.

Controls need only two functions: a make() function that builds the control, and a `setRe

A Stack is a stack of controls arranged horizontally or vertically. If horizontal, all controls take the same heights, and use their preferred widths. If vertical, all controls take the same widths, and use their preferred heights.

PROBLEM We want to have controls that stretch with the window SOLUTION Delegate one control as the "stretchy" control. s := NewVerticalStack(c1, c2, c3) s.SetStretchy(1) // c2

// 28 february 2014
package main
/*
These are wrapper functions for the functions in bleh_darwin.m to wrap around stdint.h type casting.
This will eventually be expanded to include the other Objective-C runtime support functions.
*/
// #cgo LDFLAGS: -lobjc -framework Foundation

Most GUI toolkits require you to use one thread. It doesn't matter which thread, so long as you only use one thread.

Cocoa, however, absolutely demands you use the very first OS thread created, called the "main thread", and provides no way to change which thread is used.

This basically means that instead of you saying

func main() {
    w := ui.NewWindow(blah blah blah)
    blah blah blah
 for { event loop }

Known To Have Ever Been Built Matrices

For convenience's sake, here are matrices of builds that I have personally done at least once. Each cell represents the run status. These matrices represent builds that I have done at any point in development; it is not a guarantee that the current version works. (I built this list to answer questions of whether or not ui works with a specific configuration.) Only configurations marked with a * are tested during active development.

| 386 | amd64 | arm ----- | ----- | ----- | ----- windows | works on windows; works on wine* | works on windows; fails on wine | (invalid) linux | see table below | see table below | Raspian: works darwin (Mac OS X) | works* (cross-compiled from 64-bit) | works* | (not applicable) dragonfly | untested | untested | ???? freebsd | untested (VM failure) | untested (VM failure) | untested

func (s *sysData) setProgress(percent int) {
ret := make(chan uiret)
defer close(ret)
style := classTypes[s.ctype].style
uitask <- &uimsg{
call: _setWindowLong,
p: []uintptr{
uintptr(s.hwnd),
uintptr(_GWL_STYLE),
uintptr(style | _PBS_MARQUEE),

bold

italic

strong

em

tt