Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Normand Erwan
VVVVVV_level_merger
Commits
30d8be25
Commit
30d8be25
authored
Jun 01, 2015
by
Orbmancer
Browse files
isolated some bugs (importXML and or toString)
whereIsLocated is okay
parent
53ce6c2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
merge.php
View file @
30d8be25
...
...
@@ -6,7 +6,7 @@ ini_set('display_errors', 1);
require_once
'model/Data.class.php'
;
require_once
'model/Tabs.class.php'
;
$td
=
$_
POS
T
[
'td'
];
$td
=
$_
GE
T
[
'td'
];
$levels
=
Data
::
loadXML
(
$td
);
...
...
@@ -20,10 +20,12 @@ $final->fillBlank();
foreach
(
$levels
as
$level
){
$myContent
=
new
Tabs
();
$myContent
->
importXML
(
$level
[
'data'
]);
$final
->
setTab
(
$myContent
->
getTab
(),
$level
[
'x'
],
$level
[
'y'
]);
echo
'<br/>'
.
$myContent
->
toString
();
//$final->setTab($myContent->getTab(), $level['x'], $level['y']);
unset
(
$myContent
);
break
;
}
//echo '<br/>'.$final->toString();
// Create the XML file
/*
...
...
model/Tabs.class.php
View file @
30d8be25
...
...
@@ -29,16 +29,15 @@ class Tabs
$tabs
=
explode
(
','
,
$this
->
tabsRaw
);
$line
=
array
();
$prev_y
=
1
;
for
(
$i
=
0
;
$i
<
count
(
$tabs
)
-
1
;
++
$i
){
$tab_x
=
$this
->
getTabX
(
$i
);
$tab_y
=
$this
->
getTabY
(
$i
);
echo
'TAB INDEX: '
.
$i
.
' : '
.
$tab_x
.
'|'
.
$tab_y
.
'<br/>'
;
$line
[]
=
(
int
)
$tabs
[
$i
];
$line
[]
=
(
int
)
$tabs
[
$i
];
if
(
$prev_y
!=
$tab_y
){
if
(
count
(
$line
)
==
40
){
$this
->
tabs
[
$tab_x
][
$tab_y
][]
=
$line
;
$line
=
array
();
}
...
...
@@ -107,7 +106,9 @@ class Tabs
for
(
$i
=
1
;
$i
<=
5
;
++
$i
){
for
(
$j
=
1
;
$j
<=
5
;
++
$j
)
{
//echo 'TOSTRING, i='.$i.' j='.$j.' LINE COUNT='.count($this->tabs[$i][$j]).'<br/>';
foreach
(
$this
->
tabs
[
$i
][
$j
]
as
$l
=>
$line
)
{
//echo 'BLOCK COUNT = '.count($line).'<br/>';
foreach
(
$line
as
$b
=>
$block
){
$txt
.
=
$block
.
','
;
}
...
...
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