Fix weird mixing of layers from main and spare pages (Issue 259)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1232 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
247b228141
commit
7645d0844a
@ -1220,10 +1220,11 @@ void Button_Page(void)
|
||||
SWAP_WORDS (Main_fileselector_position,Spare_fileselector_position)
|
||||
SWAP_WORDS (Main_fileselector_offset,Spare_fileselector_offset)
|
||||
|
||||
SWAP_SHORTS(Main_current_layer,Spare_current_layer)
|
||||
SWAP_DWORDS (Main_layers_visible,Spare_layers_visible)
|
||||
SWAP_BYTES (Main_current_layer,Spare_current_layer)
|
||||
SWAP_DWORDS(Main_layers_visible,Spare_layers_visible)
|
||||
|
||||
Update_screen_targets();
|
||||
Redraw_layered_image();
|
||||
|
||||
// A la fin, on affiche l'écran
|
||||
for (factor_index=0; ZOOM_FACTOR[factor_index]!=Main_magnifier_factor; factor_index++);
|
||||
|
||||
4
global.h
4
global.h
@ -338,7 +338,7 @@ GFX2_GLOBAL short Main_magnifier_offset_X;
|
||||
/// Y position (in image space) of the pixel to display in the top left corner of the magnified view.
|
||||
GFX2_GLOBAL short Main_magnifier_offset_Y;
|
||||
/// Index of layer currently being edited
|
||||
GFX2_GLOBAL int Main_current_layer;
|
||||
GFX2_GLOBAL byte Main_current_layer;
|
||||
/// Bitfield that records which layers are visible. 2^0 for 0, 2^1 for 1, 2^2 for 2, etc.
|
||||
GFX2_GLOBAL dword Main_layers_visible;
|
||||
|
||||
@ -402,7 +402,7 @@ GFX2_GLOBAL short Spare_magnifier_offset_X;
|
||||
/// Y position (in image space) of the pixel to display in the top left corner of the magnified view.
|
||||
GFX2_GLOBAL short Spare_magnifier_offset_Y;
|
||||
/// Index of layer currently being edited
|
||||
GFX2_GLOBAL short Spare_current_layer;
|
||||
GFX2_GLOBAL byte Spare_current_layer;
|
||||
/// Bitfield that records which layers are visible. 2^0 for 0, 2^1 for 1, 2^2 for 2, etc.
|
||||
GFX2_GLOBAL dword Spare_layers_visible;
|
||||
// -- Image backups
|
||||
|
||||
2
layers.c
2
layers.c
@ -26,7 +26,7 @@
|
||||
#include "engine.h"
|
||||
#include "pages.h"
|
||||
|
||||
void Layer_activate(short layer, short side)
|
||||
void Layer_activate(byte layer, short side)
|
||||
{
|
||||
word old_layers;
|
||||
|
||||
|
||||
2
layers.h
2
layers.h
@ -30,6 +30,6 @@ void Button_Layer_up(void);
|
||||
void Button_Layer_down(void);
|
||||
void Button_Layer_select(void);
|
||||
void Button_Layer_toggle(void);
|
||||
void Layer_activate(short layer, short side);
|
||||
void Layer_activate(byte layer, short side);
|
||||
|
||||
|
||||
|
||||
3
pages.c
3
pages.c
@ -176,7 +176,7 @@ void Redraw_layered_image(void)
|
||||
{
|
||||
#ifndef NOLAYERS
|
||||
// Re-construct the image with the visible layers
|
||||
int layer;
|
||||
byte layer;
|
||||
// First layer
|
||||
for (layer=0; layer<Main_backups->Pages->Nb_layers; layer++)
|
||||
{
|
||||
@ -950,7 +950,6 @@ void Exchange_main_and_spare(void)
|
||||
Download_infos_page_main(Main_backups->Pages);
|
||||
Download_infos_backup(Main_backups);
|
||||
Download_infos_page_spare(Spare_backups->Pages);
|
||||
Redraw_layered_image();
|
||||
}
|
||||
|
||||
void End_of_modification(void)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user