Skip to content

Commit

Permalink
[Maintenance] Rename "seg2" to "SHARED"
Browse files Browse the repository at this point in the history
There's the better name, in ALLCAPS for improved grepping. TH01 is also
going to need a pseudo-binary to bundle translation units that appear
in more than one .EXE, and since "segment 2" would be wrong for that
game, it makes more sense to have one consistent name for these
pseudo-binaries in all games.

(Maintenance mode commit)
  • Loading branch information
nmlgc committed Nov 3, 2020
1 parent f6a3246 commit 4850d6d
Show file tree
Hide file tree
Showing 26 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion th02/exit_dos.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma codeseg seg2
#pragma codeseg SHARED

#include "libs/master.lib/master.h"
#include "th02/initexit.h"
Expand Down
2 changes: 1 addition & 1 deletion th02/frmdely2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma codeseg seg2
#pragma codeseg SHARED

#include "libs/master.lib/master.h"
#include "th02/hardware/frmdelay.h"
Expand Down
2 changes: 1 addition & 1 deletion th02/grppsafx.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -3

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion th02/main02_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 1st part of code segment #2 of TH02's MAIN.EXE
*/

#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -3

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion th02/main02_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 2nd part of code segment #2 of TH02's MAIN.EXE
*/

#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -3

#include "libs/kaja/kaja.h"
Expand Down
2 changes: 1 addition & 1 deletion th02/maine021.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 1st part of code segment #2 of TH02's MAINE.EXE
*/

#pragma codeseg seg2
#pragma codeseg SHARED

extern "C" {
#include "th02/th02.h"
Expand Down
2 changes: 1 addition & 1 deletion th02/maine022.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 2nd part of code segment #2 of TH02's MAINE.EXE
*/

#pragma codeseg seg2
#pragma codeseg SHARED

#include "libs/kaja/kaja.h"
#include "th02/th02.h"
Expand Down
2 changes: 1 addition & 1 deletion th02/op_02_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 1st part of code segment #2 of TH02's OP.EXE
*/

#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -3

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion th02/op_02_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 2nd part of code segment #2 of TH02's OP.EXE
*/

#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -3

#include "libs/kaja/kaja.h"
Expand Down
2 changes: 1 addition & 1 deletion th02/zunerror.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma codeseg seg2
#pragma codeseg SHARED

#include "th02/core/zunerror.h"

Expand Down
4 changes: 2 additions & 2 deletions th02_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9290,7 +9290,7 @@ main_01_TEXT ends

; ===========================================================================

seg2 segment word public 'CODE' use16
SHARED segment word public 'CODE' use16
extern ZUN_ERROR:proc
extern _key_delay:proc
extern MPTN_LOAD:proc
Expand All @@ -9314,7 +9314,7 @@ seg2 segment word public 'CODE' use16
extern _snd_se_reset:proc
extern _snd_se_play:proc
extern _snd_se_update:proc
seg2 ends
SHARED ends

; ===========================================================================

Expand Down
4 changes: 2 additions & 2 deletions th02_maine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,7 @@ maine_01_TEXT ends

; ===========================================================================

seg2 segment word public 'CODE' use16
SHARED segment word public 'CODE' use16
extern _graph_putsa_fx:proc
extern _key_delay:proc
extern _vram_planes_set:proc
Expand All @@ -2987,7 +2987,7 @@ seg2 segment word public 'CODE' use16
extern _pi_put_8:proc
extern _snd_kaja_interrupt:proc
extern _snd_delay_until_measure:proc
seg2 ends
SHARED ends

; ===========================================================================

Expand Down
4 changes: 2 additions & 2 deletions th02_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ _TEXT ends
op_01_TEXT segment byte public 'CODE' use16
op_01_TEXT ends

seg2 segment word public 'CODE' use16
seg2 ends
SHARED segment word public 'CODE' use16
SHARED ends

.data

Expand Down
6 changes: 3 additions & 3 deletions th03/cdg_p_na.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ include th03/formats/cdg.inc

extrn _cdg_slots:cdg_t:CDG_SLOT_COUNT

SEG2 segment word public 'CODE' use16
assume cs:SEG2
SHARED segment word public 'CODE' use16
assume cs:SHARED

public CDG_PUT_NOALPHA_8
cdg_put_noalpha_8 proc far
Expand Down Expand Up @@ -66,6 +66,6 @@ cdg_put_noalpha_8 proc far
retf 6
cdg_put_noalpha_8 endp
even
SEG2 ends
SHARED ends

end
2 changes: 1 addition & 1 deletion th03/hfliplut.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -k-

#include "platform.h"
Expand Down
2 changes: 1 addition & 1 deletion th03/inp_m_w.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma codeseg seg2
#pragma codeseg SHARED

extern "C" {
#include "ReC98.h"
Expand Down
2 changes: 1 addition & 1 deletion th03/sprite16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPRITE16 display calls
*/

#pragma codeseg seg2
#pragma codeseg SHARED
#pragma option -k-

extern "C" {
Expand Down
6 changes: 3 additions & 3 deletions th03_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8882,8 +8882,8 @@ main_01_TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:seg2
SHARED segment word public 'CODE' use16
assume cs:SHARED
;org 8
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

Expand Down Expand Up @@ -9213,7 +9213,7 @@ sub_F0A6 endp
left:word, screen_top:word, sprite_offset:word, func:word
SPRITE16_PUT_NOCLIP procdesc pascal far \
left:word, screen_top:word, sprite_offset:word
seg2 ends
SHARED ends

; ===========================================================================

Expand Down
6 changes: 3 additions & 3 deletions th03_mainl.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5513,8 +5513,8 @@ mainl_01_TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:seg2
SHARED segment word public 'CODE' use16
assume cs:SHARED
;org 2
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

Expand Down Expand Up @@ -5569,7 +5569,7 @@ include th03/formats/pi_put_quarter.asm
extern INPUT_WAIT_FOR_CHANGE:proc
extern CDG_PUT_NOALPHA_8:proc
extern _hflip_lut_generate:proc
seg2 ends
SHARED ends

.data

Expand Down
6 changes: 3 additions & 3 deletions th03_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3606,8 +3606,8 @@ op_01_TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:seg2
SHARED segment word public 'CODE' use16
assume cs:SHARED
;org 8
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

Expand Down Expand Up @@ -3638,7 +3638,7 @@ include th02/formats/pi_load.asm
extern CDG_PUT_NOALPHA_8:proc
extern _hflip_lut_generate:proc
extern FRAME_DELAY_2:proc
seg2 ends
SHARED ends

.data

Expand Down
12 changes: 6 additions & 6 deletions th04_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ include th04/main/enemy/enemy.inc

.seq
main_01 group main_0_TEXT, main_01_TEXT, main_012_TEXT
g_seg2 group seg2, seg2_
g_SHARED group SHARED, SHARED_
main_03 group main_032_TEXT, main_033_TEXT

; ===========================================================================
Expand Down Expand Up @@ -12977,8 +12977,8 @@ main_012_TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:g_seg2
SHARED segment word public 'CODE' use16
assume cs:g_SHARED
;org 0Dh
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

Expand All @@ -12987,9 +12987,9 @@ include th03/math/vector2.asm
nop
include th03/math/vector2_between_plus.asm
include th02/hardware/frame_delay.asm
seg2 ends
SHARED ends

seg2_ segment word public 'CODE' use16
SHARED_ segment word public 'CODE' use16

; =============== S U B R O U T I N E =======================================

Expand Down Expand Up @@ -13136,7 +13136,7 @@ include th04/formats/cdg_put_plane_roll.asm
include th04/hardware/input_sense.asm
include th04/snd/se.asm
include th04/formats/cdg_load.asm
seg2_ ends
SHARED_ ends

; ===========================================================================

Expand Down
12 changes: 6 additions & 6 deletions th04_maine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include th04/hardware/grppsafx.inc
extern __ctype:byte

maine_01 group maine_01_TEXT, maine_01__TEXT
g_seg2 group seg2, seg2_
g_SHARED group SHARED, SHARED_

; ===========================================================================

Expand Down Expand Up @@ -4583,8 +4583,8 @@ maine_01__TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:g_seg2
SHARED segment word public 'CODE' use16
assume cs:g_SHARED
;org 0Ah
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

Expand All @@ -4594,9 +4594,9 @@ include th02/formats/pi_palette_apply.asm
include th02/formats/pi_put.asm
include th02/formats/pi_load.asm
include th03/formats/pi_put_quarter.asm
seg2 ends
SHARED ends

seg2_ segment word public 'CODE' use16
SHARED_ segment word public 'CODE' use16
include th04/hardware/input_wait.asm
include th04/math/vector1_at.asm
include th04/math/vector2_at.asm
Expand All @@ -4618,7 +4618,7 @@ include th04/snd/se.asm
include th04/bgimage.asm
include th04/bgimage_put_rect.asm
include th04/formats/cdg_load.asm
seg2_ ends
SHARED_ ends

.data

Expand Down
8 changes: 4 additions & 4 deletions th04_op.asm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
; Application type: Executable 16bit

.286 ; Force the .model directive to create 16-bit default segments...
.model large seg2
.model large SHARED
.386 ; ... then switch to what we actually need.
; And yes, we can't move this to an include file for some reason.

Expand Down Expand Up @@ -2633,8 +2633,8 @@ op_01_TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:seg2
SHARED segment word public 'CODE' use16
assume cs:SHARED
;org 2
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

Expand Down Expand Up @@ -2670,7 +2670,7 @@ include th04/bgimage.asm
include th04/bgimage_put_rect.asm
include th04/formats/cdg_load.asm
extern FRAME_DELAY_2:proc
seg2 ends
SHARED ends

.data

Expand Down
12 changes: 6 additions & 6 deletions th05_main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include th05/main/enemy/enemy.inc

.seq
main_01 group main_TEXT, main__TEXT, main_0_TEXT, main_01_TEXT
g_seg2 group seg2, seg2_
g_SHARED group SHARED, SHARED_
main_03 group main_031_TEXT, main_032_TEXT, main_033_TEXT, main_034_TEXT, main_035_TEXT

; ===========================================================================
Expand Down Expand Up @@ -10541,17 +10541,17 @@ main_01_TEXT ends
; ===========================================================================

; Segment type: Pure code
seg2 segment word public 'CODE' use16
assume cs:g_seg2
SHARED segment word public 'CODE' use16
assume cs:g_SHARED
;org 3
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

include th03/math/vector2.asm
nop
include th03/math/vector2_between_plus.asm
seg2 ends
SHARED ends

seg2_ segment word public 'CODE' use16
SHARED_ segment word public 'CODE' use16
include th04/snd/pmd_res.asm
include th02/snd/mmd_res.asm
include th04/snd/detmodes.asm
Expand All @@ -10570,7 +10570,7 @@ include th05/hardware/input_wait.asm
include th05/hardware/frame_delay.asm
db 0
include th04/formats/cdg_load.asm
seg2_ ends
SHARED_ ends

; ===========================================================================

Expand Down
Loading

0 comments on commit 4850d6d

Please sign in to comment.