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
0b47d4f3
Commit
0b47d4f3
authored
Nov 02, 2009
by
anotherguest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to show more of intro. Delay using timing values
parent
ea5a14fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
59 deletions
+64
-59
scene.cpp
src/scene.cpp
+64
-59
No files found.
src/scene.cpp
View file @
0b47d4f3
...
...
@@ -645,6 +645,7 @@ int Scene::play () {
unsigned
int
sceneIndex
=
0
;
ImageInfo
*
imageInfo
=
NULL
;
unsigned
int
pageTime
=
scriptPages
[
sceneIndex
].
pageTime
;
unsigned
int
lastTicks
=
globalTicks
;
if
(
scriptPages
[
sceneIndex
].
bgIndex
!=
-
1
)
{
imageInfo
=
FindImage
(
scriptPages
[
sceneIndex
].
bgIndex
);
...
...
@@ -653,7 +654,6 @@ int Scene::play () {
if
(
imageInfo
!=
NULL
)
usePalette
(
imageInfo
[
0
].
palette
);
while
(
true
)
{
if
(
loop
(
NORMAL_LOOP
)
==
E_QUIT
)
return
E_QUIT
;
if
(
controls
.
release
(
C_ESCAPE
))
{
...
...
@@ -662,18 +662,22 @@ int Scene::play () {
}
if
(
controls
.
release
(
C_ENTER
))
{
if
(
controls
.
release
(
C_ENTER
)
||
((
globalTicks
-
lastTicks
)
>=
pageTime
*
1000
&&
pageTime
!=
256
&&
pageTime
!=
0
)
)
{
sceneIndex
++
;
if
(
sceneIndex
==
scriptItems
)
{
return
E_NONE
;
}
lastTicks
=
globalTicks
;
// Get bg for this page
if
(
scriptPages
[
sceneIndex
].
bgIndex
!=
-
1
)
{
imageInfo
=
FindImage
(
scriptPages
[
sceneIndex
].
bgIndex
);
if
(
imageInfo
!=
NULL
)
{
usePalette
(
imageInfo
[
0
].
palette
);
}
else
{
restorePalette
(
screen
);
}
}
pageTime
=
scriptPages
[
sceneIndex
].
pageTime
;
...
...
@@ -684,6 +688,10 @@ int Scene::play () {
dst
.
y
=
(
screenH
-
200
)
>>
1
;
if
(
imageInfo
!=
NULL
)
{
SDL_BlitSurface
(
imageInfo
->
image
,
NULL
,
screen
,
&
dst
);
}
else
{
clearScreen
(
BLACK
);
}
int
x
=
0
;
int
y
=
0
;
for
(
int
text
=
0
;
text
<
scriptPages
[
sceneIndex
].
noScriptTexts
;
text
++
)
{
...
...
@@ -736,10 +744,7 @@ int Scene::play () {
}
y
+=
font
->
fontHeight
()
/
2
;
}
}
else
{
//clearScreen(BLACK);
}
SDL_Delay
(
T_FRAME
);
}
...
...
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