mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Create PMF Levels
This commit is contained in:
parent
89b38c25ce
commit
e7fcbe206f
2 changed files with 51 additions and 11 deletions
|
|
@ -53,7 +53,7 @@ class PMF{
|
|||
|
||||
public function load($file){
|
||||
$this->close();
|
||||
$this->file = realpath($file);
|
||||
$this->file = $file;
|
||||
if(($this->fp = @fopen($file, "c+b")) !== false){
|
||||
fseek($this->fp, 0, SEEK_END);
|
||||
if(ftell($this->fp) >= 5){ //Header + 2 Bytes
|
||||
|
|
@ -95,7 +95,8 @@ class PMF{
|
|||
}
|
||||
|
||||
public function create($file, $type, $version = PMF_CURRENT_VERSION){
|
||||
$this->file = realpath($file);
|
||||
$this->file = $file;
|
||||
@mkdir(dirname($this->file), 0755, true);
|
||||
if(!is_resource($this->fp)){
|
||||
if(($this->fp = @fopen($file, "c+b")) === false){
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue