Source
...
Target
Commits (13)
  • Robert Sprowson's avatar
    Fix abort when sorting the sprites by name and one or more sprite viewers are... · 52984de9
    Robert Sprowson authored
    Fix abort when sorting the sprites by name and one or more sprite viewers are open, also massively simplified it since the copying around of main_sprite blocks was pointless - much simpler to just rejoin the linked list leaving the data in place.
    
    *Tidy up
     Delete awk.*, change to use central 'AwkVers' script.
     Delete h.types.
     Delete h.Paint, it's a duplicate of h.main.
     Delete writepixel, swap to using the one in RISCOS_Lib
     Retire 'h.fixes', switches collapsed, bugfixes proven after 18 years use.
     Cast away some warnings.
     Sprinkled in some consts, moved pointer qualifiers to get syntax colouring
     right.
     Remove local SWI defines, read from <swis.h> now.
     !MkInstall now installs into <Install$Dir>.Apps
    *Little UI changes
     Make the colour number in the colour picker be in the right place vertically
     and correct horizontal position of 'T' and 'E' for ECFs.
     In the create new sprite dialogue box the 32k and 16M options are shaded
     when a palette is requested, this avoids the problem of selecting a deep
     colour mode (which trapped the radio icon in a shaded paletted selection).
     The 'Selection' menu is now shaded when there are zero sprites in the
     file
    *Sprite filer
     Fix tiled main window fill to work in EX0 modes and not overwrite in EX2
     modes (was using the sprite's mode word not the current mode to deduce eigen
     factors), leading to odd chequer board areas not being redrawn.
     Refactored main_clear_background() to use stronger typing of RISC_OSLib
     rather than _swix where possible.
     A failure to get the Wimp pixel translation table now falls back to solid
     fill
     Double clicking on a sprite in the sprite file window no longer leaves it
     selected, to mimic the filer.
     Set DISPLAY_MARGIN to 0 to counter for the recent increase from 32 to 40
     of main_FILER_TextHeight
     Added 'Sort by size' after 'Sort by name'
    
    Version 2.02. Tagged as 'Paint-2_02'
    52984de9
  • Robert Sprowson's avatar
    Prune the plethora of targets a bit. · cba6e241
    Robert Sprowson authored
    Spurious ';' after an if at line 2386 of c.Main deleted, something to do with scroll wheel support. Untested.
    Refer to FileType_ using the filetypes header file.
    Internationalised "Selection" when saving a sprite selection.
    main_save_selection wasn't checking if fwrite() worked so never reported 'disc full'.
    Turn on egg timer during main_save_selection().
    Fix (de)selection bug when in full sprite info view, the 'spritesperrow' was being rounded down to zero, and unlike everywhere else it wasn't being adjusted back to a minimum of 1.
    
    Version 2.03. Tagged as 'Paint-2_03'
    cba6e241
  • Robert Sprowson's avatar
    Redundant files removed. · 2c57b174
    Robert Sprowson authored
    2c57b174
  • Robert Sprowson's avatar
    Redundant files removed. · af6ac588
    Robert Sprowson authored
    af6ac588
  • Robert Sprowson's avatar
    Clean up pass. · f11f2074
    Robert Sprowson authored
    No functional changes, but it's now a consistent ball of spaghetti.
    f11f2074
  • Robert Sprowson's avatar
    Simplify _swix to os_swix. · a42c3c38
    Robert Sprowson authored
    Function main_icon_bboxes() reordered to only call the SWIs it needs to fulfil the requested information.
    
    Version 2.04. Tagged as 'Paint-2_04'
    a42c3c38
  • Robert Sprowson's avatar
    Switch to using common JPEG code in RISC_OSLib. · e5100890
    Robert Sprowson authored
    Allows better sharing when !Draw is also in ROM.
    Fix long (long) standing bug of not being able to drag JPEGs into !Paint using the RAM transfer protocol - some dubious pointer arithmetic meant the wrong address of JPEG data was used and so gave an error.
    The 3 paths that result in a JPEG->Sprite conversion now share code too.
    Remove local definition of FileType_JPEG, use that in the exports.
    
    Version 2.05. Tagged as 'Paint-2_05'
    e5100890
  • Robert Sprowson's avatar
    Minor reformatting step. · a0724eed
    Robert Sprowson authored
    Not tested, not tagged.
    a0724eed
  • Robert Sprowson's avatar
    Fix crashes when dragging from the sprite filer to the filer to save sprite(s). · 97539240
    Robert Sprowson authored
    The use of DragASprite tended to cause an abort somewhere in the kernel's sprite handling code for some reason, changed this to instead create a temporary WIMP icon on the sprite filer in question which can than be referred to in a normal call to xfersend(). The rest of the save is then handled by the normal xfersend() handlers and the temporary icon destroyed since the WIMP takes a copy anyway.
    Has the extra benefits
     * Dragging from the sprite filer now obeys the 'solid drag' flags.
     * Dragging from the sprite filer no longer crashes if dropping back on the originating filer window itself.
    When dragging a selection from the filer the selection is cleared at the end of the drag, to match the behaviour of the desktop filer. When saving a selection from the 'Selection' menu, they are not deselected.
    Changed to use the 'package' icon when dragging multiple sprites, or file_ff9 for singles.
    
    Version 2.06. Tagged as 'Paint-2_06'
    97539240
  • Robert Sprowson's avatar
    Help messages refined. · ecdac85b
    Robert Sprowson authored
    Retagged as Paint-2_06.
    ecdac85b
  • Robert Sprowson's avatar
    Colour picker help made more helpful. · ee21e95d
    Robert Sprowson authored
    Previously, the help requests would end up in the background event handler which didn't look at the window handle and would just return "This is paint" even if the handle was that of the colour picker dialogue.
    Also now passes documented 0x80000000 and 0x7FFFFFFF on opening rather than zero.
    
    Version 2.07. Tagged as 'Paint-2_07'
    ee21e95d
  • Jeffrey Lee's avatar
    Fix CATCH_SIGNALS code to report the right error if WIMP$ScrapDir is undefined · 58d77a84
    Jeffrey Lee authored
    Detail:
      c/Main - Previously the signal handling code was using a pointer to the original error block when reporting the error to the user. This could cause the wrong error to be reported in some situations (e.g. if WIMP$ScrapDir is undefined). Instead, the code now stores a copy of the error block on the stack.
    Admin:
      Tested on rev A2 BB-xM
    
    
    Version 2.08. Tagged as 'Paint-2_08'
    58d77a84
  • Robert Sprowson's avatar
    Failure to plot JPEG would not switch output back. · 13cf3af4
    Robert Sprowson authored
    Always switches back now before reporting the error.
    
    Version 2.09. Tagged as 'Paint-2_09'
    13cf3af4
| Copyright 1996 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
Echo Cleaning <Obey$Dir> ...
AMU_machine INSTDIR=!Paint clean_all
StripDepnd Makefile
| Copyright 1996 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
WIMPSlot -min 1996K -max 1996K
Dir <Obey$Dir>
Echo Making <Obey$Dir> ...
AMU_machine THROWBACK=-throwback INSTDIR=!Paint asms
| Copyright 1996 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
WIMPSlot -min 1996K -max 1996K
Dir <Obey$Dir>
Echo Making <Obey$Dir> ...
AMU_machine THROWBACK=-throwback INSTDIR=debug.!Paint installd
| Copyright 1996 Acorn Computers Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
WIMPSlot -min 1996K -max 1996K
Dir <Obey$Dir>
Echo Making <Obey$Dir> ...
AMU_machine THROWBACK=-throwback INSTDIR=!Paint install
...@@ -14,4 +14,5 @@ ...@@ -14,4 +14,5 @@
| |
Dir <Obey$Dir> Dir <Obey$Dir>
wimpslot -min 1024k wimpslot -min 1024k
amu_machine appd cdir debug.!Paint
amu_machine installd THROWBACK=-throwback INSTDIR=debug.!Paint
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
| |
Dir <Obey$Dir> Dir <Obey$Dir>
wimpslot -min 1024k wimpslot -min 1024k
cdir <Install$Dir>.!Paint cdir <Install$Dir>.Apps.!Paint
amu_machine install INSTDIR=<Install$Dir>.!Paint amu_machine install INSTDIR=<Install$Dir>.Apps.!Paint
s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
awk/** gitlab-language=awk linguist-language=awk linguist-detectable=true
*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true *,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
c/** gitlab-language=c linguist-language=c linguist-detectable=true c/** gitlab-language=c linguist-language=c linguist-detectable=true
**/c/** gitlab-language=c linguist-language=c linguist-detectable=true **/c/** gitlab-language=c linguist-language=c linguist-detectable=true
......
...@@ -32,7 +32,7 @@ MODULE = rm.!Paint ...@@ -32,7 +32,7 @@ MODULE = rm.!Paint
ROM_MODULE = aof.Paint ROM_MODULE = aof.Paint
RDIR = Resources RDIR = Resources
LDIR = ${RDIR}.${LOCALE} LDIR = ${RDIR}.${LOCALE}
MSGVERSION = ${AWK} -f Build:AwkVers
MSGS = Resources.GenMessage MSGS = Resources.GenMessage
# #
...@@ -54,12 +54,13 @@ RM = remove ...@@ -54,12 +54,13 @@ RM = remove
SQUEEZE = squeeze SQUEEZE = squeeze
WIPE = -wipe WIPE = -wipe
XWIPE = x wipe XWIPE = x wipe
AWK = GNU.gawk
AFLAGS = ${THROWBACK} -depend !Depend -nocache -stamp -quit AFLAGS = ${THROWBACK} -depend !Depend -nocache -stamp -quit
CFLAGS = ${THROWBACK} -c -depend !Depend -fah ${INCLUDES} -wp CFLAGS = ${THROWBACK} -c -depend !Depend -fah ${INCLUDES} -wp
CPFLAGS = ~cfr~v CPFLAGS = ~cfr~v
SQFLAGS = SQFLAGS =
WFLAGS = ~c~v WFLAGS = ~c~vf
# #
# Libraries # Libraries
...@@ -107,11 +108,11 @@ DFILES = \ ...@@ -107,11 +108,11 @@ DFILES = \
debug.${APP}.Templates debug.${APP}.Templates
OBJS = o.colours o.main o.menus o.psprite o.sprwindow o.tools o.toolwindow \ OBJS = o.colours o.main o.menus o.psprite o.sprwindow o.tools o.toolwindow \
o.jpeg o.writepixel o.AltRename o.PaintLib o.AltRename o.PaintLib
OBJSZ = oz.colours oz.main oz.menus oz.psprite oz.sprwindow\ OBJSZ = oz.colours oz.main oz.menus oz.psprite oz.sprwindow\
oz.tools oz.toolwindow o.jpeg o.writepixel oz.AltRename oz.PaintLib oz.tools oz.toolwindow oz.AltRename oz.PaintLib
OBJSD = od.colours od.ftrace od.guard od.main od.menus\ OBJSD = od.colours od.ftrace od.guard od.main od.menus\
od.psprite od.sprwindow od.tools od.toolwindow o.jpeg o.m o.writepixel\ od.psprite od.sprwindow od.tools od.toolwindow o.m\
od.AltRename od.PaintLib od.AltRename od.PaintLib
ASMS = s.colours s.main s.menus s.psprite s.sprwindow s.tools s.toolwindow ASMS = s.colours s.main s.menus s.psprite s.sprwindow s.tools s.toolwindow
INCS = i.colours i.main i.menus i.psprite i.sprwindow i.tools i.toolwindow INCS = i.colours i.main i.menus i.psprite i.sprwindow i.tools i.toolwindow
...@@ -130,8 +131,6 @@ INCS = i.colours i.main i.menus i.psprite i.sprwindow i.tools i.toolwindow ...@@ -130,8 +131,6 @@ INCS = i.colours i.main i.menus i.psprite i.sprwindow i.tools i.toolwindow
# #
# Main rules: # Main rules:
# #
# Application
#
all: ${FILES} all: ${FILES}
@echo ${COMPONENT}: Application built (Disc) @echo ${COMPONENT}: Application built (Disc)
...@@ -161,7 +160,7 @@ installd: ${FILESD} ...@@ -161,7 +160,7 @@ installd: ${FILESD}
${CP} ${LDIR}.!Help ${INSTDIR}.!Help ${CPFLAGS} ${CP} ${LDIR}.!Help ${INSTDIR}.!Help ${CPFLAGS}
${CP} ${LDIR}.!Run ${INSTDIR}.!Run ${CPFLAGS} ${CP} ${LDIR}.!Run ${INSTDIR}.!Run ${CPFLAGS}
${CP} abs.!RunImageD ${INSTDIR}.!RunImage ${CPFLAGS} ${CP} abs.!RunImageD ${INSTDIR}.!RunImage ${CPFLAGS}
${CP} ${LDIR}.Messages ${INSTDIR}.Messages ${CPFLAGS} ${CP} ${MSGS} ${INSTDIR}.Messages ${CPFLAGS}
${CP} ${LDIR}.Sprites ${INSTDIR}.Sprites ${CPFLAGS} ${CP} ${LDIR}.Sprites ${INSTDIR}.Sprites ${CPFLAGS}
${CP} ${LDIR}.Templates ${INSTDIR}.Templates ${CPFLAGS} ${CP} ${LDIR}.Templates ${INSTDIR}.Templates ${CPFLAGS}
Access ${INSTDIR}.!Boot lr/r Access ${INSTDIR}.!Boot lr/r
...@@ -196,6 +195,8 @@ clean: ...@@ -196,6 +195,8 @@ clean:
${XWIPE} s.* ${WFLAGS} ${XWIPE} s.* ${WFLAGS}
${XWIPE} linked.* ${WFLAGS} ${XWIPE} linked.* ${WFLAGS}
${XWIPE} map.* ${WFLAGS} ${XWIPE} map.* ${WFLAGS}
${XWIPE} debug.!Paint.* ${WFLAGS}
${XWIPE} !Paint.* ${WFLAGS}
${RM} abs.!RunImage ${RM} abs.!RunImage
${RM} abs.!RunImageD ${RM} abs.!RunImageD
${RM} ${ROM_MODULE} ${RM} ${ROM_MODULE}
...@@ -203,39 +204,6 @@ clean: ...@@ -203,39 +204,6 @@ clean:
${RM} ${MODULE} ${RM} ${MODULE}
@echo ${COMPONENT}: cleaned @echo ${COMPONENT}: cleaned
#
# Development rules:
#
app: ${FILES}
@echo Made application ${APP}
appd: ${DFILES}
@echo Made debug.${APP}
mod: ${MODULE}
@echo ${COMPONENT}: Module built (RAM)
asms: ${ASMS}
incs: ${INCS}
clean_all:
x Access ${INSTDIR}.!Boot rw/rw
x Access ${INSTDIR}.!Help rw/rw
x Access ${INSTDIR}.!Run rw/rw
x Access ${INSTDIR}.!RunImage rw/rw
x Access ${INSTDIR}.Messages rw/rw
x Access ${INSTDIR}.Sprites rw/rw
x Access ${INSTDIR}.Templates rw/rw
Destroy ${OBJS} ${OBJSZ} ${OBJSD} o.ModuleWrap \
${APP}.!RunImage \
debug.${APP}.!RunImage \
${ROM_MODULE} ${MODULE} \
${ASMS} s.Appname s.ModuleWrap s.ResFiles \
${DFILES} ${INSTDIR}.!Boot ${INSTDIR}.!Help ${INSTDIR}.!Run \
${INSTDIR}.!RunImage ${INSTDIR}.Messages ${INSTDIR}.Sprites \
${INSTDIR}.Templates
# #
# Static dependencies: # Static dependencies:
# #
...@@ -262,8 +230,8 @@ oz.ModuleWrap: s.ModuleWrap ${MSGS} s.AppName ${RESFILES} s.Resfiles ...@@ -262,8 +230,8 @@ oz.ModuleWrap: s.ModuleWrap ${MSGS} s.AppName ${RESFILES} s.Resfiles
s.ModuleWrap: ${WRAPPER} s.ModuleWrap: ${WRAPPER}
${CP} ${WRAPPER} $@ ${CPFLAGS} ${CP} ${WRAPPER} $@ ${CPFLAGS}
${MSGS}: ${LDIR}.Messages awk.Version ${MSGS}: ${LDIR}.Messages VersionNum
GNU.gawk -f awk.Version ${LDIR}.Messages > $@ ${MSGVERSION} ${LDIR}.Messages > $@
s.ResFiles: asm.ResFiles s.ResFiles: asm.ResFiles
${CP} asm.ResFiles $@ ${CPFLAGS} ${CP} asm.ResFiles $@ ${CPFLAGS}
......
No preview for this file type
No preview for this file type
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "2.01" Module_MajorVersion SETS "2.09"
Module_Version SETA 201 Module_Version SETA 209
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "01 Oct 2009" Module_Date SETS "24 Sep 2011"
Module_ApplicationDate SETS "01-Oct-09" Module_ApplicationDate SETS "24-Sep-11"
Module_ComponentName SETS "Paint" Module_ComponentName SETS "Paint"
Module_ComponentPath SETS "castle/RiscOS/Sources/Apps/Paint" Module_ComponentPath SETS "castle/RiscOS/Sources/Apps/Paint"
Module_FullVersion SETS "2.01" Module_FullVersion SETS "2.09"
Module_HelpVersion SETS "2.01 (01 Oct 2009)" Module_HelpVersion SETS "2.09 (24 Sep 2011)"
END END
/* (2.01) /* (2.09)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 2.01 #define Module_MajorVersion_CMHG 2.09
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 01 Oct 2009 #define Module_Date_CMHG 24 Sep 2011
#define Module_MajorVersion "2.01" #define Module_MajorVersion "2.09"
#define Module_Version 201 #define Module_Version 209
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "01 Oct 2009" #define Module_Date "24 Sep 2011"
#define Module_ApplicationDate "01-Oct-09" #define Module_ApplicationDate "24-Sep-11"
#define Module_ComponentName "Paint" #define Module_ComponentName "Paint"
#define Module_ComponentPath "castle/RiscOS/Sources/Apps/Paint" #define Module_ComponentPath "castle/RiscOS/Sources/Apps/Paint"
#define Module_FullVersion "2.01" #define Module_FullVersion "2.09"
#define Module_HelpVersion "2.01 (01 Oct 2009)" #define Module_HelpVersion "2.09 (24 Sep 2011)"
#define Module_LibraryVersionInfo "2:1" #define Module_LibraryVersionInfo "2:9"
;ObjAsm file for JPEG
;written by DefMod (Aug 16 1994) on Tue Sep 20 15:06:43 1994
;Tweaked for 32-bit by KBracey on Sat Nov 27 1999
R0 RN 0
R1 RN 1
R2 RN 2
R3 RN 3
R4 RN 4
R5 RN 5
R6 RN 6
R7 RN 7
R8 RN 8
R9 RN 9
A1 RN 0
A2 RN 1
A3 RN 2
A4 RN 3
V1 RN 4
V2 RN 5
V3 RN 6
V4 RN 7
V5 RN 8
V6 RN 9
R RN 0
SL RN 10
FP RN 11
IP RN 12
SP RN 13
LR RN 14
PC RN 15
GET Hdr:ListOpts
GET Hdr:APCS.<APCS>
EXPORT xjpeginfo_dimensions
EXPORT jpeginfo_dimensions
EXPORT xjpegfileinfo_dimensions
EXPORT jpegfileinfo_dimensions
EXPORT xjpeg_plot_scaled
EXPORT jpeg_plot_scaled
EXPORT xjpeg_plot_file_scaled
EXPORT jpeg_plot_file_scaled
EXPORT xjpeg_plot_transformed
EXPORT jpeg_plot_transformed
EXPORT xjpeg_plot_file_transformed
EXPORT jpeg_plot_file_transformed
AREA |SWI$$Code|, CODE, READONLY
xjpeginfo_dimensions ROUT
MOV IP, LR
STMFD SP!, {A3, A4, V1, V2, V3}
MOV R2, A2
MOV R1, A1
MOV R0, #&1
SWI &69980
BVS %99
LDR LR, [SP, #0]
TEQ LR, #0
STRNE R0, [LR]
LDR LR, [SP, #4]
TEQ LR, #0
STRNE R2, [LR]
LDR LR, [SP, #20]
TEQ LR, #0
STRNE R3, [LR]
LDR LR, [SP, #24]
TEQ LR, #0
STRNE R4, [LR]
LDR LR, [SP, #28]
TEQ LR, #0
STRNE R5, [LR]
MOV R, #0
99 ADD SP, SP, #8
LDMFD SP!, {V1, V2, V3}
Return ,LinkNotStacked,,IP
jpeginfo_dimensions ROUT
STMFD SP!, {A3, A4, V1, V2, V3}
MOV R2, A2
MOV R1, A1
MOV R0, #&1
SWI &49980
LDR IP, [SP, #0]
TEQ IP, #0
STRNE R2, [IP]
LDR IP, [SP, #4]
TEQ IP, #0
STRNE R3, [IP]
LDR IP, [SP, #20]
TEQ IP, #0
STRNE R4, [IP]
LDR IP, [SP, #24]
TEQ IP, #0
STRNE R5, [IP]
ADD SP, SP, #8
LDMFD SP!, {V1, V2, V3}
Return ,LinkNotStacked
xjpegfileinfo_dimensions ROUT
MOV IP, LR
STMFD SP!, {A2, A3, A4, V1, V2, V3}
MOV R1, A1
MOV R0, #&1
SWI &69981
BVS %99
LDR LR, [SP, #0]
TEQ LR, #0
STRNE R0, [LR]
LDR LR, [SP, #4]
TEQ LR, #0
STRNE R2, [LR]
LDR LR, [SP, #8]
TEQ LR, #0
STRNE R3, [LR]
LDR LR, [SP, #24]
TEQ LR, #0
STRNE R4, [LR]
LDR LR, [SP, #28]
TEQ LR, #0
STRNE R5, [LR]
MOV R, #0
99 ADD SP, SP, #12
LDMFD SP!, {V1, V2, V3}
Return ,LinkNotStacked,,IP
jpegfileinfo_dimensions ROUT
STMFD SP!, {A2, A3, A4, V1, V2, V3}
MOV R1, A1
MOV R0, #&1
SWI &49981
LDR IP, [SP, #0]
TEQ IP, #0
STRNE R2, [IP]
LDR IP, [SP, #4]
TEQ IP, #0
STRNE R3, [IP]
LDR IP, [SP, #8]
TEQ IP, #0
STRNE R4, [IP]
LDR IP, [SP, #24]
TEQ IP, #0
STRNE R5, [IP]
ADD SP, SP, #12
LDMFD SP!, {V1, V2, V3}
Return ,LinkNotStacked
xjpeg_plot_scaled ROUT
MOV IP, SP
STMFD SP!, {V1, V2, LR}
LDMFD IP, {R4, R5}
SWI &69982
MOVVC R, #0
Return "V1, V2"
jpeg_plot_scaled ROUT
MOV IP, SP
STMFD SP!, {V1, V2, LR}
LDMFD IP, {R4, R5}
SWI &49982
Return "V1, V2"
xjpeg_plot_file_scaled ROUT
MOV IP, SP
STMFD SP!, {V1, LR}
LDMFD IP, {R4}
SWI &69983
MOVVC R, #0
Return "V1"
jpeg_plot_file_scaled ROUT
MOV IP, SP
STMFD SP!, {V1, LR}
LDMFD IP, {R4}
SWI &49983
Return "V1"
xjpeg_plot_transformed ROUT
MOV IP, LR
SWI &69984
MOVVC R, #0
Return ,LinkNotStacked,,IP
jpeg_plot_transformed ROUT
SWI &49984
Return ,LinkNotStacked
xjpeg_plot_file_transformed ROUT
MOV IP, LR
SWI &69985
MOVVC R, #0
Return ,LinkNotStacked,,IP
jpeg_plot_file_transformed ROUT
SWI &49985
Return ,LinkNotStacked
END
;ObjAsm file for OSSpriteOp_{WritePixelColour,WritePixelMask}
;written by DefMod (Oct 24 1994) on Wed Oct 26 11:31:56 1994
;Copyright Acorn Computers Ltd, 1994
;Tweaked for 32-bit by KBracey on Sat Nov 27 1999
R0 RN 0
R1 RN 1
R2 RN 2
R3 RN 3
R4 RN 4
R5 RN 5
R6 RN 6
R7 RN 7
R8 RN 8
R9 RN 9
A1 RN 0
A2 RN 1
A3 RN 2
A4 RN 3
V1 RN 4
V2 RN 5
V3 RN 6
V4 RN 7
V5 RN 8
V6 RN 9
R RN 0
SL RN 10
FP RN 11
IP RN 12
SP RN 13
LR RN 14
PC RN 15
GET Hdr:ListOpts
GET Hdr:APCS.<APCS>
EXPORT xosspriteop_write_pixel_colour
EXPORT xosspriteop_write_pixel_mask
AREA |SWI$$Code|, CODE, READONLY
xosspriteop_write_pixel_colour ROUT
MOV IP, SP
STMFD SP!, {V1, V2, V3, LR}
LDMFD IP, {R4, R5, R6}
ORR R0, R0, #&2A
SWI &2002E
MOVVC R, #0
Return "V1, V2, V3"
xosspriteop_write_pixel_mask ROUT
MOV IP, SP
STMFD SP!, {V1, V2, LR}
LDMFD IP, {R4, R5}
ORR R0, R0, #&2C
SWI &2002E
MOVVC R, #0
Return "V1, V2"
END
# Generate an assembler header file containing ApplicationName
# and ApplicationVersion using information in the Messages file.
# Component version and date need only be updated in Messages file
#
BEGIN {
found = 0
}
{
if (!found) {
split($1, Id, ":")
if (Id[1] == "PntID") {
found = 1
split($2, Date, "-")
}
}
}
END {
printf("; AppName - generated from Messages, used by ModuleWrap\n;\n")
printf(" GBLS ApplicationName\n")
printf("ApplicationName SETS \"Paint\"\n")
printf(" GBLS ApplicationVersion\n")
printf("ApplicationVersion SETS \"%s %s %s 19%s\"\n\n", Id[2], Date[1], Date[2], Date[3])
printf(" END\n")
}
#
# Output a messages file,with the ID token replaced with the date taken from the VersionNum file
#
BEGIN {
while (getline < "VersionNum" > 0) {
split($0, Version);
if (Version[1] == "#define") {
if (Version[2] == "Module_ApplicationDate") {
Date = substr(Version[3], 2, length(Version[3]) -2 );
}
if (Version[2] == "Module_MajorVersion_CMHG") {
VString = Version[3];
}
}
}
}
/^PntID/ { printf("PntID:%s (%s)\n", VString, Date); done = 1; next; }
{ print }
END {
if (!done) {
printf("PntID:%s (%s)\n", VString, Date);
}
}
...@@ -12,47 +12,48 @@ ...@@ -12,47 +12,48 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#include "AltRename.h" #include <swis.h>
#include <string.h>
#include "os.h"
#include "bbc.h" #include "bbc.h"
#include "wimpt.h" #include "wimpt.h"
#include "werr.h" #include "werr.h"
#include "string.h" #include "sprite.h"
#include "AltRename.h"
#include "PSprite.h" #include "PSprite.h"
#include "PaintLib.h" #include "PaintLib.h"
#include "os.h"
#include "main.h" #include "main.h"
#include "sprite.h"
#include "SprWindow.h" #include "SprWindow.h"
#include "swis.h"
#include "akbd.h" #include "akbd.h"
static wimp_i rename_icon=-1; static wimp_i rename_icon = -1;
static char rename_buffer[16]; static char rename_buffer[16];
static main_window* rename_window; static main_window *rename_window;
static main_sprite* rename_sprite; static main_sprite *rename_sprite;
static wimp_box rename_bbox; static wimp_box rename_bbox;
static int rename_sprites_per_row; static int rename_sprites_per_row;
static void AltRename_renamesprite(main_sprite* sprite,char* newname) static void altrename_renamesprite (main_sprite *sprite, char *newname)
{
sprite_id sid; { sprite_id sid;
char name[NAME_LIMIT+1]; char name[NAME_LIMIT+1];
sid.tag = sprite_id_name; /*doesn't flex*/ sid.tag = sprite_id_name; /*doesn't flex*/
sid.s.name = newname; sid.s.name = newname;
if (*newname==0) return; if (*newname == 0) return;
/* check if new name exists */ /* check if new name exists */
if (!sprite_select (sprite->file->spritearea,&sid)) return ; if (!sprite_select (sprite->file->spritearea,&sid)) return;
strncpy(name,psprite_address(sprite)->name,NAME_LIMIT); strncpy (name, psprite_address (sprite)->name, NAME_LIMIT);
name[NAME_LIMIT]=0; name[NAME_LIMIT] = 0;
sid.s.name=name; sid.s.name = name;
if (wimpt_complain (sprite_rename if (wimpt_complain (sprite_rename
(sprite->file->spritearea, &sid, newname)) != (sprite->file->spritearea, &sid, newname)) !=
NULL) return; NULL) return;
main_set_modified(sprite->file); main_set_modified (sprite->file);
sprwindow_set_window_titles (sprite); sprwindow_set_window_titles (sprite);
/* rename must reset the titles of all the windows open on /* rename must reset the titles of all the windows open on
...@@ -74,7 +75,7 @@ static void AltRename_renamesprite(main_sprite* sprite,char* newname) ...@@ -74,7 +75,7 @@ static void AltRename_renamesprite(main_sprite* sprite,char* newname)
wimp_wstate wstate; wimp_wstate wstate;
winfo.w = sprite->colourhandle; winfo.w = sprite->colourhandle;
wimpt_noerr (PaintLib_get_wind_info (&winfo)); wimpt_noerr (paintlib_get_wind_info (&winfo));
sprintf (winfo.info.title.indirecttext.buffer, sprintf (winfo.info.title.indirecttext.buffer,
msgs_lookup ("PntW7"), newname); msgs_lookup ("PntW7"), newname);
...@@ -92,21 +93,22 @@ static void AltRename_renamesprite(main_sprite* sprite,char* newname) ...@@ -92,21 +93,22 @@ static void AltRename_renamesprite(main_sprite* sprite,char* newname)
} }
} }
void AltRename_delete(void) void altrename_delete (void)
{
wimp_redrawstr ds; { wimp_redrawstr ds;
if (!rename_window) return; if (!rename_window) return;
wimp_delete_icon(rename_window->handle,rename_icon); wimp_delete_icon (rename_window->handle, rename_icon);
ds.w=rename_window->handle; ds.w = rename_window->handle;
ds.box=rename_bbox; ds.box = rename_bbox;
wimp_force_redraw(&ds); wimp_force_redraw (&ds);
rename_window=0; rename_window = NULL;
} }
static int AltRename_sprites_per_row(int* toggled) static int altrename_sprites_per_row (int *toggled)
{
wimp_wstate ws; { wimp_wstate ws;
int width; int width;
if (!rename_window) return 0; if (!rename_window) return 0;
...@@ -116,146 +118,140 @@ static int AltRename_sprites_per_row(int* toggled) ...@@ -116,146 +118,140 @@ static int AltRename_sprites_per_row(int* toggled)
else else
width = main_FILER_TotalWidth; width = main_FILER_TotalWidth;
wimp_get_wind_state(rename_window->handle,&ws); wimp_get_wind_state(rename_window->handle, &ws);
if (toggled) *toggled=(ws.flags & wimp_WCLICK_TOGGLE);
width=(ws.o.box.x1-ws.o.box.x0)/width; if (toggled) *toggled = (ws.flags & wimp_WCLICK_TOGGLE);
width = (ws.o.box.x1-ws.o.box.x0)/width;
return width?width:1; return width ? width : 1;
} }
void AltRename_start(main_window* window, main_sprite* sprite) void altrename_start (main_window *window, main_sprite *sprite)
{
wimp_box bbox; { wimp_box bbox;
psprite_info sinfo; psprite_info sinfo;
wimp_icreate icon; wimp_icreate icon;
wimp_wstate ws; wimp_wstate ws;
int y,scy; int y, scy;
wimp_redrawstr ds;
wimp_caretstr caret;
if (!window || ! sprite) return; if (!window || !sprite) return;
if (window==rename_window && sprite==rename_sprite) return; if (window==rename_window && sprite==rename_sprite) return;
AltRename_delete(); altrename_delete();
if (!main_get_all_sprite_bboxes (window,sprite,&bbox,0,&icon.i.box)) if (!main_get_all_sprite_bboxes (window, sprite, &bbox, 0, &icon.i.box))
return; return;
if (window->data->file.fullinfo) if (window->data->file.fullinfo)
icon.i.box.x1=icon.i.box.x0+12*main_FILER_TextWidth; icon.i.box.x1 = icon.i.box.x0+12*main_FILER_TextWidth;
else else
{ { icon.i.box.x0 = bbox.x0;
icon.i.box.x0=bbox.x0; icon.i.box.x1 = bbox.x1;
icon.i.box.x1=bbox.x1;
} }
icon.w=window->handle; icon.w = window->handle;
icon.i.flags=(wimp_iconflags)(wimp_ITEXT | wimp_INDIRECT | wimp_IHCENTRE | icon.i.flags = (wimp_iconflags)(wimp_ITEXT | wimp_INDIRECT | wimp_IHCENTRE |
wimp_IFILLED | wimp_IBORDER | wimp_IFILLED | wimp_IBORDER |
(7*wimp_IFORECOL) | (0*wimp_IBACKCOL) | (7 * wimp_IFORECOL) | (0 * wimp_IBACKCOL) |
(wimp_BWRITABLE*wimp_IBTYPE)); (wimp_BWRITABLE * wimp_IBTYPE));
icon.i.data.indirecttext.buffer=rename_buffer; icon.i.data.indirecttext.buffer = rename_buffer;
icon.i.data.indirecttext.validstring=""; icon.i.data.indirecttext.validstring = "";
icon.i.data.indirecttext.bufflen=NAME_LIMIT+1; icon.i.data.indirecttext.bufflen = NAME_LIMIT+1;
psprite_read_full_info (sprite, &sinfo); psprite_read_full_info (sprite, &sinfo);
strcpy(rename_buffer,sinfo.name); strcpy (rename_buffer, sinfo.name);
if (wimpt_complain(wimp_create_icon(&icon,&rename_icon))) return; if (wimpt_complain (wimp_create_icon (&icon, &rename_icon))) return;
wimp_redrawstr ds; rename_window = window;
wimp_caretstr caret; rename_sprite = sprite;
rename_window=window; ds.w = icon.w;
rename_sprite=sprite; ds.box = icon.i.box;
ds.w=icon.w; rename_bbox = ds.box;
ds.box=icon.i.box; rename_sprites_per_row = altrename_sprites_per_row (0);
rename_bbox=ds.box; caret.w = window->handle;
rename_sprites_per_row=AltRename_sprites_per_row(0); caret.i = rename_icon;
caret.w=window->handle; caret.x = caret.y = 0;
caret.i=rename_icon; caret.height = -1;
caret.x=caret.y=0; caret.index = strlen (sinfo.name);
caret.height=-1; wimp_set_caret_pos (&caret);
caret.index=strlen(sinfo.name); wimp_force_redraw (&ds);
wimp_set_caret_pos(&caret); wimp_get_wind_state (window->handle,&ws);
wimp_force_redraw(&ds);
wimp_get_wind_state(window->handle,&ws); scy = ws.o.y;
y = WORKAREA_TO_SCREEN_Y(&ws, bbox.y1);
scy=ws.o.y;
y=WORKAREA_TO_SCREEN_Y(&ws,bbox.y1);
if (y>ws.o.box.y1) if (y>ws.o.box.y1)
ws.o.y+=(y-ws.o.box.y1); ws.o.y += (y-ws.o.box.y1);
y=WORKAREA_TO_SCREEN_Y(&ws,bbox.y0); y = WORKAREA_TO_SCREEN_Y(&ws, bbox.y0);
if (y<ws.o.box.y0) if (y<ws.o.box.y0)
ws.o.y+=(y-ws.o.box.y0); ws.o.y += (y-ws.o.box.y0);
if (scy != ws.o.y) wimp_open_wind(&ws.o);
if (scy != ws.o.y) wimp_open_wind (&ws.o);
} }
BOOL AltRename_claim_event(wimp_eventstr *e,main_window* window) BOOL altrename_claim_event (wimp_eventstr *e, main_window *window)
{
if (!rename_window) return 0; { if (!rename_window) return FALSE;
switch (e->e) switch (e->e)
{ {
case wimp_EBUT: case wimp_EBUT:
if (window->handle!=rename_window->handle || if (window->handle!=rename_window->handle ||
(e->data.but.m.bbits & 2)) (e->data.but.m.bbits & 2))
{ { altrename_delete ();
AltRename_delete(); break;
break;
} }
if ( e->data.but.m.i==rename_icon && if ( e->data.but.m.i==rename_icon &&
window->handle==rename_window->handle) return 1; window->handle==rename_window->handle) return TRUE;
if (e->data.but.m.bbits & (wimp_BCLICKLEFT | wimp_BCLICKRIGHT)) if (e->data.but.m.bbits & (wimp_BCLICKLEFT | wimp_BCLICKRIGHT))
{ { altrename_delete ();
AltRename_delete();
break; break;
} }
return 1; return TRUE;
case wimp_EOPEN: case wimp_EOPEN:
{ { int wid;
int wid;
if (window->handle==rename_window->handle) if (window->handle==rename_window->handle)
{ { int toggled;
int toggled; wid = altrename_sprites_per_row (&toggled);
wid = AltRename_sprites_per_row(&toggled); if (wid != rename_sprites_per_row || toggled)
if (wid != rename_sprites_per_row || toggled) altrename_delete();
AltRename_delete();
} }
break; break;
} }
case wimp_EKEY: case wimp_EKEY:
if (window->handle!=rename_window->handle) break; if (window->handle!=rename_window->handle) break;
switch (e->data.key.chcode) switch (e->data.key.chcode)
{ {
case 13: case 13:
AltRename_renamesprite(rename_sprite,rename_buffer); altrename_renamesprite (rename_sprite, rename_buffer);
if (!akbd_pollctl()) if (!akbd_pollctl ())
{ { altrename_delete ();
AltRename_delete(); break;
break; }
} /*fall through*/
// fall through
case 0x18A: /* TAB - next sprite */ case 0x18A: /* TAB - next sprite */
{ { main_sprite *sprite=rename_sprite->link;
main_sprite* sprite=rename_sprite->link;
if (sprite==0) sprite=rename_window->data->file.sprites; if (sprite==0) sprite=rename_window->data->file.sprites;
AltRename_start(rename_window,sprite); altrename_start (rename_window, sprite);
} }
break; break;
case 0x19A: /* Shift TAB - previous sprite */ case 0x19A: /* Shift TAB - previous sprite */
{ { main_sprite *sprite=rename_sprite;
main_sprite* sprite=rename_sprite; for (sprite = rename_window->data->file.sprites;
for (sprite=rename_window->data->file.sprites; !(sprite->link == NULL || sprite->link == rename_sprite);
!(sprite->link==0 || sprite->link==rename_sprite); sprite = sprite->link);
sprite=sprite->link); altrename_start (rename_window, sprite);
AltRename_start(rename_window,sprite);
} }
break; break;
} }
} }
return 0; return FALSE;
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* JAB, 23 Nov 90 - Doesn't reset options when closing colour window * JAB, 23 Nov 90 - Doesn't reset options when closing colour window
*/ */
#include "swis.h" #include <swis.h>
#include "bbc.h" #include "bbc.h"
#include "wimpt.h" #include "wimpt.h"
...@@ -40,17 +40,6 @@ ...@@ -40,17 +40,6 @@
#include "Colours.h" #include "Colours.h"
#include "PaintLib.h" #include "PaintLib.h"
#undef OS_SetColour
#define OS_SetColour 0x61
#undef ColourPicker_OpenDialogue
#define ColourPicker_OpenDialogue 0x47702
#undef ColourPicker_CloseDialogue
#define ColourPicker_CloseDialogue 0x47703
#undef Wimp_TextOp
#define Wimp_TextOp 0x400F9
#undef ColourTrans_GenerateTable
#define ColourTrans_GenerateTable 0x40763
/********************************** /**********************************
* Number of colours in a sprite * * Number of colours in a sprite *
**********************************/ **********************************/
...@@ -91,23 +80,8 @@ void colours_set_gcol (int col, int action, int back) ...@@ -91,23 +80,8 @@ void colours_set_gcol (int col, int action, int back)
os_swi2 (OS_SetColour, action | back << 4, col); os_swi2 (OS_SetColour, action | back << 4, col);
ftracef2 ("SetColour 0x%X=%d\n", col, col); ftracef2 ("SetColour 0x%X=%d\n", col, col);
break; break;
} } }
}
#if 0
/*replaces the following. J R C 22nd Feb 1994*/
{ if (bbc_modevar (-1, bbc_Log2BPP) >= 3) /* 256 colour mode */
{ bbc_gcol (action, colours_gcol_ttab [col >> 2] | back << 7);
bbc_tint (2 + back, col & 3); /* library shifts it for me */
ftracef3 ("GCOL 0x%X=%d, TINT %d\n",
colours_gcol_ttab [col >> 2] | back << 7,
colours_gcol_ttab [col >> 2] | back << 7, col & 3);
}
else
{ bbc_gcol (action, (col & 127) | back << 7);
ftracef2 ("GCOL 0x%X=%d\n", (col & 127) | back << 7,
(col & 127) | back << 7);
} }
#endif
/*********************************************************** /***********************************************************
* Set the gcol, doing sprite ECF selection if appropriate * * Set the gcol, doing sprite ECF selection if appropriate *
...@@ -159,7 +133,7 @@ void colours_event_handler (wimp_eventstr *e, void *handle) ...@@ -159,7 +133,7 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
wimp_redrawstr rds; wimp_redrawstr rds;
unsigned char mono_ttab [256]; unsigned char mono_ttab [256];
static int mono_palette [] = {0x00000000, 0xFFFFFF00}; static const unsigned int mono_palette [] = {0x00000000, 0xFFFFFF00};
mask = psprite_hasmask (sprite); mask = psprite_hasmask (sprite);
lim = nc = colours_count (sprite); lim = nc = colours_count (sprite);
...@@ -259,7 +233,9 @@ void colours_event_handler (wimp_eventstr *e, void *handle) ...@@ -259,7 +233,9 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
os_swi2 (OS_SetColour, 0, t [i]); os_swi2 (OS_SetColour, 0, t [i]);
} }
break; break;
} } } }
}
}
if (!ECF) bbc_rectanglefill (x, y, coloursize - (1 << x_eig), if (!ECF) bbc_rectanglefill (x, y, coloursize - (1 << x_eig),
coloursize - (1 << y_eig)); coloursize - (1 << y_eig));
...@@ -303,7 +279,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle) ...@@ -303,7 +279,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
/*Copy nybbles.*/ /*Copy nybbles.*/
bg |= bg >> 4; bg |= bg >> 4;
} } }
}
if (mono_ttab [i /*was colour 31st Jan 1994*/]) if (mono_ttab [i /*was colour 31st Jan 1994*/])
fg = 0 /*black*/; fg = 0 /*black*/;
...@@ -325,9 +302,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle) ...@@ -325,9 +302,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
-1, -1, -1, -1,
xpos + coloursize/2 - xpos + coloursize/2 -
(i < nc? (i < 10? 1: i < 100? 2: 3): (i < nc? (i < 10? 1: i < 100? 2: 3):
!ECF? 2: 1)*(main_FILER_TextWidth - 4)/2, !ECF? 1: 2)*(main_FILER_TextWidth - 4)/2,
ypos - ypos - coloursize + (main_FILER_TextHeight/2));
(coloursize + main_FILER_TextHeight + (1 << y_eig))/2);
} }
else else
{ /*WIMP Does not support wimptextop_set_colour.*/ { /*WIMP Does not support wimptextop_set_colour.*/
...@@ -336,9 +312,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle) ...@@ -336,9 +312,8 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
bbc_move (xpos + coloursize/2 - bbc_move (xpos + coloursize/2 -
(i < nc? (i < 10? 1: i < 100? 2: 3): (i < nc? (i < 10? 1: i < 100? 2: 3):
!ECF? 2: 1)*(main_FILER_TextWidth - 4)/2, !ECF? 1: 2)*(main_FILER_TextWidth - 4)/2,
ypos - (coloursize - main_FILER_TextHeight + ypos - (main_FILER_TextHeight/2));
(1 << y_eig))/2);
/*the main_FILER_TextWidth's have 4 taken off to set value /*the main_FILER_TextWidth's have 4 taken off to set value
to the original size*/ to the original size*/
...@@ -348,7 +323,10 @@ void colours_event_handler (wimp_eventstr *e, void *handle) ...@@ -348,7 +323,10 @@ void colours_event_handler (wimp_eventstr *e, void *handle)
puts ("T"); puts ("T");
else else
printf ("E%d", ECF); printf ("E%d", ECF);
} } } } }
}
}
}
wimpt_noerr (wimp_get_rectangle (&rds, &more)); wimpt_noerr (wimp_get_rectangle (&rds, &more));
} }
...@@ -506,7 +484,7 @@ void colours_set_extent (main_sprite *sprite) ...@@ -506,7 +484,7 @@ void colours_set_extent (main_sprite *sprite)
wimp_redrawstr newext; wimp_redrawstr newext;
curr.w = sprite->colourhandle; curr.w = sprite->colourhandle;
wimpt_noerr (PaintLib_get_wind_info (&curr)); wimpt_noerr (paintlib_get_wind_info (&curr));
newext.w = sprite->colourhandle; newext.w = sprite->colourhandle;
calculate_colour_extent (sprite, &newext.box, calculate_colour_extent (sprite, &newext.box,
...@@ -554,13 +532,12 @@ void colours_create_window (main_sprite *sprite) ...@@ -554,13 +532,12 @@ void colours_create_window (main_sprite *sprite)
(psprite_hasmask (sprite)? (psprite_hasmask (sprite)?
colourpicker_DIALOGUE_OFFERS_TRANSPARENT: 0) | colourpicker_DIALOGUE_OFFERS_TRANSPARENT: 0) |
(sprite->gcol == nc? colourpicker_DIALOGUE_TRANSPARENT: 0) | (sprite->gcol == nc? colourpicker_DIALOGUE_TRANSPARENT: 0) |
colourpicker_DIALOGUE_TYPE_CLICK << (colourpicker_DIALOGUE_TYPE_CLICK << colourpicker_DIALOGUE_TYPE_SHIFT);
colourpicker_DIALOGUE_TYPE_SHIFT;
ftracef1 ("flags set to 0x%X\n", dialogue.flags); ftracef1 ("flags set to 0x%X\n", dialogue.flags);
dialogue.title = sprite->colourtitle; dialogue.title = sprite->colourtitle;
dialogue.visible.x0 = sprite_redraw_str.box.x1; dialogue.visible.x0 = sprite_redraw_str.box.x1;
dialogue.visible.y0 = 0; dialogue.visible.y0 = (int)0x80000000;
dialogue.visible.x1 = 0; dialogue.visible.x1 = 0x7FFFFFFF;
dialogue.visible.y1 = sprite_w_state.o.box.y1; dialogue.visible.y1 = sprite_w_state.o.box.y1;
dialogue.xscroll = 0; dialogue.xscroll = 0;
dialogue.yscroll = 0; dialogue.yscroll = 0;
...@@ -574,7 +551,8 @@ void colours_create_window (main_sprite *sprite) ...@@ -574,7 +551,8 @@ void colours_create_window (main_sprite *sprite)
{ m_FREE (sprite->colourtitle, 23); { m_FREE (sprite->colourtitle, 23);
sprite->colourtitle = 0; sprite->colourtitle = 0;
return; return;
} } }
}
else else
{ wimp_wind colours_wind; { wimp_wind colours_wind;
...@@ -608,7 +586,8 @@ void colours_create_window (main_sprite *sprite) ...@@ -608,7 +586,8 @@ void colours_create_window (main_sprite *sprite)
colours_open_str.x = 0; colours_open_str.x = 0;
colours_open_str.y = 0; colours_open_str.y = 0;
wimpt_noerr (wimp_open_wind (&colours_open_str)); wimpt_noerr (wimp_open_wind (&colours_open_str));
} } }
}
else else
{ /* if the window is already open, then bring it to the front */ { /* if the window is already open, then bring it to the front */
wimp_wstate colour_w_state; wimp_wstate colour_w_state;
...@@ -620,11 +599,10 @@ void colours_create_window (main_sprite *sprite) ...@@ -620,11 +599,10 @@ void colours_create_window (main_sprite *sprite)
} }
} }
extern int colours_entry (int nc, int colour) int colours_entry (int nc, int colour)
/*Returns the palette entry corresponding to the given colour number.*/
{ ftracef0 ("colours_entry\n"); { /*Returns the palette entry corresponding to the given colour number.*/
ftracef0 ("colours_entry\n");
switch (nc) switch (nc)
{ case 1 << 15: { case 1 << 15:
...@@ -645,4 +623,5 @@ extern int colours_entry (int nc, int colour) ...@@ -645,4 +623,5 @@ extern int colours_entry (int nc, int colour)
ftracef0 ("INVALID SPRITE MODE!!!\n"); ftracef0 ("INVALID SPRITE MODE!!!\n");
return 0; return 0;
break; break;
} } }
}
This diff is collapsed.
This diff is collapsed.