Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
2492518c
Commit
2492518c
authored
Jan 08, 2001
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id_ca.c: converted the last usage of open() to the new functions
fmopl.c: removed an unused function
parent
8decf6bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
27 deletions
+10
-27
fmopl.c
src/fmopl.c
+0
-17
id_ca.c
src/id_ca.c
+10
-10
No files found.
src/fmopl.c
View file @
2492518c
...
@@ -645,23 +645,6 @@ static void OPLCloseTable()
...
@@ -645,23 +645,6 @@ static void OPLCloseTable()
free
(
VIB_TABLE
);
free
(
VIB_TABLE
);
}
}
/* CSM Key Controll */
INLINE
void
CSMKeyControll
(
OPL_CH
*
CH
)
{
OPL_SLOT
*
slot1
=
&
CH
->
SLOT
[
SLOT1
];
OPL_SLOT
*
slot2
=
&
CH
->
SLOT
[
SLOT2
];
/* all key off */
OPL_KEYOFF
(
slot1
);
OPL_KEYOFF
(
slot2
);
/* total level latch */
slot1
->
TLL
=
slot1
->
TL
+
(
CH
->
ksl_base
>>
slot1
->
ksl
);
slot1
->
TLL
=
slot1
->
TL
+
(
CH
->
ksl_base
>>
slot1
->
ksl
);
/* key on */
CH
->
op1_out
[
0
]
=
CH
->
op1_out
[
1
]
=
0
;
OPL_KEYON
(
slot1
);
OPL_KEYON
(
slot2
);
}
/* ---------- opl initialize ---------- */
/* ---------- opl initialize ---------- */
static
void
OPL_initalize
(
FM_OPL
*
OPL
)
static
void
OPL_initalize
(
FM_OPL
*
OPL
)
{
{
...
...
src/id_ca.c
View file @
2492518c
...
@@ -74,13 +74,12 @@ boolean CA_WriteFile(char *filename, void *ptr, long length)
...
@@ -74,13 +74,12 @@ boolean CA_WriteFile(char *filename, void *ptr, long length)
ssize_t
l
;
ssize_t
l
;
int
handle
;
int
handle
;
handle
=
open
(
filename
,
O_CREAT
|
O_BINARY
|
O_WRONLY
,
handle
=
OpenWrite
(
filename
);
S_IREAD
|
S_IWRITE
|
S_IFREG
);
if
(
handle
==
-
1
)
if
(
handle
==
-
1
)
return
false
;
return
false
;
l
=
write
(
handle
,
ptr
,
length
);
l
=
WriteBytes
(
handle
,
(
byte
*
)
ptr
,
length
);
if
(
l
==
-
1
)
{
if
(
l
==
-
1
)
{
perror
(
"CA_FarWrite"
);
perror
(
"CA_FarWrite"
);
return
false
;
return
false
;
...
@@ -92,7 +91,8 @@ boolean CA_WriteFile(char *filename, void *ptr, long length)
...
@@ -92,7 +91,8 @@ boolean CA_WriteFile(char *filename, void *ptr, long length)
return
false
;
return
false
;
}
}
close
(
handle
);
CloseWrite
(
handle
);
return
true
;
return
true
;
}
}
...
@@ -112,13 +112,13 @@ boolean CA_LoadFile(char *filename, memptr *ptr)
...
@@ -112,13 +112,13 @@ boolean CA_LoadFile(char *filename, memptr *ptr)
ssize_t
l
;
ssize_t
l
;
long
size
;
long
size
;
if
((
handle
=
open
(
filename
,
O_RDONLY
|
O_BINARY
))
==
-
1
)
if
((
handle
=
OpenRead
(
filename
))
==
-
1
)
return
false
;
return
false
;
size
=
filel
ength
(
handle
);
size
=
ReadL
ength
(
handle
);
MM_GetPtr
(
ptr
,
size
);
MM_GetPtr
(
ptr
,
size
);
l
=
read
(
handle
,
ptr
,
size
);
l
=
ReadBytes
(
handle
,
(
byte
*
)
ptr
,
size
);
if
(
l
==
-
1
)
{
if
(
l
==
-
1
)
{
perror
(
"CA_FarRead"
);
perror
(
"CA_FarRead"
);
...
@@ -131,7 +131,8 @@ boolean CA_LoadFile(char *filename, memptr *ptr)
...
@@ -131,7 +131,8 @@ boolean CA_LoadFile(char *filename, memptr *ptr)
return
false
;
return
false
;
}
}
close
(
handle
);
CloseRead
(
handle
);
return
true
;
return
true
;
}
}
...
@@ -274,7 +275,7 @@ void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag)
...
@@ -274,7 +275,7 @@ void CA_RLEWexpand(word *source, word *dest, long length, word rlewtag)
/* compressed string */
/* compressed string */
count
=
SwapInt16L
(
*
source
);
source
++
;
count
=
SwapInt16L
(
*
source
);
source
++
;
value
=
*
source
++
;
value
=
*
source
++
;
for
(
i
=
1
;
i
<=
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
*
dest
++
=
value
;
*
dest
++
=
value
;
}
}
}
while
(
dest
<
end
);
}
while
(
dest
<
end
);
...
@@ -371,7 +372,6 @@ static void CAL_SetupGrFile()
...
@@ -371,7 +372,6 @@ static void CAL_SetupGrFile()
/* ======================================================================== */
/* ======================================================================== */
/*
/*
======================
======================
=
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment