home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
LOBE.src.sit
/
LOBE.src
/
InitToPrefs.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-13
|
677b
|
22 lines
#include "common.h"
// The new lock state is held in a temp variable, in case new and old
// happen to be the same pointer. Otherwise, the old->Locked = -1 would
// trash the new value.
// old is assumed to be pointed to the vars currently in use.
void InitToPrefs(BusVars *new,BusVars *old) {
const long DangerStr = 0x50FF8001;
short newLock = new->Locked;
old->Locked = Locked_stop; // lock it so we can change things
old->Behavior = new->Behavior; // copy new values
old->Do4 = new->Do4;
*(long *)(0) = DangerStr; // init the magic values
if ( new->Do4 == Do4_yep )
*(long *)(4) = DangerStr;
old->Locked = newLock; // free the vbl to run again
}