Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
openjazz
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
openjazz
Commits
5a60ec98
Commit
5a60ec98
authored
Oct 28, 2009
by
anotherguest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
File functions with don't seek flag (don't reset position after reading). To support scenes better
parent
82603dd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
file.cpp
src/io/file.cpp
+5
-3
file.h
src/io/file.h
+2
-2
No files found.
src/io/file.cpp
View file @
5a60ec98
...
...
@@ -187,7 +187,7 @@ unsigned char * File::loadBlock (int length) {
}
unsigned
char
*
File
::
loadRLE
(
int
length
)
{
unsigned
char
*
File
::
loadRLE
(
int
length
,
bool
dontseek
)
{
unsigned
char
*
buffer
;
int
rle
,
pos
,
byte
,
count
,
next
;
...
...
@@ -229,7 +229,9 @@ unsigned char * File::loadRLE (int length) {
}
if
(
!
dontseek
)
{
fseek
(
f
,
next
,
SEEK_SET
);
}
return
buffer
;
...
...
@@ -293,9 +295,9 @@ char * File::loadString () {
}
SDL_Surface
*
File
::
loadSurface
(
int
width
,
int
height
)
{
SDL_Surface
*
File
::
loadSurface
(
int
width
,
int
height
,
bool
dontseek
)
{
return
createSurface
(
loadRLE
(
width
*
height
),
width
,
height
);
return
createSurface
(
loadRLE
(
width
*
height
,
dontseek
),
width
,
height
);
}
...
...
src/io/file.h
View file @
5a60ec98
...
...
@@ -52,10 +52,10 @@ class File {
signed
long
int
loadInt
();
void
storeInt
(
signed
long
int
val
);
unsigned
char
*
loadBlock
(
int
length
);
unsigned
char
*
loadRLE
(
int
length
);
unsigned
char
*
loadRLE
(
int
length
,
bool
dontseek
=
false
);
void
skipRLE
();
char
*
loadString
();
SDL_Surface
*
loadSurface
(
int
width
,
int
height
);
SDL_Surface
*
loadSurface
(
int
width
,
int
height
,
bool
dontseek
=
false
);
void
loadPalette
(
SDL_Color
*
palette
);
};
...
...
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