Commit af5d7a18 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Internationalised the command help and syntax

Deleted RISC OS 2 support. Use defines from OS_Byte and OS_Word headers.
Tested in a ROM build, help and syntax looked OK.

Version 2.18. Tagged as 'Hourglass-2_18'
parent 857a19c5
......@@ -14,18 +14,10 @@
#
# Makefile for Hourglass
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 25-May-94 AMcC Created.
#
COMPONENT = Hourglass
HEADER1 = Hourglass
ROM_SOURCE = Module.s
RESOURCES = no
include StdTools
include AAsmModule
......
# Only got CmdHelp
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "2.17"
Module_Version SETA 217
Module_MajorVersion SETS "2.18"
Module_Version SETA 218
Module_MinorVersion SETS ""
Module_Date SETS "14 Jan 2012"
Module_ApplicationDate SETS "14-Jan-12"
Module_Date SETS "25 Aug 2013"
Module_ApplicationDate SETS "25-Aug-13"
Module_ComponentName SETS "Hourglass"
Module_ComponentPath SETS "castle/RiscOS/Sources/Video/Render/Hourglass"
Module_FullVersion SETS "2.17"
Module_HelpVersion SETS "2.17 (14 Jan 2012)"
Module_FullVersion SETS "2.18"
Module_HelpVersion SETS "2.18 (25 Aug 2013)"
END
/* (2.17)
/* (2.18)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.17
#define Module_MajorVersion_CMHG 2.18
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Jan 2012
#define Module_Date_CMHG 25 Aug 2013
#define Module_MajorVersion "2.17"
#define Module_Version 217
#define Module_MajorVersion "2.18"
#define Module_Version 218
#define Module_MinorVersion ""
#define Module_Date "14 Jan 2012"
#define Module_Date "25 Aug 2013"
#define Module_ApplicationDate "14-Jan-12"
#define Module_ApplicationDate "25-Aug-13"
#define Module_ComponentName "Hourglass"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/Render/Hourglass"
#define Module_FullVersion "2.17"
#define Module_HelpVersion "2.17 (14 Jan 2012)"
#define Module_LibraryVersionInfo "2:17"
#define Module_FullVersion "2.18"
#define Module_HelpVersion "2.18 (25 Aug 2013)"
#define Module_LibraryVersionInfo "2:18"
......@@ -24,6 +24,8 @@
GET Hdr:Hourglass
GET Hdr:MsgTrans
GET Hdr:FSNumbers
GET Hdr:OsBytes
GET Hdr:OsWords
GET Hdr:NewErrors
GET Hdr:Proc
GET Hdr:Wimp
......@@ -45,13 +47,12 @@ debugdepth SETL {FALSE}
GBLL debugcurrent
debugcurrent SETL {FALSE}
bignum * &3FFFFFFF ; A large number to put into PercentageDepth
bignum * &3FFFFFFF ; A large number to put into PercentageDepth
; RISC OS 2 compatibility
[ :LNOT: :DEF: OldOs
GBLL OldOs
OldOs SETL {FALSE}
]
[ :LNOT: :DEF: international_help
GBLL international_help
international_help SETL {TRUE} ; Default to RISC OS 3.60+ internationalisation
]
; The constants defining the hourglass shape and position
......@@ -82,13 +83,6 @@ CharHeight * 9
DefaultColour1 * &00FFFF00 ; Cyan
DefaultColour3 * &00FF0000 ; Blue
WaitForVSync * 19
SetPointer * 106
NoPointer * 0
PointerOSWord * 21
WritePalette * 12
MySWIChunkBase * Module_SWISystemBase + HourglassSWI * Module_SWIChunkSize
ASSERT MySWIChunkBase = Hourglass_On
......@@ -153,15 +147,13 @@ Module_BaseAddr
DCD SWIHandlerCode-Module_BaseAddr
DCD SWIDecodingTable-Module_BaseAddr
DCD 0 ; SWIDecodingCode
DCD 0 ; MessagesFile
[ international_help
DCD MessageFileName-Module_BaseAddr ; MessagesFile
|
DCD 0
]
DCD FlagsTable-Module_BaseAddr
[ OldOs
UnknownSWIErrorMsg
DCD ErrorNumber_ModuleBadSWI
DCB "SWI value out of range for module "
]
SWIDecodingTable
TitleString
DCB "Hourglass", 0 ; Share
......@@ -179,8 +171,24 @@ HelpString
ALIGN
HelpAndCommandKeywordTable
Command "HOn", 0, 0
Command "HOff", 0, 0
[ international_help
Command "HOn", 0, 0, International_Help
Command "HOff", 0, 0, International_Help
DCB 0
HOn_Help
DCB "HHON", 0
HOn_Syntax
DCB "SHON", 0
HOff_Help
DCB "HHOFF", 0
HOff_Syntax
DCB "SHOFF", 0
ALIGN
MessageFileName
DCB "Resources:$.Resources.Hourglass.Messages", 0
|
Command "HOn", 0, 0, 0
Command "HOff", 0, 0, 0
DCB 0
HOn_Help
DCB "*HOn switches the hourglass on", 13
......@@ -190,6 +198,7 @@ HOff_Help
DCB "*HOff switches the hourglass off", 13
HOff_Syntax
DCB "Syntax: *HOff", 0
]
ALIGN
HOn_Code
......@@ -253,7 +262,7 @@ ExitInit
OSWord15BlockData
DCB 0 ; two dummy bytes so that the
DCB 0 ; data pointer is on a word boundary
DCB 0 ; Reason code: program pointer shape
DCB OWPointerAndMouse_SetPointerShape ; Reason code: program pointer shape
DCB 3 ; Initial pointer number
; (this toggles between 3 and 4)
DCB BytesPerLine
......@@ -298,7 +307,7 @@ ServiceCallEntry
DoServiceReset
Push "r0-r2, lr"
MOV r0, #253 ; Now check reset was NOT hard
MOV r0, #OsByte_RW_LastResetType ; Now check reset was NOT hard
MOV r1, #0 ; Read last reset type,
MOV r2, #255
SWI XOS_Byte ; only do reset when it was soft
......@@ -325,10 +334,6 @@ EndOfJumpTable
ASSERT HourglassSWICheckValue-Hourglass_On=(EndOfJumpTable - SWIJumpTable)/4
UnknownSWIError
[ OldOs
ADR r0, UnknownSWIErrorMsg
ORRS pc, lr, #V_bit
| ; OldOs
Push "r1-r7, lr"
ADR r0, ErrorBlock_ModuleBadSWI
MOV r1, #0 ; No message block
......@@ -340,8 +345,7 @@ UnknownSWIError
SWI XMessageTrans_ErrorLookup
Pull "r1-r7, pc"
MakeErrorBlock ModuleBadSWI
] ; OldOs
MakeInternatErrorBlock ModuleBadSWI,,BadSWI
; *****************************************************************************
;
......@@ -756,7 +760,7 @@ ProgramPointer ROUT
EOR r0, r0, #(3 :EOR: 4)
STRB r0, Block_PointerNumber
MOV r0, #PointerOSWord
MOV r0, #OsWord_DefinePointerAndMouse
ADR r1, OSWord15Block
SWI XOS_Word ; reprogram our pointer
......@@ -768,7 +772,7 @@ ProgramPointer ROUT
TEQ r5, r3 ; set the colour(s)/number for the next frame
TEQEQ r6, r4 ; avoid reprogramming colours unless strictly necessary
BEQ %FT10
MOV r0, #WaitForVSync ; at least one needs changing, so wait until VSync
MOV r0, #OsByte_Wait ; at least one needs changing, so wait until VSync
SWI XOS_Byte
MOV r0, #PaletteV
ADR r1, MyPaletteVRoutine
......@@ -789,7 +793,7 @@ ProgramPointer ROUT
ADR r0, CurrentColours
STMIA r0, { r3, r4 } ; update our idea of the current colour
10
MOV r0, #SetPointer
MOV r0, #OsByte_SelectPointer
LDRB r1, Block_PointerNumber
SWI XOS_Byte ; on exit, R1 is old shape/linkage
AND r1, r1, #&FF
......@@ -818,7 +822,7 @@ SetColour ROUT
MOV r14, r1, LSR #16
Push "r0, r14" ; Put data in to a stack frame
MOV r1, sp ; Address of recently stored data
MOV r0, #WritePalette
MOV r0, #OsWord_WritePalette
SWI XOS_Word
ADD sp, sp, #8 ; Trash stack frame
Pull "r0-r1, pc"
......@@ -871,7 +875,7 @@ InitialisePointerInfo Entry "r0-r2"
; out: Registers preserved.
RestorePointer Entry "r0-r4,r10-r11"
MOV r0, #SetPointer ; restore old pointer iff it was most recently changed by us
MOV r0, #OsByte_SelectPointer ; restore old pointer iff it was most recently changed by us
LDRB r1, ReturnPointer
SWI XOS_Byte ; on exit, R1 is old shape/linkage
AND r3, r1, #&FF
......@@ -894,7 +898,7 @@ RestorePointer Entry "r0-r4,r10-r11"
LDR r4, CurrentColour3
TEQ r3, r10
TEQEQ r4, r11
MOVNE r0, #WaitForVSync ; at least one needs changing, so wait until VSync
MOVNE r0, #OsByte_Wait ; at least one needs changing, so wait until VSync
SWINE XOS_Byte ; if called R1, R2 trashed
MOV r0, #1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment