Commit b9aff2a3 authored by Ben Avison's avatar Ben Avison

Fix to filename capitalisation clash for version 1.99.

Summary:
  Bugfix of version 1.98
Detail:
  * Show error message when dragging selection fails.
  * Sprite target area in spritefile window set to a minimum height
    of 64 units and minimum width of 64 units.
  * Moving brush now redrawn in the same place that it is updated.
  * Changed moving brush plotting from EOR to NOT to stop
    black in brushes not appearing.
  * Fixed situation where the moving text y position is different
    to plotted text y position at 1:1 scale.
  * Stopped text redrawing repeatedly at the same place. This makes
    single clicks when using EOR plotting always work as expected.
    (old bug)
  * fixed width of insert/delete display at 1:1 scale.
  * fixed ftrace calls left in from changes that cause the !Debug
    compilation to fail.
  * makefile: changed OBJSZ o.Paintlib and o.AltRename. Changed o. to  oz.
  * makefile: changed OBJSD o.Paintlib and o.AltRename. Changed o. to  od.
Admin:
 Tested on Iyonix RO5.10
 Programmer tested only.
Notes:
  Changed by Colin Granville

Version 1.99. Retagged as 'Paint-1_99'
parent f6b118d2
......@@ -1777,6 +1777,21 @@ static void main_select_icon(main_window* window,main_sprite* sprite,wimp_box* i
}
}
#define MIN_TARGET_SIZE 64
static void ensure_min_target_size(wimp_box* bbox,int fullinfo)
{
if (bbox->x1-bbox->x0 < MIN_TARGET_SIZE)
{
if (!fullinfo) bbox->x0=(bbox->x0+bbox->x1-MIN_TARGET_SIZE)/2;
bbox->x1=bbox->x0+MIN_TARGET_SIZE;
}
if (bbox->y1-bbox->y0 < MIN_TARGET_SIZE)
{
if (!fullinfo) bbox->y0=(bbox->y0+bbox->y1-MIN_TARGET_SIZE)/2;
bbox->y1=bbox->y0+MIN_TARGET_SIZE;
}
}
/* clip area in work area coords */
static void main_clear_selection(main_window *window,wimp_box* clip,select_icon_how how)
{
......@@ -1825,6 +1840,8 @@ static void main_clear_selection(main_window *window,wimp_box* clip,select_icon_
wimp_box namebbox;
main_icon_bboxes(window,sprite,&bbox,&spritebbox,&namebbox);
ensure_min_target_size(&spritebbox,window->data->file.fullinfo);
is_over_graphic=0;
if (main_CLIPS(&spritebbox,clip->x0,clip->y0,clip->x1,clip->y1) ||
main_CLIPS(&namebbox,clip->x0,clip->y0,clip->x1,clip->y1)) is_over_graphic=1;
......@@ -1903,6 +1920,7 @@ BOOL main_save_selection(char* filename,void* handle)
main_window* window = (main_window*)handle;
main_sprite* sprite;
FILE* file;
_kernel_oserror* err=0;
struct
{
int num_of_sprites;
......@@ -1918,7 +1936,11 @@ BOOL main_save_selection(char* filename,void* handle)
if (header.offset_to_free<=16) return 0;
file=fopen(filename,"wb");
if (!file) return 0;
if (!file)
{
wimpt_complain(_kernel_last_oserror());
return 0;
}
fwrite(&header,sizeof(header),1,file);
for (sprite=window->data->file.sprites;sprite != NULL; sprite = sprite->link)
......@@ -1929,8 +1951,16 @@ BOOL main_save_selection(char* filename,void* handle)
fwrite(spriteaddr,spriteaddr->next,1,file);
}
}
if (ferror(file)) err=_kernel_last_oserror();
fclose(file);
if (err)
{
wimpt_complain(err);
remove(filename);
return 0;
}
_swix(OS_File,_INR(0,2),18,filename,SPRITE_FILE); /* set file type*/
alarm_set(alarm_timenow()+1,main_save_finished,window);
......@@ -2015,6 +2045,8 @@ static main_sprite *main_pick_sprite_bbox (main_window *window,
wimp_box namebbox;
main_icon_bboxes(window,sprite,bbox,&spritebbox,&namebbox);
ensure_min_target_size(&spritebbox,window->data->file.fullinfo);
*is_over_graphic=0;
if (main_CLIPS(&spritebbox,mx,my,mx,my))
*is_over_graphic=1;
......
......@@ -1301,8 +1301,8 @@ os_error *psprite_plot_scaled_m (int x, int y, main_sprite *sprite,
ftracef1 ("R0 0x%X\n", op);
ftracef1 ("R1 0x%X\n", sprite->file->spritearea);
ftracef1 ("R2 0x%X\n", psprite_address (sprite));
ftracef1 ("R3 0x%X\n", x - infoblock.width);
ftracef1 ("R4 0x%X\n", y - infoblock.height);
ftracef1 ("R3 0x%X\n", x);
ftracef1 ("R4 0x%X\n", y);
ftracef1 ("R5 0x%X\n", flags);
ftracef1 ("R6 0x%X\n", &scaling);
ftracef1 ("R7 0x%X\n", table);
......
This diff is collapsed.
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